Deploy problem with ejb jar in WEB-INF/lib

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)

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" <[email protected]> wrote in message
news:[email protected]...
>
Please help with : StringIndexOutOfBoundsException
On WL 6.1 sp2, I have one EJB jar that deploys fine in an expanded EARstructure,
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, stillusing
WL 6.1, and leave the EJBs in another WL server I getjava.lang.StringIndexOutOfBoundsException.
>
I have about 8 ejb jars. When I put one of them in the Web-App'sWEB-INF/lib directory.
I get java.lang.StringIndexOutOfBoundsException when it starts up, justafter/during
the extracting of classes for the standalone Web App. The exception stacktrace
mentions manifest, but the manifest for the ejb jar is just standard. Itdoesn't
even have a Class-Path: entry, which all the others happen to have. anneeds
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" fromdirectory:
"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 applicationclasp1: Could
not load clasp1>
<04-Feb-02 12:20:23 GMT> <Error> <Management> <ApplicationManager startingConfig
caught throwable
java.lang.reflect.UndeclaredThrowableException:java.lang.StringIndexOutOfBoundsException:
String index out of range: -1
at java.lang.String.substring(String.java:1525)
atweblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:166)
at weblogic.utils.jars.Manifest.stream(Manifest.java:81)
atweblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java
:398)
atweblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:2
34)
atweblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServl
etContext.java:3407)
atweblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletConte
xt.java:3376)
atweblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.jav
a:862)
atweblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.j
ava:815)
atweblogic.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)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:329)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:144)
atweblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:
76)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy35.addWebDeployment(Unknown Source)
atweblogic.management.configuration.WebServerMBean_CachingStub.addWebDeploymen
t(WebServerMBean_CachingStub.java:1121)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:315)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
Target.java:279)
atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
eploymentTarget.java:233)
atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
entTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy34.updateDeployments(Unknown Source)
atweblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
ServerMBean_CachingStub.java:2761)
atweblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
icationManager.java:370)
atweblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
r.java:160)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy46.start(Unknown Source)
atweblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
ApplicationManagerMBean_CachingStub.java:480)
atweblogic.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 nestedexception:
[java.lang.StringIndexOutOfBoundsException: String index out of range: -1]
atweblogic.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)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:329)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:144)
atweblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:
76)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy35.addWebDeployment(Unknown Source)
atweblogic.management.configuration.WebServerMBean_CachingStub.addWebDeploymen
t(WebServerMBean_CachingStub.java:1121)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:315)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
Target.java:279)
atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
eploymentTarget.java:233)
atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
entTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy34.updateDeployments(Unknown Source)
atweblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
ServerMBean_CachingStub.java:2761)
atweblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
icationManager.java:370)
atweblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
r.java:160)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy46.start(Unknown Source)
atweblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
ApplicationManagerMBean_CachingStub.java:480)
atweblogic.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)

Similar Messages

  • Please help.! Problem with locating classes within Jars under WEB-INF/lib.

    Hi All,
    I have a problem which you guys would have faced already...Here it goes..
    I'm using OC4J 10.1.3.0 and use ADF for my web page. I have a controller class which refers to JSF/ADF APIs and this class is archived as a jar file and put under WEB-INF/lib, Also, all the classes related to JSF/ADF are available under the same WEB-INF/lib folder.
    When I invoke my page, the controller class is getting called but it throws NoClassDefFound Error for the ADF based class. i mean, these ADF/JSF classes are not getting found when my jar class is placed within WEB-INF/lib. However, when i extract my jar into WEB-INF/classes, it works.
    I'm sure, i miss some entry for classpath somewhere. Can any one please point me to right direction...?
    Thanks
    Rajasekaran

    Hello,
    I do not have a direct answer to your question, but could you try the ClassLoader query tools to see if your classes/jar are loaded by the applications:
    - Using Queries to Troubleshoot Class Loading Issues
    Regards
    Tugdual Grall

  • NoClassDefFoundError with jar in WEB-INF/lib

    Hi,
    I have an enterprise application running on Websphere 6. I have one external jar file in WEB-INF\lib (it's commons-lang). I am getting NoClassDefFoundError when trying to use classes in this jar file from the web app -- I thought that it was sufficient to drop the jar in \lib and then it would be picked up but obviously that is not the case.
    As a workaround, I've created a shared lib on the app server for this jar, and added it to the application. This works fine, but I can't understand why is should be required.
    Shouldn't it be sufficient just to put the jar file in WEB-INF\lib under the webapp?

    I think Websphere 6 already includes commons-logging. So the error you are getting may be classloader confusion, which is easy to do with Websphere and hard to understand (so I may be confused here). Try not including it anywhere, not in your web app and not whatever it was you did to make it work. Restart Websphere and your web app and see what happens.

  • Jars in web-inf/lib not in classpath

              Hello,
              I am building a web application where I wish to use third party jars.
              (specifically cos.jar and log4j.jar)
              AFAIK when you place these jars in the web-inf/lib directory of your application
              they should then be included in the application classpath.
              However this does not seem to always work. I am using Weblogic 6.1, no service
              pack.
              Eventually I got it to work by adding a manifest to my EJB jar file with the classpath
              pointing to the jars and including the jars in the ear file.
              Has anyone else had any issues with this?
              Thanks,
              James
              

    James,
              Yes, I've had troubles with WLS 6.1.2 finding the classes in my jar files
              that are stored in WEB-INF/lib when deploying as a .war file. The funny
              thing is that when I deploy to a WLS 6.1.0 running on two other machines
              (one solaris, one linux), I don't see this problem.
              My servlets all extend the webmacro WMServlet class, which is found in
              WEB-INF/lib/webmacro.jar. When deploying my web app, grems, I see the
              following behavior.
              On WLS 6.1.0 (running on solaris), the server unjars the WEB-INF/lib files into
              ".wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_grems". That directory
              contains a jar file for each one in my .war files WEB-INF/lib directory.
              On WLS 6.1.2 (running on Solaris), however, the server just doesn't seem to do that.
              Instead, it creates
              ".wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_grems/WEB-INF/lib". Not
              only that, but it doesn't put any of my jar files into that directory.
              Notice that it create the WEB-INF directory twice for some reason.
              Needless to say, any class which uses a class from one of those jar files
              bombs spectacularly with a ClassNotFound exception. This is extremely
              frustrating and any help would be greatly appreciated.
              Thanks,
              Bobby
              In article <[email protected]>, "James Lawless"
              <[email protected]> wrote:
              > Hello,
              >
              > I am building a web application where I wish to use third party jars.
              > (specifically cos.jar and log4j.jar)
              >
              > AFAIK when you place these jars in the web-inf/lib directory of your
              > application they should then be included in the application classpath.
              >
              > However this does not seem to always work. I am using Weblogic 6.1, no
              > service pack.
              >
              > Eventually I got it to work by adding a manifest to my EJB jar file with
              > the classpath pointing to the jars and including the jars in the ear
              > file.
              >
              > Has anyone else had any issues with this?
              >
              > Thanks,
              >
              > James
              

  • WebLogic 8.1 SP6 NoClassDefFoundError for jar in WEB-INF/lib dir (Solaris)

    Hi,
    I am getting a NoClassDefFoundError for a class that is contained in the WEB-INF/lib folder of my ear/war file.
    The strange thing is that this only fails when i try to deploy to production. In UAT (also on Solaris) and in Windows (test) the exact same versions of the deployment / ear file everything seems fine and the class is accessed.
    When i added the jar file to the classpath i experienced a "Unsupported major.minor version...." of this class error so i am reluctant to go down that route and anyway would rather consistent deployment between the systems.
    I would REALLY appreciate any suggestions as to what might be the cause or what i could try.
    Thanks,
    David

    Thanks for your replies. Sorry if i didn't post enough information for you...
    I appear to have found the problem (i managed to recreate in Windows) but have no idea why this is occuring.
    In the startManagedWebLogic.cmd file, if i specify "set JAVA_OPTIONS= xxxxxx" then the system will not pick up this one jar file. This appears to be the case even with "set JAVA_OPTIONS=-Dweblogic.attribute=value -Djava.attribute=value" which i assume is a default value as i can't remember having set it... The moment i comment out this set JAVA_OPTIONS line then the system is able to find the jar file.
    (Answering your questions:
    - The class in question is being referenced from another class also contained in a jar file in the WEB-INF/lib directory
    - the WEB-INF is part of the WAR which is contained in the EAR which is deployed on my server)
    For now i am ok but know that in a future build i am going to have to use the JAVA_OPTIONS parameter so would really appreciate any suggestions as to why this might be happening.
    Thanks,
    David

  • EAR has WAR has JAR in WEB-INF\lib NoClassDefFoundError

    What a nightmare.
    I found approximately 40 forums on this topic (and there are probably more), but noone has the definitive answer!
    Here's the problem....
    My servlet uses a utility class that resides in some other jar. That jar is then placed into the WEB-INF\lib directory of the WAR which in turn goes into the EAR. This is supposed to be all that is needed in order for the utility class to be found on the classpath.
    In fact, if you run the war in Tomcat as a standalone WAR it does in fact find it.... its when in an EAR deloployed to app server that the problem arises.
    I have had no luck with using any combination of putting the jar ANYWHERE in the EAR or WAR no matter if I specify the Class-Path: in the manifest(s) or not.
    I thought maybe that I was missing some config in the application.xml or web.xml but I couldn't find anything to support that.
    Maybe its dependent on the app server? I am using Orion, but the same problem can be found on J2EE RI release 1.3
    Work arounds:
    1. Simply put the utility jar in the lib directory of the server you're using
    2. Add an ejb module to the application.xml naming the utility jar as the ejb jar. Of course this is NOT an EJB jar and error messages/warnings will appear accordingly, but on Orion at least, it will load the classes needed... hooray!!
    Anyone got a definitive answer?

    What did you do to resolve this issue .. I'm having the exact same problem.
    What a nightmare.
    I found approximately 40 forums on this topic (and
    there are probably more), but noone has the definitive
    answer!
    Here's the problem....
    My servlet uses a utility class that resides in some
    other jar. That jar is then placed into the
    WEB-INF\lib directory of the WAR which in turn goes
    into the EAR. This is supposed to be all that is
    needed in order for the utility class to be found on
    the classpath.
    In fact, if you run the war in Tomcat as a standalone
    WAR it does in fact find it.... its when in an EAR
    deloployed to app server that the problem arises.
    I have had no luck with using any combination of
    putting the jar ANYWHERE in the EAR or WAR no matter
    if I specify the Class-Path: in the manifest(s) or
    not.
    I thought maybe that I was missing some config in the
    application.xml or web.xml but I couldn't find
    anything to support that.
    Maybe its dependent on the app server? I am using
    Orion, but the same problem can be found on J2EE RI
    release 1.3
    Work arounds:
    1. Simply put the utility jar in the lib directory of
    the server you're using
    2. Add an ejb module to the application.xml naming the
    utility jar as the ejb jar. Of course this is NOT an
    EJB jar and error messages/warnings will appear
    accordingly, but on Orion at least, it will load the
    classes needed... hooray!!
    Anyone got a definitive answer?

  • Can we downlod jar from WEB-INF/lib using webstart?

    Hi,
    Can we down jars which are in WEB-INF/lib directory
    using jnlp (webstart)?

    I got the basic concept of webstart.
    I can download jar only if publicly accessible (It
    should form a valid URL).Note an important distincion here..
    1) It is possible to form valid URL's that
    point to WEB-INF/lib.
    2) The server should not allow access, to
    that URL (any URL pointing inside WEB-INF/lib)
    and should return instead the HTTP code that says
    'not allowed/barred/forbidden'
    There is a big difference between a[b] valid URL,
    and a valid URL pointing to a forbidden resource.
    But yes, you seem to understand correctly,
    that the jar's for web-start cannot be loaded
    back to the client, from this directory.
    Thanks for your help.You're welcome.

  • Problem with ejb-jar.xml created with ejbgen.

    Hi! ,
    I m using ejbgen for creating interfaces for my bean nut i m facing a problem which is suppose i have beans in different folders and i m using ejbgen for each folder containing beans.Now the problem is i m using ejbgen under one target in build.xml so wht happens is when ejb-jar.xml is generated it contains entry for the last folder beans and overrides other beans entry in different folder . i need some way so tht ejb-jar.xml keeps appending for every ejbgen is called.
    Thanks in advance....... :-)
    warm regards,
    Sourabh Singh

    My temporary workaround is copy all beans from different directory trees to one temporary directory, and create one FileSet in Ant.
    z.

  • Error while accessing a war with xmlbeans under WEB-INF/lib

    Hi All,
    I am trying to deploy a WAR file with XMLBean generated jar under WEB-INF/lib folder along with other jars.
    I am getting following error
    java.lang.NoClassDefFoundError: com/xx/DataServiceRequestDocument
         at java.lang.Class.getDeclaredFields0(Native Method)
         at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
         at java.lang.Class.getDeclaredField(Class.java:1880)
         at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1610)
         at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
         at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)
         at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)
         at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:310)
         at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
         at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2216)
         at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2347)
         at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2290)
         at com.tangosol.io.DefaultSerializer.deserialize(DefaultSerializer.java:74)
         at com.tangosol.coherence.component.net.extend.Channel.deserialize(Channel.CDB:15)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3306)
         at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2603)
         at com.tangosol.coherence.component.net.extend.messageFactory.InvocationServiceFactory$InvocationRequest.readExternal(InvocationServiceFactory.CDB:5)
         at com.tangosol.coherence.component.net.extend.Codec.decode(Codec.CDB:29)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.decodeMessage(Peer.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:54)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:662)
    I tried multiple combinations like changing, but no success.
    <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3.2</wls:weblogic-version>
    <wls:context-root>CoherenceWS</wls:context-root>
    <wls:container-descriptor>
    <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
    </wls:container-descriptor>
    </wls:weblogic-web-app>
    I have very few classes in WEB-INF/class (trying to load java objects from lib)
    My WEB-INF/lib folder contains following jar
    coherence.jar
    commons-beanutils-1.8.0.jar
    commons-collections-3.2.jar
    commons-lang-2.4.jar
    commons-logging-1.1.1.jar
    dsRemoteCall.jar
    ezmorph-1.0.jar
    jackson-all-1.8.5.jar
    json-lib-2.1-jdk13.jar
    org.springframework.asm-3.1.0.M2.jar
    org.springframework.beans-3.1.0.M2.jar
    org.springframework.context-3.1.0.M2.jar
    org.springframework.core-3.1.0.M2.jar
    org.springframework.expression-3.1.0.M2.jar
    org.springframework.oxm-3.1.0.M2.jar
    org.springframework.web-3.1.0.M2.jar
    org.springframework.web.servlet-3.1.0.M2.jar
    schemaclasses.jar
    xbean.jar
    xom-1.2.7.jar
    Am I missing something? Any help is greatly appreciated
    Thanks
    sunder
    Edited by: 868704 on Sep 6, 2011 6:10 PM

    Note : schemaclasses.jar contains "com/xx/DataServiceRequestDocument" class file.
    WebLogic Server 10.3.5.0
    Thanks
    sunder
    Edited by: 868704 on Sep 6, 2011 6:26 PM

  • Jars extracted from WEB-INF/lib in JDev 9.0.3

    I have a project for a Web application with Struts and I've built a deployment profile for it. When I deploy to WAR or EAR the generated WAR contains the jars from <HTML Source>/WEB-INF/lib folder as extracted classes in the WEB-INF/classes folder and jars in WEB-INF/lib as well. I want to do something so that the jars will be included just as jars and not extracted.
    Thanks for help.

    I put the jars in the deployment profile in the "WAR File" option from deployment profile descriptor.
    When the jars were defined in a separate library entry for my project I put them through "WEB-INF/lib" link under "WAR File" option. Both ways it did the same.
    I gave up this and I am using ant but I would like to know if it is possible to do it with deployment descriptor.

  • WEB-INF/lib WEB-INF/classes ClassLoader problem

    I have observed that in WL 8.1, a class in a jar deployed in WEB-INF/lib does not have the ability to access a resource deployed in WEB-INF/classes. Is this the intended behavior to not have WEB-INF/lib and WEB-INF/classes in the same ClassLoader? If so, is there a way to configure this behavior to give permission to classes loaded in WEB-INF/lib to the ClassLoader that has WEB-INF/classes?
              thanks,
              Kenneth Shin

    Are you really certain that's what's happening? Is it possible the jar file stored in WEB-INF/lib isn't found elsewhere in the CLASSPATH, perhaps by a higher-level classloader? You might consider setting "prefer-web-inf-classes" to true in your weblogic.xml file, to ensure that the jars in WEB-INF/lib are being used instead of from somewhere else.

  • Wl6.1sp2 can't find classes in WEB-INF/lib

              Hi,
              I meet a very strange problem.
              I use struts in my application.so I put struts.jar in web-inf/lib.
              In the .war file, the struts.jar can be found under web-inf/lib.
              my servlet configuration in web.xml is:
              <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              <init-param>
              <param-name>application</param-name>
              <param-value>StrutsProperties</param-value>
              </init-param>
              <init-param>
              <param-name>config</param-name>
              <param-value>/WEB-INF/struts-config.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
              </servlet>
              when this .war file is deploy, the console not show any error message.
              then,when i visit a jsp page that has a <html:form> tag, the console will show
              the error below:
              <Error> <HTTP> <[WebAppServletContext(5418530,struts,/
              struts)] Servlet failed with Exception
              java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
              at java.lang.ClassLoader.defineClass0(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
              1)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
              areClassLoader.java:43)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:120)
              at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:563)
              at jsp_servlet.__logon._jspService(__logon.java:137)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:304)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:200)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              rvletContext.java:2495)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              pl.java:2204)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              note "org/apache/struts/action/ActionForm" can be found when i open struts.jar
              in web-inf/lib
              why weblogic can't find this class but can find the "org.apache.struts.action.ActionServlet",
              these 2 classes should all be located in struts.jar
              i used it in win2k,so i think it may not be connect with case sensitive.
              Any one can give me some help or a link I did not found in this group.
              Thanks
              

              1.the struts-html.tld is in web-inf directory
              2.this is part of the web.xml
              ===========
              <taglib>
              <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
              </taglib>
              ================
              "Deepak Vohra" <[email protected]> wrote:
              >
              >Are the tld files including the struts-html.tld in the web-inf directory
              >& specified in the web.xml deployment descriptor?
              >
              >thanks,
              >
              >Deepak
              >
              >
              >"erric_sarra" <[email protected]> wrote:
              >>
              >>Hi,
              >>I meet a very strange problem.
              >>
              >>I use struts in my application.so I put struts.jar in web-inf/lib.
              >>In the .war file, the struts.jar can be found under web-inf/lib.
              >>
              >>my servlet configuration in web.xml is:
              >> <servlet>
              >> <servlet-name>action</servlet-name>
              >> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              >> <init-param>
              >> <param-name>application</param-name>
              >> <param-value>StrutsProperties</param-value>
              >> </init-param>
              >> <init-param>
              >> <param-name>config</param-name>
              >> <param-value>/WEB-INF/struts-config.xml</param-value>
              >> </init-param>
              >> <load-on-startup>1</load-on-startup>
              >> </servlet>
              >>
              >>when this .war file is deploy, the console not show any error message.
              >>then,when i visit a jsp page that has a <html:form> tag, the console
              >>will show
              >>the error below:
              >><Error> <HTTP> <[WebAppServletContext(5418530,struts,/
              >>struts)] Servlet failed with Exception
              >>java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
              >> at java.lang.ClassLoader.defineClass0(Native Method)
              >> at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              >> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
              >>1)
              >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
              >> at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              >> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              >> at java.security.AccessController.doPrivileged(Native Method)
              >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              >> at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
              >>areClassLoader.java:43)
              >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              >> at java.lang.Class.forName0(Native Method)
              >> at java.lang.Class.forName(Class.java:120)
              >> at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:563)
              >> at jsp_servlet.__logon._jspService(__logon.java:137)
              >> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>pl.java:265)
              >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>pl.java:304)
              >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>pl.java:200)
              >> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              >>rvletContext.java:2495)
              >> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              >>pl.java:2204)
              >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >>>
              >>
              >>note "org/apache/struts/action/ActionForm" can be found when i open
              >struts.jar
              >>in web-inf/lib
              >>why weblogic can't find this class but can find the "org.apache.struts.action.ActionServlet",
              >>these 2 classes should all be located in struts.jar
              >>
              >>i used it in win2k,so i think it may not be connect with case sensitive.
              >>
              >>Any one can give me some help or a link I did not found in this group.
              >>
              >>Thanks
              >>
              >>
              >
              

  • MySql driver not found in WEB-INF/lib

    Hello
    This topic is very often met on this forum but there are no
    suitable answers for the problem I have. I am creating
    a Jsf application and I have setup a connection pool using
    the MySql jar. I want to supply the jar with the war and I keep
    it in WEB-INF/lib directory but I still get ClassNotFoundException.
    I am running this on a Debian machine with Sun JVM 1.5,
    Tomcat 5.0, Mysql 4.1, Connector/J - nightly build from
    20060403 (since the stable version has bugs with Charset).
    Here are the confings. If I missed some of them, pleaste tell
    me.
    War task in build.xml
        <target name="war" depends="build">
          <mkdir dir="${build.dir}"/>
          <war
            basedir="${webroot.dir}"
            warfile="${build.dir}/${project.distname}.war"
            webxml="${webinf.dir}/web.xml">
            <metainf dir="${meta.dir}">
              <include name="context.xml"/>
            </metainf>
            <exclude name="WEB-INF/${build.dir}/**"/>
            <exclude name="WEB-INF/src/**"/>
            <exclude name="WEB-INF/web.xml"/>
          </war>
        </target>
    context.xml
    <Context  path="/jsfblog" docBase="jsfblog.war" reloadable="false" crossContext="true" useNaming="true">
      <Resource name="jdbc/jsfblog" auth="Container" type="javax.sql.DataSource"/>
      <ResourceParams name="jdbc/jsfblog">
        <parameter>
          <name>factory</name>
          <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>
        <parameter>
          <name>url</name>
          <value>jdbc:mysql://localhost/jsfblog</value>
        </parameter>
        <parameter>
          <name>driverClassName</name><value>com.mysql.jdbc.Driver</value>
        </parameter>
        <parameter>
          <name>username</name>
          <value>blog</value>
        </parameter>
        <parameter>
          <name>password</name>
          <value>blog</value>
        </parameter>
        <parameter>
          <name>maxWait</name>
          <value>3000</value>
        </parameter>
        <parameter>
          <name>maxIdle</name>
          <value>100</value>
        </parameter>
        <parameter>
          <name>maxActive</name>
          <value>10</value>
        </parameter>
      </ResourceParams>
    </Context>
    hibernate.cfg.xml
    <hibernate-configuration>
        <session-factory>
            <property name="connection.datasource">java:comp/env/jdbc/jsfblog</property>
            <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
            <property name="current_session_context_class">thread</property>
            <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
            <property name="show_sql">true</property>
            <mapping resource="......"/>
        </session-factory>
    </hibernate-configuration>
    web.xml
    I am not sure if I really need this.
    <web-app>
      <!-- Connection pool configuration  -->
      <resource-ref>
        <description>JSF Blog Database</description>
        <res-ref-name>jdbc/jsfblog</res-ref-name>
        <res-ref-type>javax.sql.DataSource</res-ref-type>
        <res-auth>Container</res-auth>
      </resource-ref>
      <!--  jsf and facelets declarations  -->
    jsfblog.policy
    Not all the rules apply at the same time. I also tried to
    setup the mysql jar in ${catalina.home}/common/lib
    directory and it was loaded but I need to make it work
    in WEB-INF/lib location.
    grant
         permission java.io.FilePermission "${catalina.home}/webapps/jsfblog/WEB-INF/lib/mysql-connector-java-3.1.12-bin.jar", "read";
         permission java.io.FilePermission "${catalina.home}/webapps/jsfblog/WEB-INF/lib/mysql-connector-java-3.1-nightly-20060403-bin.jar", "read";
         permission java.net.SocketPermission "localhost:3306", "connect,resolve";
    grant codeBase "jar:file:${catalina.home}/webapps/jsfblog/WEB-INF/lib/hibernate3.jar!/-" {
         permission java.lang.RuntimePermission "accessDeclaredMembers";
         permission java.util.PropertyPermission "*", "read,write";
         permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    grant codeBase "jar:file:${catalina.home}/webapps/jsfblog/WEB-INF/lib/mysql-connector-java-3.1-nightly-20060403-bin.jar!/-"
         permission java.net.SocketPermission "localhost:3306", "connect,resolve";
         permission java.lang.RuntimePermission "accessDeclaredMembers";
         permission java.util.PropertyPermission "*", "read,write";
         permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    Project layout
    |-- build
    |   `-- jsfblog.war
    |-- build.xml
    |-- conf
    |   `-- 99jsfblog.policy
    |-- deploy
    |   `-- jsfblog.war
    |-- doc
    |   |-- WEB-INF
    |   |   |-- classes
    |   |   |   |-- beans
    |   |   |   |   `-- CategoryBean.class
    |   |   |   |-- blog
    |   |   |   |   |-- Category.class
    |   |   |   |   |-- Category.hbm.xml
    |   |   |   |   |-- Comment.class
    |   |   |   |   |-- Comment.hbm.xml
    |   |   |   |   |-- Post.class
    |   |   |   |   `-- Post.hbm.xml
    |   |   |   |-- hibernate.cfg.xml
    |   |   |   |-- log4j.properties
    |   |   |   `-- util
    |   |   |       |-- HibernateSessionFactory.class
    |   |   |       |-- HibernateUtil.class
    |   |   |       `-- Service.class
    |   |   |-- faces-config.xml
    |   |   |-- lib
    |   |   |   |-- antlr-2.7.5.jar
    |   |   |   |-- asm-attrs.jar
    |   |   |   |-- asm.jar
    |   |   |   |-- cglib-2.1.3.jar
    |   |   |   |-- common-annotations.jar
    |   |   |   |-- commons-beanutils.jar
    |   |   |   |-- commons-collections-2.1.1.jar
    |   |   |   |-- commons-digester.jar
    |   |   |   |-- commons-lang.jar
    |   |   |   |-- commons-logging-1.0.4.jar
    |   |   |   |-- commons-validator.jar
    |   |   |   |-- dom4j-1.6.1.jar
    |   |   |   |-- el-api.jar
    |   |   |   |-- el-ri.jar
    |   |   |   |-- hibernate3.jar
    |   |   |   |-- jsf-api.jar
    |   |   |   |-- jsf-facelets.jar
    |   |   |   |-- jsf-impl.jar
    |   |   |   |-- jsf-tlds.jar
    |   |   |   |-- jstl.jar
    |   |   |   |-- jta.jar
    |   |   |   |-- log4j-1.2.11.jar
    |   |   |   |-- mysql-connector-java-3.1-nightly-20060403-bin.jar
    |   |   |   `-- standard.jar
    |   |   `-- web.xml
    |   |-- admin
    |   |   |-- admintemplate.xhtml
    |   |   |-- category.xhtml
    |   |   |-- index.xhtml
    |   |   `-- skeleton.xhtml
    |   |-- index.jsp
    |   `-- layout.css
    |-- lib
    |   `-- servlet.jar
    |-- meta
    |   `-- context.xml
    `-- src
        |-- beans
        |   `-- CategoryBean.java
        |-- blog
        |   |-- Category.hbm.xml
        |   |-- Category.java
        |   |-- Comment.hbm.xml
        |   |-- Comment.java
        |   |-- Post.hbm.xml
        |   `-- Post.java
        |-- hibernate.cfg.xml
        |-- log4j.properties
        `-- util
            `-- HibernateUtil.javaAnd, finally, the error message:
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
         at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854)
         at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
         ... 60 moreI don't really understand how I can setup the CLASSPATH in this
    context. So there should be something else. Does anyone have an
    idea?
    Thanks.
    Igor

    This is what I achived using the <metainf> tags from
    war task in build.xml. Look at the first code
    listing. The
    magic code is:
    <metainf dir="${meta.dir}">
    <include name="context.xml"/>
    </metainf>where ${meta.dir} is defined as ./meta and there
    resides
    the context.xml file (look at the project layout).Very good, thanks.
    Any guesses why Tomcat is not loading mysql jar from
    WEB-INF/lib directory?No. 8(
    My understanding is that JARs in the WEB-INF/lib are visible only to your web app. Those in /common/lib are visible to all apps and the container. Those in /server/lib are visible only to the container and no apps. It SHOULD work from WEB-INF/lib. I've done it that way, but it was an older version of Tomcat.
    Checked the Tomcat docs. They say to put it in /common/lib, but they don't explicitly forbid it in WEB-INF/lib.
    I'll try a simpler example.
    %

  • How can I access WEB-INF/lib

    Hello all,
    I deployed JClient application using Java Web Start.
    I have the following lines in jnlp file
    <resource>
    <jar href="WEB-INF/lib/share.jar" />
    </resource>
    There's actually share.jar under WEB-INF/lib directory,
    but I got error message when execute the application.
    It seems that I can't access files under WEB-INF via http.
    Does anybody know why?
    Thanks in advance.

    Sorry for being picky on this. Oracle is not doing it, it is the software you're using, ie JDeveloper in your case.
    AFAIK, the Servlet spec states that every library that is needed by the Servlet application should be put under WEB-INF/lib. These libraries are not accessible for any other usage.
    JDev is doing this because your web application needs it.
    If your JNLP application needs it too, JDev should be smart enough to include it twice in your WAR file, once for your web application and once for your JNLP application.
    On the other hand I really hate software that is too smart and causes more problem by being smart than everything else.
    Having said that, please file an enhancement request on Metalink for JDev for better library management for JNLP applications.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Jne.jcert,jsee in web-inf lib

              Here are the details of the error that i am getting :
              Please bear with me as the stack trace is pretty big .
              I am using WebLogic ver 6.1 with Sp2 and JDK1.3.x .
              Following is the piece of the code from myservlet:
              package examples.myapp;
              import Base64Encoder.*;
              import javax.servlet.*;
              import javax.servlet.http.*;
              import java.io.*;
              import java.net.*;
              import java.security.*;
              import com.sun.net.ssl.*;
              import com.sun.net.ssl.HttpsURLConnection;
              import com.sun.net.ssl.internal.ssl.Provider;
              public class MyServlet extends HttpServlet {
              private final static String CONTENT_TYPE = "text/xml";
              private String SERVLETURL;
              private String USER_NAME;
              private String USER_PASSWORD;
              public void init(ServletConfig config) throws ServletException {
              super.init(config);
              SERVLETURL =”https://abc/xyz “;
              USER_NAME = getInitParameter("USER_NAME");
              USER_PASSWORD = getInitParameter("USER_PASSWORD");
              public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
              try {
              Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              System.setProperty("java.protocol.handler.pkgs",
              "com.sun.net.ssl.internal.www.protocol");
              String urlname = SERVLETURL;
              PrintWriter out = response.getWriter();
              URL url = new URL(urlname);
              HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
              } catch (Exception e) {
              e.printStackTrace();
              Following is the str of myapp:
              Build
              Build/web-inf
              Build/web-inf/classes
              Build/web-inf/lib
              If I add jnet.jar,jcert.jar,jsse.jar in web-inf/lib then I get following msg
              java.lang.reflect.InvocationTargetException: weblogic.management.DistributedManagementException:
              Distributed Management [1 exceptions]
                   at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:443)
                   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 $Proxy9.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.management.console.utils.SetException: An error occurred while updating
              Application.Deployed on Proxy for examples:Application=myapp,Name=myapp,Type=WebAppComponent
              - with nested exception:
              [java.lang.reflect.InvocationTargetException - with target exception:
              [weblogic.management.DistributedManagementException: Distributed Management [1
              exceptions]]]
                   at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:151)
                   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)
              Console Release Build
              6.1.2.0
              Server Release Build
              6.1.2.0
              Server Build
              WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
              All Server Product Versions
              WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529 WebLogic XML Module 6.1
              SP2 12/18/2001 11:28:02 #154529
              Also this what i get from stack trace:
              weblogic.j2ee.DeploymentException: Could not load myapp - 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
              ava: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(ConfigurationMBe
              Impl.java:392)
              at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl
              ava: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 $Proxy9.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.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.j
              a:135)
              at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:
              1)
              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:
              95)
              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)
              >
              <Feb 19, 2003 11:06:53 AM EST> <Error> <J2EE> <Error deploying application myapp:
              Could not loa
              myapp>
              <Feb 19, 2003 11:06:53 AM EST> <Error> <Management> <InvocationTargetException
              setting attribute D
              loyed on MBean examples:Location=examplesServer,Name=myapp,Type=ApplicationConfig
              to value true
              Method: public void weblogic.management.mbeans.custom.Application.setDeployed(boolean)
              throws webl
              ic.management.DeploymentException,weblogic.management.UndeploymentException
              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:177)
              at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.j
              a:3405)
              at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:337
              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
              ava: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(ConfigurationMBe
              Impl.java:392)
              at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl
              ava: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 $Proxy9.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.j
              a:135)
              at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:
              1)
              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:
              95)
              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 myapp - 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
              ava: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(ConfigurationMBe
              Impl.java:392)
              at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl
              ava: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 $Proxy9.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.j
              a:135)
              at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:
              1)
              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:
              95)
              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)
              >
              Plase suggest what should i do .
              Thanks,
              ag
              

    The alternative option is:
              >b) stay on sp2 try to muck with the jar files and fix manifest entries.
              That means take each of the jars, and see if the manifest looks corrupted.
              You could try starting with only one of them in "installed" and see which
              one is "bad", and then you can unjar it and , examine the manifest, fix it
              and rejar it.
              Here is the line that was busted:
              // End of header
              if (line.length() == 0) {
              return true;
              String key = line.substring(0, line.indexOf(':'));
              String value = line.substring(line.indexOf(':') + 2, line.length());
              addHeader(key, value);
              Cheers
              mbg
              "ag" <[email protected]> wrote in message
              news:[email protected]...
              >
              > We will not be upgrading to 6.1 sp3. So Could you please provide more
              details
              > about the alternative option to use https url connection from servlet.
              >
              >
              > Thanks,
              > ag
              >
              >
              > "ag" <[email protected]> wrote:
              > >
              > >Here are the details of the error that i am getting :
              > >Please bear with me as the stack trace is pretty big .
              > >I am using WebLogic ver 6.1 with Sp2 and JDK1.3.x .
              > >
              > >Following is the piece of the code from myservlet:
              > >
              > >package examples.myapp;
              > >
              > >
              > >import Base64Encoder.*;
              > >import javax.servlet.*;
              > >import javax.servlet.http.*;
              > >import java.io.*;
              > >import java.net.*;
              > >import java.security.*;
              > >import com.sun.net.ssl.*;
              > >import com.sun.net.ssl.HttpsURLConnection;
              > >import com.sun.net.ssl.internal.ssl.Provider;
              > >public class MyServlet extends HttpServlet {
              > >
              > > private final static String CONTENT_TYPE = "text/xml";
              > > private String SERVLETURL;
              > > private String USER_NAME;
              > > private String USER_PASSWORD;
              > >public void init(ServletConfig config) throws ServletException {
              > > super.init(config);
              > > SERVLETURL ="https://abc/xyz ";
              > > USER_NAME = getInitParameter("USER_NAME");
              > > USER_PASSWORD = getInitParameter("USER_PASSWORD");
              > > }
              > >
              > > public void doGet(HttpServletRequest request, HttpServletResponse
              > >response)
              > > throws ServletException, IOException {
              > > try {
              > >
              > > Security.addProvider(new
              com.sun.net.ssl.internal.ssl.Provider());
              > >
              > > System.setProperty("java.protocol.handler.pkgs",
              > > "com.sun.net.ssl.internal.www.protocol");
              > > String urlname = SERVLETURL;
              > > PrintWriter out = response.getWriter();
              > > URL url = new URL(urlname);
              > >HttpsURLConnection connection = (HttpsURLConnection)
              url.openConnection();
              > >
              > >
              > >..
              > >..
              > >..
              > >..
              > >..
              > >
              > > } catch (Exception e) {
              > > e.printStackTrace();
              > >
              > > }
              > >
              > >
              > >Following is the str of myapp:
              > >
              > >Build
              > >Build/web-inf
              > >Build/web-inf/classes
              > >Build/web-inf/lib
              > >
              > >If I add jnet.jar,jcert.jar,jsse.jar in web-inf/lib then I get following
              > > msg
              > >:
              > >
              > >java.lang.reflect.InvocationTargetException:
              weblogic.management.DistributedManagementException:
              > >Distributed Management [1 exceptions]
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(Confi
              gurationMBeanImpl.java:443)
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(Configurati
              onMBeanImpl.java:298)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:135
              6)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:133
              1)
              > > at
              weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
              > > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
              > > at $Proxy9.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(DoEditMB
              eanAction.java:135)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
              rvlet.java:171)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
              let.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(WebAppServletCo
              ntext.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.management.console.utils.SetException: An error occurred while
              > >updating
              > >Application.Deployed on Proxy for
              examples:Application=myapp,Name=myapp,Type=WebAppComponent
              > >- with nested exception:
              > >[java.lang.reflect.InvocationTargetException - with target exception:
              > >[weblogic.management.DistributedManagementException: Distributed
              Management
              > >[1
              > >exceptions]]]
              > > at
              weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMB
              eanAction.java:151)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
              rvlet.java:171)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
              let.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(WebAppServletCo
              ntext.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)
              > >
              > >
              > >
              > >Console Release Build
              > >6.1.2.0
              > >
              > >Server Release Build
              > >6.1.2.0
              > >
              > >Server Build
              > >WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
              > >
              > >All Server Product Versions
              > >WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529 WebLogic XML Module
              > >6.1
              > >SP2 12/18/2001 11:28:02 #154529
              > >
              > >Also this what i get from stack trace:
              > >
              > >weblogic.j2ee.DeploymentException: Could not load myapp - 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.j
              ava:362)
              > > at
              weblogic.management.mbeans.custom.Application.setDeployed(Application.java:2
              96)
              > > 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(Configurati
              onMBeanImpl
              > >ava:295)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:135
              6)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:133
              1)
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(Confi
              gurationMBe
              > >Impl.java:392)
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(Configurati
              onMBeanImpl
              > >ava:298)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:135
              6)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:133
              1)
              > > at
              weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
              > > at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
              > > at $Proxy9.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.actions.mbean.DoEditMBeanAction.perform(DoEditMB
              eanAction.j
              > >a:135)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
              rvlet.java:
              > >1)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
              let.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(WebAppServletCo
              ntext.java:
              > >95)
              > > 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)
              > >>
              > ><Feb 19, 2003 11:06:53 AM EST> <Error> <J2EE> <Error deploying
              application
              > >myapp:
              > >Could not loa
              > >myapp>
              > ><Feb 19, 2003 11:06:53 AM EST> <Error> <Management>
              <InvocationTargetException
              > >setting attribute D
              > >loyed on MBean
              examples:Location=examplesServer,Name=myapp,Type=ApplicationConfig
              > >to value true
              > >Method: public void
              weblogic.management.mbeans.custom.Application.setDeployed(boolean)
              > >throws webl
              >
              >ic.management.DeploymentException,weblogic.management.UndeploymentException
              > >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:1
              77)
              > > at
              weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServl
              etContext.j
              > >a:3405)
              > > at
              weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletConte
              xt.java:337
              > >
              > > at
              weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.jav
              a:862)
              > > at
              weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.j
              ava: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.j
              ava:362)
              > > at
              weblogic.management.mbeans.custom.Application.setDeployed(Application.java:2
              96)
              > > 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(Configurati
              onMBeanImpl
              > >ava:295)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:135
              6)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:133
              1)
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(Confi
              gurationMBe
              > >Impl.java:392)
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(Configurati
              onMBeanImpl
              > >ava:298)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:135
              6)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:133
              1)
              > > at
              weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
              > > at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
              > > at $Proxy9.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(DoEditMB
              eanAction.j
              > >a:135)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
              rvlet.java:
              > >1)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
              let.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(WebAppServletCo
              ntext.java:
              > >95)
              > > 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 myapp - 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.j
              ava:362)
              > > at
              weblogic.management.mbeans.custom.Application.setDeployed(Application.java:2
              96)
              > > 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(Configurati
              onMBeanImpl
              > >ava:295)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:135
              6)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:133
              1)
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(Confi
              gurationMBe
              > >Impl.java:392)
              > > at
              weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(Configurati
              onMBeanImpl
              > >ava:298)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:135
              6)
              > > at
              com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:133
              1)
              > > at
              weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
              > > at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
              > > at $Proxy9.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(DoEditMB
              eanAction.j
              > >a:135)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
              rvlet.java:
              > >1)
              > > at
              weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
              let.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(WebAppServletCo
              ntext.java:
              > >95)
              > > 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)
              > >>
              > >
              > >
              > >
              > >
              > >Plase suggest what should i do .
              > >
              > >Thanks,
              > >ag
              >
              

Maybe you are looking for