You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently leveraging Jruby for our applications, but haven't upgraded past Jruby 1.7.3 because of issues we keep running into. The issues are the same as this closed issue #1189. I finally tracked down our problem and looking for a bit of guidance if anything can be done short of asking another project to upgrade their dependencies.
We package a few of our applications as a war. Starting with Jruby 1.7.5 moving to the Joda Time library, whenever our application would be packaged as a WAR with this version or newer in testing, our application crashes with the same error in issue #1189. As part of our application, we wrap a third party Java library, and this library includes a dependency for Joda 1.6.2. When our application gets packaged as a war, this Joda 1.6.2 jar file is moved to the WEB-INF/lib directory inside the war which is part of the classpath. When our application is deployed, the application crashes as calls to any Date/Time functions in Jruby are being called against this old library and not the newer 2.3 version included with Jruby 1.7.10 and that Jruby expects to use.
Is it possible to have multiple versions of the same library inside a war/jar file, and be included correctly for the code that requires them?
The text was updated successfully, but these errors were encountered:
as far as joda-time is concerned they are backward compatible (as far I remember), i.e. if leave out the joda jar from the WEB-INF/lib then everything works.
if you have a maven based dependency manager either use org.jruby:jruby artifact (version 1.7.5 or newer) a long with your third party dependency or exclude the joda depenceny from this third dependency.
I just played around with jruby and different version of joda-time. jruby-1.7.5 or newer needs joda-time-2.3 so you need to make sure there is no older version of that jar in your classpath (or classloader). possible solutions I mentioned above.
We are currently leveraging Jruby for our applications, but haven't upgraded past Jruby 1.7.3 because of issues we keep running into. The issues are the same as this closed issue #1189. I finally tracked down our problem and looking for a bit of guidance if anything can be done short of asking another project to upgrade their dependencies.
We package a few of our applications as a war. Starting with Jruby 1.7.5 moving to the Joda Time library, whenever our application would be packaged as a WAR with this version or newer in testing, our application crashes with the same error in issue
#1189. As part of our application, we wrap a third party Java library, and this library includes a dependency for Joda 1.6.2. When our application gets packaged as a war, this Joda 1.6.2 jar file is moved to the WEB-INF/lib directory inside the war which is part of the classpath. When our application is deployed, the application crashes as calls to any Date/Time functions in Jruby are being called against this old library and not the newer 2.3 version included with Jruby 1.7.10 and that Jruby expects to use.
Is it possible to have multiple versions of the same library inside a war/jar file, and be included correctly for the code that requires them?
The text was updated successfully, but these errors were encountered: