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(A WConcreteRequestHandler.java:194) at ariba.ui.aribaweb.core.AWComponentActionRequestHandler.handleRequest(AWComp onentActionRequestHandler.java:919) at ariba.ui.aribaweb.core.AWConcreteServerApplication._dispatchRequest(AWConcr eteServerApplication.java:516) at ariba.ui.aribaweb.core.AWConcreteServerApplication.dispatchRequest(AWConcre teServerApplication.java:560) at ariba.ui.aribaweb.core.AWConcreteApplication.dispatchRequest(AWConcreteAppl ication.java:885) at ariba.ui.servletadaptor.AWDispatcherServlet.aribawebDispatcher(AWDispatcher Servlet.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.j ar!/" 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(AWClasspathReso urceDirectory.java:433) at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405) at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405) at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.autoRegisterJarResource s(AWClasspathResourceDirectory.java:320) at ariba.ui.aribaweb.core.AWConcreteServerApplication.registerResourceDirector ies(AWConcreteServerApplication.java:353) at ariba.ui.aribaweb.core.AWConcreteServerApplication.init(AWConcreteServerApp lication.java:131) at ariba.ui.aribaweb.core.AWConcreteApplication.init(AWConcreteApplication.jav a:293) at ariba.ui.servletadaptor.AWServletApplication.init(AWServletApplication.java :91) at ariba.ui.aribaweb.core.AWConcreteApplication.createApplication(AWConcreteAp plication.java:161) at ariba.ui.servletadaptor.AWDispatcherServlet.createApplication(AWDispatcherS ervlet.java:67) at ariba.ui.servletadaptor.AWDispatcherServlet.init(AWDispatcherServlet.java:5 5) 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.
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.
> 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(A WConcreteRequestHandler.java:194)
> at ariba.ui.aribaweb.core.AWComponentActionRequestHandler.handleRequest(AWComp onentActionRequestHandler.java:919)
> at ariba.ui.aribaweb.core.AWConcreteServerApplication._dispatchRequest(AWConcr eteServerApplication.java:516)
> at ariba.ui.aribaweb.core.AWConcreteServerApplication.dispatchRequest(AWConcre teServerApplication.java:560)
> at ariba.ui.aribaweb.core.AWConcreteApplication.dispatchRequest(AWConcreteAppl ication.java:885)
> at ariba.ui.servletadaptor.AWDispatcherServlet.aribawebDispatcher(AWDispatcher Servlet.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.j ar!/" 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(AWClasspathReso urceDirectory.java:433)
> at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405)
> at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405)
> at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.autoRegisterJarResource s(AWClasspathResourceDirectory.java:320)
> at ariba.ui.aribaweb.core.AWConcreteServerApplication.registerResourceDirector ies(AWConcreteServerApplication.java:353)
> at ariba.ui.aribaweb.core.AWConcreteServerApplication.init(AWConcreteServerApp lication.java:131)
> at ariba.ui.aribaweb.core.AWConcreteApplication.init(AWConcreteApplication.jav a:293)
> at ariba.ui.servletadaptor.AWServletApplication.init(AWServletApplication.java :91)
> at ariba.ui.aribaweb.core.AWConcreteApplication.createApplication(AWConcreteAp plication.java:161)
> at ariba.ui.servletadaptor.AWDispatcherServlet.createApplication(AWDispatcherS ervlet.java:67)
> at ariba.ui.servletadaptor.AWDispatcherServlet.init(AWDispatcherServlet.java:5 5)
> 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 aribaweb@googlegroups.com.
> To unsubscribe from this group, send email to aribaweb+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/aribaweb?hl=en.
Thank you! I don't really like these solutions, but it works (option #1). If you are an AribaWeb developer: Did you ever think of fixing this somehow, since it seems to make problems on widely used application servers?
Kind regards,
Hannes
Am Dienstag, 9. Oktober 2012 21:38:11 UTC+2 schrieb František Kolář:
> 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.
> *Regards*
> *
> *
> František Kolář > *
> *
> 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(A WConcreteRequestHandler.java:194)
> at > ariba.ui.aribaweb.core.AWComponentActionRequestHandler.handleRequest(AWComp onentActionRequestHandler.java:919)
> at > ariba.ui.aribaweb.core.AWConcreteServerApplication._dispatchRequest(AWConcr eteServerApplication.java:516)
> at > ariba.ui.aribaweb.core.AWConcreteServerApplication.dispatchRequest(AWConcre teServerApplication.java:560)
> at > ariba.ui.aribaweb.core.AWConcreteApplication.dispatchRequest(AWConcreteAppl ication.java:885)
> at > ariba.ui.servletadaptor.AWDispatcherServlet.aribawebDispatcher(AWDispatcher Servlet.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.j ar!/" > 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(AWClasspathReso urceDirectory.java:433)
> at > ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405)
> at > ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405)
> at > ariba.ui.aribaweb.util.AWClasspathResourceDirectory.autoRegisterJarResource s(AWClasspathResourceDirectory.java:320)
> at > ariba.ui.aribaweb.core.AWConcreteServerApplication.registerResourceDirector ies(AWConcreteServerApplication.java:353)
> at > ariba.ui.aribaweb.core.AWConcreteServerApplication.init(AWConcreteServerApp lication.java:131)
> at > ariba.ui.aribaweb.core.AWConcreteApplication.init(AWConcreteApplication.jav a:293)
> at > ariba.ui.servletadaptor.AWServletApplication.init(AWServletApplication.java :91)
> at > ariba.ui.aribaweb.core.AWConcreteApplication.createApplication(AWConcreteAp plication.java:161)
> at > ariba.ui.servletadaptor.AWDispatcherServlet.createApplication(AWDispatcherS ervlet.java:67)
> at > ariba.ui.servletadaptor.AWDispatcherServlet.init(AWDispatcherServlet.java:5 5)
> 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<javascript:>
> .
> To unsubscribe from this group, send email to > aribaweb+u...@googlegroups.com <javascript:>.
> For more options, visit this group at > http://groups.google.com/group/aribaweb?hl=en.
Not really a AW developer only I implement Ariba comercial products and now I am running some personal projects based on AW. this AWJ.W. is only used for this AribaWeb opensource project. But It looks like most of us is using this on tomcat platform and any other servletContainer or maximum weblogic that I think still follows the standards not like the other ones including IBM WS ;-)
> Thank you! I don't really like these solutions, but it works (option #1). If you are an AribaWeb developer: Did you ever think of fixing this somehow, since it seems to make problems on widely used application servers?
> Kind regards,
> Hannes
> Am Dienstag, 9. Oktober 2012 21:38:11 UTC+2 schrieb František Kolář:
> 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.
> Regards
> František Kolář
> 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(A WConcreteRequestHandler.java:194)
>> at ariba.ui.aribaweb.core.AWComponentActionRequestHandler.handleRequest(AWComp onentActionRequestHandler.java:919)
>> at ariba.ui.aribaweb.core.AWConcreteServerApplication._dispatchRequest(AWConcr eteServerApplication.java:516)
>> at ariba.ui.aribaweb.core.AWConcreteServerApplication.dispatchRequest(AWConcre teServerApplication.java:560)
>> at ariba.ui.aribaweb.core.AWConcreteApplication.dispatchRequest(AWConcreteAppl ication.java:885)
>> at ariba.ui.servletadaptor.AWDispatcherServlet.aribawebDispatcher(AWDispatcher Servlet.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.j ar!/" 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(AWClasspathReso urceDirectory.java:433)
>> at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405)
>> at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.initJar(AWClasspathReso urceDirectory.java:405)
>> at ariba.ui.aribaweb.util.AWClasspathResourceDirectory.autoRegisterJarResource s(AWClasspathResourceDirectory.java:320)
>> at ariba.ui.aribaweb.core.AWConcreteServerApplication.registerResourceDirector ies(AWConcreteServerApplication.java:353)
>> at ariba.ui.aribaweb.core.AWConcreteServerApplication.init(AWConcreteServerApp lication.java:131)
>> at ariba.ui.aribaweb.core.AWConcreteApplication.init(AWConcreteApplication.jav a:293)
>> at ariba.ui.servletadaptor.AWServletApplication.init(AWServletApplication.java :91)
>> at ariba.ui.aribaweb.core.AWConcreteApplication.createApplication(AWConcreteAp plication.java:161)
>> at ariba.ui.servletadaptor.AWDispatcherServlet.createApplication(AWDispatcherS ervlet.java:67)
>> at ariba.ui.servletadaptor.AWDispatcherServlet.init(AWDispatcherServlet.java:5 5)
>> 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.
> -- > 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/-/uWiD-pDCzrIJ.
> To post to this group, send email to aribaweb@googlegroups.com.
> To unsubscribe from this group, send email to aribaweb+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/aribaweb?hl=en.