facebook

action class reloading fails in weblogic8.1

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #205029 Reply

    sbonasoni
    Member

    Hi ,
    I am trying to develop a struts based application and each time I make and change to the Action class I have to retstart the weblogic server.
    If I dont restart the server, I get a ClassCastException.
    I am starting Weblogic thru myeclipse and have added -Dweblogic.ProductionModeEnabled=false to the JVM arguments.
    Below is the exception stack trace
    <Mar 19, 2004 11:43:56 AM EST> <Error> <HTTP> <BEA-101020> <[ServletContext(id=29988910,name=CATS,context-path=/CATS)] Servlet failed with Exception
    java.lang.ClassCastException
    at com.isone.commons.login.filter.SecureFilter.doFilter(SecureFilter.java:123)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6356)
    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)
    Any suggestions..

    thanks
    Anil
    – System Setup ——————————-
    Operating System and version:
    Eclipse version: 3.0.0
    Eclipse build id: 200312182000
    Fresh Eclipse install (y/n): y
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins:
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 5
    MyEclipse version: 3.7rc2
    Eclipse JDK version: 1.4
    Application Server JDK version: 1.4
    Are there any exceptions in the Eclipse log file? No

    – Message Body ——————————-

    #205035

    Riyad Kalla
    Member

    Anil,
    If you run the server from the command line, and manually drop the class file into WebLogic while it is running (say via Explorer or something) does it work then? If not, I’m not sure that MyEclipse can help you as the problem seems to stem from the application server’s settings.

    Have you tried weblogic’s development FAQs?

    #205210

    sbonasoni
    Member

    Whenever I do a recompile of my project I get this error:

    weblogic.server at localhost:2816 (may be out of sync) was unable to repalce the running code with the code in workspace.
    Reason:
    Hot code replace failed -Scheme change not implemented.
    After this when I try to access the application I get the ClassCastException which I mentioned before.
    How do I get rid of this error.
    thanks
    Anil

    #205212

    Scott Anderson
    Participant
    #216029

    tanweeho
    Member

    Hi,
    I believe this issue is NOT settled in the latest release?

    #216032

    Scott Anderson
    Participant

    I believe this issue is NOT settled in the latest release?

    There is absolutely nothing we can do about this. If you follow the referenced threads you’ll see that it is caused by a limitation in Sun’s JPDA specification such that certain types of Java class changes simply aren’t supported for hot updates. If they’re outside the spec, then the JDK’s won’t support it and neither will Eclipse.

    #217297

    tanweeho
    Member

    My ClassCastException is a different situation. I did not add a method or whatsoever, just a simple println statement. But i do observe a strange phenomenon. When i wrap my Web app with a EAR and deploy it as an Enterprise app, it works perfectly! Any explanation for this? FYI, i was using Spring Framework’s JPetstore sample as an experiment.
    (Iso-Consult1, did u try deploying your app as an enterprise?)

    #217513

    lchuenya
    Member

    I experienced ClassCastException during hotswapping ONLY for classes that I hotswap in Web Project. If I throw exactly the same classes into the EJB project, it will work. I’m using Weblogic SP2 with EAR Project, Web Project, and EJB project to deploy my application.

    Conclusion: For those meeting the same problems with SP2, you might want to consider putting your classes in the EJB project first during development to make use of hotswapping, and move them over to the Web project during production deployment/checking into cvs.

    #217789

    Scott Anderson
    Participant

    What you’re probably seeing here is that both the web project and the EJB project had copies of the same classes. However, since a hierarchy of classloaders is used at deployment time, each loaded their *own* version of the class. Remember that a class file itself is not what determines uniqueness; it is both the class and the classloader that loads it. The same class loaded by two classloaders are different classes by definition. By moving the classes to only the EJB project, both classloaders began using the same copy, since the web project has visibility to the classes loaded in an EJB classloader, as mandated by the spec.

    So, if you have classes that are shared in your both EJB project and your web project, place them *only* in the EJB project. They will be visible to both at runtime and will keep you from seeing errors like this.

    #217852

    lchuenya
    Member

    Yes, I’ve only 1 copy of the class files in either the Web Project or EJB Project at any one time.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: action class reloading fails in weblogic8.1

You must be logged in to post in the forum log in