Re: AribaWeb in Websphere 8

76 views
Skip to first unread message

František Kolář

unread,
Oct 9, 2012, 3:38:04 PM10/9/12
to arib...@googlegroups.com
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(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.

František Kolář

unread,
Oct 10, 2012, 2:27:35 PM10/10/12
to arib...@googlegroups.com
Hi Hannes, 

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 ;-)

But you are right this should be fixed. 


Regards
František Kolář 


On Oct 10, 2012, at 10:58 AM, Hannes wrote:

Hello,

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
To view this discussion on the web visit https://groups.google.com/d/msg/aribaweb/-/uWiD-pDCzrIJ.
Reply all
Reply to author
Forward
0 new messages