21.06.07 в 23:25 Jerome Louvel в своём письме писал(а):


Hi Evgeny,

Could you send us the stack trace that you get? Note that the
JaxbRepresentation hasn't been tested seriously yet.

Best regards,
Jerome

22.06.2007 10:10:30 org.restlet.ext.jaxb.JaxbRepresentation$Marshaller$1 initialValue
WARNING: Problem creating Marshaller
java.lang.NullPointerException
at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller$1.initialValue(JaxbRepresentation.java:326) at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller$1.initialValue(JaxbRepresentation.java:322)
        at 
java.lang.ThreadLocal$ThreadLocalMap.getAfterMiss(ThreadLocal.java:374)
        at java.lang.ThreadLocal$ThreadLocalMap.get(ThreadLocal.java:347)
        at java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java:225)
        at java.lang.ThreadLocal.get(ThreadLocal.java:127)
at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller.getMarshaller(JaxbRepresentation.java:416) at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller.marshal(JaxbRepresentation.java:375) at org.restlet.ext.jaxb.JaxbRepresentation.write(JaxbRepresentation.java:299) at org.restlet.resource.StreamRepresentation.write(StreamRepresentation.java:58) at com.noelios.restlet.ext.grizzly.GrizzlyServerCall.writeResponseBody(GrizzlyServerCall.java:124) at com.noelios.restlet.http.HttpServerCall.sendResponse(HttpServerCall.java:316) at com.noelios.restlet.http.HttpServerConverter.commit(HttpServerConverter.java:108) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:95) at com.noelios.restlet.ext.grizzly.HttpParserFilter.execute(HttpParserFilter.java:77) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:77) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:56)
        at com.sun.grizzly.Context.call(Context.java:249)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:132)
22.06.2007 10:10:30 org.restlet.ext.jaxb.JaxbRepresentation$Marshaller getMarshaller
WARNING: Unable to locate marshaller.
22.06.2007 10:10:30 org.restlet.ext.jaxb.JaxbRepresentation$Marshaller$1 initialValue
WARNING: Problem creating Marshaller
java.lang.NullPointerException
at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller$1.initialValue(JaxbRepresentation.java:326) at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller$1.initialValue(JaxbRepresentation.java:322)
        at 
java.lang.ThreadLocal$ThreadLocalMap.getAfterMiss(ThreadLocal.java:374)
        at java.lang.ThreadLocal$ThreadLocalMap.get(ThreadLocal.java:347)
        at java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java:225)
        at java.lang.ThreadLocal.get(ThreadLocal.java:127)
at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller.getMarshaller(JaxbRepresentation.java:416) at org.restlet.ext.jaxb.JaxbRepresentation$Marshaller.marshal(JaxbRepresentation.java:375) at org.restlet.ext.jaxb.JaxbRepresentation.write(JaxbRepresentation.java:303) at org.restlet.resource.StreamRepresentation.write(StreamRepresentation.java:58) at com.noelios.restlet.ext.grizzly.GrizzlyServerCall.writeResponseBody(GrizzlyServerCall.java:124) at com.noelios.restlet.http.HttpServerCall.sendResponse(HttpServerCall.java:316) at com.noelios.restlet.http.HttpServerConverter.commit(HttpServerConverter.java:108) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:95) at com.noelios.restlet.ext.grizzly.HttpParserFilter.execute(HttpParserFilter.java:77) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:77) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:56)
        at com.sun.grizzly.Context.call(Context.java:249)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:132)
22.06.2007 10:10:30 org.restlet.ext.jaxb.JaxbRepresentation$Marshaller getMarshaller
WARNING: Unable to locate marshaller.
22.06.2007 10:10:30 com.noelios.restlet.http.HttpServerConverter commit
INFO: Exception intercepted
java.io.IOException: Unable to locate marshaller.
at org.restlet.ext.jaxb.JaxbRepresentation.write(JaxbRepresentation.java:306) at org.restlet.resource.StreamRepresentation.write(StreamRepresentation.java:58) at com.noelios.restlet.ext.grizzly.GrizzlyServerCall.writeResponseBody(GrizzlyServerCall.java:124) at com.noelios.restlet.http.HttpServerCall.sendResponse(HttpServerCall.java:316) at com.noelios.restlet.http.HttpServerConverter.commit(HttpServerConverter.java:108) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:95) at com.noelios.restlet.ext.grizzly.HttpParserFilter.execute(HttpParserFilter.java:77) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:77) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:56)
        at com.sun.grizzly.Context.call(Context.java:249)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:132)


Exception is occured in JaxbRepresentation.Marshaller class in method

            @Override
protected synchronized javax.xml.bind.Marshaller initialValue() {
                javax.xml.bind.Marshaller m = null;

                try {
                    m = contexts.get(getPackage()).createMarshaller();
                    m.setProperty("jaxb.formatted.output", true);
                } catch (Exception e) {
logger.log(Level.WARNING, "Problem creating Marshaller", e);
                    return null;
                }

                return m;
            }

when this line is executed

m = contexts.get(getPackage()).createMarshaller();

the static map contexts is empty.
--
Best Regards
Evgeny K. Shepelyuk

Reply via email to