Tomcat 4.1.10 ignoring WebApp's WEB-INF/lib/*.jar

I've been bashing my head against this for two days now:
1. Got a webapp deployed in tomcat, with a whole bunch of jars that sit in the /<webapp>/WEB-INF/lib
2. In web.xml, I instantiate a servlet that performs cache-loading - the servlet class is in of the jars from point 1 ^ - and it works fine, finding all the classes that it needs, etc.
3. A test page, with nothing more than a page import directive of the same package that the servlet from point. 2 uses - fails with package {xxx} does not exist...
Any help is GREATLY apreciated!

Thanx for all your suggestions, nothing seems to have solved the problem and since I had it working fine under tomcat 3, I'm quite convinced that this is a bonafide bug.
I'll award 1 duke dollar to each, since none have solved the problem.

Similar Messages

  • Unable to delete WEB-INF\\lib\*.jar using ant

    Using ant to build struts.
    This is part of the build.xml for struts-example.war
    <property name="deploy.dir" value="${tomcat.home}/webapps"/>
    <target name="cleanWebApp">
    <delete file="${deploy.dir}/${war.file.name}" />
    <delete dir="${deploy.dir}/${war.file}" includeEmptyDirs="true" />
    </target>
    But when I try to build and reload it to tomcat, it gives me errors:
    cleanWebApp:
    [delete] Deleting: D:\jakarta-tomcat-5.5.7\webapps\struts-example.war
    [delete] Deleting directory D:\jakarta-tomcat-5.5.7\webapps\struts-example
    BUILD FAILED
    D:Java\code\struts\strutsexamples\build.xml:46: Unable to delete file D:\jakarta-tomcat-5.5.7\webapps\struts-example\WEB-INF\lib\commons-digester.jar
    Also lib\struts.jar(maybe more) can't be deleted.
    Now I have to stop tomcat, delete it manually, and reinstall the war.
    How can I fix this problem?

    All the advice above seems to make sense, but .....
    - Tomcat shutdown,
    - with all java processes shutdown,
    - after a full reboot,
    - with antiJARLocking="true" set in every context.xml I can find:
    [delete] Deleting directory C:\Program Files\Apache Software
    Foundation\Tomcat 5.5\webapps\myApp
    BUILD FAILED
    C:\myApp\build.xml:118: Unable to delete file C:\Program Files\Apache
    Software Foundation\Tomcat 5.5\webapps\myApp\WEB-INF\lib\antlr.jar
    But I CAN delete the jars using the normal Windows Explorer or from the DOS Command Prompt.
    And per the advice found here:
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=67&t=000574
    I've downloaded the Process Explorer from www.sysinternals.com and no windows processes appear to have a handle on there directory.
    I think the solution is indeed to exclude jar files from <delete> target.
    Regards,
    Stewart

  • Working with tag-library which is packed in WEB-INF\lib\jar-file.jar:

    Hi,
    When importing a webworks war file, which contains default taglib.tld in the webworks.jar which is packed in /Web-Inf/lib/webworks.2.1.7.jar the war file.
    I am getting following error while running the jsp.
    Error(6): duplicated tag definitions within the same TLD: text
    Error(6): java.lang.NullPointerException
    Error(6): Unable to load taghandler class: /webwork
    Line which points to Errors is "<%@ taglib prefix="ww" uri="/webwork" %>"
    But, There is a taglib.tld in /Web-Inf/lib/webworks.2.1.7.jar!\meta-inf\tablib.tld
    which mentions uri as
    <taglib>
    <tlib-version>2.2.1</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>WebWork Taglib</short-name>
    <uri>/webwork</uri>
    </taglib>
    But, There is no following entry for '/webwork' (uri) in web.xml
    Same war is working fine in tomcat webserver.
    Can anybody explain me how to work with this kind of a setup, where taglib is packed in some jar which is packed in Web-Inf/lib dir.
    Thanks,
    Siva

    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

  • OAS 10.1.3 isn't detecting /WEB-INF/lib jar files within WAR file

    Hello,
    I have been developing and testing a simple non-EJB web application on Tomcat 5.5 with no class loading difficulties for the past several months. All of the needed JARs for my app are located under the WEB-INF/lib directory. My next task is to deploy the WAR file containing my webapp on the Oracle 10g (10.1.3) application server.
    The problem I am having when trying to do this is that when I deploy the WAR file from Oracle Enterprise Manager, the WAR file will expand correctly but at runtime OAS doesn't appear to be detecting the JAR files in the WEB-INF/lib folder of my WAR file. I have confirmed that the JAR files are indeed being expanded in the directory that OC4J expands the WAR file into:
    appserver/j2ee/home/applications/appEARFile/MyWebApp/WEB-INF/lib.
    But when I run the application, from the Firefox browser I immediately get the following 500 Internal Server Error:
    "Servlet error: Error instantiating servlet 'reports'. Servlet class org.springframework.web.servlet.DispatcherServlet not found in web-application MyWebApp"
    (The IE browser just gives me the 500 error without additional elaboration.)
    But my spring.jar where that class is located is in the WEB-INF/lib directory. Does anyone have an idea what the solution is--how can I get OC4J to read the spring.jar (or any jar) in that lib folder? (Or is there a way I can configure logging to better pinpoint the problem if that isn't it?)
    Thanks,
    Glen

    Glen,
    You said:
    IE browser just gives me the 500 error without
    additional elaborationTry unsetting the "Show friendly HTTP error
    messages".
    From the "Tools" menu of Microsoft Internet Explorer,
    choose "Internet Options".
    (You should then see another window entitled
    "Internet Properties" displayed.)
    Select the "Advanced" tab and search for "Show
    friendly HTTP error messages".
    Excellent--that worked. Thanks! I was afraid that I would have to be debugging on Firefox exclusively.
    I also suggest setting the
    "search-local-classes-first" attribute, of the
    "web-app-class-loader" element, in your
    "orion-web.xml" file to 'true' (if it isn't
    already).
    That did it. My orion-web.xml file was of the old DTD-based version, I believe that was causing the problem.
    The following document:
    Oracle® Containers for J2EE
    Developer’s Guide
    10g Release 3 (10.1.3)
    Part No. B14433-01
    has a chapter (3) entitled Utilizing the OC4J
    Class Loading Framework which contains a section
    entitled Troubleshooting Class Loading-Related
    Problems in OC4J.
    Thanks for the link, I went through it thoroughly in trying to fix my problem.
    Glen

  • Bug using WEB-INF/lib Jar archives

    Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
    application in the form of a War file and it is now under the APPS/modules
    directory as the following directory: APPS/modules/ourapp.
    When I start the iPlanet Application Server, it fails to find any of the
    classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
    One workaround is to unjar all of these files, but this is counter to the
    J2EE spec. Another workaround is to modify the classpath in the iPlanet
    registry, but this would expose the classes to other Web applications
    running in the same server.
    Thanks for any help. Martin

    Hi Martin,
    I think you are packinh up the jar file inside the war module, as far as i know
    there should be no jar file inside the module/App-name dir tree.
    all the modules either war or jar should be in <GX_ROOT_DIR>/JAR dir.
    So try making the war module with class files only(static content can also be
    added) with appropriate deployment descriptor.
    I will mail you separately the procedure for creating a war file from deployment
    tool gui.
    Please mail me back if you have any other problems.
    Sanjeev.
    Developer Support Group iAS.
    Martin Gilchrist wrote:
    Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
    application in the form of a War file and it is now under the APPS/modules
    directory as the following directory: APPS/modules/ourapp.
    When I start the iPlanet Application Server, it fails to find any of the
    classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
    One workaround is to unjar all of these files, but this is counter to the
    J2EE spec. Another workaround is to modify the classpath in the iPlanet
    registry, but this would expose the classes to other Web applications
    running in the same server.
    Thanks for any help. Martin

  • WEB-INF\lib\ Jar files

    Hello
    I have a war module with this:
    /index.html
    /pages/ (my pages)
    /pages/js (my js)
    /pages/images (my images)
    /WEB-INF/classes/ (my servlet classes)
    /WEB-INF/lib/ (my lib jar files)
    /WEB-INF/web.xml (descriptor)
    ok,
    I run deploy tool,
    open this war file (module), (ex mod1.war)
    convert to ias module, modify the descriptor,
    verify (everything ok)
    save module
    create ear (ex ap1.ear)
    put this module within this ear
    create and save ear descriptor
    save ear
    verify (everything ok)
    deploy ear.
    ok,
    Why decompress my lib jar files in:
    /APPS/ap1/mod1/WEB-INF/lib
    These wil be fine if decompress the entire jars, but only extracts the class
    files and no the xxxx.properties neither messages.txt; exactly
    no extracts files that aren't .class. ???
    Are there any workaround to this that isn't copy the files? Figure not to
    have ftp acces in a sun? What we have to do?
    Thanks.

    In iWS 6.0, the context information such as a context path of the web application and other properties are defined in web-apps.xml file.
    'class-loader' element in web-apps.xml file can be be used to specify the class path to a web application and customize how the application is serviced.
    Refer to example web-apps.xml file in Prog. guide to Servlets for more details.
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/war.htm#33557

  • Bug:WEB-INF/lib JARs not added to runtime classpath of WebLogic Server

    The JAR files packaged in the WEB-INF/lib directory of an application do not get installed to the runtime classpath of the Weblogic server.
    Edited by: dvohra16 on Feb 28, 2013 9:24 AM

    Some posts in which an external jar, usually a JDBC jar, had to be added to the startWebLogic script to be added to the runtime classpath of WebLogic server.
    Re: jdbc problem on MS SQL Server
    Re: MySQL JDBC driver w/11.1.2 where too now?
    Re: ADF Parameter form  - java.lang.NoClassDefFoundError: sqlj/runtime/ref/Defa
    Re: Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Re: deploy a shared library
    Re: Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Re: Help need in Adding External jar files.
    Re: NoClassDefFoundError  while Testing a JAX-WS Web Service
    Re: Unable to connect to SQL server 2008 from a deployed Weblogic application
    Re: Howo to add external jar - quick question
    Re: MySql connection with JDev 11.1.2.2 issues
    Re: Integration of MySQL with ADF application

  • Web application can not find apphome /WEB-INF/lib/*.jar files in classpath?

    I need to add the jsse jars to one of my servlets. I do not want the jsse in the server classpath(jvm12.conf) however, because this screws with some credit card jar I am using. Can't I have a per application classpath with the /WEB-INF/lib directory? This is iWS 6.0.

    In iWS 6.0, the context information such as a context path of the web application and other properties are defined in web-apps.xml file.
    'class-loader' element in web-apps.xml file can be be used to specify the class path to a web application and customize how the application is serviced.
    Refer to example web-apps.xml file in Prog. guide to Servlets for more details.
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/war.htm#33557

  • WL 5.1 war: can't access WEB-INF/lib jars

              I'm trying to deploy a war file that uses Struts on wl5.1. The problem I am having
              is that the servlets are unable to find classes from jars in the war file. If
              I put the jars in the weblogic classpath, it works, but I'd rather not do that.
              This war file works on Tomcat, but it doesn't seem to be working on wl5.1. Oddly,
              while deploying, the server finds the servlet class itself from one of the jars,
              but then can't find the other classes the servlet class references, even though
              they are in the same jar.
              I've verified that the servlet class is not in the server classpath. I've found
              a number of posts about this problem in this newsgroup (though generally for later
              versions of the appserver), but none of them solved my problem.
              If anyone can recollect Weblogic 5.1, I'd appreciate your help.
              Thanks.
              Rex
              

    Glen,
    You said:
    IE browser just gives me the 500 error without
    additional elaborationTry unsetting the "Show friendly HTTP error
    messages".
    From the "Tools" menu of Microsoft Internet Explorer,
    choose "Internet Options".
    (You should then see another window entitled
    "Internet Properties" displayed.)
    Select the "Advanced" tab and search for "Show
    friendly HTTP error messages".
    Excellent--that worked. Thanks! I was afraid that I would have to be debugging on Firefox exclusively.
    I also suggest setting the
    "search-local-classes-first" attribute, of the
    "web-app-class-loader" element, in your
    "orion-web.xml" file to 'true' (if it isn't
    already).
    That did it. My orion-web.xml file was of the old DTD-based version, I believe that was causing the problem.
    The following document:
    Oracle® Containers for J2EE
    Developer’s Guide
    10g Release 3 (10.1.3)
    Part No. B14433-01
    has a chapter (3) entitled Utilizing the OC4J
    Class Loading Framework which contains a section
    entitled Troubleshooting Class Loading-Related
    Problems in OC4J.
    Thanks for the link, I went through it thoroughly in trying to fix my problem.
    Glen

  • Calling WEB-INF/lib/.Jar class from JSP

    Hi everybody.
    I have a problem about calling my jar file class from JSP .My development plotform is WSAD 5.1.2 and application server : WebSphere Test Server 5.1.This is the my server console error:
    error: IO exception sun.io.MalformedInputException
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar&#40;dvo/utb_part_tai_tool_code_bilgi_DVO.java&#41;:4: cannot access ortak.dvo.AnaDvo
    bad class file: D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar&#40;ortak/dvo/AnaDvo.java&#41;
    file does not contain class ortak.dvo.AnaDvo
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    &#40;source unavailable&#41;
    3 errors
    ]: org.apache.jasper.JasperException: Unable to compile class for JSP
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar(dvo/utb_part_tai_tool_code_bilgi_DVO.java):8: class utb_part_tai_tool_code_bilgi_DVO is public, should be declared in a file named utb_part_tai_tool_code_bilgi_DVO.java
    (source unavailable)
    error: IO exception sun.io.MalformedInputException
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar(dvo/utb_part_tai_tool_code_bilgi_DVO.java):4: cannot access ortak.dvo.AnaDvo
    bad class file: D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar(ortak/dvo/AnaDvo.java)
    file does not contain class ortak.dvo.AnaDvo
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    (source unavailable)
    3 errors
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:129)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:941)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:285)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:317)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    can you help me ?

    class utb_part_tai_tool_code_bilgi_DVO is public,
    should be declared in a file named utb_part_tai_tool_code_bilgi_DVO.java...
    cannot access ortak.dvo.AnaDvo bad class file:
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar(ortak/dvo/AnaDvo.java)
    file does not contain class ortak.dvo.AnaDvoThe error messages say it all. Rename the .java files so that they match the class names. Then recompile and repack the JAR file.

  • [svn] 2942: Add webapps/webtier/WEB-INF/flex/flex-sdk-description. xml to the ignore list.

    Revision: 2942
    Author: [email protected]
    Date: 2008-08-21 07:52:24 -0700 (Thu, 21 Aug 2008)
    Log Message:
    Add webapps/webtier/WEB-INF/flex/flex-sdk-description.xml to the ignore list.
    Property Changed:
    flex/sdk/trunk/webapps/webtier/WEB-INF/flex/

    java.lang.ClassNotFoundException: flex.messaging.HttpFlexSession
    This class exists in flex-messaging-core.jar
    Looks like BlazeDS libraries are not loaded. Check if BlazeDS libraries exists in your WEB-INF/lib directory.
    webapps\{yourwebapp}\WEB-INF\lib
    Hope it helps you.

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

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

  • ContextConfig[]: Exception processing JAR at resource path /WEB-INF/lib/..

    Hi,
    The application deployment works fine with Tomcat 4.0.6.
    Now I'm trying to upgrade to Tomcat 4.1.24 and am getting this exception...
    Using CATALINA_BASE: /users/home/cjain/nls/projects/CKJ_loaddb/java/deploy
    Using CATALINA_HOME: /nls/apps/tomcat
    Using CATALINA_TMPDIR: /users/home/cjain/nls/projects/CKJ_loaddb/java/deploy/temp
    Using JAVA_HOME: /nls/apps/jdk
    May 16, 2003 3:26:05 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on port 80
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.24
    HostConfig[localhost]: Expanding web application archive ROOT.war
    StandardHost[localhost]: Installing web application at context path from URL file:/users/home/cjain/nls/projects/CKJ_loaddb/java/deploy/webapps/ROOT
    WebappLoader[]: Deploying class repositories to work directory /users/home/cjain/nls/projects/CKJ_loaddb/java/deploy/work/Standalone/localhost/_
    WebappLoader[]: Deploy class files /WEB-INF/classes to /users/home/cjain/nls/projects/CKJ_loaddb/java/deploy/webapps/ROOT/WEB-INF/classes
    WebappLoader[]: Deploy JAR /WEB-INF/lib/jnlp-servlet.jar to /users/home/cjain/nls/projects/CKJ_loaddb/java/deploy/webapps/ROOT/WEB-INF/lib/jnlp-servlet.jar
    ContextConfig[]: Exception processing JAR at resource path /WEB-INF/lib/jnlp-servlet.jar
    javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/jnlp-servlet.jar
    javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/jnlp-servlet.jar
    at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
    at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:307)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
    at org.apache.catalina.core.StandardService.start(StandardService.java:497)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
    ContextConfig[]: Marking this application unavailable due to previous error(s)
    Any ideas what I'm doing wrong?
    Thanks,
    chet

    Found the solution...
    The deploy directory needs to have a temp directory in
    it!!!!We have had this problem too when upgrading to 4.1.27 but are confused about which directory should have a temp directory under it, and what the permission should be. Could someone enlighten us ?
    Thanks
    Janet

  • How to load .jar files of subfolder in web-inf/lib folder?

    Hi All,
    In 'webapps\myappliction\WEB-INF\lib\myfolder' and in myfolder have some .jar files. How to load subfolder jar files in weblogic server 10.0?
    Do I need to configure subfolder jar path in web.xml? Please help me.
    Thanks & Regards,
    Gangadhar

    Class loaders associated with a Web application can be configured to locate local classes first. To enable this we have to set the <prefer-web-inf-classes> to true in the deployment override weblogic.xml, for example
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    http://blog.transfer-solutions.com/2010/12/weblogic-class-loading/

Maybe you are looking for

  • Track changes causing #of pages in document to fluctuate wildly

    Hello! I'm running Pages 5.5.2 on an almost-brand-new Macbook Pro running OS 10.10.1. I've been working on a document for a long time with no problems (well, a bit of that lovely pages-5-lag), and tracking changes and converting to word and sending i

  • T CODE MIRO- Service tax mapping

    I am making an entry through miro . this is a normal invoice entry. where i select expense account. vendor account credit and expense account debit. With this i am selecting a tax code which has service tax the component are as follow service tax   1

  • Photos disappear from camera roll

    After taking photos & videos i can view them on Camera Roll. However, when I next open camera roll they have all disappeared. This only started happening 5 weeks ago. Earlier photos are still on Camera Roll. This is very frustrating. Any ideas out th

  • Plasmoid init problems

    Hello, I'm trying to follow the Python Plasma tutorial http://techbase.kde.org/Development/Tut … ingStarted. After adding the plasmoid with plasmapkg and running it with plasmoidviewer, I get this error plasmoidviewer(25748)/plasma main: setting Form

  • Recieving information from Explorer with Java

    Hi I don't know if this is possible but what I'm looking to do is create a java pplication the monitor the webpages being view by the user. Is there any way that I can pass the URL of the page being viewed in Explorer into my JAVA app. Cheers