You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin Jacobson <ma...@libero.it> on 2002/06/24 15:01:21 UTC

TC 4.1.3 ExptyStackException

Since moving to TC4.1.3, I get this:

2002-06-24 14:48:22 HttpProcessor[80][4] process.invoke
java.util.EmptyStackException
         at java.util.Stack.peek(Stack.java:82)
         at java.util.Stack.pop(Stack.java:64)
         at 
org.apache.tomcat.util.log.SystemLogHandler.stopCapture(SystemLogHandler.java:152)
         at 
org.apache.catalina.connector.RequestBase.recycle(RequestBase.java:562)
         at 
org.apache.catalina.connector.HttpRequestBase.recycle(HttpRequestBase.java:417)
         at 
org.apache.catalina.connector.http.HttpRequestImpl.recycle(HttpRequestImpl.java:195)
         at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1101)
         at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
         at java.lang.Thread.run(Thread.java:496)

2002-06-24 14:48:55 HttpProcessor[443][4] process.invoke
java.util.EmptyStackException
         at java.util.Stack.peek(Stack.java:82)
         at java.util.Stack.pop(Stack.java:64)
         at 
org.apache.tomcat.util.log.SystemLogHandler.stopCapture(SystemLogHandler.java:152)
         at 
org.apache.catalina.connector.RequestBase.recycle(RequestBase.java:562)
         at 
org.apache.catalina.connector.HttpRequestBase.recycle(HttpRequestBase.java:417)
         at 
org.apache.catalina.connector.http.HttpRequestImpl.recycle(HttpRequestImpl.java:195)
         at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1101)
         at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
         at java.lang.Thread.run(Thread.java:496)

I haven't been able to track down exactly what provokes it - it seems to 
happen at random :-( but sure as eggs is eggs, it'll happen sooner or later.
It doesn't look like a user code error, but who knows!

Anyone got any ideas of where I should look?

Thanks,
Martin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TC 4.1.3 ExptyStackException

Posted by Martin Jacobson <ma...@libero.it>.
Remy Maucherat wrote:

>>
>> It mentions an sslImplementation as being null, but I don't find any 
>> mention of such an attribute in the docs. Is this the problem? And if 
>> so, what do I need to put?
>>
>> BTW, I didn't really want to be on the bleeding edge of development - 
>> but I do need a JNDI DataSource that works, so here I am!
> 
> 
> You need JSSE for that to work (and put the JARs in common/lib, or use 
> JDK 1.4).
> 
> There is a bug in that release recognizing the "keystoreType" attribute, 
> though (bugzilla 9676). This got fixed in release 4.1.4.
> 
> Remy
> 


Well, I already had JSSE installed as a standard extension, but I copied 
it to common/lib anyway; there was no difference, I'm afraid :-(

I should point out that I have this working (not with Coyote) in Tomcat 
4.0.4, if that helps.

Where can I get 4.1.4? I hunted around, but I can't find it on the 
jakarta site. Is there a binary?

Best regards, and thanks for the help,
Martin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TC 4.1.3 ExptyStackException

Posted by Remy Maucherat <re...@apache.org>.
Martin Jacobson wrote:
> Remy Maucherat wrote:
> 
>>
>> The old HTTP/1.1 connector is unsupported (and apparently, a bug was 
>> introduced in there). Try using Coyote HTTP/1.1 instead. You can look 
>> at the default configuration file to see how to configure it.
>>
>> Remy
>>
> 
> 
> Thanks for the quick response! Have tried that, but I now have a new 
> problem! Coyote does not appear to initialize the SSL connection 
> properly - or I've got something wrong: here's what I find in the logs:
> 
> [INFO] Http11Protocol - -Attribute port: 80
> [INFO] Http11Protocol - -Attribute maxThreads: 75
> [INFO] Http11Protocol - -Attribute backlog: 10
> [INFO] Http11Protocol - -Attribute tcpNoDelay: true
> [INFO] Http11Protocol - -Attribute soTimeout: 20000
> [INFO] Http11Protocol - -Attribute timeout: 20000
> [INFO] Http11Protocol - -Attribute secure: false
> [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 80
> [INFO] Http11Protocol - -Attribute port: 443
> [INFO] Http11Protocol - -Attribute maxThreads: 75
> [INFO] Http11Protocol - -Attribute backlog: 10
> [INFO] Http11Protocol - -Attribute tcpNoDelay: true
> [INFO] Http11Protocol - -Attribute soTimeout: 60000
> [INFO] Http11Protocol - -Attribute timeout: 60000
> [INFO] Http11Protocol - -Attribute secure: true
> [INFO] Http11Protocol - -Attribute algorithm: SunX509
> [INFO] Http11Protocol - -Attribute keystore: /Users/martin/.keystore
> [INFO] Http11Protocol - -Attribute protocol: TLS
> [INFO] Http11Protocol - -Attribute sslImplementation: null
> [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 443
> 
> 2002-06-24 16:20:35 Authenticator[/drs]:  Subject to constraint 
> SecurityConstraint[Login]
> 2002-06-24 16:20:35 Authenticator[/drs]:  Calling checkUserData()
> 2002-06-24 16:20:35 Authenticator[/drs]:   Cannot create new URL
> java.net.MalformedURLException: unknown protocol: https
>         at java.net.URL.<init>(URL.java:307)
>         at java.net.URL.<init>(URL.java:224)
>         at 
> org.apache.catalina.authenticator.AuthenticatorBase.checkUserData(AuthenticatorBase.java:730) 
> 
>         at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) 
> 
>         at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644) 
> 
>         at 
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) 
> 
>         at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644) 
> 
>         at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
> 
> and here's my server.xml
> 
> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>         port="80"
>     minProcessors="5"
>     maxProcessors="75"
>     enableLookups="true"
>     redirectPort="443"
>     acceptCount="10"
>     debug="9"
>     connectionTimeout="20000"
>     useURIValidationHack="false"
> />
> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>         port="443"
>         minProcessors="5"
>         maxProcessors="75"
>         enableLookups="true"
>         acceptCount="10"
>         debug="9"
>         scheme="https"
>         secure="true"
>            useURIValidationHack="false">
>     <Factory 
> className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
>             clientAuth="false"
>           keystoreFile="/Users/martin/.keystore"
>           keystorePass="mypassword"
>               protocol="TLS"
>               algorithm="SunX509"
>               keystoreType="JKS"
>     />
> </Connector>
> 
> It mentions an sslImplementation as being null, but I don't find any 
> mention of such an attribute in the docs. Is this the problem? And if 
> so, what do I need to put?
> 
> BTW, I didn't really want to be on the bleeding edge of development - 
> but I do need a JNDI DataSource that works, so here I am!

You need JSSE for that to work (and put the JARs in common/lib, or use 
JDK 1.4).

There is a bug in that release recognizing the "keystoreType" attribute, 
though (bugzilla 9676). This got fixed in release 4.1.4.

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TC 4.1.3 ExptyStackException

Posted by Martin Jacobson <ma...@libero.it>.
Remy Maucherat wrote:

> 
> The old HTTP/1.1 connector is unsupported (and apparently, a bug was 
> introduced in there). Try using Coyote HTTP/1.1 instead. You can look at 
> the default configuration file to see how to configure it.
> 
> Remy
> 


Thanks for the quick response! Have tried that, but I now have a new 
problem! Coyote does not appear to initialize the SSL connection 
properly - or I've got something wrong: here's what I find in the logs:

[INFO] Http11Protocol - -Attribute port: 80
[INFO] Http11Protocol - -Attribute maxThreads: 75
[INFO] Http11Protocol - -Attribute backlog: 10
[INFO] Http11Protocol - -Attribute tcpNoDelay: true
[INFO] Http11Protocol - -Attribute soTimeout: 20000
[INFO] Http11Protocol - -Attribute timeout: 20000
[INFO] Http11Protocol - -Attribute secure: false
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 80
[INFO] Http11Protocol - -Attribute port: 443
[INFO] Http11Protocol - -Attribute maxThreads: 75
[INFO] Http11Protocol - -Attribute backlog: 10
[INFO] Http11Protocol - -Attribute tcpNoDelay: true
[INFO] Http11Protocol - -Attribute soTimeout: 60000
[INFO] Http11Protocol - -Attribute timeout: 60000
[INFO] Http11Protocol - -Attribute secure: true
[INFO] Http11Protocol - -Attribute algorithm: SunX509
[INFO] Http11Protocol - -Attribute keystore: /Users/martin/.keystore
[INFO] Http11Protocol - -Attribute protocol: TLS
[INFO] Http11Protocol - -Attribute sslImplementation: null
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 443

2002-06-24 16:20:35 Authenticator[/drs]:  Subject to constraint 
SecurityConstraint[Login]
2002-06-24 16:20:35 Authenticator[/drs]:  Calling checkUserData()
2002-06-24 16:20:35 Authenticator[/drs]:   Cannot create new URL
java.net.MalformedURLException: unknown protocol: https
         at java.net.URL.<init>(URL.java:307)
         at java.net.URL.<init>(URL.java:224)
         at 
org.apache.catalina.authenticator.AuthenticatorBase.checkUserData(AuthenticatorBase.java:730)
         at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
         at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)

and here's my server.xml

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
		port="80"
	minProcessors="5"
	maxProcessors="75"
	enableLookups="true"
	redirectPort="443"
	acceptCount="10"
	debug="9"
	connectionTimeout="20000"
	useURIValidationHack="false"
/>
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
		port="443"
		minProcessors="5"
		maxProcessors="75"
		enableLookups="true"
		acceptCount="10"
		debug="9"
		scheme="https"
		secure="true"
	   	useURIValidationHack="false">
	<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
			clientAuth="false"
		  keystoreFile="/Users/martin/.keystore"
		  keystorePass="mypassword"
			  protocol="TLS"
			  algorithm="SunX509"
			  keystoreType="JKS"
	/>
</Connector>

It mentions an sslImplementation as being null, but I don't find any 
mention of such an attribute in the docs. Is this the problem? And if 
so, what do I need to put?

BTW, I didn't really want to be on the bleeding edge of development - 
but I do need a JNDI DataSource that works, so here I am!

Thanks,
Martin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TC 4.1.3 ExptyStackException

Posted by Remy Maucherat <re...@apache.org>.
Martin Jacobson wrote:
> Since moving to TC4.1.3, I get this:
> 
> 2002-06-24 14:48:22 HttpProcessor[80][4] process.invoke
> java.util.EmptyStackException
>         at java.util.Stack.peek(Stack.java:82)
>         at java.util.Stack.pop(Stack.java:64)
>         at 
> org.apache.tomcat.util.log.SystemLogHandler.stopCapture(SystemLogHandler.java:152) 
> 
>         at 
> org.apache.catalina.connector.RequestBase.recycle(RequestBase.java:562)
>         at 
> org.apache.catalina.connector.HttpRequestBase.recycle(HttpRequestBase.java:417) 
> 
>         at 
> org.apache.catalina.connector.http.HttpRequestImpl.recycle(HttpRequestImpl.java:195) 
> 
>         at 
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1101) 
> 
>         at 
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151) 
> 
>         at java.lang.Thread.run(Thread.java:496)
> 
> 2002-06-24 14:48:55 HttpProcessor[443][4] process.invoke
> java.util.EmptyStackException
>         at java.util.Stack.peek(Stack.java:82)
>         at java.util.Stack.pop(Stack.java:64)
>         at 
> org.apache.tomcat.util.log.SystemLogHandler.stopCapture(SystemLogHandler.java:152) 
> 
>         at 
> org.apache.catalina.connector.RequestBase.recycle(RequestBase.java:562)
>         at 
> org.apache.catalina.connector.HttpRequestBase.recycle(HttpRequestBase.java:417) 
> 
>         at 
> org.apache.catalina.connector.http.HttpRequestImpl.recycle(HttpRequestImpl.java:195) 
> 
>         at 
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1101) 
> 
>         at 
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151) 
> 
>         at java.lang.Thread.run(Thread.java:496)
> 
> I haven't been able to track down exactly what provokes it - it seems to 
> happen at random :-( but sure as eggs is eggs, it'll happen sooner or 
> later.
> It doesn't look like a user code error, but who knows!
> 
> Anyone got any ideas of where I should look?

The old HTTP/1.1 connector is unsupported (and apparently, a bug was 
introduced in there). Try using Coyote HTTP/1.1 instead. You can look at 
the default configuration file to see how to configure it.

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>