Classes in web-inf/lib not being found.

I'm having problems with a servlet app in which jar files placed in the web-inf/lib of the application are not found at runtime.
If I put them in J2ee\home\lib they are found OK.
This application has previously deployed and worked correctly, then I added another servlet and redeployed, and classes that were previously found OK stopped being found.
On checking the server all the directories look correct.
What could be causing this and how can I make my web applications deploy reliably?
OC4J version is 9.0.3.0.0.
Thanks

Guys,
Have you tried with the production version of OC4J 9.0.2 ? It should work. Please download the production version of OC4J 9.0.2 and give a try.
regards
Debu Panda
Oracle

Similar Messages

  • Problems with WEB-INF files not being found.

    We are using Sun Java Web Server v6.1SP2. I have tried to install the struts example application into the docroot. The application makes use of tld files (tag libraries) that are stored in the WEB-INF directory.
    I receive the following error when starting the web server:
    [29/Oct/2004:15:11:30] failure (22379): for host 169.198.12.50 trying to GET /index.jsp, service-j2ee reports: S
    tandardWrapperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: WEB4059: can't find /WEB-INF/struts-bean.tld (File not found)
    The file IS in the directory.
    Thanks in advance for any assistance.
    TJ Herring
    [email protected]

    Web Server denies access to the WEB-INF directory.

  • Is there a restriction on loading "javax" classes from WEB-INF/lib?

    I'm having trouble with a webapp in WL 10MP1 that is having trouble loading classes from the "jsr311-api-1.0.jar" in my WEB-INF/lib. Even though I have no trouble with it in Eclipse (no compile errors), classes from that jar fail with "NoClassDefFound" exceptions. I have a feeling it might be the fact that the packages in that jar start with "javax". Assuming that's the case, is there anything I can do to fix this?
    What's even stranger is that the errors I get are when I try to load them directly from the Spring context. However, if I remove the test references to those classes, there's other code that loads those classes later in the application startup (after the Spring context finishes loading), and they load perfectly fine (I turned on verbose class loading to verify this).

    Note that I've tried two other strategies that both result in the same failed state.
    I tried putting the "jsr311-api-1.0.jar" in $JDK_HOME/jre/lib/ext, but that causes a failure to find Spring classes. I then copied the "spring.jar" into $DOMAIN_HOME/lib, and then it fails to find CXF classes. After doing the same with "cxf-2.2.3.jar", it then fails to find "javax.servlet.ServletContextListener", which clearly tells me there's no benefit to this approach.
    Similarly, I tried copying the jars into $DOMAIN_HOME/lib, and that fails to find "org.apache.commons.logging.LogFactory". I could continue down this path, but it doesn't seem likely to succeed. Eventually, I'll get to a point where it just can't find the classes specific to my application, which I certainly can't copy into $DOMAIN_HOME/lib.
    The first basic problem is that I can't put anything into a higher-level classloader that will eventually reference classes in a lower-level classloader, because references can only go up the chain, and the second problem is that WebLogic appears to ignore classes in WEB-INF/lib in the "javax.*" packages. I think there might be an exception for "javax.xml.*", but not for other subpackages. I tried adding a "prefer-application-packages" clause to my weblogic-application.xml file, but that had no effect.

  • 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
              

  • 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
              >>
              >>
              >
              

  • 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.

  • Jar files not in WEB-INF/lib (custom ClassLoader?)

    I need to use classes in my JSP that do not come from a JAR file in the standard location. Sounds like I "simply" need to extend the ClassLoader used by the app server for loading the JSP. Is there any way of doing that?
    Example: my.jsp
    <h1>Hi</h1>
    <%
    FOO x = new FOO(); // code from a non-standard place
    ClassLoader cl = getClass().getClassLoader();
    %>
    I cannot put FOO.class into WEB-INF/lib or any of the standard places. Ideally I'd like to give the ClassLoader (cl above) a different (custom) parent ClassLoader which would know how to resolve FOO.class.
    I've poured over docs and Google and WebSphere and the Tomcat source code. Is this request of mine really so outrageous? I'm about the give up. What good are custom classloaders if one can't use them?

    You are essentially making the argument "All that Java
    needs is a URLClassLoader, and no one has any need for
    any custom ClassLoaders". (After all, that's all that
    I seem to have in a JSP context, with a list of
    hard-coded URLs into that URLClassLoader ...)
    Do a Google search on "custom ClassLoader" and you
    will find lots of reasons why people want to have
    custom ClassLoaders, such as ones that don't use any
    JAR or .class files ... which would qualify as why I
    can't put them into a certain place ...To be fair to duffymo, that is not how I read his argument. I read it as:
    "Sometimes we try to do things the hard way. If we sit back and rethink the problem, an easier solution might come about."
    I think this is a good opportunity to explain why you can not use the normal class loader heirarchy. You have no JARs and no .class files? Then where are you getting the class definitions? If you explain enough so that we might understand the problem:
    1) we might be able to come up with a solution or
    2) you might see a different approach before you are even done explaining
    #2 has happened to me more times then I can count. I sit down formulating a question for the forums, make sure I include enough detail to explain my problem. And by the time I am done I have a new (usually simpler) approach to solving the problem.
    Or you could sit and defend your first approach without providing any context and accomplish nothing. So its up to you.

  • 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
              >
              

  • Web application in EAR not finding class in APP=INF/lib jar file

    Hi,
    I have read some posts regarding this but am still not able to figure out anything.
    I have a war file in my EAR along with some EJB jars. I have the common jars in the APP-INF/lib. The EJBs can find the classes in the common jars easily. But the Web app gives me a NoClassDefFoundError when trying to load a class from a common jar.
    Here is the structure:
    <pre>
    EAR
    |---WAR
    |---WEB-INF
    | |---lib
    | |---a.jar (A.class)
    |---APP-INF
    |---lib
    |---b.jar (B.class)
    </pre>
    Class A is trying to load class B and I get the NoClassDefFoundError for class B
    Thanks for any help,
    Sameet

    I 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

  • 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

  • Jar file in web-inf\lib is not being loaded - weblogic 7.0

    I am callling a webservice from a jsp. everything works fine if I keep the interface
    classes under web-inf\classes....but If I put the interface classes in a jar file
    and put it under web-inf\lib, then weblogic does not seem to find that....
    I am getting following error :
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):14:
    class CustomerValue is public, should be declared in a file named CustomerValue.java
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):119:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):120:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):121:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    4 errors
    Wondering if it is a bug...?
    any thoughts ?
    -Girish Bhatia

    I wrote up a simple test case for this and it works fine for me.
    I suppose there are diffences. ;)
    I am using:
    WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753
    Take the attached zip, unzip.
    cd to directory
    ant build
    then deploy it via the console, or
    java weblogic.Deployer -adminurl t3://127.0.0.1:7001 -user weblogic -password
    weblogic -activate -name mywebapp2 -source e:/weblogic/dev/sandbox/griffith/apps/output/exploded_mywebapp_lib/
    Then:
    http://c863775-d:7001/exploded_mywebapp_lib/frobber
    works for me. My servlet implments an interface in the jar in my lib dir.
    Cheers
    mbg
    "Girish" <[email protected]> wrote:
    >
    I am callling a webservice from a jsp. everything works fine if I keep
    the interface
    classes under web-inf\classes....but If I put the interface classes in
    a jar file
    and put it under web-inf\lib, then weblogic does not seem to find that....
    I am getting following error :
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):14:
    class CustomerValue is public, should be declared in a file named CustomerValue.java
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):119:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):120:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):121:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    4 errors
    Wondering if it is a bug...?
    any thoughts ?
    -Girish Bhatia
    [mywebapptest.zip]

  • Tomcat6 does not load class files from WEB-INF/lib/myjarfile.jar  WHY???

    I have placed my jar file in c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jar
    But, after restarting tomcat6, when i try to import the class file contained in the myjarfile.jar in a servlet, it says
    ProcessFileUpload.java:4: package test.test1 does not exist
    import test.test1.*;
    ^It clearly tomcat's class loading problem.
    As i unzipped my jar and placed the packagefolder structure to
    c:\tomcat6\webapps\my-application\WEB-INF\classes\testand it works perfectly.
    Anyone knows its workaround? please suggest if any configuration changes is required in tomcat or so.
    Thanks.
    ---Sujoy

    Thank you gimbal2 . There was error in creating the jar file myjarfile.jar.
    But, now I have created it again and placed it in place
    c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jarand tried to use one on the Class file included within the jar to compile my servlet. But, still I am getting error at servlet compilation time. I want to place executable jar files in
    c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jar and compile my servlet and execute the servlet.
    I DO NOT WANT TO unzip the jar, placing all unzipped files to
    c:\tomcat6\webapps\my-application\WEB-INF\classes\ folder and comiple my servlet and execute the servlet. But, I am failing to user WEB-INF\lib\ folder facility....please help me why i am not getting class files from WEB-INF\lib\ folder.
    If you please see the small code bit and tell me any possible error that would be very helpful.
    Step 1: my library java file MyClass.java
    package test.test1;
    public class MyClass {
         String myName = "Default return string value";
         public void setMyName(String varName) {
              this.myName = varName;
         public String getMyName() {
              return this.myName;
    }Step2 : Creating jar file of my library class files
    C:\jdk1.6\bin>jar cvf myjarfile.jar test
    added manifest
    adding: test/(in = 0) (out= 0)(stored 0%)
    adding: test/test1/(in = 0) (out= 0)(stored 0%)
    adding: test/test1/MyClass.class(in = 452) (out= 296)(deflated 34%)
    adding: test/test1/MyClass.java(in = 230) (out= 140)(deflated 39%)
    C:\jdk1.6\bin>Step3 : Double checking the created jar file content by listing its content
    C:\jdk1.6\bin>jar tf myjarfile.jar
    META-INF/
    META-INF/MANIFEST.MF
    test/
    test/test1/
    test/test1/MyClass.class
    test/test1/MyClass.java
    C:\jdk1.6\bin>Step4 : Placed myjarfile.jar to
    c:\tomcat6\webapps\my-application\WEB-INF\lib\Step5 : Restarted standalone Tomcat6 in my Windows XP SP2.
    Step6 : Created a simple servlet LibFolderTest.java within my-application\WEB-INF\classes\ folder with code
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import test.test1.*;
    public class LibFolderTest extends HttpServlet {
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              MyClass mc = new MyClass();
              out.println(mc.getMyName());
    }Step7 : Tried to compile my servlet LibFolderTest.java and got the following error
    LibFolderTest.java:4: package test.test1 does not exist
    import test.test1.*;
    ^
    LibFolderTest.java:11: cannot find symbol
    symbol  : class MyClass
    location: class LibFolderTest
                    MyClass mc = new MyClass();
                    ^
    LibFolderTest.java:11: cannot find symbol
    symbol  : class MyClass
    location: class LibFolderTest
                    MyClass mc = new MyClass();
                                     ^
    3 errorsThe above servlet compilation error on Step7 is telling me that myjarfile.jar is not loaded by Tomcat6 or not available for use when compiling servlet. I want to use myjarfile.jar from within WEB-INF\lib\ folder but I can not. please help.
    ---Sujoy

  • 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.
    %

  • 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).

  • 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

Maybe you are looking for

  • Why won't computer acknolwedge ipod plugged in? Works otherwise...

    I plug in ipod. I get no feedback, no usb plugged in sound and its not showing up in my My Computer Manager. I tried R's and I can't reset. Is it the cable? homebrew and Dell   Windows XP Pro  

  • Clamshell ibook keyboard problem

    I just added some RAM to a 300 mhz blueberry clamshell iBook and upgraded to OS X. Everything went smoothly until it came time to type in the registration info, when I discovered that one diagonal row of keys on the keyboard -- the 9 O L and . keys,

  • Void Check problem

    Friends, I have a check no. that we have voided and trying to figure out which vendor it was issued to. In FCHN we are unable to find any deeper info. about the check. We have check no., reason code and the amount. The report is not pulling up this c

  • Acknowledgement Mode

    Hi All, Can anyone explain about Acknowledgement Mode in deliviery channel and Acknowledgement Mode options (Sync and Async) I am using AS2, I dont understand how to configure Deliviery channel, Is there any document which describes about Deliviery c

  • Javascript: don't get onload event

    I'm still having issues grabbing properties via javascript using various onload methods. I have a script that I'm using to toggle a checkbox based on whether another checkbox is checked or not: function toggleEnabledCheckBoxes(idOfToggler, idOfToggle