You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Seema Patel <se...@hotmail.com> on 2013/08/09 11:17:24 UTC

Upgrade to Tomcat 7 Issues

Hi,

I've upgraded my tomcat from 5.5 to 7.0.
I've also upgraded the jre from 1.5 to 7.

I'm trying to get my existing struts/servlets projects to run, but I'm getting the following error when running tomcat in my tomcat7-stderr...log file:

 INFO: Deploying configuration descriptor C:\Tomcat 7.0\conf\Catalina\localhost\common.xml
09-Aug-2013 10:11:44 org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/common]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
    at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1346)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

Any ideas?  Have I missed something?

Thanks
Seema
 		 	   		  

RE: Upgrade to Tomcat 7 Issues

Posted by Seema Patel <se...@hotmail.com>.

> Date: Mon, 12 Aug 2013 14:00:12 +0200
> From: ognjen.d.blagojevic@gmail.com
> To: users@tomcat.apache.org
> Subject: Re: Upgrade to Tomcat 7 Issues
> 
> Seema,
> 
> On 12.8.2013 13:09, Seema Patel wrote:
> > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
> ...
> > Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
> 
> You are doing fine. You correctly removed all the jar files as Chuck 
> suggested. Now you need to add them one by one EITHER to Tomcat lib 
> folder or webapp WEB-INF/lib folder.
> 
> Since your configuration implies that Tomcat will be managing your DB 
> connection pool, add mysql-connector jar to Tomcat lib folder, and try 
> to restart Tomcat.
> 
> -Ognjen
> 
> 

Thanks for the advise.  I have now fixed the issue and it is working.  I added the mysql-connector-java-5.0.8-bin to my project's lib directory, which has put it into WEB-INF/lib directory when built and deployed.

Thanks to all that have helped me with this, its appreciated.
Seema


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  

Re: Upgrade to Tomcat 7 Issues

Posted by Ognjen Blagojevic <og...@gmail.com>.
Seema,

On 12.8.2013 13:09, Seema Patel wrote:
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
...
> Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

You are doing fine. You correctly removed all the jar files as Chuck 
suggested. Now you need to add them one by one EITHER to Tomcat lib 
folder or webapp WEB-INF/lib folder.

Since your configuration implies that Tomcat will be managing your DB 
connection pool, add mysql-connector jar to Tomcat lib folder, and try 
to restart Tomcat.

-Ognjen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Upgrade to Tomcat 7 Issues

Posted by Seema Patel <se...@hotmail.com>.

> From: seema165@hotmail.com
> To: users@tomcat.apache.org
> Subject: RE: Upgrade to Tomcat 7 Issues
> Date: Mon, 12 Aug 2013 11:09:59 +0100
> 
> Sorry,  I didn't realise it wouls remove the highlighted red.  This is what I have changed from 8080 to 8088:
> 
> <Connector connectionTimeout="20000" port="8088" protocol="HTTP/1.1" redirectPort="8443"/>
> 
> This is what I have added just above the Host tag/element:
> 
> <Realm className="org.apache.catalina.realm.JNDIRealm"
>                 connectionURL="xxx://xxx:3268"
>                 connectionName="xxx@xxx.local" connectionPassword="xxx"
>                 referrals="follow" userBase="dc=xxx,dc=local"
>                 userSearch="(sAMAccountName={0})" userSubtree="true"
>                 roleBase="dc=xxx,dc=local" roleSearch="(member={0})"
>                 roleName="cn" roleSubtree="true" />
> 
> Sorry again about that.
> 

I've added my application.xml file to Tomcat/conf/Catalina/localhost/ directory which contains all the database connection resources.
This has removed the error I was getting in my 1st post for today.  I now have this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.viatel.soportal.helpers.Database.getSopConnection(Database.java:18)
    at com.viatel.soportal.util.UserUtil.getUser(UserUtil.java:36)
    at com.viatel.soportal.P1_00Action.portalExecute(P1_00Action.java:60)
    at com.viatel.soportal.PortalBaseAction.execute(PortalBaseAction.java:200)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.viatel.soportal.RequestFilter.doFilter(RequestFilter.java:47)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.viatel.commonlib.ADGroupFilter.doFilter(ADGroupFilter.java:62)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
    ... 37 more


Do i need to add the my-sql-connector-java-5.0.8-bin jar somewhere?  Or do I need to do something else?

Thanks


> > Date: Mon, 12 Aug 2013 12:05:51 +0200
> > From: aw@ice-sa.com
> > To: users@tomcat.apache.org
> > Subject: Re: Upgrade to Tomcat 7 Issues
> > 
> > Seema Patel wrote:
> > > 
> > ...>
> > > Right, I've re-installed Tomcat 7.0.42.  The only things I've changed are in the server.xml file, here is what's in the server.xml file (what I have added/changed are in red, 
> > 
> > Not the easiest to spot, for a list which works only with plain text messages and strips 
> > most attachments.
> > 
> > Please check the recommendations in http://tomcat.apache.org/lists.html
> > 
> > 
> > ...
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> > 
>  		 	   		  
 		 	   		  

RE: Upgrade to Tomcat 7 Issues

Posted by Seema Patel <se...@hotmail.com>.
Sorry,  I didn't realise it wouls remove the highlighted red.  This is what I have changed from 8080 to 8088:

<Connector connectionTimeout="20000" port="8088" protocol="HTTP/1.1" redirectPort="8443"/>

This is what I have added just above the Host tag/element:

<Realm className="org.apache.catalina.realm.JNDIRealm"
                connectionURL="xxx://xxx:3268"
                connectionName="xxx@xxx.local" connectionPassword="xxx"
                referrals="follow" userBase="dc=xxx,dc=local"
                userSearch="(sAMAccountName={0})" userSubtree="true"
                roleBase="dc=xxx,dc=local" roleSearch="(member={0})"
                roleName="cn" roleSubtree="true" />

Sorry again about that.

> Date: Mon, 12 Aug 2013 12:05:51 +0200
> From: aw@ice-sa.com
> To: users@tomcat.apache.org
> Subject: Re: Upgrade to Tomcat 7 Issues
> 
> Seema Patel wrote:
> > 
> ...>
> > Right, I've re-installed Tomcat 7.0.42.  The only things I've changed are in the server.xml file, here is what's in the server.xml file (what I have added/changed are in red, 
> 
> Not the easiest to spot, for a list which works only with plain text messages and strips 
> most attachments.
> 
> Please check the recommendations in http://tomcat.apache.org/lists.html
> 
> 
> ...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  

Re: Upgrade to Tomcat 7 Issues

Posted by André Warnier <aw...@ice-sa.com>.
Seema Patel wrote:
> 
...>
> Right, I've re-installed Tomcat 7.0.42.  The only things I've changed are in the server.xml file, here is what's in the server.xml file (what I have added/changed are in red, 

Not the easiest to spot, for a list which works only with plain text messages and strips 
most attachments.

Please check the recommendations in http://tomcat.apache.org/lists.html


...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Upgrade to Tomcat 7 Issues

Posted by Seema Patel <se...@hotmail.com>.

> Date: Fri, 9 Aug 2013 09:07:12 -0700
> From: its_toasted@yahoo.com
> To: users@tomcat.apache.org
> Subject: Re: Upgrade to Tomcat 7 Issues
> 
> On 8/9/2013 8:46 AM, Christopher Schultz wrote:
> > -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
> >
> > Chuck,
> >
> > On 8/9/13 10:08 AM, Caldarale, Charles R wrote:
> >>> From: Seema Patel [mailto:seema165@hotmail.com] Subject: RE:
> >>> Upgrade to Tomcat 7 Issues
> >>
> >>> In my WEB-INF/lib I have the following (sorry the list is quite
> >>> long): activation.jar
> >>
> >>> In Tomcat7.0/lib directory I have (I have grouped them
> >>> alphabetically so it doesn't make the list too long downwards,
> >>> like the above list)
> >>
> >>> activation.jar j2ee.jar
> >>
> >> You must never, never, never have the same class files in multiple
> >> locations in the class loader hierarchy (e.g., activation.jar and
> >> several others).
> >
> > I don't think "activation" is something provided by servlet
> > containers. I don't see it in a stock Tomcat, for example.
> >
> 
> JavaBeans activation framework (activation.jar) was required for Java 
> mail when running on older versions of the JRE. It has been included 
> since JRE 6 (can't remember the minor version).
> 
> Since the original poster has upgraded to JRE 7, there should be no need 
> for this JAR either in $CATALINA_HOME/lib or WEB-INF/lib of the application.
> 
> >> Also, j2ee.jar must never be present anywhere in any Tomcat
> >> installation.
> >
> > I'm not sure what's in this particular j2ee.jar, but you're probably
> > right that it does not belong. The container should provide all
> > services to the webapp. If you want a more fully-functional J2EE
> > container, consider Apache TomEE.
> >
> >> You need to start over, not adding anything to Tomcat's lib
> >> directory, and try running your webapp.
> >
> > Absolutely.
> >
> > - -chris
> 
> . . . . just my two cents.
> /mde/
> 

Right, I've re-installed Tomcat 7.0.42.  The only things I've changed are in the server.xml file, here is what's in the server.xml file (what I have added/changed are in red, one being the connector port - from 8080 to 8088 and the other is adding the realm tag/element just before the Host tag/element):

<Server port="8005" shutdown="SHUTDOWN">
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener"/>
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector connectionTimeout="20000" port="8088" protocol="HTTP/1.1" redirectPort="8443"/>
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->
    <!--
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine defaultHost="localhost" name="Catalina">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      </Realm>

      <Realm className="org.apache.catalina.realm.JNDIRealm"
                connectionURL="ldap://xxx:3268"
                connectionName="xxx@xxx.local" connectionPassword="xxx"
                referrals="follow" userBase="dc=xxx,dc=local"
                userSearch="(sAMAccountName={0})" userSubtree="true"
                roleBase="dc=xxx,dc=local" roleSearch="(member={0})"
                roleName="cn" roleSubtree="true" />

      <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." suffix=".txt"/>

      </Host>
    </Engine>
  </Service>
</Server>

I am now getting the following error message in my application's log file:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://xxx.xxx.local/xxx?autoReconnect=true'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.xxx.xxx.helpers.Database.getSopConnection(Database.java:18)
    at com.xxx.xxx.util.UserUtil.getUser(UserUtil.java:36)
    at com.xxx.xxx.P1_00Action.portalExecute(P1_00Action.java:60)
    at com.xxx.xxx.PortalBaseAction.execute(PortalBaseAction.java:200)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.xxx.xxx.RequestFilter.doFilter(RequestFilter.java:47)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.xxx.xxxXX.ADGroupFilter.doFilter(ADGroupFilter.java:62)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(Unknown Source)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
    ... 37 more

Can I put the mysql-connector-java-5.0.8-bin jar into the Tomcat/lib directory?  Previous posts said not to add anything to the lib directory.  Also I don't think adding this there will solve the issue anyway.  Am I missing something in my server.xml file?  The old server.xml file (for Tomcat 5.5.29) was amended by previous developers, so I am not sure what I need out of there, hence I've only added one thing to the new servrer.xml file, which is the realm to authenicate users (which is what's failing when I run the server).

Any help/feedback is appreciated, as this is all a bit new for me.

Thanks
Seema 

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  

Re: Upgrade to Tomcat 7 Issues

Posted by Mark Eggers <it...@yahoo.com>.
On 8/9/2013 8:46 AM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>
> Chuck,
>
> On 8/9/13 10:08 AM, Caldarale, Charles R wrote:
>>> From: Seema Patel [mailto:seema165@hotmail.com] Subject: RE:
>>> Upgrade to Tomcat 7 Issues
>>
>>> In my WEB-INF/lib I have the following (sorry the list is quite
>>> long): activation.jar
>>
>>> In Tomcat7.0/lib directory I have (I have grouped them
>>> alphabetically so it doesn't make the list too long downwards,
>>> like the above list)
>>
>>> activation.jar j2ee.jar
>>
>> You must never, never, never have the same class files in multiple
>> locations in the class loader hierarchy (e.g., activation.jar and
>> several others).
>
> I don't think "activation" is something provided by servlet
> containers. I don't see it in a stock Tomcat, for example.
>

JavaBeans activation framework (activation.jar) was required for Java 
mail when running on older versions of the JRE. It has been included 
since JRE 6 (can't remember the minor version).

Since the original poster has upgraded to JRE 7, there should be no need 
for this JAR either in $CATALINA_HOME/lib or WEB-INF/lib of the application.

>> Also, j2ee.jar must never be present anywhere in any Tomcat
>> installation.
>
> I'm not sure what's in this particular j2ee.jar, but you're probably
> right that it does not belong. The container should provide all
> services to the webapp. If you want a more fully-functional J2EE
> container, consider Apache TomEE.
>
>> You need to start over, not adding anything to Tomcat's lib
>> directory, and try running your webapp.
>
> Absolutely.
>
> - -chris

. . . . just my two cents.
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Upgrade to Tomcat 7 Issues

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Friday, August 09, 2013 10:47 AM
> To: Tomcat Users List
> Subject: Re: Upgrade to Tomcat 7 Issues
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Chuck,
> 
> On 8/9/13 10:08 AM, Caldarale, Charles R wrote:
> >> From: Seema Patel [mailto:seema165@hotmail.com] Subject: RE:
> >> Upgrade to Tomcat 7 Issues
> >
> >> In my WEB-INF/lib I have the following (sorry the list is quite
> >> long): activation.jar
> >
> >> In Tomcat7.0/lib directory I have (I have grouped them
> alphabetically
> >> so it doesn't make the list too long downwards, like the above list)
> >
> >> activation.jar j2ee.jar
> >
> > You must never, never, never have the same class files in multiple
> > locations in the class loader hierarchy (e.g., activation.jar and
> > several others).
> 
> I don't think "activation" is something provided by servlet containers.
> I don't see it in a stock Tomcat, for example.
> 

CAVEAT:  I have yet to verify this via testing, but....

I was reading the documentation on the javamail api and discovered that as of Java 6, the activation.jar file that was previously required in Java 5 and below is no longer needed, as the functionality is provided in the Java 6&up jvm. Now I'm not sure what that means overall, but for myself, and many others, the only reason we included activation.jar in our apps is to support javamail.
If you are using activation.jar features directly, I would suggest verifying if you still need the jar file after upgrading jvms, otherwise, it should be safe to delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Upgrade to Tomcat 7 Issues

Posted by David kerber <dc...@verizon.net>.
On 8/9/2013 11:46 AM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Chuck,
>
> On 8/9/13 10:08 AM, Caldarale, Charles R wrote:
>>> From: Seema Patel [mailto:seema165@hotmail.com] Subject: RE:
>>> Upgrade to Tomcat 7 Issues
>>
>>> In my WEB-INF/lib I have the following (sorry the list is quite
>>> long): activation.jar
>>
>>> In Tomcat7.0/lib directory I have (I have grouped them
>>> alphabetically so it doesn't make the list too long downwards,
>>> like the above list)
>>
>>> activation.jar j2ee.jar
>>
>> You must never, never, never have the same class files in multiple
>> locations in the class loader hierarchy (e.g., activation.jar and
>> several others).
>
> I don't think "activation" is something provided by servlet
> containers. I don't see it in a stock Tomcat, for example.

It's not; it's part of the mail package.  But the OP still has it in 
multiple places.  Probably placed in Tomcat7.0/lib manually, and in 
WEB-INF/lib automatically.



>
>> Also, j2ee.jar must never be present anywhere in any Tomcat
>> installation.
>
> I'm not sure what's in this particular j2ee.jar, but you're probably
> right that it does not belong. The container should provide all
> services to the webapp. If you want a more fully-functional J2EE
> container, consider Apache TomEE.
>
>> You need to start over, not adding anything to Tomcat's lib
>> directory, and try running your webapp.
>
> Absolutely.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.14 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJSBQ7bAAoJEBzwKT+lPKRYz0MQAJ95UbypXpJfS/a9DcqtgB+Z
> VL4mVwtrKZfNRAK+vyP8yg/N3FYi+KIFPslZlYUj4/lH49srTQewlYkfw3Z9CaPR
> aySxb/UN1EOnTyoW3jGzATC2u8+W8lMSDj6w8nBsefPoAkiQqrsaHpeUtvms+BJG
> W3GRUwaTxIjo3J8anoCSea+LMTjYHROQeuECk+eXCMkm0hHC6KYAxKNB3cc2sqiP
> zLkh2H8FalQORizUI43XC2H9R+deno8W6HtGnFowOcWIkZIQOok7V1GZGjNrPkB4
> VEDQYn0tLvWMH9TpDpU8F3L0h2WedrX4LPVk+iYPI0jbuH2iFmtk8hCvVKv5LZ3O
> teA7axTtOTm2LrkAA8luNWNyPVdMlr8dphKpIFQHVytq8EQNAEx3W5LBlYc1hKb9
> WpML80J7BIEhJjkuB4rzX1BRqd8tmF7c1LBAl77QgDhkD8Hk66+lLKdsSo9T/B8t
> 6c2L+/RIpDl2H5ru3oCWlHRw3LF5I4qyh/qSEdqU0udrj+rGMAOP+qIFLhndRKSO
> hb4sYipTlplI9Q1pI9skOTNQOFN5ThBjU4WoRnsbvQtjXnmEoR0lV3eUKkPBRuQS
> chjmbfw1YdygMNIZEw36dclkPG4Vt3XjQZ8EudAb226BUDF5khpSlooDLEajMiXy
> 1lAcbwTnbcvjFKXyScTi
> =CKJe
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Upgrade to Tomcat 7 Issues

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: Upgrade to Tomcat 7 Issues

> I don't think "activation" is something provided by servlet
> containers. I don't see it in a stock Tomcat, for example.

It's not provided by Tomcat, but that's not the relevant point.  The problem was that it was placed in _both_ Tomcat's lib directory and the webapp's WEB-INF/lib directory - an absolute no-no.  It can be in each webapp's WEB-INF/lib directory (since the relevant class loaders can't see each other), or possibly in Tomcat's lib directory (although it might cause other problems there, depending on how it's coded).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Upgrade to Tomcat 7 Issues

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chuck,

On 8/9/13 10:08 AM, Caldarale, Charles R wrote:
>> From: Seema Patel [mailto:seema165@hotmail.com] Subject: RE:
>> Upgrade to Tomcat 7 Issues
> 
>> In my WEB-INF/lib I have the following (sorry the list is quite
>> long): activation.jar
> 
>> In Tomcat7.0/lib directory I have (I have grouped them
>> alphabetically so it doesn't make the list too long downwards,
>> like the above list)
> 
>> activation.jar j2ee.jar
> 
> You must never, never, never have the same class files in multiple 
> locations in the class loader hierarchy (e.g., activation.jar and 
> several others).

I don't think "activation" is something provided by servlet
containers. I don't see it in a stock Tomcat, for example.

> Also, j2ee.jar must never be present anywhere in any Tomcat
> installation.

I'm not sure what's in this particular j2ee.jar, but you're probably
right that it does not belong. The container should provide all
services to the webapp. If you want a more fully-functional J2EE
container, consider Apache TomEE.

> You need to start over, not adding anything to Tomcat's lib
> directory, and try running your webapp.

Absolutely.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSBQ7bAAoJEBzwKT+lPKRYz0MQAJ95UbypXpJfS/a9DcqtgB+Z
VL4mVwtrKZfNRAK+vyP8yg/N3FYi+KIFPslZlYUj4/lH49srTQewlYkfw3Z9CaPR
aySxb/UN1EOnTyoW3jGzATC2u8+W8lMSDj6w8nBsefPoAkiQqrsaHpeUtvms+BJG
W3GRUwaTxIjo3J8anoCSea+LMTjYHROQeuECk+eXCMkm0hHC6KYAxKNB3cc2sqiP
zLkh2H8FalQORizUI43XC2H9R+deno8W6HtGnFowOcWIkZIQOok7V1GZGjNrPkB4
VEDQYn0tLvWMH9TpDpU8F3L0h2WedrX4LPVk+iYPI0jbuH2iFmtk8hCvVKv5LZ3O
teA7axTtOTm2LrkAA8luNWNyPVdMlr8dphKpIFQHVytq8EQNAEx3W5LBlYc1hKb9
WpML80J7BIEhJjkuB4rzX1BRqd8tmF7c1LBAl77QgDhkD8Hk66+lLKdsSo9T/B8t
6c2L+/RIpDl2H5ru3oCWlHRw3LF5I4qyh/qSEdqU0udrj+rGMAOP+qIFLhndRKSO
hb4sYipTlplI9Q1pI9skOTNQOFN5ThBjU4WoRnsbvQtjXnmEoR0lV3eUKkPBRuQS
chjmbfw1YdygMNIZEw36dclkPG4Vt3XjQZ8EudAb226BUDF5khpSlooDLEajMiXy
1lAcbwTnbcvjFKXyScTi
=CKJe
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Upgrade to Tomcat 7 Issues

Posted by Seema Patel <se...@hotmail.com>.
Ok thanks for the help.  I'll redo it again.  If I get any further errors I'll post a new question.

Thanks again.
Seema


> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> Date: Fri, 9 Aug 2013 09:08:55 -0500
> Subject: RE: Upgrade to Tomcat 7 Issues
> 
> > From: Seema Patel [mailto:seema165@hotmail.com] 
> > Subject: RE: Upgrade to Tomcat 7 Issues
> 
> > In my WEB-INF/lib I have the following (sorry the list is quite long):
> > activation.jar
> 
> > In Tomcat7.0/lib directory I have (I have grouped them alphabetically 
> > so it doesn't make the list too long downwards, like the above list) 
> 
> > activation.jar
> > j2ee.jar
> 
> You must never, never, never have the same class files in multiple locations in the class loader hierarchy (e.g., activation.jar and several others).  Also, j2ee.jar must never be present anywhere in any Tomcat installation.  You need to start over, not adding anything to Tomcat's lib directory, and try running your webapp.  If it fails, determine why, and decide where the necessary .jar file should go (the answer is almost always WEB-INF/lib, except for JDBC drivers when Tomcat is handling the connection pooling).
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  

RE: Upgrade to Tomcat 7 Issues

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Seema Patel [mailto:seema165@hotmail.com] 
> Subject: RE: Upgrade to Tomcat 7 Issues

> In my WEB-INF/lib I have the following (sorry the list is quite long):
> activation.jar

> In Tomcat7.0/lib directory I have (I have grouped them alphabetically 
> so it doesn't make the list too long downwards, like the above list) 

> activation.jar
> j2ee.jar

You must never, never, never have the same class files in multiple locations in the class loader hierarchy (e.g., activation.jar and several others).  Also, j2ee.jar must never be present anywhere in any Tomcat installation.  You need to start over, not adding anything to Tomcat's lib directory, and try running your webapp.  If it fails, determine why, and decide where the necessary .jar file should go (the answer is almost always WEB-INF/lib, except for JDBC drivers when Tomcat is handling the connection pooling).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Upgrade to Tomcat 7 Issues

Posted by Seema Patel <se...@hotmail.com>.
In my WEB-INF/lib I have the following (sorry the list is quite long):

activation.jar
axis.jar
BTDslCheckerLib.jar (this is one of our java projects)
commons-beanutils.jar
commons-codec-1.3.jar
commons-collections.jar
commons-digester.jar
commons-discovery-0.2.jar
commons-fileupload.jar
common-httpclient-3.0.1.jar
commons-logging-1.0.4.jar
commons-validator.jar
ditchnet-tabs-taglib.jar
itext-1.4.jar
jaxen-core.jar
jaxen-jdom.jar
jaxrpc.jar
jbossall-client.jar
jcifs-1.2.17dynamic-dc.jar
jcifs-1.3.17.jar
jdom.jar
jstl.jar
log4j-1.2.13.jar
mail.jar
poi-2.5.1-final-20040804.jar
poi-3.7-20101029.jar
poi-contrib-2.5.1-final-20040804.jar
saaj.jar
saxpath.jar
SOPortalCommon.jar (this is one of our java projects)
standard.jar
struts.jar
struts-el.jar
commonlib.jar (this is one of our java projects)
portalcommonlib.jar (this is one of our java projects)
wsclients.jar (this is one of our java projects)
wsdl4j-1.5.1.jar
yahoo-toolkit.jar (this is one of our java projects that uses the yahoo toolkit yui stuff)

In terms of upgrading, I downloaded jre7 and installed it, changed the projects to use jre7 and in eclipse I pointed the installed JREs to use jre7.
I then downloaded Tomcat7, changed the server.xml file to have the Resource tags/elements in GlobalNamingResources tag to point to my databases (9 Resource tags in total, all taken from the server.xml file in Tomcat 5.5).  In Service tag/element, I have added the following:

<Connector port="8088"
        maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="10"
        enableLookups="false" redirectPort="8443"
        acceptCount="100" connectionTimeout="20000"
        disableUploadTimeout="true" />

I have commented out:

<Connector connectionTimeout="20000" port="8088" protocol="HTTP/1.1" redirectPort="8443"/>

In the Engine tag/element I have added:

<Realm className="org.apache.catalina.realm.JNDIRealm"
                connectionURL="ldap://xxx:3268"
                connectionName="xxx@xxx.local" connectionPassword="xxx"
                referrals="follow" userBase="dc=xxx,dc=local"
                userSearch="(sAMAccountName={0})" userSubtree="true"
                roleBase="dc=xxx,dc=local" roleSearch="(member={0})"
                roleName="cn" roleSubtree="true" />

which is just before the Host tag/element.

In Tomcat7.0/lib directory I have (I have grouped them alphabetically so it doesn't make the list too long downwards, like the above list) (some of which I have added, but not sure if they're needed):

activation.jar, annotations-api.jar
catalina.jar, catalina-ant.jar, catalina-ha.jar, catalina-tribes.jar
ecj-4.2.2.jar, el-api.jar
j2ee.jar
jasper.jar, jasper-el.jar
jaxen-core.jar, jaxen-jdom.jar, jdom.jar, jsp.jar, jtds-1.2.jar
log4j-1.2.13.jar
mysql-connector-java-5.0.8-bin.jar
naming-factory.jar, naming-facotry-dbcp.jar, naming-resources.jar
servlet-api.jar
tomcat-api.jar, tomcat-coyote.jar, tomcat-dbcp.jar, tomcat-i18n-es.jar, tomcat-i18n-fr.jar, tomcat-i18n-ja.jar, tomcat-jdbc.jar, tomcat-util.jar
xmlrpc-1.2-b1.jar

I believe that's everything I have done, but I may have left something out, as I have been trying to get it working for the pass 2 days and may have changed something that I don't remember.  If there is anything more you need to know then please let me know.

Thanks
Seema

> Date: Fri, 9 Aug 2013 09:07:48 -0400
> From: chris@christopherschultz.net
> To: users@tomcat.apache.org
> Subject: Re: Upgrade to Tomcat 7 Issues
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Seema,
> 
> On 8/9/13 5:17 AM, Seema Patel wrote:
> > I've upgraded my tomcat from 5.5 to 7.0. I've also upgraded the jre
> > from 1.5 to 7.
> > 
> > I'm trying to get my existing struts/servlets projects to run, but
> > I'm getting the following error when running tomcat in my
> > tomcat7-stderr...log file:
> > 
> > INFO: Deploying configuration descriptor C:\Tomcat
> > 7.0\conf\Catalina\localhost\common.xml 09-Aug-2013 10:11:44
> > org.apache.catalina.core.ContainerBase addChildInternal SEVERE:
> > ContainerBase.addChild: start: 
> > org.apache.catalina.LifecycleException: Failed to start component
> > [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/common]]
> >
> > 
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
> > at
> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> >
> > 
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> > at
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> >
> > 
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
> > at
> > org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
> >
> > 
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> > at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at
> > java.util.concurrent.FutureTask.run(Unknown Source) at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> > Source) at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
> > at java.lang.Thread.run(Unknown Source) Caused by:
> > java.lang.NoSuchMethodError:
> > javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
> >
> > 
> at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374)
> > at
> > org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1346)
> >
> > 
> at
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
> > at
> > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
> >
> > 
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> > at
> > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> >
> > 
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
> > at
> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >
> > 
> ... 11 more
> > 
> > Any ideas?  Have I missed something?
> 
> Sounds like you have a library in your WEB-INF/lib directory that you
> should not have. Can you give us a listing of what you have there?
> Tomcat should be protecting itself against loading javax.servlet.*
> classes from your webapp, but that sure looks like what is happening.
> 
> Or maybe you copied old (Tomcat) libraries from your Tomcat 5.5
> install to Tomcat 7.0?
> 
> Can you tell us exactly how you upgraded from one to another (be as
> specific as possible without writing a 50-page description).
> 
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.14 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQIcBAEBCAAGBQJSBOmkAAoJEBzwKT+lPKRYBkcP/j3SfgL5v0KbZa37blpSu3pt
> 9yUsosdIcy36baBdxefOZKyRhLVSQusdm7egj3SbY2O7/GofcoCPrU17iF4jltqL
> S0czwXKFItmX+H+44siEJO295oC91GF6ogBQPdOveJXI96bbZo1DTs/TqeFVK66R
> x6MO0Xp/KYBYYx06bLU/kqbUA1WpvZ47x5y69JCJ88beCvhFjixFIKNJmlxZ6xLZ
> hxUjery+59Ao/lVKSRhVsY5ytuI66rKgaCwYEsO57c+gBkO0Ex8QCdOUFIBYuj8/
> AXOOuyElbxri1jAnoaqG81nVPK1KdPkNAlueYBt1ke0j+bxl/H+VOjz2siyjJB3j
> o4Uag/z8e5APLautD+0b37TjMZWrxy7sm5AMrKCsSgYEuX88VU26kpkFlqTy6OQI
> BDqqvnTf0mHFfQPO96+vOnhpGKRkXFxORAfGynixeoKw8n13YKdyV6wxKfLne6gc
> cbR01SRMXe3O71o5+jH1PB6ZhGh9PRA4wgUDuUuht96Jdv6lmizOpl8ZZWHIRtjU
> v4KQu6X9akHLNM29JWVD/6XuhwD7Tr4tiHHQHHR8ozLt6hg7SdAiDSUBQw7RkF6s
> NUK2FkUDUA6ICncZ61TiHkaxyH+SCh4c5Z6ThP8pvbUTmWV2UZ1VLJ/6T9GvCyPY
> 5+XsswfHm40lBbprZn2F
> =7d1+
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  

RE: HTTP Status 304 on GET

Posted by Seema Patel <se...@hotmail.com>.

> Subject: Re: HTTP Status 304 on GET
> From: dmikusa@gopivotal.com
> Date: Wed, 12 Feb 2014 08:02:01 -0500
> To: users@tomcat.apache.org
> 
> On Feb 12, 2014, at 7:48 AM, Seema Patel <se...@hotmail.com> wrote:
> 
> > 
> > 
> >> Date: Wed, 12 Feb 2014 12:38:33 +0000
> >> From: markt@apache.org
> >> To: users@tomcat.apache.org
> >> Subject: Re: HTTP Status 304 on GET
> >> 
> >> On 12/02/2014 12:31, Seema Patel wrote:
> >> 
> >>> When looking in webapps/my_application/.. at the paths shown above, they all exist.  Why is it then showing a 304 error and not loading the pages properly?
> >>> FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error)
> >> 
> >> Did you bother to check what an HTTP 304 status code actually means
> >> before sending this e-mail? I'll give you a hint, it is NOT an error code.
> >> 
> >> Mark
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >> 
> > 
> > I have checked, but when I say error, what I meant is that it's not loading the yui stuff in my application (hence to me an error).
> > Sorry for the confusion, I'm quite new to yui, as it was developed by previous developers and now I've just upgraded the java and tomcat, but can't get the application to work properly
> 
> It doesn’t seem like there’s a problem with your server.  As Mark mentioned 304 is not an error code.  You probably want to debug this through your browser.  Try Chrome Dev Tools or Firebug, inspect the requests and see if there are any JS errors.  
> 
> Dan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

Ok thanks Dan.  I'm using IE 9, as the application seems to work on that when live.  Just not working after I updated the java and tomcat versions.
Will look at the IE developer tools

Seema
 		 	   		  

Re: HTTP Status 304 on GET

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Feb 12, 2014, at 7:48 AM, Seema Patel <se...@hotmail.com> wrote:

> 
> 
>> Date: Wed, 12 Feb 2014 12:38:33 +0000
>> From: markt@apache.org
>> To: users@tomcat.apache.org
>> Subject: Re: HTTP Status 304 on GET
>> 
>> On 12/02/2014 12:31, Seema Patel wrote:
>> 
>>> When looking in webapps/my_application/.. at the paths shown above, they all exist.  Why is it then showing a 304 error and not loading the pages properly?
>>> FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error)
>> 
>> Did you bother to check what an HTTP 304 status code actually means
>> before sending this e-mail? I'll give you a hint, it is NOT an error code.
>> 
>> Mark
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
> 
> I have checked, but when I say error, what I meant is that it's not loading the yui stuff in my application (hence to me an error).
> Sorry for the confusion, I'm quite new to yui, as it was developed by previous developers and now I've just upgraded the java and tomcat, but can't get the application to work properly

It doesn’t seem like there’s a problem with your server.  As Mark mentioned 304 is not an error code.  You probably want to debug this through your browser.  Try Chrome Dev Tools or Firebug, inspect the requests and see if there are any JS errors.  

Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: HTTP Status 304 on GET

Posted by Seema Patel <se...@hotmail.com>.

> Date: Wed, 12 Feb 2014 12:38:33 +0000
> From: markt@apache.org
> To: users@tomcat.apache.org
> Subject: Re: HTTP Status 304 on GET
> 
> On 12/02/2014 12:31, Seema Patel wrote:
> 
> > When looking in webapps/my_application/.. at the paths shown above, they all exist.  Why is it then showing a 304 error and not loading the pages properly?
> > FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error)
> 
> Did you bother to check what an HTTP 304 status code actually means
> before sending this e-mail? I'll give you a hint, it is NOT an error code.
> 
> Mark
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

I have checked, but when I say error, what I meant is that it's not loading the yui stuff in my application (hence to me an error).
Sorry for the confusion, I'm quite new to yui, as it was developed by previous developers and now I've just upgraded the java and tomcat, but can't get the application to work properly


Seema
 		 	   		  

Re: HTTP Status 304 on GET

Posted by Mark Thomas <ma...@apache.org>.
On 12/02/2014 12:31, Seema Patel wrote:

> When looking in webapps/my_application/.. at the paths shown above, they all exist.  Why is it then showing a 304 error and not loading the pages properly?
> FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error)

Did you bother to check what an HTTP 304 status code actually means
before sending this e-mail? I'll give you a hint, it is NOT an error code.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


HTTP Status 304 on GET

Posted by Seema Patel <se...@hotmail.com>.
Hi,

I've just upgraded my java from 1.5 to 1.7, tomcat from 5.5.29 to 7.0.50 on the test environment. 
I have removed all JCIFs authentication from my application and am authenticating users against LDAP through tomcat.
I have managed to get my application to load and allow me access, but when I go to different pages I'm getting HTTP 304 in my localhost_access_log file.
The log file contains:

[12/Feb/2014:12:03:56 +0000] "GET / HTTP/1.1" 200 11444
[12/Feb/2014:12:04:23 +0000] "GET /my_application/ HTTP/1.1" 200 20972
[12/Feb/2014:12:04:23 +0000] "GET /my_application/css/main.css HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/css/main.css HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/js/common.js HTTP/1.1" 200 1296
[12/Feb/2014:12:04:24 +0000] "GET /my_application/js/common.js HTTP/1.1" 200 1296
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/yuiloader-dom-event/yuiloader-dom-event.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/yuiloader/yuiloader-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/yahoo/yahoo-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/event/event-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/dom/dom-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/element/element-beta-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/dragdrop/dragdrop-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/resize/resize-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/animation/animation-min.js HTTP/1.1" 304 -
[12/Feb/2014:12:04:24 +0000] "GET /my_application/yui/layout/layout-min.js HTTP/1.1" 304 -
etc..
etc...

When looking in webapps/my_application/.. at the paths shown above, they all exist.  Why is it then showing a 304 error and not loading the pages properly?
FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error)


Thanks
Seema
 		 	   		  

Re: Upgrade to Tomcat 7 Issues

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Seema,

On 8/9/13 5:17 AM, Seema Patel wrote:
> I've upgraded my tomcat from 5.5 to 7.0. I've also upgraded the jre
> from 1.5 to 7.
> 
> I'm trying to get my existing struts/servlets projects to run, but
> I'm getting the following error when running tomcat in my
> tomcat7-stderr...log file:
> 
> INFO: Deploying configuration descriptor C:\Tomcat
> 7.0\conf\Catalina\localhost\common.xml 09-Aug-2013 10:11:44
> org.apache.catalina.core.ContainerBase addChildInternal SEVERE:
> ContainerBase.addChild: start: 
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/common]]
>
> 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>
> 
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>
> 
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
> at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
>
> 
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at
> java.util.concurrent.FutureTask.run(Unknown Source) at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source) at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
> at java.lang.Thread.run(Unknown Source) Caused by:
> java.lang.NoSuchMethodError:
> javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
>
> 
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374)
> at
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1346)
>
> 
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
> at
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
>
> 
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>
> 
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>
> 
... 11 more
> 
> Any ideas?  Have I missed something?

Sounds like you have a library in your WEB-INF/lib directory that you
should not have. Can you give us a listing of what you have there?
Tomcat should be protecting itself against loading javax.servlet.*
classes from your webapp, but that sure looks like what is happening.

Or maybe you copied old (Tomcat) libraries from your Tomcat 5.5
install to Tomcat 7.0?

Can you tell us exactly how you upgraded from one to another (be as
specific as possible without writing a 50-page description).


- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSBOmkAAoJEBzwKT+lPKRYBkcP/j3SfgL5v0KbZa37blpSu3pt
9yUsosdIcy36baBdxefOZKyRhLVSQusdm7egj3SbY2O7/GofcoCPrU17iF4jltqL
S0czwXKFItmX+H+44siEJO295oC91GF6ogBQPdOveJXI96bbZo1DTs/TqeFVK66R
x6MO0Xp/KYBYYx06bLU/kqbUA1WpvZ47x5y69JCJ88beCvhFjixFIKNJmlxZ6xLZ
hxUjery+59Ao/lVKSRhVsY5ytuI66rKgaCwYEsO57c+gBkO0Ex8QCdOUFIBYuj8/
AXOOuyElbxri1jAnoaqG81nVPK1KdPkNAlueYBt1ke0j+bxl/H+VOjz2siyjJB3j
o4Uag/z8e5APLautD+0b37TjMZWrxy7sm5AMrKCsSgYEuX88VU26kpkFlqTy6OQI
BDqqvnTf0mHFfQPO96+vOnhpGKRkXFxORAfGynixeoKw8n13YKdyV6wxKfLne6gc
cbR01SRMXe3O71o5+jH1PB6ZhGh9PRA4wgUDuUuht96Jdv6lmizOpl8ZZWHIRtjU
v4KQu6X9akHLNM29JWVD/6XuhwD7Tr4tiHHQHHR8ozLt6hg7SdAiDSUBQw7RkF6s
NUK2FkUDUA6ICncZ61TiHkaxyH+SCh4c5Z6ThP8pvbUTmWV2UZ1VLJ/6T9GvCyPY
5+XsswfHm40lBbprZn2F
=7d1+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org