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

Similar Messages

  • MySql driver not found in WEB-INF/lib

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

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

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

  • Images not loaded from WEB-INF/lib/images.jar

    The images are found in root/images/*.gif, but not
    when jarred up and placed in the lib folder. I've looked everywhere
    for a solution but all I've seen is suggestions of other places to put
    the folder, or to add it to the classpath.
    The jar is being loaded but the images are not found. Or at least the images are not showing up - the table where the main image is linked expands to the size of the image when the path is correct.
    Does anyone know the solution to this problem? I don't want to just leave them in the folder at root level, because this does not work if I set a default url pattern for the control servlet.
    Thanks,
    Greg

    The images are found in root/images/*.gif, but not
    when jarred up and placed in the lib folder. I've
    looked everywhere
    for a solution but all I've seen is suggestions of
    other places to put
    the folder, or to add it to the classpath.
    The jar is being loaded but the images are not found.
    Or at least the images are not showing up - the table
    where the main image is linked expands to the size of
    the image when the path is correct.
    Does anyone know the solution to this problem? I don't
    want to just leave them in the folder at root level,
    because this does not work if I set a default url
    pattern for the control servlet.
    Thanks,
    GregIf your planning to make the images accessible by normal html tags - img etc, then they cant be in a jar, and they must be in a location from which the container serves content - i.e not under WEB-INF. Unless you want to write a special servlet which does nothing but read the images and feed them to the client - but I wouldnt recommend that.
    Sounds like your using Struts, and sounds like youre not using weblogic since you wouldnt be able to serve even jsp�s (using forward) from under WEB-INF if you were. Putting jsp�s under WEB-INF sounds like such a good idea when using Struts, but in practice...

  • 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

  • Error:verifier jar file not found

    Hi,
    I found problem "verifier jar file not found" while building a package in Aspects Developer Evaluation version.
    Pls guide me regarding my problem if any body could.

    Include the offcardverifier.jar file in your classpath, you will find this file under $java_card_kit-2_2_2\lib
    Regards,
    Amr.

  • 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

  • Class not found in web-inf/classes folder of war file within ear file

    Hi all,
              I am using Weblogic 8.1 sp4. I have a war file within an ear file. I am trying to deploy the war file with a few classes within its web-inf/classes folder, however when the classes are in that folder I consistently get a class not found exception when trying to instantiate them. If I package the classes in a jar file and then put that jar file within the web-inf/lib folder of the war, the classes are also not found.
              If I put these two classes in the app-inf/classes folder of the ear file, everything works as expected and the classes are found.
              Any ideas of why this is happening. This seems to be a very simple thing that should work, but appears to not be working at all.
              thanks in advance for any suggestions or ideas.

    Hi,
              This is a known limitation/issue with WL. There is also no way around this.
              Regards,
              LG

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

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

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

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

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

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

  • Classes are not loading from WEB-INF/classes directory

    Hi All,
    I am in a deep troble because the class files in the WEB-INF/classes directory are not loading.
    I have deployed the application in Tomcat 6 server. And stored all class files under WEB-INF/classes dirctory. But when I execute a JSP page, I am getting following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    JSP FileName:/hello.jsp
    An error occurred at line: 1 in the jsp file: /hello.jsp
    com.flt.Test cannot be resolved to a type
    1: <%=new com.flt.Test().hello()%>
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:98)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)The classes are available in the WEB-INF/classes directory and the folder name and package name of the classes are correct. I have also tried to execute the application by creating a jar file and put it in the WEB-INF/lib directory. But I am getting same result.
    Is it the problem with Tomcat configuration? When I gone through Tomcat documentation, I get to know that the WebAppX class loader in Tomcat, loads application specific classes for a web application. Is it possible to start/stop WebAppx classloader manually?
    Please help me to solve this issue.
    Many Thanks,
    Francis Lukose
    Edited by: francis_ on May 13, 2008 10:03 AM

    Thanks for your reply, Soultech2012.
    <%=new com.flt.Test().hello()%>is the only code in the JSP page. Just a single line. Nothing more than that.
    The code in Test.java is as follows:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.flt;
    * @author Francis Lukose
    public class Test {
        public static String hello()    {
            return "hello";
    }Many Thanks,
    Francis
    Edited by: francis_ on May 13, 2008 6:45 PM

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

  • Tricky - PDF file not Opening from Web Browser based application

    Hi Guys,
    Just a brief history about the issue:
    At my client site everything was fine when IE7 was there and everybody were able to open PDF files from web applications in browsers. But after a IE8 upgrade, things changed and customers are facing problems. All are Windows XP SP3 machines
    Issue: If they try to open a pdf file from the browser it just stucks at 0% and hangs with "Cancel" button. Even if they try to save that file it tell downloading and hangs again in the screen without downloading the file.
    Initial fix:
    Open Adobe Reader
    -> select the menu "Edit"
    -> select "Preferences"
    -> select the Category "Internet"
    -> set the indicator "Display PDF in browser"
    -> Reboot the machine
    This fix worrked for some people but many user are still experiencing the same thing even after changing the setting many times.
    Friends, Is there anything else might be creating the trouble here. Please let me know, and why it is that for some systems it is working and for it is not ?
    Thanks,

    There was a browser bug with IE in the past that seemed to span several browser versions.  It had to do with the interaction of the browser and the webserver.  The short version is that I had to toggle the caching option on the folder.
    Here's what I ended up doing for my client:
    Move their PDF documents into a subfolder called forms and all Flash animations into a subfolder called flash
    Marked all folders in the site to "Expire Immediately" (IIS -> highlight root folder -> Properties)
    Individually marked the "/forms" and "/flash" folders to toggle this caching option
    In this way, it allowed dynamic pages to deliver non-cached content (from the server's perspective) and it allowed binary downloads like Flash animations and PDF files to work as expected without errors.  The bug has to do with the cache-negotiation handshaking that goes on between the browser and server.
    This may not be what you're seeing but it's good to remember because I've seen it often:  the settings that you'd use to optimize a web applications don't seem to work for binary downloads like a PDF document.

  • Aspects Developer "Verifier jar file not found error"

    Hello all.
    I'm working in a Java Card project and I have some troubles.
    When I tried to compile, verify and load my solution in Aspects Developer's Software, I achieved the following error message: " could not found Verifier jar file".
    So I couldn't test my applet nor simulate it.
    Then I compiled myself (with Java Card's commands) and execute the verifier file provided with Java Card, and all was good, so i decided to test my java card applet on the simulator or the real card, both with Aspects Developer SW.
    Then the error I got was "Read past end of stream".
    What am I doing in the wrong way?What can I do test my applet in a Simulator?
    Thank very much for your help.
    Regards.
    Mike L.

    Hi,
    This error message indicates that an incompatible version of the Java JDK is being used with Developer.
    The release notes distributed with Developer are a little misleading. Currently Developer supports Java JDK versions greater than 1.2.2 but not 1.4.x. For example, I have JDK 1.3.1_06 installed on my machine.
    Developer currently supports JavaCard development kit 2.1.2 and this specification restricts the versions of JDK that can be used. For more detail look at JCDevKit_User_Guide.pdf which can be found under <JAVA_CARD_INSTALL_DIR>\java_card_kit-2_1_2\doc\en\guides
    Cheers,
    Alasdair

  • Classes in JAR file not found

    Okay, so I am somewhat new to Java, and I've never used a JAR file before. However, I need to make an applet with access to the local machine, so I've got to put it in a JAR file so I can sign it and blah, blah, blah . . .
    Anyhow, my understaing is that I write
    <APPLET
    CODE = DisplayClass.class
    ARCHIVE = display.jar
    HEIGHT = x
    WIDTH = y>
    </APPLET>
    then use java.sun.com's html converter to make the tag like
    <!--"CONVERTED_APPLET"-->
    <!-- CONVERTER VERSION 1.3 -->
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 800 HEIGHT = 450 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = CODE VALUE = DisplayClass.class >
    <PARAM NAME = ARCHIVE VALUE = "display.jar" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="scriptable" VALUE="false">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3" CODE = DisplayClass.class ARCHIVE = "display.jar" WIDTH = 800 HEIGHT = 450 scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>
    Man, you need a new browser, one that can display applets
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = DisplayClass.class ARCHIVE = "display.jar" WIDTH = 800 HEIGHT = 450>
    Man, you need a new browser, one that can display applets
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->
    In any event, whenever I try to view it, with either IE or Netscape, the browser can't find the .class file in question.
    The JAR file contains all the classes in the base directory. I'm really at a loss as to what I'm doing wrong, since all the docs I can find seem to indicate this should work.

    What's all this about DisplayClass.class being in a
    package? It was my understanding that classes are
    always part of packages. DisplayClass.java (the
    uncompiled DisplayClass) certainly refers to itself as
    being in a package, with the first line being package
    testapplet;So your DisplayClass is in the package testapplet. Then you have to move DisplayClass in a folder named testapplet, or compile as
    javac -d . DisplayClass.java
    which will then create that folder for you and place the class file inside that.
    The jar file should then keep the class in the same folder structure
    testapplet/DisplayClass
    And your CODE tag should refer to
    testapplet.DisplayClass
    If you didn't add the package statement to your DisplayClass.java file, then it would be in a default package and you wouldn't have to place the class file in a folder.

Maybe you are looking for

  • Oracle 8i  (8.1.7 - 32bit)  for  AIX 5.1  (downloading)

    Hello, I need to download Oracle 8i (8.1.7 - 32bit) for AIX 5.1. I think it is the newest certificated Oracle db for AIX 5.1 and now I can't find this Oracle version.. Is it possible to find and get it from OTN? Thank you. Regards, Maarit Pddskynen

  • How do I change the order of my songs in a playlist?

    I am trying to change the order of songs in a play list by dragging a song to the desired location. For example taking the 10th song and moving it so that it is first song. Sometimes I am successfuly in dragging the song in a play list. Other times I

  • Is there a plug-in similar to next tab for v3.6.18

    Is there a plug-in similar to next tab for v3.6.18?

  • XI content for CRM 4.1

    i was able to locate the BBPCRM module but it is for crm version 4.0 and i can not find one for version 4.1. I also tried to find some documentation  but i can not find any documentation about this module. anybody any suggestions ?

  • Problem to run a CATT to replace accounting clerk data

    Hi, I have created a CATT in the development system to modify accounting clerk data in the production system. When I do a remote execution (production system) in the background, I see errors in the log. "No batch input data for screen SAPMF02D 7101.