Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Deploy problem with ejb jar in WEB-INF/lib

5 views
Skip to first unread message

Pete

unread,
Feb 4, 2002, 9:43:41 AM2/4/02
to

Please help with : StringIndexOutOfBoundsException

On WL 6.1 sp2, I have one EJB jar that deploys fine in an expanded EAR structure,
this has EJB jars and the web apps together running under a single JVM.

But when I need to deploy the Web App to a separate server & JVM, still using
WL 6.1, and leave the EJBs in another WL server I get java.lang.StringIndexOutOfBoundsException.

I have about 8 ejb jars. When I put one of them in the Web-App's WEB-INF/lib directory.
I get java.lang.StringIndexOutOfBoundsException when it starts up, just after/during
the extracting of classes for the standalone Web App. The exception stack trace
mentions manifest, but the manifest for the ejb jar is just standard. It doesn't
even have a Class-Path: entry, which all the others happen to have. an needs
to contain the server EJB jars.

<04-Feb-02 12:20:18 GMT> <Info> <HTTP> <[HTTP myserver] Loading web app: clasp1>
<04-Feb-02 12:20:18 GMT> <Info> <HTTP> <[myserver] Loading "clasp1" from directory:
"D:\JavaProjects\NR\CLASp2\CLASp2WebTier\warCLASp1">
<04-Feb-02 12:20:18 GMT> <Info> <HTTP> <[WebAppServletContext(5055074,clasp1,/clasp1)]
extracting classfiles to D:\JavaProjects\NR\CLASp2\CL
ASp2WebTier\warCLASp1\WEB-INF\_tmp_war_myserver_myserver_clasp1:>
<04-Feb-02 12:20:23 GMT> <Error> <J2EE> <Error deploying application clasp1: Could
not load clasp1>
<04-Feb-02 12:20:23 GMT> <Error> <Management> <ApplicationManager starting Config
caught throwable
java.lang.reflect.UndeclaredThrowableException: java.lang.StringIndexOutOfBoundsException:
String index out of range: -1
at java.lang.String.substring(String.java:1525)
at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:166)
at weblogic.utils.jars.Manifest.stream(Manifest.java:81)
at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:398)
at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:234)
at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3407)
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.addComponent(Application.java:163)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy35.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2761)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:370)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy46.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
--------------- nested within: ------------------
weblogic.j2ee.DeploymentException: Could not load clasp1 - 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.addComponent(Application.java:163)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy35.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2761)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:370)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy46.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)

Rob Woollen

unread,
Feb 4, 2002, 4:45:31 PM2/4/02
to
That's a bad error message.

Can you show me your manifest file?

-- Rob

Pete

unread,
Feb 6, 2002, 5:03:42 AM2/6/02
to

Rob,

The manifest for the Bean jar that seems to cause problems is RDFInfrastuctureBeans.jar
here it is, it's simple :-

Manifest-Version: 1.0

Name: META-INF/ejb-jar.xml

Name: com/rdf/infrastructure/command/ejb/ApplicationCommandInvokerBean
.class

Name: com/rdf/infrastructure/command/ejb/ApplicationCommandInvoker.cla
ss

Name: com/rdf/infrastructure/command/ejb/ApplicationCommandInvokerHome
.class

Name: META-INF/weblogic-ejb-jar.xml


But what I think might be causing a problem is this particular Bean jar is like
a Utility bean jar which contains one generic session bean (implements the Command
Pattern, and can be used across Projects) and ALL utility classes are also bundled
in the JAR (again used across projects). So this jar is specified as a jar for
all the other Bean jars (to conveniently give them the utility classes). e.g

OtherBean.jar manifest :-

Manifest-Version: 1.0
Name: META-INF/ejb-jar.xml
Class-Path: RDFInfrastuctureBeans.jar NRInfrastructurep2.jar

Name: com/rdf/nr/clas/bus/accountmanager/ejb/AccountManager.class

Name: com/rdf/nr/clas/bus/accountmanager/ejb/AccountManagerBean.class

Name: com/rdf/nr/clas/bus/accountmanager/ejb/AccountManagerHome.class

Name: META-INF/weblogic-ejb-jar.xml

So in web-inf/lib I have normal jars like OtherBean.jar and this
RDFInfrastuctureBeans.jar. If I put OtherBean.jar on it's own the Web App will
deploy OK (but won't run), as soon as I put
RDFInfrastuctureBeans.jar there it gets this StringIndexOutOfBoundsException as
it extracts the classes.

I've tried deploying the Web app as both an Expanded EAR, that just contains the
Web App as a <WebAppComponent> and no EJB modules. Also tried the Web App deployed
at the /Applications/ folder level. But I think the latter may not like Manifest
Class-Path: entries ? these only work in EARS ?

Cameron Purdy

unread,
Feb 6, 2002, 12:21:10 PM2/6/02
to
Manifest class-path possibly?

--
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/

"Pete" <pete....@orange.net> wrote in message
news:3c5e9e1d$1...@newsgroups.bea.com...

Pete

unread,
Feb 12, 2002, 7:26:15 AM2/12/02
to

Just raising the visibility of the issue. Hoping Rob will see my response to his
question.
0 new messages