Skip to content

Instantly share code, notes, and snippets.

@jondot
Created March 8, 2012 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jondot/2001949 to your computer and use it in GitHub Desktop.
Save jondot/2001949 to your computer and use it in GitHub Desktop.
Caused by: org.jruby.exceptions.RaiseException: (LoadError) load error: yajl/yajl -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: /var/lib/tomcat6/file:/var/lib/tomcat6/webapps/pablo/WEB-INF/lib/jruby-stdlib-1.6.7.jar!/META-INF/jruby.home/META-INF/jruby.homei386-Linux/libjruby-cext.so: cannot open shared object file: No such file or directory
Caused by: java.lang.UnsatisfiedLinkError: failed to load shim library, error: /var/lib/tomcat6/file:/var/lib/tomcat6/webapps/pablo/WEB-INF/lib/jruby-stdlib-1.6.7.jar!/META-INF/jruby.home/META-INF/jruby.homei386-Linux/libjruby-cext.so: cannot open shared object file: No such file or directory
at org.jruby.cext.Native.load(Native.java:95)
at org.jruby.cext.Native.getInstance(Native.java:66)
at org.jruby.cext.ModuleLoader.load(ModuleLoader.java:51)
at org.jruby.runtime.load.CExtension.load(CExtension.java:94)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:745)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
at org.jruby.runtime.load.LoadService.require(LoadService.java:379)
at org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:304)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1050)
at org.jruby.RubyKernel.require19(RubyKernel.java:1042)
at org.jruby.RubyKernel$s$1$0$require19.call(RubyKernel$s$1$0$require19.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:119)
at org.jruby.Ruby.runInterpreter(Ruby.java:724)
at org.jruby.Ruby.loadFile(Ruby.java:2487)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:745)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
at org.jruby.runtime.load.LoadService.require(LoadService.java:379)
at org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:304)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1050)
at org.jruby.RubyKernel.require19(RubyKernel.java:1042)
at org.jruby.RubyKernel$s$1$0$require19.call(RubyKernel$s$1$0$require19.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:119)
at org.jruby.Ruby.runInterpreter(Ruby.java:724)
at org.jruby.Ruby.loadFile(Ruby.java:2487)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:745)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
at org.jruby.runtime.load.LoadService.require(LoadService.java:379)
at org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:304)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1050)
at org.jruby.RubyKernel.require19(RubyKernel.java:1042)
at org.jruby.RubyKernel$s$1$0$require19.call(RubyKernel$s$1$0$require19.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:119)
at org.jruby.Ruby.runInterpreter(Ruby.java:724)
at org.jruby.Ruby.loadFile(Ruby.java:2487)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:745)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
at org.jruby.runtime.load.LoadService.require(LoadService.java:379)
at org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:304)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1050)
at org.jruby.RubyKernel.require19(RubyKernel.java:1042)
at org.jruby.RubyKernel$s$1$0$require19.call(RubyKernel$s$1$0$require19.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:119)
at org.jruby.Ruby.runInterpreter(Ruby.java:724)
at org.jruby.Ruby.loadFile(Ruby.java:2487)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:745)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
at org.jruby.runtime.load.LoadService.require(LoadService.java:379)
at org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:304)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1050)
at org.jruby.RubyKernel.require19(RubyKernel.java:1042)
at org.jruby.RubyKernel$s$1$0$require19.call(RubyKernel$s$1$0$require19.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:119)
at org.jruby.Ruby.runInterpreter(Ruby.java:724)
at org.jruby.Ruby.loadFile(Ruby.java:2487)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:745)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
at org.jruby.runtime.load.LoadService.require(LoadService.java:379)
at org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:304)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1050)
at org.jruby.RubyKernel.require19(RubyKernel.java:1042)
at org.jruby.RubyKernel$s$1$0$require19.call(RubyKernel$s$1$0$require19.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:111)
at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:212)
at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:200)
at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:183)
at org.jruby.runtime.Block.yieldNonArray(Block.java:141)
at org.jruby.RubyBasicObject.yieldUnder(RubyBasicObject.java:1818)
at org.jruby.RubyBasicObject.specificEval(RubyBasicObject.java:1842)
at org.jruby.RubyBasicObject.instance_eval19(RubyBasicObject.java:1730)
at org.jruby.RubyBasicObject$i$instance_eval19.call(RubyBasicObject$i$instance_eval19.gen:65535)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:302)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:144)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.ast.FCallNoArgBlockPassNode.interpret(FCallNoArgBlockPassNode.java:27)
at org.jruby.ast.IfNode.interpret(IfNode.java:117)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:169)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:191)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:302)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:144)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.RubyClass.newInstance(RubyClass.java:822)
at org.jruby.RubyClass$i$newInstance.call(RubyClass$i$newInstance.gen:65535)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:302)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:144)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:153)
at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:119)
at org.jruby.Ruby.runInterpreter(Ruby.java:724)
at org.jruby.Ruby.runInterpreter(Ruby.java:732)
at org.jruby.Ruby.executeScript(Ruby.java:377)
at org.jruby.rack.DefaultRackApplicationFactory.createRackServletWrapper(DefaultRackApplicationFactory.java:133)
at org.jruby.rack.DefaultRackApplicationFactory.createApplicationObject(DefaultRackApplicationFactory.java:87)
at org.jruby.rack.DefaultRackApplicationFactory$1.create(DefaultRackApplicationFactory.java:49)
at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:203)
at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:56)
at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:27)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
@nicksieger
Copy link

So, it looks like we don't ship libjruby-cext.so in the jruby-jars gem. That might be grounds for filing a bug/improvement ticket.

To work around, you'll need to grab libjruby-cext.so out of the JRuby binary distribution, put it somewhere on the system (e.g., /opt/jruby/lib), and either modify the places where ld.so looks for libraries to add that path or set LD_LIBRARY_PATH (or equivalent) to use that path before launching Tomcat.

While you're at it, you should grap libjffi-1.0.so as well and put it in the same place.

@nicksieger
Copy link

Also, I updated https://github.com/jruby/jruby/wiki/Troubleshooting with this info.

@jondot
Copy link
Author

jondot commented Mar 11, 2012

Thanks Nick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment