-
1. Re: AS7 WAR classloading
jaikiran Jul 7, 2011 9:41 AM (in response to prasad.deshpande)Can you post the contents of web.xml? Does it explicitly mark it as a servlet class via web.xml or do you use the Servlet 3 annotations?
-
2. Re: AS7 WAR classloading
prasad.deshpande Jul 7, 2011 9:50 AM (in response to jaikiran)Here is my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<servlet>
<description><![CDATA[Startup servlet]]></description>
<display-name>StartupServlet</display-name>
<servlet-name>StartupServlet</servlet-name>
<servlet-class>com.banctec.caseware.server.system.common.StartupServlet</servlet-class>
<init-param>
<param-name>p1</param-name>
<param-value>v1</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>StartupServlet</servlet-name>
<url-pattern>/StartupServlet</url-pattern>
</servlet-mapping>
</web-app>
StartupServlet extends to HTTPServlet & doesn't use any Servlet 3 annotations. All it uses is @EJB/@Resource annotations. This is very simple to reproduce, Just deploy war in ear as containing WEB-INF/web.xml & put your servlet in a jar in lib of ear.
-
3. Re: AS7 WAR classloading
swd847 Jul 7, 2011 10:36 PM (in response to prasad.deshpande)This is a bug, I am looking at a fix and will try and get it into AS7 final
-
4. Re: AS7 WAR classloading
swd847 Jul 8, 2011 12:28 AM (in response to prasad.deshpande)I created a JIRA
https://issues.jboss.org/browse/AS7-1228
I also have a fix mostly done, if you get the chance would you be able to build AS7 from
https://github.com/stuartwdouglas/jboss-as
And let me know if this fixes it?
-
5. Re: AS7 WAR classloading
prasad.deshpande Jul 8, 2011 5:26 AM (in response to swd847)I've built from your source, thing is that, I can't even now proceed due to the stage where I can test this bug due to xercesImpl jar issue, I reported in http://community.jboss.org/thread/169030?tstart=0. I can see Jaikiran's fix to removed dependency of xerces from WarClassloadingDependencyProcessor.java but still I'm getting the same exception & few more others which I wasn't getting. I tried removing xercesImpl jar from my ear/lib, then it throws class not found exception for SAXParser. I've attached server.log for your ref.
If you could please try to fix xerces one, I could test issue reported in this thread. But xerces one has become blocking one for me now where I can't proceed anymore to migrate my app to AS7.
-
server.log.zip 8.9 KB
-
-
6. Re: AS7 WAR classloading
jaikiran Jul 8, 2011 6:19 AM (in response to prasad.deshpande)My local tests around the xerces issue have been failing too. I'm looking into this.
-
7. Re: AS7 WAR classloading
jaikiran Jul 8, 2011 2:47 PM (in response to prasad.deshpande)Prasad Deshpande wrote:
I've built from your source, thing is that, I can't even now proceed due to the stage where I can test this bug due to xercesImpl jar issue, I reported in http://community.jboss.org/thread/169030?tstart=0. I can see Jaikiran's fix to removed dependency of xerces from WarClassloadingDependencyProcessor.java but still I'm getting the same exception & few more others which I wasn't getting. I tried removing xercesImpl jar from my ear/lib, then it throws class not found exception for SAXParser. I've attached server.log for your ref.
If you could please try to fix xerces one, I could test issue reported in this thread. But xerces one has become blocking one for me now where I can't proceed anymore to migrate my app to AS7.
Just a FYI - We've figured out what the issue is and are working on a fix. Will update this thread once we have the fix committed upstream.
-
8. Re: AS7 WAR classloading
prasad.deshpande Jul 8, 2011 3:39 PM (in response to jaikiran)Thanks a lot Jaikiran, really appreciate you prompt response & help!
-
9. Re: AS7 WAR classloading
jaikiran Jul 9, 2011 3:09 AM (in response to prasad.deshpande)1 of 1 people found this helpfulThe xerces issue is now fixed in AS7 upstream. Give it a try!
-
10. Re: AS7 WAR classloading
prasad.deshpande Jul 9, 2011 7:39 AM (in response to jaikiran)Thanks a lot Jaikiran, Do you want me to try with nightly build or from the git source build that Stuart has shared above? In either case, earliest I'll be able to test on monday.
-
11. Re: AS7 WAR classloading
jaikiran Jul 9, 2011 9:05 AM (in response to prasad.deshpande)Prasad Deshpande wrote:
Do you want me to try with nightly build or from the git source build that Stuart has shared above?
Please try the nightly build to test the xerces issue. The fix for @EJB is in Stuart's branch which needs to be rebased against latest upstream to get the xerces and other fixes. I guess, Stuart will do the rebase and then you can use that branch for testing the @EJB injection part.
Prasad Deshpande wrote:
In either case, earliest I'll be able to test on monday.
Sure, no problem. Thanks for testing and reporting these issues.
-
12. Re: AS7 WAR classloading
prasad.deshpande Jul 11, 2011 4:46 AM (in response to jaikiran)Hi Stuart,
Xerces issue that Jaikiran fixed, did work for me, I was wondering, if you have rebased your branch with main upstream, then I can try this issue too now?
-
13. Re: AS7 WAR classloading
jaikiran Jul 11, 2011 5:08 AM (in response to prasad.deshpande)Stuart has pushed his fix to AS7 upstream. So building from latest AS7 upstream https://github.com/jbossas/jboss-as should get you both the xerces as well as Stuart's fix.
P.S: I would have pointed you to the latest nightly build of AS7 here https://ci.jboss.org/jenkins/view/JBoss%20AS/job/JBoss-AS-7.0.x/ but it looks like the latest build there is 2 days old. I'll see what needs to be done to fix that job.
-
14. Re: AS7 WAR classloading
prasad.deshpande Jul 13, 2011 6:51 AM (in response to jaikiran)I tested this in AS7 final & it worked, Thank you for fixing this.