-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Classloader issue when using WOBootstrap.jar #9
Comments
Do you have a sample project that I could use to reproduce the problem? |
Yes Henrique, here's a simple project that reproduces the problem : |
Thank you Alexis. I'll take a look during the weekend. |
Hi Henrique, has there been any progress with this issue, as I am unable to use WOInject because of this ? I'm really impressed with the current work on WOInject, and would like to use it in my applications, please let me know if it is still possible to use it without removing WOBootstrap.jar ? |
Hey guys, Sorry for taking so long to solve this problem. I tried a lot of things, including a completely new solution using Java agents. In the end, one line of code seems to solve the problem. Could you try this [1] version of WOInject in your projects? Does it work? [1] https://dl.dropboxusercontent.com/u/9599580/woinject-possible-wobootstrap-fix.jar |
Hi Henrique, your efforts are appreciated, however startup failed with the following exception. I tested with a new empty Wonder Application. Exception encountered while loading zoneinfo from archive during NSTimeZone class initialization: Unable to get input stream for the timezone archive, "com/webobjects/foundation/TimeZoneInfo/zoneinfo.zip". WARN 11:43:27 NSLog - A fatal exception occurred: null [2013-9-9 11:43:27 EST] java.lang.ExceptionInInitializerError at com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116) at com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317) at com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743) at com.webobjects.appserver.WOApplication.(WOApplication.java:779) at er.extensions.appserver.ajax.ERXAjaxApplication.(ERXAjaxApplication.java:24) at er.extensions.appserver.ERXApplication.(ERXApplication.java:1036) at com.woinject.InjectableApplication.(InjectableApplication.java:61) at your.app.Application.(Application.java:14) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at com.webobjects.appserver.WOApplication.main(WOApplication.java:547) at er.extensions.appserver.ERXApplication.main(ERXApplication.java:820) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.woinject.WOInject.init(WOInject.java:92) at your.app.Application.main(Application.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:87) Caused by: com.webobjects.foundation.NSForwardException [java.lang.ExceptionInInitializerError] null:java.lang.ExceptionInInitializerError at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:39) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:667) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562) at com.webobjects.foundation.NSBundle.postNotification(NSBundle.java:2546) at com.webobjects.foundation.NSBundle.LoadBundlesFromClassPath(NSBundle.java:748) at com.webobjects.foundation.NSBundle.(NSBundle.java:373) ... 27 more Caused by: java.lang.ExceptionInInitializerError at com.webobjects.eocontrol.EOClassDescription.(EOClassDescription.java:149) at er.extensions.ERXExtensions.bundleDidLoad(ERXExtensions.java:230) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) ... 41 more Caused by: java.lang.NullPointerException at com.webobjects.foundation.NSTimeZone.knownTimeZoneNames(NSTimeZone.java:875) at com.webobjects.foundation.NSTimestampFormatter._getDefaultZoneStrings(NSTimestampFormatter.java:334) at com.webobjects.foundation.NSTimestampFormatter.(NSTimestampFormatter.java:254) ... 48 more |
Thanks for your work Henrique, but I got the same error as mbits : Looks like a classloader problem : ZipInputStream zis = null; |
Hi Alexis, You're right. It's a class loader problem. Unfortunately, the problem can't be fixed unless we create a custom version of the WOBootstrap.jar. If no one has an alternative to this problem, I'd like to document this as a WOInject restriction and ask users to build their projects without the WOBootstrap.jar. Sorry about that. |
When building a woa with wobootstrap.jar embedded, we get the following exception :
Caused by: javassist.NotFoundException: com.webobjects.foundation._NSUtilities
at javassist.ClassPool.get(ClassPool.java:450)
at com.woinject.WOInject.init(WOInject.java:66)
... 6 more
The current workaround is to build without wobootstrap.jar, but the launching generates a huge command line with the whole classpath appended
The text was updated successfully, but these errors were encountered: