문제

While trying to deploy a JRuby/Rails Application to a Weblogic 10.3 (Solaris Zone) container it always encounters this exception:

org.jruby.rack.RackInitializationException: library `fcntl' could not be loaded: java.lang.NullPointerException
from /xyz/war/WEB-INF/gems/gems/activesupport-3.0.6/lib/active_support/dependencies.rb:239:in `require'
from /xyz/war/WEB-INF/gems/gems/activesupport-3.0.6/lib/active_support/dependencies.rb:225:in `load_dependency'
from /xyz/war/WEB-INF/gems/gems/activesupport-3.0.6/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /xyz/war/WEB-INF/gems/gems/activesupport-3.0.6/lib/active_support/dependencies.rb:225:in `load_dependency'
from /xyz/war/WEB-INF/gems/gems/activesupport-3.0.6/lib/active_support/dependencies.rb:239:in `require'
from /xyz/war/WEB-INF/gems/gems/jruby-openssl-0.7.3/lib/openssl/ssl.rb:19:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'
[..snip...]

It just don't get it why JRuby fails to load this core library. It seems somehow Solaris related, because installing WLS on MacOS X and deploying locally works without any issues.

Any hints, or pointers where I can look next - or how to solve this issue?

UPDATE: Probably a bug (got feedback in IRC/#jruby now tracked in JRuby JIRA, see: http://jira.codehaus.org/browse/JRUBY-5753

도움이 되었습니까?

해결책

I solved this issue by adding -d32 to JAVA_OPTS, to force the use of a 32-bit JVM.

다른 팁

I was experiencing this problem on Centos 5 and OSX with Tomcat 7 and Jruby 1.7.2. and a sqlite3 db. I resolved the issue through poking around and I'm not sure why what I did solved it but I discovered a few things: I got this error after restarting Tomcat due to a previous crash which left the DB locked. ActiveRecord::StatementInvalid (Java::JavaLang::Error: Internal Error in _syscall(): SELECT "urls".* FROM "urls" ):

The following steps seemed to resolve the issue, though it seems to me that the original error simply indicates that the DB got into a bad state. -I downgraded Jruby to 1.7.1 -I removed all gems pertaining to the db from the gemfile except activerecord-jdbcsqlite3-adapter'. This seemed to resolve this issue. (The gems I removed were 'sqlite-ruby','sqlite3','activerecord-jdbc-adapter', 'jruby-rack') I note that the first gem here was a normal C gem, which shouldn't have been deployed because it wasn in a conditional but seemed to be getting included in the war by warbler anyway. Anyway, I redeployed and it worked, even using the original DB.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top