Re: Unexplained WOSessionStore or NSProperties ClassNotFound Exceptions
Re: Unexplained WOSessionStore or NSProperties ClassNotFound Exceptions
- Subject: Re: Unexplained WOSessionStore or NSProperties ClassNotFound Exceptions
- From: Filippo Laurìa <email@hidden>
- Date: Tue, 02 Jul 2013 23:00:40 +0200
2013/7/2 Chuck Hill <email@hidden>:
> The JavaWebObjects.framework/Resources/Java/javawebobjects.jar is different than WAR type jar bundles.
> That might be a problem?
I don't think so.
I took the same WebObjects frameworks that deployed and fully working
application (on Tomcat, too) uses.
If you think this could be a problem, maybe it is.
Can you explain how to use WAR type jar bundles of frameworks used?
More deeply, how can I understand how dinamic class loader works?
Thank you for reading.
> Not a lot of people use Tomcat for deployment, I don't.
Considering I have Ubuntu Linux, what servlet container do you suggest?
>
>
> Chuck
>
>
> On 2013-07-01, at 7:48 AM, Filippo Laurìa wrote:
>
>> Hello everyone.
>> I'm back with a new question.
>>
>> I'm always trying (few days ago I'm on it "full-time") to build up a
>> Linux environment to modify WebObjects based Web-CAT [1] application.
>> If you remember my last posts I had some troubles. My system is based
>> on Ubuntu Linux 12, Eclipse 3.7, WOLips 37 and Tomcat 7.0.40.
>>
>> I tried using WO 5.4.3 + Wonder 5.0 installation but after many
>> trials, i left that way for this other one: since Web-CAT developers
>> release a war file and the application updates itself when starts
>> (from here [2]), I decided to use frameworks itself downloaded and
>> installed, so now I'm using same frameworks (same versions) in it
>> used. (You can read list of used frameworks here [3])
>>
>> Then, I also added few jars needed (always taken from initial, up to
>> date, war released, trying to avoid diffrent packages version) and
>> finally I've got _no java compilation errors_ (i was starting having
>> more than 2000 errors).
>>
>> But, I'm now having strange runtime problems. Specifically, some
>> WebObjects classes cannot be found. Here it is few lines of
>> catalina.out log:
>>
>> ...
>> invoking ERXApplication.setup()
>> Installed NSProjectSearchPath fix
>> java.lang.ClassNotFoundException: com.webobjects.appserver.WOSessionStore
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
>> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>> at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895)
>> at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>> at java.lang.Class.forName0(Native Method)
>> at java.lang.Class.forName(Class.java:188)
>> at com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:350)
>> at com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:334)
>> at com.webobjects.appserver.WOApplication._instanceOfNamedClassAssignableFrom(WOApplication.java:5831)
>> at com.webobjects.appserver.WOApplication.setSessionStoreClassName(WOApplication.java:5021)
>> at com.webobjects.appserver.WOApplication.<init>(WOApplication.java:857)
>> at er.extensions.appserver.ajax.ERXAjaxApplication.<init>(ERXAjaxApplication.java:22)
>> at er.extensions.appserver.ERXApplication.<init>(ERXApplication.java:816)
>> at org.webcat.core.Application.<init>(Application.java:124)
>> at net.sf.webcat.core.Application.<init>(Application.java:33)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
>> at java.lang.Class.newInstance0(Class.java:374)
>> at java.lang.Class.newInstance(Class.java:327)
>> at com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:616)
>> at com.webobjects.appserver.WOApplication.primeApplication(WOApplication.java:634)
>> 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:601)
>> at com.webobjects.jspservlet.WOServletAdaptor._applicationInit(WOServletAdaptor.java:421)
>> at com.webobjects.jspservlet.WOServletAdaptor.initStatics(WOServletAdaptor.java:95)
>> at com.webobjects.jspservlet.WOServletAdaptor.init(WOServletAdaptor.java:652)
>> at net.sf.webcat.WCServletAdaptor.init(WCServletAdaptor.java:109)
>> at javax.servlet.GenericServlet.init(GenericServlet.java:160)
>> at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
>> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
>> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
>> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
>> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>> at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>> at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:722)
>> ...
>>
>> as you can see WOSessionStore cannot be found, but JavaWebObjects
>> framework is fisically present on filesystem and correctly mapped by
>> WO automatic classloader
>> (...t.jar:/home/flippo/tomcat7040_2/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/JavaWebObjects.framework/Resources/Java/javawebobjects.jar...)
>>
>> Firstly i thought maybe some jar file is corrupted, so i replaced
>> WebObjects jars with their content (removing only META-INF directory).
>> I also properly modified Info.plist files (I don't know if this is
>> needed, but I did it anyway).
>>
>> Result is that now class that it can't see is NSProperties of the
>> JavaFoundation framework.
>>
>> ...
>> Found MainBundle at:
>> /home/flippo/tomcat7040_2/webapps/Web-CAT/WEB-INF/Web-CAT.woa
>> java.lang.ClassNotFoundException: com.webobjects.foundation.NSProperties
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>> at com.webobjects.jspservlet.WOServletAdaptor._applicationInit(WOServletAdaptor.java:329)
>> at com.webobjects.jspservlet.WOServletAdaptor.initStatics(WOServletAdaptor.java:95)
>> at com.webobjects.jspservlet.WOServletAdaptor.init(WOServletAdaptor.java:652)
>> at net.sf.webcat.WCServletAdaptor.init(WCServletAdaptor.java:109)
>> at javax.servlet.GenericServlet.init(GenericServlet.java:160)
>> at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
>> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
>> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
>> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
>> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>> at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>> at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:722)
>> ...
>>
>> I also tryied to bypass WO dynamic class loader setting
>> java.class.path property with right ":"separated paths, but it still
>> doesn't work.
>>
>> Is there anyone who can address me to the right way so I can solve
>> this problems?
>>
>> Thank you.
>>
>> PS. Here i pasted full tomcat's log http://pastebin.com/TF3UQTLB
>>
>> [1] http://sourceforge.net/projects/web-cat/
>> [2] http://web-cat.org/updates
>> [3] ----
>> Ajax.framework
>> EOJDBCPrototypes.framework
>> ERDirectToWeb.framework
>> ERExtensions.framework
>> ERJars.framework
>> ExternalJars.framework
>> JavaDirectToWeb.framework
>> JavaDTWGeneration.framework
>> JavaEOAccess.framework
>> JavaEOControl.framework
>> JavaEOProject.framework
>> JavaFoundation.framework
>> JavaJDBCAdaptor.framework
>> JavaWebObjects.framework
>> JavaWOExtensions.framework
>> JavaWOJSPServlet.framework
>> WOOgnl.framework
>> ----
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> Chuck Hill
> Executive Managing Partner, VP Development and Technical Services
>
> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/gvc/practical_webobjects
>
> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
>
> Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>
>
>
>
>
>
>
>
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden