wood burning stoves 2.0*
The moose likes BEA/Weblogic and the fly likes URGENT (plz): Strange exception when deploying to WebLogic 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "URGENT (plz): Strange exception when deploying to WebLogic 6.1" Watch "URGENT (plz): Strange exception when deploying to WebLogic 6.1" New topic
Author

URGENT (plz): Strange exception when deploying to WebLogic 6.1

David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
Sorry for the long message, but I'm totally stuck...
We have a very basic webapp that works and compiles just fine on local machine using Resin and/or Tomcat. We used Ant to compile and create a .war file to deploy to the dev. server.
Here is the error(s) that are generated by WebLogic when the .WAR is deployed.
Any help is appreciated. If you need
<Oct 21, 2002 11:46:29 AM EDT> <Info> <HTTP> <[HTTP myserver] Loading web app: itfc>
<Oct 21, 2002 11:46:29 AM EDT> <Info> <HTTP> <[myserver] Loading itfc from WAR file: /opt/beasys/wls6.1/./config/dev61/applications/.wlnotdelete/wl_comp47740.war>
<Oct 21, 2002 11:46:29 AM EDT> <Info> <HTTP> <[WebAppServletContext(5935082,itfc,/itfc)] extracting classfiles to /opt/beasys/wls6.1/config/dev61/applications/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_itfc:>
<Oct 21, 2002 11:46:31 AM EDT> <Debug> <HTTP> <Exception thrown while loading itfc: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1525)
at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:469)
at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:177)
at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3405)
at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3376)
at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:815)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.deploy(Application.java:260)
at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:185)
at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:362)
at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:296)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1388)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:881)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:295)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:392)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:298)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
at $Proxy19.setDeployed(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.MBeanAttribute.doSet(MBeanAttribute.java:84)
at weblogic.management.console.info.CompositeAttribute.doSet(CompositeAttribute.java:100)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Oct 21, 2002 11:46:31 AM EDT> <Error> <J2EE> <Error deploying application itfc: Could not load itfc>
<Oct 21, 2002 11:46:31 AM EDT> <Error> <Management> <InvocationTargetException setting attribute Deployed on MBean dev61:Location=myserver,Name=itfc,Type=ApplicationConfig to value true. Method: public void weblogic.management.mbeans.custom.Application.setDeployed(boolean) throws weblogic.management.DeploymentException,weblogic.management.UndeploymentException
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1525)
at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:469)
at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:177)
at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3405)
at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3376)
at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:815)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.deploy(Application.java:260)
at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:185)
at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:362)
at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:296)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1388)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:881)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:295)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:392)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:298)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
at $Proxy19.setDeployed(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.MBeanAttribute.doSet(MBeanAttribute.java:84)
at weblogic.management.console.info.CompositeAttribute.doSet(CompositeAttribute.java:100)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.j2ee.DeploymentException: Could not load itfc - with nested exception:
[java.lang.StringIndexOutOfBoundsException: String index out of range: -1]
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:431)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.deploy(Application.java:260)
at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:185)
at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:362)
at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:296)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1388)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:881)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:295)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:392)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:298)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
at $Proxy19.setDeployed(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.MBeanAttribute.doSet(MBeanAttribute.java:84)
at weblogic.management.console.info.CompositeAttribute.doSet(CompositeAttribute.java:100)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
No sure if this matters, but we're also using Struts 1.1.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Looks like there might be something funky going on in your deployment descriptors. Double-check them to make sure they are correct.
What version of WebLogic are you running? Is it is latest service pack. I know some people got this error deploying under 6.1 SP1. If you are not running the latest SP than I would try upgrading to see what it does.
Those are the only things I can think of off-hand. If I come up with anything else I will post back.
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
Checked, and double checked. I successfully deployed the same .WAR file using Resin and Tomcat with zero problems (locally).
I'mm going to re-start Apache/Weblogic and see if that cures it. I read an obscure article on the web that for some unknown reason, Weblogic gets "flaky" after deploying .WAR files after a while and a restart usualyl solves it.
No rhyme or reason why it happens, just cures it.
Very strange...
I'll report bakc if the restart solves the issue.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
I had made the assumption that you had already tried a restart... sorry. That would have been my first suggestion.
My experiences have also shown that restarting is sometimes the only solution. When things get really bad I will resort to shutting down, deleting all the do not delete directories, and restarting the server.
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
Sometimes, especially in 6.x, I have seen funky stuff when deploying/undeploying/redeploying apps using the <domain>/applications directory.
I had much better luck putting my apps elsewhere and using the console for deployment.
WLS 7.0 seems to be better about that applications directory, but still it is only suggested for development convenience, and is not recommended for deploying apps in production.
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
Ok, well, restarting WebLogic did NOT solve the issue. No matter what I do, it simply will not accept the .WAR file.
It appears to stem from this exception:
<Oct 22, 2002 10:32:43 AM EDT> <Info> <HTTP> <[myserver] Loading itfc from WAR file: /opt/beasys/wls6.1/./config/dev61/applications/.wlnotdelete/wl_comp25988.war>
<Oct 22, 2002 10:32:43 AM EDT> <Info> <HTTP> <[WebAppServletContext(4377957,itfc,/itfc)] extracting classfiles to /opt/beasys/wls6.1/config/dev61/applications/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_itfc:>
<Oct 22, 2002 10:32:45 AM EDT> <Debug> <HTTP> <Exception thrown while loading itfc: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1525)
at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:469)
at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:177)
at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3405)
at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3376)
at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:815)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
...<SNIP>...
For some reason, when it tries to extract the class files, it causes the exception. Is this an exception in one of my classes or is it an exception within WebLogic as it's trying to extract the classes?
From what I can surmise, it's within WebLogic since the same .WAR deploys fine locally...
Again, any ideas are appreciated!
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
Try this:
Stop the server.
Delete all the "do not delete" directories (like applications/.wlnotdelete and the "myserver" directory, etc.).
Edit the config.xml file and remove any <Application> element (and contents) that refer to your war.
Restart the server - should be happier.
Redeploy the war....
No guarantees, but this usually works for me.
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
(While I try your suggestion)....
This morning I created a .war with nothing in it except the WEB-INF structure. Amazingly, it deployed just fine!
I added in /images and /common folders and again, it deployed just fine.
As soon as I add a single .jsp file, I'm back to the same errors (noted above).
I'm at a complete loss, because there are other applications being deployed to this same server, using the same Struts files (included in .war) and they deploy without a single issue.
At this point have no idea...
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
Ah,
I think the webapp container is trying to resolve stuff in Manifest Class-Path entries of jars in WEB-INF/lib. Looks like this issue was addressed in 6.1 sp3.
Get the latest service pack....
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
Made some progress...
After re-starting the web services, I was able to deploy the .war file. I have no clue or idea why it was failing before, but it appears to be fixed now.
One thing to note, the "dev" mode deployment option works fine as long as you do not change the "web.xml" after starting weblogic.
Otherwise, you'll get the "already exists" error and have to restart before you can "dev" deploy again.
Even if you do not change it, but the timestamp does, you'll have to restart.
I've used weblogic here and there, but JBoss and Resin seem so much more robust, flexible, and aren't as "flaky" about such seemingly minor issues. IMHO (of course).
To spend as much time as I have trying to simply deploy a .war file all because of some "random" error is more than annoying...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: URGENT (plz): Strange exception when deploying to WebLogic 6.1