Hi,

My Application has this
problem(http://restlet-discuss.1400322.n2.nabble.com/Restlet-connection-is-not-closing-td6524615.html).
 
So that, i have migrated my application to 2.1 RC5. But now i have another
problem.

I use JaxbRepresentation. At the server side, JaxbRepresentation's getObject
method gives error.

Has anyone else experienced this, or know of a solution?

Thanks For Your Interests.

/######################/
/### Application Detail ###/
/######################/

Restlet-Spring-Hibernate application run on Glassfish Application Server
3.1.

*Using Restlet Jars*

1) org.restlet.jar
2) org.restlet.ext.servlet.jar
3) org.restlet.ext.spring.jar
4) org.restlet.ext.xml.jar
5) org.restlet.ext.jaxb.jar

(And Their Dependencies)

/######################/
/###      Client Code     ###/
/######################/

/*personel = new Personel();
personel.setKullaniciKodu("1");
                
String serviceURL = TestWebServiceConstants.getSistemGirisGetPersonelUrl();

JaxbRepresentation<Personel> jaxbRepresentationSendingPersonel = new
JaxbRepresentation<Personel>(MediaType.APPLICATION_XML, personel);

Request request = new Request(Method.GET, serviceURL,
jaxbRepresentationSendingPersonel);
Response response = client.handle(request);

JaxbRepresentation<Personel> personelResponse = new
JaxbRepresentation<Personel>(response.getEntity(), Personel.class);
personel = personelResponse.getObject();*/


/######################/
/###     Server Code     ###/
/######################/

/*JaxbRepresentation<Personel> jaxbRepresentation = new
JaxbRepresentation<Personel>(representation, Personel.class);

Personel personel = new Personel();

try {

        personel = jaxbRepresentation.getObject(); // this line gives error.
                        
} catch (IOException e) {

        e.printStackTrace();
}

personel = sistemGirisBusinessManager.personelDogrula(personel);

return new JaxbRepresentation<Personel>(MediaType.APPLICATION_XML,
personel);*
/

/######################/
/###           Error          ###/
/######################/

Jul 9, 2012 12:10:03 PM org.restlet.engine.connector.ServerConnectionHelper
stop
INFO: Stopping the internal [HTTP/1.1] server
Jul 9, 2012 12:10:03 PM org.restlet.util.SelectionRegistration block
WARNING: Unable to block the thread at the cyclic barrier
java.util.concurrent.TimeoutException
        at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:222)
        at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:399)
        at
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:179)
        at
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:230)
        at org.restlet.engine.io.Buffer.process(Buffer.java:597)
        at
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:307)
        at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
        at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
        at java.io.InputStreamReader.read(InputStreamReader.java:167)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(XMLEntityScanner.java:1619)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(XMLEntityScanner.java:1657)
        at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:193)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:120)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:103)
        at
org.restlet.ext.jaxb.internal.Unmarshaller.unmarshal(Unmarshaller.java:204)
        at
org.restlet.ext.jaxb.JaxbRepresentation.getObject(JaxbRepresentation.java:416)
        at
tr.com.enlil.dys.service.prj.webservice.SistemGirisWebService.getPersonel(SistemGirisWebService.java:56)
        at
tr.com.enlil.dys.service.prj.webservice.SistemGirisWebService.getOperation(SistemGirisWebService.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:496)
        at org.restlet.resource.ServerResource.get(ServerResource.java:700)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:582)
        at
org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:642)
        at
org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:341)
        at org.restlet.resource.ServerResource.handle(ServerResource.java:944)
        at org.restlet.resource.Finder.handle(Finder.java:246)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
        at
org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
        at org.restlet.Application.handle(Application.java:381)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
        at org.restlet.Component.handle(Component.java:392)
        at org.restlet.Server.handle(Server.java:516)
        at
org.restlet.engine.connector.ServerConnectionHelper.handle(ServerConnectionHelper.java:253)
        at
org.restlet.engine.connector.ServerConnectionHelper.doHandleInbound(ServerConnectionHelper.java:186)
        at org.restlet.engine.connector.BaseHelper$2.run(BaseHelper.java:588)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Jul 9, 2012 12:10:03 PM org.restlet.ext.jaxb.JaxbRepresentation getObject
WARNING: Unable to unmarshal the XML representation
javax.xml.bind.UnmarshalException
 - with linked exception:
[java.io.IOException: Unable to block the thread at the cyclic barrier.]
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:213)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:120)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:103)
        at
org.restlet.ext.jaxb.internal.Unmarshaller.unmarshal(Unmarshaller.java:204)
        at
org.restlet.ext.jaxb.JaxbRepresentation.getObject(JaxbRepresentation.java:416)
        at
tr.com.enlil.dys.service.prj.webservice.SistemGirisWebService.getPersonel(SistemGirisWebService.java:56)
        at
tr.com.enlil.dys.service.prj.webservice.SistemGirisWebService.getOperation(SistemGirisWebService.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:496)
        at org.restlet.resource.ServerResource.get(ServerResource.java:700)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:582)
        at
org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:642)
        at
org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:341)
        at org.restlet.resource.ServerResource.handle(ServerResource.java:944)
        at org.restlet.resource.Finder.handle(Finder.java:246)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
        at
org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
        at org.restlet.Application.handle(Application.java:381)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
        at org.restlet.Component.handle(Component.java:392)
        at org.restlet.Server.handle(Server.java:516)
        at
org.restlet.engine.connector.ServerConnectionHelper.handle(ServerConnectionHelper.java:253)
        at
org.restlet.engine.connector.ServerConnectionHelper.doHandleInbound(ServerConnectionHelper.java:186)
        at org.restlet.engine.connector.BaseHelper$2.run(BaseHelper.java:588)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Unable to block the thread at the cyclic
barrier.
        at
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:183)
        at
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:230)
        at org.restlet.engine.io.Buffer.process(Buffer.java:597)
        at
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:307)
        at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
        at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
        at java.io.InputStreamReader.read(InputStreamReader.java:167)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(XMLEntityScanner.java:1619)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(XMLEntityScanner.java:1657)
        at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:193)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211)
        ... 56 more
Caused by: java.util.concurrent.TimeoutException
        at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:222)
        at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:399)
        at
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:179)
        ... 73 more
java.io.IOException: Unable to unmarshal the XML representation.null
        at
org.restlet.ext.jaxb.JaxbRepresentation.getObject(JaxbRepresentation.java:421)
        at
tr.com.enlil.dys.service.prj.webservice.SistemGirisWebService.getPersonel(SistemGirisWebService.java:56)
        at
tr.com.enlil.dys.service.prj.webservice.SistemGirisWebService.getOperation(SistemGirisWebService.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:496)
        at org.restlet.resource.ServerResource.get(ServerResource.java:700)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:582)
        at
org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:642)
        at
org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:341)
        at org.restlet.resource.ServerResource.handle(ServerResource.java:944)
        at org.restlet.resource.Finder.handle(Finder.java:246)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
        at
org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
        at org.restlet.Application.handle(Application.java:381)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Router.doHandle(Router.java:431)
        at org.restlet.routing.Router.handle(Router.java:648)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
        at org.restlet.routing.Filter.handle(Filter.java:206)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
        at org.restlet.Component.handle(Component.java:392)
        at org.restlet.Server.handle(Server.java:516)
        at
org.restlet.engine.connector.ServerConnectionHelper.handle(ServerConnectionHelper.java:253)
        at
org.restlet.engine.connector.ServerConnectionHelper.doHandleInbound(ServerConnectionHelper.java:186)
        at org.restlet.engine.connector.BaseHelper$2.run(BaseHelper.java:588)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/Restlet-2-1-RC5-JaxbRepresentation-Problem-tp7578188.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2981099

Reply via email to