Classpath problems on deployment

Dear JRubyists,

i’ve got a complex JRuby app that works fine on my local machine.
However, when i war it up and deploy it, it mostly runs – except
exercising certain code paths are causing a class not found error.

The class is in a jar in the war file. Moreover, the jar is found by a
require statement in one of my controllers. However, when the class in
needed in some Java code that JRuby calls, the class not found error is
thrown.

i believe this might be caused if the jar is not actually on the JVMs
classpath for the instance of JRuby running. How would i confirm or deny
that it’s only the JVM’s classpath, and if it’s not get it on?

Best wishes,

–greg

Dear JRubyists,

i can verify that the jar containing the class that is not found is
actually in WEB-INF/lib. According to the wiki on WAR files, WEB-INF/lib
should be on the class loader’s path. So, i’m mystified.

Best wishes,

–greg

Lucius M. wrote:

Dear JRubyists,

i’ve got a complex JRuby app that works fine on my local machine.
However, when i war it up and deploy it, it mostly runs – except
exercising certain code paths are causing a class not found error.

The class is in a jar in the war file. Moreover, the jar is found by a
require statement in one of my controllers. However, when the class in
needed in some Java code that JRuby calls, the class not found error is
thrown.

i believe this might be caused if the jar is not actually on the JVMs
classpath for the instance of JRuby running. How would i confirm or deny
that it’s only the JVM’s classpath, and if it’s not get it on?

Best wishes,

–greg

On Thu, Jun 24, 2010 at 3:54 PM, Lucius M. [email protected]
wrote:

i can verify that the jar containing the class that is not found is
actually in WEB-INF/lib. According to the wiki on WAR files, WEB-INF/lib
should be on the class loader’s path. So, i’m mystified.

CNFEs can also be caused by two copies of a class being loaded –
make sure there’s only the one instance.

Also, what server and JVM are you running this on?


Hassan S. ------------------------ [email protected]
twitter: @hassan


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

without understanding the whole lot in details I would remove the
“require of that jar” from the controller. you have it already in WAR
classloader and that should be sufficient to find any java class for
jruby.

regards Kristian

On Fri, Jun 25, 2010 at 4:24 AM, Lucius M. [email protected]
wrote:

Lucius M. wrote:


To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

         _=_
       q(-_-)p
        '_) (_`
        /__/  \
     _(<_   / )_
  (__\_\_|_/__)

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email