- This topic has 11 replies, 3 voices, and was last updated 20 years, 6 months ago by Valentijn Van der Haegen.
-
AuthorPosts
-
schuerMemberHi,
I am using eclipse + myeclipse + weblogic 8 (jdk 1.4) and I experience some problems when I use the hot swap feature of the plugin.
Sometimes it works, but sometimes I got a NoClassDefFoundError. I think that after the hot swap, the ClassLoader loses some classes in its Classpath. The class i modified is always found, but i get this error with other classes of the project.
My project is composed of several librairies (jars) shared by a web application and an EJB project. My jars are inside the EAR file at the same level than the war and ejb jar.
Does any body have an idea to work around this problem?
Valentijn Van der HaegenMemberHey schuer,
I’m faced with the same problem as you…
This happend as soon as I installed Weblogic 8.1 SP2. I did not have this problem with earlier version of weblogic. (SP1).Is there a change in the way the classloading works between the two versions… because it has to do
indeed with classes not being able to be loaded after hot deploy…Anyways, hope this can be sorted out because it’s very annoying.
QUICK FIX is to go back a version of Weblogic Server.My Environment:
– Win2000
– JDK1.4.2_01
– Eclipse Version: 3.0.0 Build id: 200402122000
– MyEclipse Version: 3.7.1 Build id: 200403241200-3.7.1GAThanks in advance,
Les.
Scott AndersonParticipantLes,
Thanks for the follow up. From your comments and what was reported it does sound like a WebLogic issue.
For some background, when you modify a class that is deployed in the application server, the environment requests that the remote server JVM reload the new class definition. It looks like this request is being honored since the initial report states that the new class is available. However, like all application servers, WebLogic implements a hierarchy of classloaders for each deployed application to limit class visibility as required by the spec. It appears that the update of this hierarchy isn’t occurring correctly. From that, I’d speculate that the problem is either in the JDK, WebLogic, or caused by a strange interaction between the two. To eliminate two of these, I’d personally test WLS 8 SP2 using JDK 1.4.1_07. JDK 1.4.1’s debugging implementation is very solid while 1.4.2’s is still in a bit of “flux” from time to time.
schuerMemberI am always using Weblogic SP1, so I don’t think it’s a problem of SP.
Ok, so it seems there is nothing to do for my problem 🙁
…the problem will maybe be fixed in future SP of Weblogic.
Thanks for replying.
schuer.
Scott AndersonParticipantActually, it could still be a JDK 1.4.2 interaction problem as many have been reported both here and on the Eclipse newsgroups as various releases of 1.4.2 have come out. 1.4.1 is still worth a try, if you have time.
Valentijn Van der HaegenMemberHi Scott,
Let me explain my setup:
1) Installed j2sdk1.4.2_01 (to be able to startup eclipse)
2) Installed Eclipse (unzipped and started once)
3) Installed MyEclipse
4) Installed BEA Weblogic Platform 8.1 SP2
5) Configured Eclipse – MyEclipse in order to use the BEA libraries included with that release – meaning making sure that where pointing to JDK, J2EE … the BEA library settings were chosen (JDK141_05).So, I believe that when I startup the server from within MyEclipse, It uses the JDK141_05 and still this does not do the trick…
If I find the time I will try to do a clean install from scratch on another machine, but I think I will get the same result! 😯
Do you think that changing step 1 into a 1.4.1_xx version should make a difference ???Rgds,
Les.
Scott AndersonParticipantLes,
Do you think that changing step 1 into a 1.4.1_xx version should make a difference ???
Actually it could make a difference. To start Eclipse with a different JDK, you can simply modify the alias you use to start Eclipse and specify the JDK to use explicitly like this:
eclipse.exe -vm <path-to-javaw.exe>
Valentijn Van der HaegenMemberHi scott,
just tried out the -vm option pointing to the JRE1.4.1_05..
here are the results (deployed exploded, hoping hot swap is ok):
1) altered JSP… added html code –> 😆 WORKS GREAT
2) altered JSP… added scriptlet code –> 😆 WORKS GREAT
3) altered java class … –> 👿 DAMN ClassCastException…java.lang.ClassCastException
at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:855)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)Anyways … thanks for the follow up and the suggestion…
I’ll try to install Weblogic Server 8.1 SP1 and see what happens …
I’ll keep you posted 8)Greetz,
Les.
Valentijn Van der HaegenMemberHi Scott,
I uninstalle BEA Weblogic Portal 8.1 SP2 and installed BEA Weblogic Server 8.1 SP1….
And now everything is ok… hot deploy without any problem … 😛
So I guess that the problem is
either:
– Weblogic Portal problem
– Weblogic SP2 problemI might try to post a question to BEA concerning this issue, but I believe that they do not support the hot deployment problems emerging when running their server from within MyEclipse…
They’ll probably will shift the problem to your side???Can I assume that it is not the connector to Weblogic causing the problem?
Anyways,
Hope this helps … 😈Greetz,
Les.
Valentijn Van der HaegenMemberOoops …. stating the problems…
either:
– Weblogic Portal problem
– Weblogic SP2 problemI meant either:
– Weblogic Platform problem
– Weblogic Server SP2 problemSorry ’bout that !!
Les.
Scott AndersonParticipantCan I assume that it is not the connector to Weblogic causing the problem?
Yes, you can. It’s the Eclipse debugger that is interacting with the remote VM during hotswap operations. The connector simply sets up the launch and source lookup parameters properly for debugging the server. From what you describe it appears that BEA introduced a problem with JDK 1.4 hotwswap interaction within their classloaders with 8.1 SP2. If this is the case, the problem should be reproducable with any IDE that supports hotswap to remote servers, not just MyEclipse.
Basically it comes down to this: It was working perfectly with SP1. You installed SP2 and it stopped working. You uninstalled SP2 and it started working again. Seems pretty clear cut. 🙂
Valentijn Van der HaegenMemberScott,
Thanks for the reply…
I’ll keep working with SP1 for now and see what happens with the releases from BEA…Rgds,
Les. -
AuthorPosts