首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >包装天鹅-空罐子中常见的结果

包装天鹅-空罐子中常见的结果
EN

Stack Overflow用户
提问于 2016-06-14 08:57:54
回答 1查看 86关注 0票数 1

我正在尝试安装cygnus-通用的遵循这个指南,但创建cygnus-公共jar (包括。依赖关系)总是导致空jar。Apache安装没有任何问题。我尝试按照指南增加Maven JVM的内存,但这并没有帮助。

代码语言:javascript
复制
~/fiware-cygnus/cygnus-common$ mvn clean compile exec:exec 
assembly:single
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cygnus-common 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cygnus-common ---
[INFO] Deleting /home/cygnus/fiware-cygnus/cygnus-common/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cygnus-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cygnus-common ---
[INFO] Compiling 50 source files to /home/cygnus/fiware-cygnus/cygnus-common/target/classes
[INFO] 
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) @ cygnus-common ---
[INFO] 
[INFO] --- maven-assembly-plugin:2.6:single (default-cli) @ cygnus-common ---
[INFO] Building jar: /home/cygnus/fiware-cygnus/cygnus-common/target/cygnus-common-1.1.0-jar-with-dependencies.jar
Killed

这是生成的文件

代码语言:javascript
复制
~/fiware-cygnus/cygnus-common$ ls -lrth target/
total 12K
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 generated-sources
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 classes
drwxrwxr-x 2 cygnus cygnus 4.0K Jun 13 14:57 archive-tmp
-rw-rw-r-- 1 cygnus cygnus    0 Jun 13 14:58 cygnus-common-1.1.0-jar-with-dependencies.jar

之前有一个类似的问题被问到,没有记录任何解决方案。对这个问题提出的唯一建议是缺乏磁盘空间、内存或权限。磁盘空间绝对不是问题,我增加了Maven JVM的内存,并且用户拥有正确的权限。

编辑:

因此,我按照@frb的建议在调试模式下运行mvn compile,这是内存问题。

代码语言:javascript
复制
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 257024000 bytes for committing reserved memory.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_linux.cpp:2827), pid=48868, tid=140567873734400

  [1]: http://fiware-cygnus.readthedocs.io/en/latest/cygnus-common/installation_and_administration_guide/install_from_sources/index.html#section3 "guide"

使用top,我可以看到当进程被终止时,内存使用率超过了70%。该系统具有~1.7Gb,远高于规定的要求,是一个64位系统。

我的系统内存增加到3Gb,构建成功了,所以硬件需求应该更新吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-15 11:13:54

将系统内存增加到3Gb,修复了这个问题,并成功地创建了jar。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37807381

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档