Deploying web app

289 views
Skip to first unread message

Robbert Lambrechts

unread,
Apr 9, 2011, 2:24:39 PM4/9/11
to eID Applet
Wanneer ik lokaal mijn applet draai op de standaard GlassFish debug
server, dan werkt mijn applicatie. Echter wanneer ik een eigen server
installeer en een .war deploy op deze server dan faalt de applet.

Dank bij voorbaat.


Error:
eID Applet - Copyright (C) 2008-2010 FedICT.
Released under GNU LGPL version 3.0 license.
More info: http://code.google.com/p/eid-applet/
checking applet privileges...
security manager permission check for java 1.6...
checking web application trust...
running privileged code...
eID browser applet version: 1.0.2.GA
Java version: 1.6.0_20
Java vendor: Sun Microsystems Inc.
OS: Windows 7
OS version: 6.1
OS arch: x86
Web application URL: https://****************/CardReader/index.xhtml
Current time: Sat Apr 09 20:22:56 CEST 2011
ERROR: no session cookie detected!
sending message: HelloMessage
current protocol state: null
protocol state transition: INIT
SSL handshake finish cipher suite: SSL_RSA_WITH_RC4_128_MD5
response message: IdentificationRequestMessage
current protocol state: INIT
protocol state transition: IDENTIFY
include address: true
include photo: true
include integrity data: false
include certificates: true
remove card: false
identity data usage: null
Detecting eID card...
Scanning card terminal: OMNIKEY AG Smart Card Reader USB 0
eID card detected in card terminal : OMNIKEY AG Smart Card Reader USB
0
Reading out identity...
Reading identity file...
selecting file
read binary
Size identity file: 173
Read address file...
selecting file
read binary
Size address file: 117
Read photo file...
selecting file
read binary
reading authn certificate file...
selecting file
read binary
size authn cert file: 1058
reading sign certificate file...
selecting file
read binary
size non-repud cert file: 1079
reading citizen CA certificate file...
selecting file
read binary
size Cit CA cert file: 1044
reading root certificate file...
selecting file
read binary
size Root CA cert file: 914
Transmitting identity data...
sending message: IdentityDataMessage
current protocol state: IDENTIFY
SSL handshake finish cipher suite: SSL_RSA_WITH_RC4_128_MD5
SSL session Id mismatch
HTTP response code: 500
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>GlassFish
Server Open Source Edition 3.1 - Error report</title><style type="text/
css"><!--H1 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-
family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;} P {font-family:Tahoma,Arial,sans-
serif;background:white;color:black;font-size:12px;}A {color : black;}
HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </
h1><hr/><p><b>type</b> Exception report</p><p><b>message</b></
p><p><b>description</b>The server encountered an internal error ()
that prevented it from fulfilling this request.</p><p><b>exception</b>
<pre>java.lang.RuntimeException: unmarshaller error: IO error: Invalid
chunk header</pre></p><p><b>note</b> <u>The full stack traces of the
exception and its root causes are available in the GlassFish Server
Open Source Edition 3.1 logs.</u></p><hr/><h3>GlassFish Server Open
Source Edition 3.1</h3></body></html>
error: error sending message to service. HTTP status code: 500
error type: java.io.IOException
at be.fedict.eid.applet.Controller.sendMessage:218
at be.fedict.eid.applet.Controller.sendMessage:179
at be.fedict.eid.applet.Controller.performEidIdentificationOperation:
1703
at be.fedict.eid.applet.Controller.run:390
at be.fedict.eid.applet.Applet$AppletThread$1.run:602
at java.security.AccessController.doPrivileged:-2
at be.fedict.eid.applet.Applet$AppletThread.run:597
at java.lang.Thread.run:-1
Generic Error.

Error uit de logs:

StandardWrapperValve[AppletServiceServlet]: PWC1406: Servlet.service()
for servlet AppletServiceServlet threw exception
java.lang.RuntimeException: unmarshaller error: IO error: Invalid
chunk header at
be.fedict.eid.applet.service.AppletServiceServlet.doPost(AppletServiceServlet.java:
282) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:
1534) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
281) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
655) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
595) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:
91) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
162) at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:
326) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
227) at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:
170) at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:
822) at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:
225) at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:
137) at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
104) at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
90) at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:
79) at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:
54) at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:
59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at
com.sun.grizzly.util.AbstractThreadPool
$Worker.doWork(AbstractThreadPool.java:532) at
com.sun.grizzly.util.AbstractThreadPool
$Worker.run(AbstractThreadPool.java:513) at
java.lang.Thread.run(Thread.java:662) Caused by:
java.lang.RuntimeException: IO error: Invalid chunk header at
be.fedict.eid.applet.service.impl.HttpServletRequestHttpReceiver.getBody(HttpServletRequestHttpReceiver.java:
67) at
be.fedict.eid.applet.shared.protocol.Unmarshaller.injectHttpBody(Unmarshaller.java:
300) at
be.fedict.eid.applet.shared.protocol.Unmarshaller.receive(Unmarshaller.java:
266) at
be.fedict.eid.applet.service.AppletServiceServlet.doPost(AppletServiceServlet.java:
279) ... 27 more Caused by: java.io.IOException: Invalid chunk header
at
com.sun.grizzly.tcp.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilter.java:
173) at
com.sun.grizzly.tcp.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:
744) at com.sun.grizzly.tcp.Request.doRead(Request.java:501) at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:
336) at com.sun.grizzly.util.buf.ByteChunk.substract(ByteChunk.java:
431) at
org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:357)
at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:
228) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025) at
org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at
org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:218) at
be.fedict.eid.applet.service.impl.HttpServletRequestHttpReceiver.getBody(HttpServletRequestHttpReceiver.java:
64) ... 30 more

Robbert Lambrechts

unread,
Apr 15, 2011, 8:59:46 PM4/15/11
to eID Applet
Ik heb de netBeans tutorial gevolgd en terug opnieuw begonnen en ik
krijg echter nog steedsdezelfde fout (zelfs lokaal):
java.lang.RuntimeException: unmarshaller error: IO error: Invalid
chunk header.

Ik denk dat deze gekomen is na het switchen van 1.0.1 naar 1.0.2
(tegelijk wanneer ik op de server deployde).

Van waar komt deze fout, of doe ik iets mis?

Mvg, Robbert Lambrechts


On 9 apr, 20:24, Robbert Lambrechts <robbert.lambrec...@gmail.com>
wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>GlassFish

Frank Cornelis

unread,
Apr 18, 2011, 10:06:41 AM4/18/11
to eid-a...@googlegroups.com
Dag Robbert,


There indeed has been a change between version 1.0.1.GA and 1.0.2.GA in
the HTTP transport code. Starting from 1.0.2.GA we have enabled Chunked
Transfer-Encoding per default since this fixes some issue with Visual
Studio and also with WebScarab (our lovely hacking tool).

On the other hand, it was expected that some server implementations
would noise on this not-so-common transfer encoding. So I've prepared a
new beta release of the eID Applet, which is available at:
https://www.e-contract.be/maven2/be/fedict/eid-applet/eid-applet-package/1.0.3.Beta2/

This new eID Applet supports the NoChunkedTransferEncoding applet
parameter. When setting this parameter to 'true', you will have "normal"
transfer encoding enabled again.


Mvg,
Frank.

> --
> You received this message because you are subscribed to the Google Groups "eID Applet" group.
> To post to this group, send email to eid-a...@googlegroups.com.
> To unsubscribe from this group, send email to eid-applet+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/eid-applet?hl=en.
>

Robbert Lambrechts

unread,
Apr 18, 2011, 11:52:14 AM4/18/11
to eID Applet
Thank you for your reply.

In the meantime I found out that updating Grizzly on the GlassFish
Server solves the problem with the chunked transfer mode. But as the
next version is coming out I suppose this information isn't relevant
anymore.

I grabbed the latest 1.0.3, and added 'NoChunkedTransferEncoding'.
var parameters = {
TargetPage :'index.xhtml',
AppletService : 'applet-service',
BackgroundColor : '#ffffff',
Language: 'en',
HideDetailsButton: 'false',
NoChunkedTransferEncoding: 'true'
};

and this gave me the following error:

eID Applet - Copyright (C) 2008-2010 FedICT.
Released under GNU LGPL version 3.0 license.
More info: http://code.google.com/p/eid-applet/
checking applet privileges...
security manager permission check for java 1.6...
checking web application trust...
running privileged code...
eID browser applet version: 1.0.3.Beta2
Java version: 1.6.0_20
Java vendor: Sun Microsystems Inc.
OS: Windows 7
OS version: 6.1
OS arch: x86
Web application URL: https://localhost:8080/mavenproject1/test.xhtml
Current time: Mon Apr 18 17:44:13 CEST 2011
session cookie detected
sending message: HelloMessage
current protocol state: null
protocol state transition: INIT
no chunked transfer-encoding: true
SSL handshake finish cipher suite: SSL_RSA_WITH_RC4_128_MD5
response message: IdentificationRequestMessage
current protocol state: INIT
protocol state transition: IDENTIFY
include address: true
include photo: false
include integrity data: false
include certificates: false
remove card: false
identity data usage: null
Detecting eID card...
Scanning card terminal: OMNIKEY AG Smart Card Reader USB 0
eID card detected in card terminal : OMNIKEY AG Smart Card Reader USB
0
Reading out identity...
Reading identity file...
selecting file
read binary
Size identity file: 173
Read address file...
selecting file
read binary
Size address file: 117
Transmitting identity data...
sending message: IdentityDataMessage
current protocol state: IDENTIFY
no chunked transfer-encoding: true
HTTP response code: 500
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>GlassFish
Server Open Source Edition 3.1 - Error report</title><style type="text/
css"><!--H1 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-
family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;} P {font-family:Tahoma,Arial,sans-
serif;background:white;color:black;font-size:12px;}A {color : black;}
HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </
h1><hr/><p><b>type</b> Exception report</p><p><b>message</b></
p><p><b>description</b>The server encountered an internal error ()
that prevented it from fulfilling this request.</p><p><b>exception</b>
<pre>java.lang.RuntimeException: expected a protocol start message</
pre></p><p><b>note</b> <u>The full stack traces of the exception and
its root causes are available in the GlassFish Server Open Source
Edition 3.1 logs.</u></p><hr/><h3>GlassFish Server Open Source Edition
3.1</h3></body></html>
error: error sending message to service. HTTP status code: 500
error type: java.io.IOException
at be.fedict.eid.applet.Controller.sendMessage:227
at be.fedict.eid.applet.Controller.sendMessage:179
at be.fedict.eid.applet.Controller.performEidIdentificationOperation:
1712
at be.fedict.eid.applet.Controller.run:399
at be.fedict.eid.applet.Applet$AppletThread$1.run:602
at java.security.AccessController.doPrivileged:-2
at be.fedict.eid.applet.Applet$AppletThread.run:597
at java.lang.Thread.run:-1
Generic Error.

WARNING: StandardWrapperValve[AppletServiceServlet]: PWC1406:
Servlet.service() for servlet AppletServiceServlet threw exception
java.lang.RuntimeException: expected a protocol start message
at
be.fedict.eid.applet.shared.protocol.ProtocolStateMachine.checkRequestMessage(ProtocolStateMachine.java:
121)
at
be.fedict.eid.applet.service.AppletServiceServlet.doPost(AppletServiceServlet.java:
299)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
848)
...

On 18 apr, 16:06, Frank Cornelis <frank.corne...@fedict.be> wrote:
> Dag Robbert,
>
> There indeed has been a change between version 1.0.1.GA and 1.0.2.GA in
> the HTTP transport code. Starting from 1.0.2.GA we have enabled Chunked
> Transfer-Encoding per default since this fixes some issue with Visual
> Studio and also with WebScarab (our lovely hacking tool).
>
> On the other hand, it was expected that some server implementations
> would noise on this not-so-common transfer encoding. So I've prepared a
> new beta release of the eID Applet, which is available at:https://www.e-contract.be/maven2/be/fedict/eid-applet/eid-applet-pack...
> ...
>
> meer lezen »

Frank Cornelis

unread,
Apr 19, 2011, 4:19:16 AM4/19/11
to eid-a...@googlegroups.com
Hi Robbert,


Running on the GlassFish 3.0.1 that comes with NetBeans 6.9.1 does not
give me any problems.

I've also tried it out on GlassFish 3.1 and indeed I get the same error.
Seems like an issue in the latest GlassFish.


Kind Regards,
Frank.

Seems like this Grizzly bear thing has problems keeping track of the
HTTP session.

> For more options, visit this group at http://groups.google.com/group/eid-applet?hl=en.
>

Frank Cornelis

unread,
Apr 21, 2011, 6:28:42 AM4/21/11
to eid-a...@googlegroups.com
Hi Robbert,


Now that NetBeans 7.0 is out, I've been playing some more with GlassFish
3.1.
I've come up with the following work-around. For AppletService applet
parameter use something like:
AppletService : 'identification;jsessionid=<%=session.getId()%>'
within your JSP page where the eID Applet gets loaded.
Of course, from a security point-of-view, this smells some...


Kind Regards,
Frank.

Robbert Lambrechts

unread,
Apr 21, 2011, 7:36:48 PM4/21/11
to eID Applet
Thank you very much for these replies. It saved me the trouble of
reinstalling my server. It seems to be working now.
> ...
>
> meer lezen »
Reply all
Reply to author
Forward
0 new messages