使用java npm包时出现致命错误

时间:2014-03-17 16:17:39

标签: java node.js ubuntu meteor npm

我在Meteor应用程序中使用'node-excel-api'npm包。它依赖于'java'npm包。我在启动Meteor服务器时收到以下错误。

A fatal error has been detected by the Java Runtime Environment:

Internal Error (threadLocalStorage.cpp:56), pid=3880, tid=3074959104
guarantee(get_thread() == thread) failed: must be the same thread, quickly

JRE version:  (7.0_45-b18) (build )
Java VM: Java HotSpot(TM) Server VM (24.45-b08 mixed mode, sharing linux-x86 )
Failed to write core dump. Core dumps have been disabled. To enable core dumping,
try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as:
/home/support/sTemp/excel-support/node-excel-api_Sample/.meteor/local/build/programs/server/hs_err_pid3880.log

If you would like to submit a bug report, please visit:
http://bugreport.sun.com/bugreport/crash.jsp
=> Exited from signal: SIGABRT

我怀疑问题在于我的机器中的环境设置,但我无法找出相同的原因。我使用的是Ubuntu 13.10和oracle java 7(/ usr / lib / jvm / java-7-oracle /)。我已经设置了JAVA_HOME env变量,并且在PATH变量中也有JAVA_HOME \ bin。

有谁可以帮我解决这个问题。提前致谢。

1 个答案:

答案 0 :(得分:0)

该错误表示您已正确设置java并且正确地公开了环境变量。

实际上,在cpp代码中检测到错误,cpp代码是JVM的包装器。 JVM的线程管理是一些非常复杂的工作,必须非常正确地完成。

另一方面,节点是单线程的。

Meteor使用光纤,这已经在节点的单线程架构之上放置了一层。

当然,java npm包似乎有光纤问题。

请参阅此问题:https://github.com/joeferner/node-java/issues/38并表达您的疑虑,以便开发人员优先处理此问题。