Hi Hannes,
Indeed this is 100% correct. There is little limitation but its based on the fact that it follows original Sun J2EE standard about servlet container how jar entries are referenced= > URL should start with Jar: file: /
But as you can see there are specifics made by different vendors that has their own versions of class loaders and this produces not really not really standard variations.
WSjar for webspere, Jboss I think has something like vfjar, oracle app server has coude-source, and so on..
Basically you have two options.
1) replace this AWJarWalker with your fix to handle your container specific behavior
2) Override registerResourceDirectories method and there call your own implementation of this jar walker.
But I think the fastest in your case would be option #1.
On Oct 9, 2012, at 2:41 PM, Hannes wrote:
Hi,
Today I started evaluating AribaWeb 5.1 and ran into my first problem: It is a requirement that I have to work with a "dynamic web project" in eclipse with websphere 8. When I try to deploy a simple HelloWorld app (that works with the distributed ant/tomcat) and want to load it in the browser, I get the following exception:
java.lang.NullPointerException
at ariba.ui.aribaweb.core.AWConcreteRequestHandler._debugDoRecordAndPlayback(AWConcreteRequestHandler.java:194)
at ariba.ui.aribaweb.core.AWComponentActionRequestHandler.handleRequest(AWComponentActionRequestHandler.java:919)
at ariba.ui.aribaweb.core.AWConcreteServerApplication._dispatchRequest(AWConcreteServerApplication.java:516)
at ariba.ui.aribaweb.core.AWConcreteServerApplication.dispatchRequest(AWConcreteServerApplication.java:560)
at ariba.ui.aribaweb.core.AWConcreteApplication.dispatchRequest(AWConcreteApplication.java:885)
at ariba.ui.servletadaptor.AWDispatcherServlet.aribawebDispatcher(AWDispatcherServlet.java:190)
at ariba.ui.servletadaptor.AWDispatcherServlet.doGet(AWDispatcherServlet.java:259)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
...
I debugged for a while and found my problem: In AWJarWalker.create (line 87) the code "url = new URL(urlString);" causes an execption, because my url is "wsjar:file:/C:/...../HelloAribaWeb/WebContent/WEB-INF/lib/ariba.aribaweb.jar!/" and therefore urlString is "r:file:/C:/...../HelloAribaWeb/WebContent/WEB-INF/lib/ariba.aribaweb.jar", because always the first four characters are removed. The exception is caught somewhere but not printed on the console, but I have it from the debugger:
java.net.MalformedURLException: unknown protocol: r
at java.net.URL.<init>(URL.java:586)
at java.net.URL.<init>(URL.java:476)
at java.net.URL.<init>(URL.java:425)
at ariba.ui.aribaweb.util.AWJarWalker.create(AWJarWalker.java:87)
at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathResourceDirectory.java:433)
at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathResourceDirectory.java:405)
at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathResourceDirectory.java:405)
at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.autoRegisterJarResources(AWClasspathResourceDirectory.java:320)
at ariba.ui.aribaweb.core.AWConcreteServerApplication.registerResourceDirectories(AWConcreteServerApplication.java:353)
at ariba.ui.aribaweb.core.AWConcreteServerApplication.init(AWConcreteServerApplication.java:131)
at ariba.ui.aribaweb.core.AWConcreteApplication.init(AWConcreteApplication.java:293)
at ariba.ui.servletadaptor.AWServletApplication.init(AWServletApplication.java:91)
at ariba.ui.aribaweb.core.AWConcreteApplication.createApplication(AWConcreteApplication.java:161)
at ariba.ui.servletadaptor.AWDispatcherServlet.createApplication(AWDispatcherServlet.java:67)
at ariba.ui.servletadaptor.AWDispatcherServlet.init(AWDispatcherServlet.java:55)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:329)
...
Because of this exception the rest of the initialization is skipped, and the AWConcreteApplication.RequestContextClass never gets initialized, and that leads to my NullPointerException.
Can anyone help me with?
Kind regards,
Hannes
--
You received this message because you are subscribed to the Google Groups "AribaWeb (aribaweb.org)" group.
To view this discussion on the web visit https://groups.google.com/d/msg/aribaweb/-/iRSavs7TF9MJ.
To post to this group, send email to arib...@googlegroups.com.
To unsubscribe from this group, send email to aribaweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/aribaweb?hl=en.