[Java lista] Tomcat Glassfish problema classloader Security ???
Peter Verhas
peter at verhas.com
2009. Aug. 26., Sze, 13:54:21 CEST
Írtam egy programot, amelyiket a Bouncycastle crypto jar-ját
használja. És gondom van vele. Tomcat 5.5-ön elindítva nem működik.
(excpetion-t bemásoltam). A hiba valahol ott van, hogy a servlet init
részében inicializálom a crypto provider-t, úgy, hogy létrehozok egy
olyan osztályt, amiben szerepel a
static {
Security.addProvider(new BouncyCastleProvider());
}
kódrészlet. Persze lehet, class loader már ezelőtt (az init futása
előtt) betöltötte az osztályt, de elvileg annak sem kellene bajnak
lennie.
Én ugyan direktben hívom a BouncyCastle kódjait, de ő maga a Security
rendszeren keresztül (tehát a PGP implementációjuk alá bekerülhet más
security provider is), és ott hasal el.
Glassfish v3 prelude alatt is hasonlóan nem működik, de ott más hibát
ad, de érezhetően hasonló a gondja.
glassfish-v2ur2 jól működik, Tomcat 6.0 jól működik. MI lehet ez?
Péter
Tomcat 5.5 exception:
INFO: Illegal access: this web application instance has been stopped
already. Could not load
org.bouncycastle.jce.provider.asymmetric.ec.Signature$ecDSA. The
eventual following stack trace is caused by an error thrown for
debugging purposes as well as to attempt to terminate the thread which
caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1272)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.security.Provider$Service.getImplClass(Provider.java:1262)
at java.security.Provider$Service.newInstance(Provider.java:1220)
at java.security.Signature.isSpi(Signature.java:255)
at java.security.Signature.getInstance(Signature.java:200)
at com.sun.net.ssl.internal.ssl.JsseJce.getSignature(JsseJce.java:197)
at com.sun.net.ssl.internal.ssl.JsseJce.isEcAvailable(JsseJce.java:156)
at com.sun.net.ssl.internal.ssl.CipherSuite$KeyExchange.isAvailable(CipherSuite.java:271)
at com.sun.net.ssl.internal.ssl.CipherSuite.isAvailable(CipherSuite.java:143)
at com.sun.net.ssl.internal.ssl.CipherSuiteList.buildAvailableCache(CipherSuiteList.java:210)
at com.sun.net.ssl.internal.ssl.CipherSuiteList.getDefault(CipherSuiteList.java:233)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.init(SSLSocketImpl.java:508)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:451)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:56)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createSSLSocket(SVNSocketFactory.java:68)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:183)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:323)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:999)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.checkPath(DAVRepository.java:217)
at com.verhas.groowiki.svnkit.SvnHandler.getNewRepositoryObject(SvnHandler.java:170)
at com.verhas.groowiki.portal.GroowikiMain.doGetInitializedProperly(GroowikiMain.java:263)
at com.verhas.groowiki.portal.GroowikiMain.doGet(GroowikiMain.java:203)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.verhas.groowiki.filter.AuthenticationFilter.doAuthentication(AuthenticationFilter.java:144)
at com.verhas.groowiki.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:179)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
2009.08.21. 10:44:46 org.apache.catalina.loader.WebappClassLoader loadClass
ClassFish v3prelude exception:
SEVERE: StandardWrapperValve[main]: PWC1406: Servlet.service() for
servlet main threw exception
java.lang.ThreadDeath
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1344)
at java.security.Provider$Service.getImplClass(Provider.java:1262)
at java.security.Provider$Service.newInstance(Provider.java:1220)
at java.security.Signature.isSpi(Signature.java:255)
at java.security.Signature.getInstance(Signature.java:200)
at com.sun.net.ssl.internal.ssl.JsseJce.getSignature(JsseJce.java:197)
at com.sun.net.ssl.internal.ssl.JsseJce.isEcAvailable(JsseJce.java:156)
at com.sun.net.ssl.internal.ssl.CipherSuite$KeyExchange.isAvailable(CipherSuite.java:271)
at com.sun.net.ssl.internal.ssl.CipherSuite.isAvailable(CipherSuite.java:143)
at com.sun.net.ssl.internal.ssl.CipherSuiteList.buildAvailableCache(CipherSuiteList.java:210)
at com.sun.net.ssl.internal.ssl.CipherSuiteList.getDefault(CipherSuiteList.java:233)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.init(SSLSocketImpl.java:508)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:451)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:56)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createSSLSocket(SVNSocketFactory.java:68)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:183)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:323)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:999)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.checkPath(DAVRepository.java:217)
at com.verhas.groowiki.svnkit.SvnHandler.getNewRepositoryObject(SvnHandler.java:170)
at com.verhas.groowiki.portal.GroowikiMain.doGetInitializedProperly(GroowikiMain.java:263)
at com.verhas.groowiki.portal.GroowikiMain.doGet(GroowikiMain.java:203)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:337)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at com.verhas.groowiki.filter.AuthenticationFilter.doAuthentication(AuthenticationFilter.java:144)
at com.verhas.groowiki.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:179)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
További információk a(z) Javalist levelezőlistáról