Skip to main content

Stateful Session detaches entity?

13 replies [Last post]
Anonymous

In my stateful session bean, I store a JPA entity found by em.find() in a member. In the business methods, I want to use that entity. But TopLink tells me that the entity is detached. The entity manager used always is the same (member annotated by @PersistenceContext).

I am not sure whether this is a bug or whether some specification (which one?) says that an entity must become detached between to calls to a STATEFUL (!) session bean.

Any ideas?

Thanks

Markus

QUIPSY QUALITY GmbH & Co. KG

Ein Unternehmen der MES-Gruppe

Stuttgarter Strasse 23

D-75179 Pforzheim

Tel: 07231-9189-52

Fax: 07231-9189-59

www.quipsy.de

karg@quipsy.de

Registergericht Mannheim HRA 701214

Geschäftsführer: Nils Schroeder

Diese E-Mail enthält persönliche, vertrauliche und vor Weitergabe geschützte Informationen und ist ausschließlich für den vorgesehenen o.g. Empfänger (Adressaten) bestimmt. Falls Sie diese E-Mail versehentlich erhalten haben und nicht der vorgesehene Empfänger sind, bitten wir Sie, die E-Mail und deren Anhänge nicht aufzubewahren, nicht zu vervielfältigen, nicht zu nutzen und nicht weiterzugeben. Bitte informieren Sie uns als Absender über diesen Zustellungsfehler und löschen Sie die E-Mail.

[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Drinkwater, GJ \(Glen\)

Hi

Has anyone had a look at this bug? I have found that it does not appear
in Gf v1 UR1.

Glen

-----Original Message-----
From: Sanjeeb.Sahoo@Sun.COM [mailto:Sanjeeb.Sahoo@Sun.COM] On Behalf Of
Sahoo
Sent: 05 June 2008 07:08
To: users@glassfish.dev.java.net
Subject: Re: Web Service error under load

looks like a bug. Can you file a bug attaching a test case?

Thanks,
Sahoo

Drinkwater, GJ (Glen) wrote:
> Hi
>
> I have a web service ejb end point that works fine, but when i put it
> under load (say 30 concurrent) i get this error about 6 times
>
> Does anyone know what this means?
>
> I am using Glassfish 9.1_02 with 1.6.0_06
>
> Thanks Glen
>
> invocation error on ejb endpoint ICAT at /ICATService/ICAT : XML
> reader error: javax.xml.stream.XMLStreamException: ParseError at
> [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
> javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamRead
erUtil.java:256)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:84)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReader
Util.java:99)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStrea
mReaderUtil.java:89)
> at
>
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:194)
> at
>
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:163)
> at
>
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:135)
> at
>
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:29
4)
> at
>
com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:
276)
> at
>
com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93
)
> at
>
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter
.java:432)
> at
> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
> at
>
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapt
er.java:135)
> at
>
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Messa
geDispatcher.java:113)
> at
>
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDi
spatcher.java:87)
> at
>
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint
(EjbWebServiceServlet.java:200)
> at
>
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebService
Servlet.java:129)
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at
>
com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:1
14)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
> at
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:206)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:150)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdap
ter(DefaultProcessorTask.java:637)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(De
faultProcessorTask.java:813)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcesso
rTask(DefaultReadTask.java:341)
> at
>
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLRead
Task.java:440)
> at
>
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadT
ask.java:228)
> at
>
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWo
> rkerThread.java:106) Caused by: javax.xml.stream.XMLStreamException:
> ParseError at [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> at
com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
> at
>
com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter
.java:92)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:65)
> ... 40 more

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Bhakti Mehta

Glen,
Sorry I have been working on other higher priority projects and have not
been able to address these issues.
This is not a part of UR1. I will definitely look at this bug whenever
I get a chance in the next couple of days
Regards,
Bhakti

Drinkwater, GJ (Glen) wrote:
> Hi
>
> Has anyone had a look at this bug? I have found that it does not appear
> in Gf v1 UR1.
>
> Glen
>
> -----Original Message-----
> From: Sanjeeb.Sahoo@Sun.COM [mailto:Sanjeeb.Sahoo@Sun.COM] On Behalf Of
> Sahoo
> Sent: 05 June 2008 07:08
> To: users@glassfish.dev.java.net
> Subject: Re: Web Service error under load
>
> looks like a bug. Can you file a bug attaching a test case?
>
> Thanks,
> Sahoo
>
> Drinkwater, GJ (Glen) wrote:
>
>> Hi
>>
>> I have a web service ejb end point that works fine, but when i put it
>> under load (say 30 concurrent) i get this error about 6 times
>>
>> Does anyone know what this means?
>>
>> I am using Glassfish 9.1_02 with 1.6.0_06
>>
>> Thanks Glen
>>
>> invocation error on ejb endpoint ICAT at /ICATService/ICAT : XML
>> reader error: javax.xml.stream.XMLStreamException: ParseError at
>> [row,col]:[1,94]
>> Message: Element type "S:Body" must be followed by either attribute
>> specifications, ">" or "/>".
>> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
>> javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,94]
>> Message: Element type "S:Body" must be followed by either attribute
>> specifications, ">" or "/>".
>> at
>>
>>
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamRead
> erUtil.java:256)
>
>> at
>>
>>
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
> va:84)
>
>> at
>>
>>
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReader
> Util.java:99)
>
>> at
>>
>>
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStrea
> mReaderUtil.java:89)
>
>> at
>>
>>
> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:194)
>
>> at
>>
>>
> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:163)
>
>> at
>>
>>
> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:135)
>
>> at
>>
>>
> com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:29
> 4)
>
>> at
>>
>>
> com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:
> 276)
>
>> at
>>
>>
> com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93
> )
>
>> at
>>
>>
> com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter
> .java:432)
>
>> at
>> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
>> at
>>
>>
> com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapt
> er.java:135)
>
>> at
>>
>>
> com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Messa
> geDispatcher.java:113)
>
>> at
>>
>>
> com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDi
> spatcher.java:87)
>
>> at
>>
>>
> com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint
> (EjbWebServiceServlet.java:200)
>
>> at
>>
>>
> com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebService
> Servlet.java:129)
>
>> at
>>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
>
>> at
>>
>>
> com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:1
> 14)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :632)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :577)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 71)
>
>> at
>>
> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
>
>> at
>>
>>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :206)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :632)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :577)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 71)
>
>> at
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
>> at
>>
>>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:150)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :632)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :577)
>
>> at
>>
>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 71)
>
>> at
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
>> at
>>
>>
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
>
>> at
>>
>>
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdap
> ter(DefaultProcessorTask.java:637)
>
>> at
>>
>>
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
> DefaultProcessorTask.java:568)
>
>> at
>>
>>
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(De
> faultProcessorTask.java:813)
>
>> at
>>
>>
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcesso
> rTask(DefaultReadTask.java:341)
>
>> at
>>
>>
> com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLRead
> Task.java:440)
>
>> at
>>
>>
> com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadT
> ask.java:228)
>
>> at
>>
>>
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
>
>> at
>> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWo
>> rkerThread.java:106) Caused by: javax.xml.stream.XMLStreamException:
>> ParseError at [row,col]:[1,94]
>> Message: Element type "S:Body" must be followed by either attribute
>> specifications, ">" or "/>".
>> at
>>
> com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
>
>> at
>>
>>
> com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter
> .java:92)
>
>> at
>>
>>
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
> va:65)
>
>> ... 40 more
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

mariuscapris
Offline
Joined: 2008-06-24

Hi,
we have almost the same constellation and noticed the same failure. The cause seems to be the StAX implementation in JDK. Replace it with e.g. woodstox wstx-asl-3.2.2.jar (see http://forums.java.net/jive/message.jspa?messageID=274654#274654) and the parse Exception are fixed. But in our test (30 threads calling an ejb web service) we get after a couple of time (between 30 seconds and 10 minutes with ) a java.net.BindException: Address already in use.
Any idea? I assume you will get the same exception.

jdk 1.6.0.4, 1.6.0.5, 1.6.0.6 and Sun Java System Application Server 9.1_01 (build b09d-fcs)

Thanks

Marius Capris
___________________________________________________________________________
Exception in thread "Thread-10" javax.xml.ws.WebServiceException: java.net.BindException: Address already in use: connect
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:223)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:137)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:581)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:540)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:525)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:422)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:235)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
at $Proxy29.add(Unknown Source)
at de.test.TestCalculator$1.run(TestCalculator.java:24)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:760)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1000)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:186)
... 14 more

Message was edited by: mariuscapris

Message was edited by: mariuscapris

Drinkwater, GJ \(Glen\)

Hi

I still get an error if I try and use wstx

I put these in the domain.xml

-Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
-Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory
-Dcom.sun.xml.ws.client.ContentNegotiaton=optimistic

Error:

invocation error on ejb endpoint TestConcurrentBean at
/TestConcurrentBeanService/TestConcurrentBean : XML reader error:
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamRead
erUtil.java:256)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:84)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReader
Util.java:99)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStrea
mReaderUtil.java:89)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:181)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:163)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:135)
at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:29
4)
at
com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:
276)
at
com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93
)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter
.java:432)
at
com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapt
er.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Messa
geDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDi
spatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint
(EjbWebServiceServlet.java:200)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebService
Servlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:1
14)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
at
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:150)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdap
ter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(De
faultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcesso
rTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultR
eadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultR
eadTask.java:214)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWork
erThread.java:106)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:
2040)
at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at
com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter
.java:92)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:65)
... 40 more

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: 24 June 2008 14:45
To: users@glassfish.dev.java.net
Subject: Re: Web Service error under load

Hi,
we have almost the same constellation and noticed the same failure. The
cause seems to be the StAX implementation in JDK. Replace it with e.g.
woodstox wstx-asl-3.2.2.jar (see
http://forums.java.net/jive/message.jspa?messageID=274654#274654) ant
the parse Exception are fixed, but after a couple of time we get a
java.net.BindException: Address already in use.
Any idea?

Thanks

Marius Capris
________________________________________________________________________
___
Exception in thread "Thread-10" javax.xml.ws.WebServiceException:
java.net.BindException: Address already in use: connect
at
com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.checkR
esponseCode(HttpClientTransport.java:223)
at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(
HttpTransportPipe.java:137)
at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processR
equest(HttpTransportPipe.java:74)
at
com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:581)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:540)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:525)
at
com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:422)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:235)
at
com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHa
ndler.java:230)
at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHa
ndler.java:210)
at
com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
at $Proxy29.add(Unknown Source)
at de.test.TestCalculator$1.run(TestCalculator.java:24)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:760)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
tion.java:1000)
at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at
com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.checkR
esponseCode(HttpClientTransport.java:186)
... 14 more
[Message sent by forum member 'mariuscapris' (mariuscapris)]

http://forums.java.net/jive/thread.jspa?messageID=282231

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

mariuscapris
Offline
Joined: 2008-06-24

Hi,

i didn't change anything in the domain.xml. I used the endorsed mechanism and added the wstx-asl-3.2.2.jar to e.g. ...jdk1.6._06\jre\lib\endorsed.

Drinkwater, GJ \(Glen\)

Hi

Cheers that works fine.

Glen

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: 25 June 2008 07:43
To: users@glassfish.dev.java.net
Subject: Re: RE: Re: Web Service error under load

Hi,

i didn't change anything in the domain.xml. I used the endorsed
mechanism and added the wstx-asl-3.2.2.jar to e.g.
...jdk1.6._06\jre\lib\endorsed.
[Message sent by forum member 'mariuscapris' (mariuscapris)]

http://forums.java.net/jive/thread.jspa?messageID=282431

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

mariuscapris
Offline
Joined: 2008-06-24

Hy Glen,

did you also get the "java.net.BindException: Address already in use: connect" after a couple of time (10 seconds to 10 minutes) ?

Marius Capris

Drinkwater, GJ \(Glen\)

No, worked fine without any problems

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: 26 June 2008 08:04
To: users@glassfish.dev.java.net
Subject: Re: RE: Re: RE: Re: Web Service error under load

Hy Glen,

did you also get the "java.net.BindException: Address already in use:
connect" after a couple of time (10 seconds to 10 minutes) ?

Marius Capris
[Message sent by forum member 'mariuscapris' (mariuscapris)]

http://forums.java.net/jive/thread.jspa?messageID=282685

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Drinkwater, GJ \(Glen\)

Hi

I have a web service ejb end point that works fine, but when i put it
under load (say 30 concurrent) i get this error about 6 times

Does anyone know what this means?

I am using Glassfish 9.1_02 with 1.6.0_06

Thanks Glen

invocation error on ejb endpoint ICAT at /ICATService/ICAT : XML reader
error: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,94]
Message: Element type "S:Body" must be followed by either attribute
specifications, ">" or "/>".
com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,94]
Message: Element type "S:Body" must be followed by either attribute
specifications, ">" or "/>".
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamRead
erUtil.java:256)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:84)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReader
Util.java:99)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStrea
mReaderUtil.java:89)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:194)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:163)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:135)
at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:29
4)
at
com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:
276)
at
com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93
)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter
.java:432)
at
com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapt
er.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Messa
geDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDi
spatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint
(EjbWebServiceServlet.java:200)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebService
Servlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:1
14)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
at
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:150)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdap
ter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(De
faultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcesso
rTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLRead
Task.java:440)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadT
ask.java:228)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWork
erThread.java:106)
Caused by: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,94]
Message: Element type "S:Body" must be followed by either attribute
specifications, ">" or "/>".
at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
at
com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter
.java:92)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:65)
... 40 more

[att1.html]

Sahoo

looks like a bug. Can you file a bug attaching a test case?

Thanks,
Sahoo

Drinkwater, GJ (Glen) wrote:
> Hi
>
> I have a web service ejb end point that works fine, but when i put it
> under load (say 30 concurrent) i get this error about 6 times
>
> Does anyone know what this means?
>
> I am using Glassfish 9.1_02 with 1.6.0_06
>
> Thanks Glen
>
> invocation error on ejb endpoint ICAT at /ICATService/ICAT : XML
> reader error: javax.xml.stream.XMLStreamException: ParseError at
> [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
> javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:256)
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:84)
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:99)
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:89)
> at
> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:194)
> at
> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:163)
> at
> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:135)
> at
> com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:294)
> at
> com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
> at
> com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93)
> at
> com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432)
> at
> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
> at
> com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
> at
> com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
> at
> com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
> at
> com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:200)
> at
> com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:129)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at
> com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228)
> at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
> Caused by: javax.xml.stream.XMLStreamException: ParseError at
> [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
> at
> com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:92)
> at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:65)
> ... 40 more

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Drinkwater, GJ \(Glen\)

Done

https://glassfish.dev.java.net/issues/show_bug.cgi?id=5107

-----Original Message-----
From: Sanjeeb.Sahoo@Sun.COM [mailto:Sanjeeb.Sahoo@Sun.COM] On Behalf Of
Sahoo
Sent: 05 June 2008 07:08
To: users@glassfish.dev.java.net
Subject: Re: Web Service error under load

looks like a bug. Can you file a bug attaching a test case?

Thanks,
Sahoo

Drinkwater, GJ (Glen) wrote:
> Hi
>
> I have a web service ejb end point that works fine, but when i put it
> under load (say 30 concurrent) i get this error about 6 times
>
> Does anyone know what this means?
>
> I am using Glassfish 9.1_02 with 1.6.0_06
>
> Thanks Glen
>
> invocation error on ejb endpoint ICAT at /ICATService/ICAT : XML
> reader error: javax.xml.stream.XMLStreamException: ParseError at
> [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
> javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamRead
erUtil.java:256)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:84)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReader
Util.java:99)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStrea
mReaderUtil.java:89)
> at
>
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:194)
> at
>
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:163)
> at
>
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:135)
> at
>
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:29
4)
> at
>
com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:
276)
> at
>
com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93
)
> at
>
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter
.java:432)
> at
> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
> at
>
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapt
er.java:135)
> at
>
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Messa
geDispatcher.java:113)
> at
>
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDi
spatcher.java:87)
> at
>
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint
(EjbWebServiceServlet.java:200)
> at
>
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebService
Servlet.java:129)
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at
>
com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:1
14)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
> at
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:206)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:150)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:632)
> at
>
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:577)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
71)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdap
ter(DefaultProcessorTask.java:637)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(De
faultProcessorTask.java:813)
> at
>
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcesso
rTask(DefaultReadTask.java:341)
> at
>
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLRead
Task.java:440)
> at
>
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadT
ask.java:228)
> at
>
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWo
> rkerThread.java:106) Caused by: javax.xml.stream.XMLStreamException:
> ParseError at [row,col]:[1,94]
> Message: Element type "S:Body" must be followed by either attribute
> specifications, ">" or "/>".
> at
com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
> at
>
com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter
.java:92)
> at
>
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.ja
va:65)
> ... 40 more

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Markus Karg

Meanwhile I found the solution: I have to use @PersistenceContext(type = EXTENDED) to make the entity manager survive the end of the transaction or I need to do this.entity = this.em.merge(this.entity) inside of @AroundInvoke. Both works pretty well.

Regards

Markus

From: Markus Karg [mailto:karg@quipsy.de]
Sent: Mittwoch, 4. Juni 2008 11:05
To: users@glassfish.dev.java.net
Subject: Stateful Session detaches entity?

In my stateful session bean, I store a JPA entity found by em.find() in a member. In the business methods, I want to use that entity. But TopLink tells me that the entity is detached. The entity manager used always is the same (member annotated by @PersistenceContext).

I am not sure whether this is a bug or whether some specification (which one?) says that an entity must become detached between to calls to a STATEFUL (!) session bean.

Any ideas?

Thanks

Markus

QUIPSY QUALITY GmbH & Co. KG

Ein Unternehmen der MES-Gruppe

Stuttgarter Strasse 23

D-75179 Pforzheim

Tel: 07231-9189-52

Fax: 07231-9189-59

www.quipsy.de

karg@quipsy.de

Registergericht Mannheim HRA 701214

Geschäftsführer: Nils Schroeder

Diese E-Mail enthält persönliche, vertrauliche und vor Weitergabe geschützte Informationen und ist ausschließlich für den vorgesehenen o.g. Empfänger (Adressaten) bestimmt. Falls Sie diese E-Mail versehentlich erhalten haben und nicht der vorgesehene Empfänger sind, bitten wir Sie, die E-Mail und deren Anhänge nicht aufzubewahren, nicht zu vervielfältigen, nicht zu nutzen und nicht weiterzugeben. Bitte informieren Sie uns als Absender über diesen Zustellungsfehler und löschen Sie die E-Mail.

[att1.html]

Marina Vatkina

Right. This is the spec refs:

3.3 Persistence Context Lifetime
By default, the lifetime of the persistence context of a container-managed
entity manager corresponds to the scope of a transaction (i.e., it is of type
PersistenceContextType.TRANSACTION).

3.3.1 Transaction Commit
The managed entities of a transaction-scoped persistence context become detached
when the transaction commits; the managed entities of an extended persistence
context remain managed.

HTH,
-marina

Markus Karg wrote:
> Meanwhile I found the solution: I have to use @PersistenceContext(type =
> EXTENDED) to make the entity manager survive the end of the transaction
> or I need to do this.entity = this.em.merge(this.entity) inside of
> @AroundInvoke. Both works pretty well.
>
>
>
> Regards
>
> Markus
>
>
>
> *From:* Markus Karg [mailto:karg@quipsy.de]
> *Sent:* Mittwoch, 4. Juni 2008 11:05
> *To:* users@glassfish.dev.java.net
> *Subject:* Stateful Session detaches entity?
>
>
>
> In my stateful session bean, I store a JPA entity found by em.find() in
> a member. In the business methods, I want to use that entity. But
> TopLink tells me that the entity is detached. The entity manager used
> always is the same (member annotated by @PersistenceContext).
>
>
>
> I am not sure whether this is a bug or whether some specification (which
> one?) says that an entity must become detached between to calls to a
> STATEFUL (!) session bean.
>
>
>
> Any ideas?
>
>
>
> Thanks
>
> Markus
>
>
>
> QUIPSY QUALITY GmbH & Co. KG
>
> Ein Unternehmen der MES-Gruppe
>
> Stuttgarter Strasse 23
>
> D-75179 Pforzheim
>
> Tel: 07231-9189-52
>
> Fax: 07231-9189-59
>
> www.quipsy.de
>
> karg@quipsy.de
>
> Registergericht Mannheim HRA 701214
>
> Geschäftsführer: Nils Schroeder
>
>
>
> Diese E-Mail enthält persönliche, vertrauliche und vor Weitergabe
> geschützte Informationen und ist ausschließlich für den vorgesehenen
> o.g. Empfänger (Adressaten) bestimmt. Falls Sie diese E-Mail
> versehentlich erhalten haben und nicht der vorgesehene Empfänger sind,
> bitten wir Sie, die E-Mail und deren Anhänge nicht aufzubewahren, nicht
> zu vervielfältigen, nicht zu nutzen und nicht weiterzugeben. Bitte
> informieren Sie uns als Absender über diesen Zustellungsfehler und
> löschen Sie die E-Mail.
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net