WAR: making executable with reference to lib in WEB-INF/lib?
I have a custom library (jar file) with a manifest to show version infos when started/double cliked. this works quite good. this jar file is now part of a bigger war file. now, i want to double click the war file to show the version info. i already added a manifest to the war file and double clicking works as expected but the (main) class is not found. i tried to add WEB-INF/lib/mylib.jar to the manifest Class-Path: entry, but that doesn't work. is there a way to tell the manifest, that it should look in the war's web-inf/lib subdirectory to look for classes? or is this an approach that couldn't be solved?
My first reaction here is to say you shouldn't do that. It seems to me that you're just asking for trouble when you start modifying the manifest class path of your WAR to try and make it an executable war - if you do succeed you might end up not being able to have the thing function as a WAR.
but that aside, I don't think (I've not tested/invistigated this very much) that you can access classes contained withing jars that are themselves contained within a jar without doing some sort of custom classloader craziness - and if you have to go down that route then you definitely don't want t o muck up your WAR like that.
I suggest that you create a Servlet (or Struts action, or whatever you have going on) such that when you hit that via a JSP (possibly protected via some sort of security) you get the results of your versioning method dumped out on your browser. That would be more "natural" and go with the Zen of the technology you're using.
Good Luck
Lee
Similar Messages
-
Oc4j 10.1.3.0.0Prev4 does not load libs in WEB-INF/lib
Hi,
trying to use an existing application with oc4j I have serious problems.
When trying to deploy I get exceptions (ClassNotFound) of classes that are in libs that are in the WEB-INF/lib folder of the war file I want to deploy:
05/09/23 17:20:21 CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
This class is in hibernate3.jar which is included in the war-file.
When I place all the libs into the applib folder it does deploy. But then it crashes at runtime telling me the classes are duplicate (one in the war, one in applib).
Any suggestions what I can do would be greatly appreciated.
NorbertHello,
Instead of simply dropping the Jar file in the applib directory you should create shared libraries that will give you better control of what is happening at the classloader level (System, Application and Web Application)
Please take a look to the 10.1.3 How tos about shared library. (Swapping XML parser and JDBC driver), and also to the documentation, chapter 7 "Using Shared Libraries" of the OC4J Configuration and Administration Guide
Regards
Tugdual Grall -
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 PMNote : 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 -
Re: Recognizing JAR files in WEB-INF/lib
Steven Vetzal wrote:
I am attempting to open existing web projects in NitroX and am beingplagued with:
The class "com.someone.Class" is not in the application class path
The classes are contained in JAR files in WEB-INF/lib.
I have been looking for a way to add these JAR files to the classpath.
There is no builder registered, so I'm not sure I can even get there
from here :)
Don't you love it when people answer their own questions?
Here's what I did:
Add the following sections to the .project file-
Under BuildSpec:
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
Under natures:
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.m7.nitrox.webProjectNature</nature>
This fixed up all my classpath issues - after I modified the Java
classpath of course... For example, my .classpath file looks like:
<classpathentry kind="src" path="WEB-INF/classes"/>
<classpathentry kind="lib" path="WEB-INF/lib/cms-bindings-3.0.2.jar"/>
<classpathentry kind="con" path="J2ee.runtime.m7"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="WEB-INF/lib/cms-ejb-2.4.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jstl.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/standard.jar"/>
<classpathentry kind="output" path="WEB-INF/classes"/>
I found that by examining these files from other projects (like from the
web project wizard) it was easy to find out what my broken project was
missing.
Hopefully this will help someone else one day :)
SteveHi Steven,
Sorry for the late response, next time you can do this in a more simple way
by launching Properties window (right click on project) and select Java
Build Path, click on Libraries tab.
Thanks
M7 Support
"Steven Vetzal" <[email protected]> wrote in message
news:[email protected]..
Steven Vetzal wrote:I am attempting to open existing web projects in NitroX and am being
plagued with:
The class "com.someone.Class" is not in the application class path
The classes are contained in JAR files in WEB-INF/lib.
I have been looking for a way to add these JAR files to the classpath.
There is no builder registered, so I'm not sure I can even get there from
here :)
Don't you love it when people answer their own questions?
Here's what I did:
Add the following sections to the .project file-
Under BuildSpec:
buildCommand
name>org.eclipse.jdt.core.javabuilder</name
arguments
/arguments
/buildCommand
Under natures:
nature>org.eclipse.jdt.core.javanature</nature
nature>com.m7.nitrox.webProjectNature</nature
This fixed up all my classpath issues - after I modified the Java
classpath of course... For example, my .classpath file looks like:
classpathentry kind="src" path="WEB-INF/classes"/
classpathentry kind="lib" path="WEB-INF/lib/cms-bindings-3.0.2.jar"/
classpathentry kind="con" path="J2ee.runtime.m7"/
classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/
classpathentry kind="lib" path="WEB-INF/lib/cms-ejb-2.4.0.jar"/
classpathentry kind="lib" path="WEB-INF/lib/jstl.jar"/
classpathentry kind="lib" path="WEB-INF/lib/standard.jar"/
classpathentry kind="output" path="WEB-INF/classes"/
I found that by examining these files from other projects (like from the
web project wizard) it was easy to find out what my broken project was
missing.
Hopefully this will help someone else one day :)
Steve -
Project librarys not included in WAR file with deployment (WEB-INF/lib)
Using JDeveloper 9.0.5.2
Project Libraries are not included in WEB-INF/lib when deploying. Although the files are selected in the deployment file at 'Contributors'. Within the 'filter' the .jar files are missing.
To solve it i have to register again (i have already made the librarys project library's) the files within Tools->ManageLibrarys as user library's.
The other workaround is to make the library's System Library's within the project.
In my opinion it is a bug that you must include the project librarys as user librarys within the 'LibraryManager'Unfortunately no, the issue with output folder being ignored occurs only with example apps bundled with Workshop product.
You can try the following workaround:
- In Workshop, Project > Properties - Java Build Path, switch to Source tab - "Remove the source folder listing" - Click OK and dismiss Properties window.
- Project > Properties - Java Build Path > Source Tab, add the same source folder entry - Click OK
- Export as WAR
With this you should see the class files bundled under output directory structure (Ex: WEB-INF/classes). -
Working with tag-library which is packed in WEB-INF\lib\jar-file.jar:
Hi,
When importing a webworks war file, which contains default taglib.tld in the webworks.jar which is packed in /Web-Inf/lib/webworks.2.1.7.jar the war file.
I am getting following error while running the jsp.
Error(6): duplicated tag definitions within the same TLD: text
Error(6): java.lang.NullPointerException
Error(6): Unable to load taghandler class: /webwork
Line which points to Errors is "<%@ taglib prefix="ww" uri="/webwork" %>"
But, There is a taglib.tld in /Web-Inf/lib/webworks.2.1.7.jar!\meta-inf\tablib.tld
which mentions uri as
<taglib>
<tlib-version>2.2.1</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>WebWork Taglib</short-name>
<uri>/webwork</uri>
</taglib>
But, There is no following entry for '/webwork' (uri) in web.xml
Same war is working fine in tomcat webserver.
Can anybody explain me how to work with this kind of a setup, where taglib is packed in some jar which is packed in Web-Inf/lib dir.
Thanks,
SivaI found the problem. The web-app was finding the class in the APP-INf/lib. But the problem was being caused due to a reference to another class that was being loaded by the webapp classloader which was not visible to the class inside the common jar. The solution was to make sure both classes were being loaded by one class loader.
Thanks anyway
Sameet -
OAS 10.1.3 isn't detecting /WEB-INF/lib jar files within WAR file
Hello,
I have been developing and testing a simple non-EJB web application on Tomcat 5.5 with no class loading difficulties for the past several months. All of the needed JARs for my app are located under the WEB-INF/lib directory. My next task is to deploy the WAR file containing my webapp on the Oracle 10g (10.1.3) application server.
The problem I am having when trying to do this is that when I deploy the WAR file from Oracle Enterprise Manager, the WAR file will expand correctly but at runtime OAS doesn't appear to be detecting the JAR files in the WEB-INF/lib folder of my WAR file. I have confirmed that the JAR files are indeed being expanded in the directory that OC4J expands the WAR file into:
appserver/j2ee/home/applications/appEARFile/MyWebApp/WEB-INF/lib.
But when I run the application, from the Firefox browser I immediately get the following 500 Internal Server Error:
"Servlet error: Error instantiating servlet 'reports'. Servlet class org.springframework.web.servlet.DispatcherServlet not found in web-application MyWebApp"
(The IE browser just gives me the 500 error without additional elaboration.)
But my spring.jar where that class is located is in the WEB-INF/lib directory. Does anyone have an idea what the solution is--how can I get OC4J to read the spring.jar (or any jar) in that lib folder? (Or is there a way I can configure logging to better pinpoint the problem if that isn't it?)
Thanks,
GlenGlen,
You said:
IE browser just gives me the 500 error without
additional elaborationTry unsetting the "Show friendly HTTP error
messages".
From the "Tools" menu of Microsoft Internet Explorer,
choose "Internet Options".
(You should then see another window entitled
"Internet Properties" displayed.)
Select the "Advanced" tab and search for "Show
friendly HTTP error messages".
Excellent--that worked. Thanks! I was afraid that I would have to be debugging on Firefox exclusively.
I also suggest setting the
"search-local-classes-first" attribute, of the
"web-app-class-loader" element, in your
"orion-web.xml" file to 'true' (if it isn't
already).
That did it. My orion-web.xml file was of the old DTD-based version, I believe that was causing the problem.
The following document:
Oracle® Containers for J2EE
Developers Guide
10g Release 3 (10.1.3)
Part No. B14433-01
has a chapter (3) entitled Utilizing the OC4J
Class Loading Framework which contains a section
entitled Troubleshooting Class Loading-Related
Problems in OC4J.
Thanks for the link, I went through it thoroughly in trying to fix my problem.
Glen -
WEB-INF/lib (.war) Vs META-INF/MANIFEST.MF (.ear)
What are the Class loading differences between libraries that are in a web application web-inf/lib and that are in class-path entry of META-INF/manifest.mf of a ear.
I recently developed a web services application with a ejb endpoint.Then
packaged it in a ear file with the classpath entry .The problem occured when I placed the weblogic.jar(and other third party jars) in the ear file which my ejb.jar uses as utility jar's. Jboss starts behaving weird.Some of the classes of jboss are overwritten and class cast exception errors started coming up.
Overnight I changed the application to a servlet end point and placed all my jars in the WEB-INF/lib then everything started working smooth.
Can any body help me , understand what is happening. Why doesn't j2ee have something like META-INF/libWhat 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? -
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? -
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) -
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.
-
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
RajasekaranHello,
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 -
JAR Files not found from /WEB-INF/lib
It appears that weblogic server (6.1 SP2 I believe) is not finding all
the jar files in the /WEB-INF/lib directory. Some, but not all. I am
not using a WAR file, the dirctories are right on the disk. I start
out with the following jar files in my WEB-INF/lib directory:
Volume in drive C has no label.
Volume Serial Number is 641F-B7A0
Directory of C:\bea\wlserver6.1\config\mydomain\applications\garyapp\WEB-INF\li
b
02/13/2002 11:34a <DIR> .
02/13/2002 11:34a <DIR> ..
01/25/2002 09:44a 45,386 activation-1.0.1.jar
01/07/2002 04:49p 1,124,276 classes12.jar
01/25/2002 09:44a 379,658 ecs-1.4.1.jar
01/25/2002 09:44a 175,666 hsql.jar
01/25/2002 09:44a 76,964 httpunit.jar
01/25/2002 09:44a 236,041 idb.jar
01/25/2002 09:44a 29,937 jakarta-regexp-1.3-dev.jar
01/25/2002 09:44a 84,854 jdbc-se2.0.jar
01/25/2002 09:44a 6,727 jdbc2_0-stdext.jar
01/25/2002 09:44a 98,496 jndi-1.2.1.jar
01/25/2002 09:44a 17,619 jta1.0.1.jar
01/25/2002 09:44a 97,382 junit-3.2.jar
01/25/2002 09:44a 152,037 log4j-1.1.jar
01/25/2002 09:44a 280,984 mail-1.2.jar
01/25/2002 09:44a 109,927 mm.mysql-2.0.4.jar
01/25/2002 09:44a 76,734 oro.jar
01/25/2002 09:44a 194,500 postgresql.jar
01/25/2002 09:44a 4,041 README.txt
01/25/2002 09:44a 208,635 sapdbc.jar
02/13/2002 11:21a 216,879 STT.jar
02/08/2002 12:15p 707,897 turbine-2.2b1.jar
01/25/2002 09:44a 369,494 velocity-1.2-dev.jar
01/25/2002 09:44a 31,326 village-1.5.1.jar
01/25/2002 09:44a 436,094 xalan-1.2.1.jar
01/25/2002 09:44a 840,704 xerces-1.3.0.jar
01/25/2002 09:44a 47,926 xmlrpc.jar
26 File(s) 6,050,184 bytes
2 Dir(s) 29,539,246,080 bytes free
When I run the server, only these files are put in the tmp_war
directory:
Volume in drive C has no label.
Volume Serial Number is 641F-B7A0
Directory of C:\bea\wlserver6.1\config\mydomain\applications\garyapp\WEB-INF\_t
mp_war_myserver_myserver_garyapp\WEB-INF\lib
02/15/2002 12:31p <DIR> .
02/15/2002 12:31p <DIR> ..
02/15/2002 12:31p 1,124,276 classes1263855.jar
02/15/2002 12:31p 175,666 hsql63856.jar
02/15/2002 12:31p 76,964 httpunit63857.jar
02/15/2002 12:31p 236,041 idb63858.jar
02/15/2002 12:31p 6,727 jdbc2_0-stdext63859.jar
02/15/2002 12:31p 76,734 oro63860.jar
02/15/2002 12:31p 194,500 postgresql63861.jar
02/15/2002 12:31p 208,635 sapdbc63862.jar
02/15/2002 12:31p 216,879 STT63863.jar
02/15/2002 12:31p 47,926 xmlrpc63864.jar
10 File(s) 2,364,348 bytes
2 Dir(s) 29,539,078,144 bytes free
It's not only that the files don't show up, of course: if I run the
system and it makes references to the files, I get a
ClassNotFoundException:
<Feb 15, 2002 12:32:39 PM EST> <Error> <HTTP>
<[WebAppServletContext(7243997,gar
yapp,/garyapp)] Error loading servlet: "garyapp"
java.lang.ClassNotFoundException: org.apache.turbine.Turbine
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
Loader.java:179)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAw
areClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
areClassLoader.java:43)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:583)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
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)
>
<Feb 15, 2002 12:32:39 PM EST> <Error> <HTTP>
<[WebAppServletContext(7243997,gar
yapp,/garyapp)] Servlet failed with ServletException
javax.servlet.ServletException: Servlet class:
'org.apache.turbine.Turbine' coul
d not be loaded - the requested class wasn't found in the classpath:
'C:\bea\wl
server6.1\config\mydomain\applications\garyapp;C:\bea\wlserver6.1\.\config\mydom
ain\applications\garyapp\WEB-INF\classes;C:\bea\wlserver6.1\.\config\mydomain\ap
plications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\classe
s1263855.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_
tmp_war_myserver_myserver_garyapp\WEB-INF\lib\hsql63856.jar;C:\bea\wlserver6.1\.
\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp
\WEB-INF\lib\httpunit63857.jar;C:\bea\wlserver6.1\.\config\mydomain\applications
\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\idb63858.jar;C:\
bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver
myservergaryapp\WEB-INF\lib\jdbc2_0-stdext63859.jar;C:\bea\wlserver6.1\.\confi
g\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-I
NF\lib\oro63860.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WE
B-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\postgresql63861.jar;C:\bea\
wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_mys
erver_garyapp\WEB-INF\lib\sapdbc63862.jar;C:\bea\wlserver6.1\.\config\mydomain\a
pplications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\STT63
863.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_w
ar_myserver_myserver_garyapp\WEB-INF\lib\xmlrpc63864.jar'
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:594)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
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)
>Please open a case with support on this issue.
Thanks,
Michael
Gary Bisaga wrote:
It appears that weblogic server (6.1 SP2 I believe) is not finding all
the jar files in the /WEB-INF/lib directory. Some, but not all. I am
not using a WAR file, the dirctories are right on the disk. I start
out with the following jar files in my WEB-INF/lib directory:
Volume in drive C has no label.
Volume Serial Number is 641F-B7A0
Directory of C:\bea\wlserver6.1\config\mydomain\applications\garyapp\WEB-INF\li
b
02/13/2002 11:34a <DIR> .
02/13/2002 11:34a <DIR> ..
01/25/2002 09:44a 45,386 activation-1.0.1.jar
01/07/2002 04:49p 1,124,276 classes12.jar
01/25/2002 09:44a 379,658 ecs-1.4.1.jar
01/25/2002 09:44a 175,666 hsql.jar
01/25/2002 09:44a 76,964 httpunit.jar
01/25/2002 09:44a 236,041 idb.jar
01/25/2002 09:44a 29,937 jakarta-regexp-1.3-dev.jar
01/25/2002 09:44a 84,854 jdbc-se2.0.jar
01/25/2002 09:44a 6,727 jdbc2_0-stdext.jar
01/25/2002 09:44a 98,496 jndi-1.2.1.jar
01/25/2002 09:44a 17,619 jta1.0.1.jar
01/25/2002 09:44a 97,382 junit-3.2.jar
01/25/2002 09:44a 152,037 log4j-1.1.jar
01/25/2002 09:44a 280,984 mail-1.2.jar
01/25/2002 09:44a 109,927 mm.mysql-2.0.4.jar
01/25/2002 09:44a 76,734 oro.jar
01/25/2002 09:44a 194,500 postgresql.jar
01/25/2002 09:44a 4,041 README.txt
01/25/2002 09:44a 208,635 sapdbc.jar
02/13/2002 11:21a 216,879 STT.jar
02/08/2002 12:15p 707,897 turbine-2.2b1.jar
01/25/2002 09:44a 369,494 velocity-1.2-dev.jar
01/25/2002 09:44a 31,326 village-1.5.1.jar
01/25/2002 09:44a 436,094 xalan-1.2.1.jar
01/25/2002 09:44a 840,704 xerces-1.3.0.jar
01/25/2002 09:44a 47,926 xmlrpc.jar
26 File(s) 6,050,184 bytes
2 Dir(s) 29,539,246,080 bytes free
When I run the server, only these files are put in the tmp_war
directory:
Volume in drive C has no label.
Volume Serial Number is 641F-B7A0
Directory of C:\bea\wlserver6.1\config\mydomain\applications\garyapp\WEB-INF\_t
mp_war_myserver_myserver_garyapp\WEB-INF\lib
02/15/2002 12:31p <DIR> .
02/15/2002 12:31p <DIR> ..
02/15/2002 12:31p 1,124,276 classes1263855.jar
02/15/2002 12:31p 175,666 hsql63856.jar
02/15/2002 12:31p 76,964 httpunit63857.jar
02/15/2002 12:31p 236,041 idb63858.jar
02/15/2002 12:31p 6,727 jdbc2_0-stdext63859.jar
02/15/2002 12:31p 76,734 oro63860.jar
02/15/2002 12:31p 194,500 postgresql63861.jar
02/15/2002 12:31p 208,635 sapdbc63862.jar
02/15/2002 12:31p 216,879 STT63863.jar
02/15/2002 12:31p 47,926 xmlrpc63864.jar
10 File(s) 2,364,348 bytes
2 Dir(s) 29,539,078,144 bytes free
It's not only that the files don't show up, of course: if I run the
system and it makes references to the files, I get a
ClassNotFoundException:
<Feb 15, 2002 12:32:39 PM EST> <Error> <HTTP>
<[WebAppServletContext(7243997,gar
yapp,/garyapp)] Error loading servlet: "garyapp"
java.lang.ClassNotFoundException: org.apache.turbine.Turbine
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
Loader.java:179)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAw
areClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
areClassLoader.java:43)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:583)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
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)
>
<Feb 15, 2002 12:32:39 PM EST> <Error> <HTTP>
<[WebAppServletContext(7243997,gar
yapp,/garyapp)] Servlet failed with ServletException
javax.servlet.ServletException: Servlet class:
'org.apache.turbine.Turbine' coul
d not be loaded - the requested class wasn't found in the classpath:
'C:\bea\wl
server6.1\config\mydomain\applications\garyapp;C:\bea\wlserver6.1\.\config\mydom
ain\applications\garyapp\WEB-INF\classes;C:\bea\wlserver6.1\.\config\mydomain\ap
plications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\classe
s1263855.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_
tmp_war_myserver_myserver_garyapp\WEB-INF\lib\hsql63856.jar;C:\bea\wlserver6.1\.
\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp
\WEB-INF\lib\httpunit63857.jar;C:\bea\wlserver6.1\.\config\mydomain\applications
\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\idb63858.jar;C:\
bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver
myservergaryapp\WEB-INF\lib\jdbc2_0-stdext63859.jar;C:\bea\wlserver6.1\.\confi
g\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-I
NF\lib\oro63860.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WE
B-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\postgresql63861.jar;C:\bea\
wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_mys
erver_garyapp\WEB-INF\lib\sapdbc63862.jar;C:\bea\wlserver6.1\.\config\mydomain\a
pplications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\STT63
863.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_w
ar_myserver_myserver_garyapp\WEB-INF\lib\xmlrpc63864.jar'
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:594)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
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)
>--
Michael Young
Developer Relations Engineer
BEA Support -
Bug using WEB-INF/lib Jar archives
Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
application in the form of a War file and it is now under the APPS/modules
directory as the following directory: APPS/modules/ourapp.
When I start the iPlanet Application Server, it fails to find any of the
classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
One workaround is to unjar all of these files, but this is counter to the
J2EE spec. Another workaround is to modify the classpath in the iPlanet
registry, but this would expose the classes to other Web applications
running in the same server.
Thanks for any help. MartinHi Martin,
I think you are packinh up the jar file inside the war module, as far as i know
there should be no jar file inside the module/App-name dir tree.
all the modules either war or jar should be in <GX_ROOT_DIR>/JAR dir.
So try making the war module with class files only(static content can also be
added) with appropriate deployment descriptor.
I will mail you separately the procedure for creating a war file from deployment
tool gui.
Please mail me back if you have any other problems.
Sanjeev.
Developer Support Group iAS.
Martin Gilchrist wrote:
Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
application in the form of a War file and it is now under the APPS/modules
directory as the following directory: APPS/modules/ourapp.
When I start the iPlanet Application Server, it fails to find any of the
classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
One workaround is to unjar all of these files, but this is counter to the
J2EE spec. Another workaround is to modify the classpath in the iPlanet
registry, but this would expose the classes to other Web applications
running in the same server.
Thanks for any help. Martin -
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
>>
>>
>
Maybe you are looking for
-
Canon HF11 not showing up in log and transfer window
I am using FC Studio 6.0.6 and a Canon HD USB camera. The camera does not show up in the log and transfer window. It shows up on the desktop, works with iMovie '09 but not FCP. If I try to select files from the camera they are greyed out. Strange thi
-
How do I add a newfolder to my e-mail
I cannot find where to enter a new folder so I can keep my certain emails in different folders. any help would be appreciated.
-
Dual control for vendors per Company code
Hi, we are going to setup dual control (sensitive fields) for master data of vendors (fk01, fk02). Is there a possibilty to use dual control only for certain company codes and not all? How can I restrict this - via workflow, user authorisation, user
-
Lightroom, PhotoShop, Camera RAW & Bridge?
Hi Guys I run PS CS5 (in the Master Collection) and I would be interested to find out if Lightroom offers something PS, Bridge and Camera Raw cannot provide separately or combined? I've been using PS for a good few years but now I'm working with my o
-
Does the quality playback matter when I import footage to edit in a project
I don't have an HD cam, but I have a professional camera, a Canon GL2 to be exact, and I was just dumbfounded when I was importing the video into my project and it was being viewed blurry! I then adjusted the playback quality to highest with field bl