tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanno Scharw├Ąchter <hanno.scharwaech...@gmx.de>
Subject AW: Tomcat 7: ClassNotFoundEception for security provider during startup
Date Mon, 21 Jan 2013 21:20:09 GMT
On 21/01/2013 17:49, Hanno Scharw├Ąchter wrote:
> Hi guys,
> 
> I have a problem for which I need your help:
> 
> I am trying to migrate from Tomcat 6.0.33 to 7.0.35 on Windows 7. The 
> Tomcat is configured to support https on port 8443 using the third 
> party security provider BouncyCastleProvider. When I start the new 
> Tomcat version 7.0.35, I get a ClassNotFoundException for the 
> BouncyCastleProvider, which resides in the jre/lib/ext directory of my 
> jdk (1.6.0_29), ergo should be loaded by the Bootstrap-ClassLoader.  I 
> checked the server-conf by starting both Tomcat versions with exactly the
same server configuration (server.xml).
> While Tomcat 6 runs, Tomcat 7 refuses to start. The catalina.log for 
> Tomcat
> 7.0.35 startup is as follows:
> 
> 21.01.2013 18:26:01 org.apache.catalina.core.AprLifecycleListener init
> INFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR 
> version 1.4.6.
> 21.01.2013 18:26:01 org.apache.catalina.core.AprLifecycleListener init
> INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters 
> [false], random [true].
> 21.01.2013 18:26:01 org.apache.catalina.startup.SetAllPropertiesRule 
> begin
> WARNUNG: [SetAllPropertiesRule]{Server/Service/Connector} Setting 
> property 'keystore' to 'C:\tmp\server_keystore.bks' did not find a
matching property.
> 21.01.2013 18:26:01 org.apache.tomcat.util.digester.SetPropertiesRule 
> begin
> WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host} Setting 
> property 'xmlNamespaceAware' to 'false' did not find a matching property.
> 21.01.2013 18:26:01 org.apache.tomcat.util.digester.SetPropertiesRule 
> begin
> WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host} Setting 
> property 'xmlValidation' to 'false' did not find a matching property.
> 21.01.2013 18:26:01 org.apache.tomcat.util.digester.Digester endElement
> WARNUNG:   No rules found matching 'Server/ApacheConfig'.
> 21.01.2013 18:26:02 org.apache.catalina.core.AprLifecycleListener
> initializeSSL
> INFO: OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012)
> 21.01.2013 18:26:02 org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-apr-8080"]
> 21.01.2013 18:26:02 org.apache.catalina.core.StandardService 
> initInternal
> SCHWERWIEGEND: Failed to initialize connector 
> [Connector[HTTP/1.1-8443]]
> org.apache.catalina.LifecycleException: Failed to initialize component 
> [Connector[HTTP/1.1-8443]]
> 	at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
> 	at
> org.apache.catalina.core.StandardService.initInternal(StandardService.
> java:5
> 59)
> 	at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
> 	at
> org.apache.catalina.core.StandardServer.initInternal(StandardServer.ja
> va:814
> )
> 	at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:39
> )
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl
> .java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
> Caused by: org.apache.catalina.LifecycleException: Protocol handler 
> initialization failed
> 	at
> org.apache.catalina.connector.Connector.initInternal(Connector.java:983)
> 	at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
> 	... 12 more
> Caused by: java.lang.ClassNotFoundException: Error loading SSL 
> Implementation org.bouncycastle.jce.provider.BouncyCastleProvider
> :java.lang.ClassCastException:
> org.bouncycastle.jce.provider.BouncyCastleProvider cannot be cast to 
> org.apache.tomcat.util.net.SSLImplementation
> 	at
> org.apache.tomcat.util.net.SSLImplementation.getInstance(SSLImplementa
> tion.j
> ava:75)
> 	at
> org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp1
> 1JsseP
> rotocol.java:118)
> 	at
> org.apache.catalina.connector.Connector.initInternal(Connector.java:981)
> 	... 13 more
> 21.01.2013 18:26:02 org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
> 21.01.2013 18:26:02 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 800 ms
> 
> Any help is strongly appreciated as I am standing in front of a wall.

server.xml contents (less comments)?

Mark


Here goes the server.xml (Please consider that I used this config for Tomcat
6 and Tomcat 7):

<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
 
  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">

    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
	
      	<Connector  port="8443" connectionTimeout="20000"
protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true" 
				keystore="C:\tmp\server_keystore.bks"
keystoreType="BKS" keystorePass="passwd" 
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS"
sslImplementationName="org.bouncycastle.jce.provider.BouncyCastleProvider"/>

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost">
    
      <Realm className="org.apache.catalina.realm.LockOutRealm">
    
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
       
        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

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

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


Mime
View raw message