Skip to main content

Inconsistent behavior after redeploy vs restart of Glassfish

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
sindrehauglum
Offline
Joined: 2011-05-27

My web-app has bug causing a exception when the .war is redeployed. If i restart Glassfish everything is fine. The exception happes when i try to send an xml-request to the server whitch in turn i ssuposed to convert the xml to a object.

Why is there inconsistent behavior between restart and redeployment?
Exception:

[#|2011-05-27T13:12:39.649+0200|SEVERE|glassfish3.1|com.sun.jersey.spi.container.ContainerResponse|_ThreadID=22;_ThreadName=Thread-1;|The RuntimeException could

not be mapped to a response, re-throwing to the HTTP container

java.lang.NullPointerException

        at org.apache.xml.serializer.OutputPropertiesFactory.getDefaultMethodProperties(OutputPropertiesFactory.java:258)

        at org.apache.xalan.templates.OutputProperties.<init>(OutputProperties.java:81)

        at org.apache.xalan.transformer.TransformerIdentityImpl.<init>(TransformerIdentityImpl.java:86)

        at org.apache.xalan.processor.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:753)

        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformerHandler(JAXBContextImpl.java:762)

        at com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader$State.<init>(DomLoader.java:66)

        at com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader.startElement(DomLoader.java:117)

        at com.sun.xml.bind.v2.runtime.unmarshaller.XsiTypeLoader.startElement(XsiTypeLoader.java:80)

        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:486)

        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:464)

        at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:152)

        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:216)

        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:195)

        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:243)

        at com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider.readFrom(XMLJAXBElementProvider.java:112)

        at com.sun.jersey.core.provider.jaxb.AbstractJAXBElementProvider.readFrom(AbstractJAXBElementProvider.java:107)

        at com.sun.jersey.core.provider.jaxb.AbstractJAXBElementProvider.readFrom(AbstractJAXBElementProvider.java:79)

        at com.sun.jersey.spi.container.ContainerRequest.getEntity(ContainerRequest.java:456)

        at com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$EntityInjectable.getValue(EntityParamDispatchProvider.java:123)

        at com.sun.jersey.server.impl.inject.InjectableValuesProvider.getInjectableValues(InjectableValuesProvider.java:46)

        at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$EntityParamInInvoker.getParams(AbstractResourceMethodDispatch

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
casperjeff
Offline
Joined: 2007-08-09

Same issue reported here (glassfish3.0.1). Restart of glassfish solves. Interestingly, it's only when an soap error is generated that the issue crops up.

Caused by: java.lang.NullPointerException
        at org.apache.xml.serializer.OutputPropertiesFactory.getDefaultMethodProperties(OutputPropertiesFactory.java:175)
        at org.apache.xalan.templates.OutputProperties.<init>(OutputProperties.java:81)
        at org.apache.xalan.transformer.TransformerIdentityImpl.<init>(TransformerIdentityImpl.java:86)
        at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:705)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformer(JAXBContextImpl.java:730)
        at com.sun.xml.bind.v2.runtime.XMLSerializer.getIdentityTransformer(XMLSerializer.java:813)
        at com.sun.xml.bind.v2.runtime.XMLSerializer.writeDom(XMLSerializer.java:805)