Hot Deploy with Weblogic 8.1


EJB programming & troubleshooting: Hot Deploy with Weblogic 8.1

  1. Hot Deploy with Weblogic 8.1 (3 messages)

    Hello, In order to use the hot deploy (re-deploy the app without restarting server), I'm using the server in development mode and using the following directory structure for my enterprise application. domains/my_domain/applications/myapp | |-APP-INF |-APP-INF/classes |-APP-INF/lib |-META-INF |-META-INF/application.xml |-META-INF/REDEPLOY |-myejbs.jar |-mywebapp.war The jar file contains all the EJB classes and deployment descriptor; the war file contains the JSPs, servlet classes and web.xml; and the APP-INF/classes folder contains all the common classes. Now to test this after deploying first time with this structure, I changed one of the JSPs, and copied the modified war file and then changed the timestamp of the REDEPLOY file (by touching it). And it refreshed the changes, so logically it is redeploying the files without restarting the server. Now, the problem is that there are some classes which are being instantiated dynamically (using Class.forName()). And when it tries to load the first class through Class.forName, it fails by giving "java.lang.NoClassDefFoundError". I tried following alternatives to get rid of this error, but no luck so far: - Tried adding the common classes directory explicitly in classpath - Deploy the application as a bundled EAR file instead of exploded structure - Tried adding the required classes in the jar and/or war files. Any clues at this point?

    Threaded Messages (3)

  2. try this ankit[ Go to top ]

    hi Ankit you can set the class path of all the dynamic classes in startWeblogic.cmd if u r working on windows or in linux based systems u can find this file in ur domain in weblogic. i am not sure but hope this will work. bye
  3. Re: try this ankit[ Go to top ]

    Hi, The internally calls and I did set the classpath in but it doesn't help :(
  4. Re: try this ankit[ Go to top ]

    Another interesting thing to note here. The reason I'm trying to get the Hot Deployment in place is, during development we change lot of things frequently and need to keep redeploying the application frequently and manual redeployment is taking quite long time. Now, if I take the ear file which I'm deploying manually (which works perfectly fine) and copy this in the domains/applications folder it gets deployed, but at the runtime it is not able to find third party library files (even if I have added that jar in "Class-Path" in META-INF/MANIFEST.MF file under war). This behavior - one ear file, when deployed manually works perfectly fine; and the same ear when deployed through weblogic's auto-deploy doesn't work well - looks very strange.