Unmarshaller and marshaller

Hi Experts!
I had a brief question to ask; I can correctly unmarshall an XML document, however, I can not marshall the doc out even I did NOT do anything.
Can someone give me a hint?
Regards,

Thanks for your reply.
The stack trace is
DefaultValidationEventHandler: [ERROR]: java.lang.ClassCastException
Location: obj: gluon.nrk.com.impl.SubjectTypeImpl@40d7b9
java.lang.ClassCastException
     at gluon.nrk.com.impl.runtime.SAXMarshaller.reportError(SAXMarshaller.java:436)
     at gluon.nrk.com.impl.runtime.Util.handlePrintConversionException(Util.java:47)
     at gluon.nrk.com.impl.ReferencetypeImpl.serializeBody(ReferencetypeImpl.java:82)
     at gluon.nrk.com.impl.SubjectTypeImpl.serializeBody(SubjectTypeImpl.java:30)
     at gluon.nrk.com.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
     at gluon.nrk.com.impl.AxmlTypeImpl$SubjectsTypeImpl.serializeBody(AxmlTypeImpl.java:7269)
     at gluon.nrk.com.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
     at gluon.nrk.com.impl.AxmlTypeImpl.serializeBody(AxmlTypeImpl.java:196)
     at gluon.nrk.com.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
     at gluon.nrk.com.impl.NewsTypeImpl.serializeBody(NewsTypeImpl.java:142)
     at gluon.nrk.com.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
     at gluon.nrk.com.impl.GluonTypeImpl$BodyTypeImpl.serializeBody(GluonTypeImpl.java:406)
     at gluon.nrk.com.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
     at gluon.nrk.com.impl.GluonTypeImpl.serializeBody(GluonTypeImpl.java:128)
     at gluon.nrk.com.impl.GluonImpl.serializeBody(GluonImpl.java:43)
     at gluon.nrk.com.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
     at gluon.nrk.com.impl.runtime.MarshallerImpl.write(MarshallerImpl.java:171)
     at gluon.nrk.com.impl.runtime.MarshallerImpl.marshal(MarshallerImpl.java:144)
     at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:66)
     at Main.main(Main.java:43)
--------------- linked to ------------------
javax.xml.bind.MarshalException
- with linked exception:
[java.lang.ClassCastException]
     at gluon.nrk.com.impl.runtime.MarshallerImpl.write(MarshallerImpl.java:176)
     at gluon.nrk.com.impl.runtime.MarshallerImpl.marshal(MarshallerImpl.java:144)
     at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:66)
     at Main.main(Main.java:43)
and the schema is at http://gluon.nrk.no/gluon.xsd
you may then need the binding.xjb to compile the schema:
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="gluon.xsd" node="/xs:schema">
<jxb:globalBindings
fixedAttributeAsConstantProperty="true"
collectionType="java.util.Vector"
typesafeEnumBase="xs:NCName"
choiceContentProperty="false"
typesafeEnumMemberName="generateError"
bindingStyle="elementBinding"
enableFailFastCheck="false"
generateIsSetMethod="false"
underscoreBinding="asCharInWord"/>
     <jxb:bindings node=".//xs:element[@name='group']">
          <jxb:class name="elementGroup"/>
          <jxb:property name="elementGroup"/>
     </jxb:bindings>
     <jxb:bindings node=".//xs:element[@name='role']">
          <jxb:class name="elementRole"/>
          <jxb:property name="elementRole"/>
     </jxb:bindings>
     <jxb:bindings node=".//xs:element[@name='class']">
          <jxb:class name="elementClass"/>
          <jxb:property name="elementClass"/>
     </jxb:bindings>
</jxb:bindings>
</jxb:bindings>
I have been trying several days, but have no clue at all...
THX!

Similar Messages

  • JAXB Unmarshaller and errors to system.out

    Hi!
    I'm using JAXB in a complex XML binding project. The question is: is there a way to prevent javax.xml.bind.Unmarshaller to send to system.out the warnings/errors messages as DefaultValidationEventHandler: [ERROR]: bla bla bla
    which are sent immediately before to throw an UnmarshalException??
    Thanks so much!!

    Have you tried using System.setErr() and System.setOut() ? With these calls at the start of your application, you should be able to redirect the error to a file or whatever you want.

  • Can I please have a free Diablo CD because WLS 8.1 SP4 doesnt support EL &

    I understand (from your doc and from reading forum entries) that BEA WLS 8.1 SP4 does not have a container that can support EL and JSTL; however, Diablo does (which is WLS 9.0)
              I'm currently studying for the SCWCD Exam which requires JSP 2.0 and Servlet 2.4 I cannot do EL and JSTL under my current WLS 8.1 and I require WLS 9.0
              However it's a large download and I have a 56KB modem.
              Is it possible that you can please send me a free Diablo CD for the Windows Operating System (I have Windows-2000):
              currently there's not an option for this on your website.
              My name and address are as follows:
              Al Diovanni
              450 Raritan Ave
              Staten Island, NY 10305
              Home EMAIL: [email protected]
              Work EMAIL: [email protected]
              Please let me know on this. Thanks. Take care.

    When I took out DOCTYPE, I received several web.xml validation errors and marshaller errors; see below:
              weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:125:8:125:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:125:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:134:8:134:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:134:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:143:8:143:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:143:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:152:8:152:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:152:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:161:8:161:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:161:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:170:8:170:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:170:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:179:8:179:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:179:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:188:8:188:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:188:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:353:5:353:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:353:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:357:5:357:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:357:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:361:5:361:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:361:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:365:5:365:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:365:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:369:5:369:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:369:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:373:5:373:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:373:5>
                   at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:726)
                   at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:255)
                   at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:81)
                   at weblogic.application.internal.flow.ModuleCallbackWrapper.prepare(ModuleCallbackWrapper.java:113)
                   at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:331)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:71)
                   at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:60)
                   at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:455)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:147)
                   at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:129)
                   at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:38)
                   at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:169)
                   at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:31)
                   at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
                   at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:125)
                   at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:82)
                   at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:61)
                   at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:138)
                   at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
                   at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
                   at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:899)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:167)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:139)
              weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:125:8:125:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:125:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:134:8:134:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:134:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:143:8:143:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:143:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:152:8:152:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:152:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:161:8:161:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:161:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:170:8:170:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:170:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:179:8:179:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:179:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:188:8:188:8: problem: cvc-minLength-valid.1.1: string length (string) is less than minLength facet (0) for '1':<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:188:8>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:353:5:353:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:353:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:357:5:357:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:357:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:361:5:361:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:361:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:365:5:365:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:365:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:369:5:369:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:369:5>
              C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp\WEB-INF\web.xml:373:5:373:5: problem: cvc-complex-type.2.4a: Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee icon@http://java.sun.com/xml/ns/j2ee distributable@http://java.sun.com/xml/ns/j2ee context-param@http://java.sun.com/xml/ns/j2ee filter@http://java.sun.com/xml/ns/j2ee filter-mapping@http://java.sun.com/xml/ns/j2ee listener@http://java.sun.com/xml/ns/j2ee servlet@http://java.sun.com/xml/ns/j2ee servlet-mapping@http://java.sun.com/xml/ns/j2ee session-config@http://java.sun.com/xml/ns/j2ee mime-mapping@http://java.sun.com/xml/ns/j2ee welcome-file-list@http://java.sun.com/xml/ns/j2ee problem-page@http://java.sun.com/xml/ns/j2ee jsp-config@http://java.sun.com/xml/ns/j2ee security-constraint@http://java.sun.com/xml/ns/j2ee login-config@http://java.sun.com/xml/ns/j2ee security-role@http://java.sun.com/xml/ns/j2ee env-entry@http://java.sun.com/xml/ns/j2ee ejb-ref@http://java.sun.com/xml/ns/j2ee ejb-local-ref@http://java.sun.com/xml/ns/j2ee service-ref@http://java.sun.com/xml/ns/j2ee resource-ref@http://java.sun.com/xml/ns/j2ee resource-env-ref@http://java.sun.com/xml/ns/j2ee message-destination-ref@http://java.sun.com/xml/ns/j2ee message-destination@http://java.sun.com/xml/ns/j2ee locale-encoding-mapping-list@http://java.sun.com/xml/ns/j2ee' instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee:<C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp/WEB-INF/web.xml:373:5>
                   at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:195)
                   at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:171)
                   at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:127)
                   at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:194)
                   at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:347)
                   at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:336)
                   at weblogic.application.descriptor.AbstractDescriptorLoader.getDescriptor(AbstractDescriptorLoader.java:246)
                   at weblogic.application.descriptor.AbstractDescriptorLoader.getRootDescriptorBean(AbstractDescriptorLoader.java:226)
                   at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:107)
                   at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:722)
                   at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:255)
                   at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:81)
                   at weblogic.application.internal.flow.ModuleCallbackWrapper.prepare(ModuleCallbackWrapper.java:113)
                   at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:331)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:71)
                   at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:60)
                   at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:455)
                   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
                   at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:147)
                   at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:129)
                   at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:38)
                   at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:169)
                   at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:31)
                   at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
                   at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:125)
                   at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:82)
                   at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:61)
                   at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:138)
                   at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
                   at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
                   at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:899)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:167)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:139)
              >
              ####<May 15, 2005 4:29:14 AM EDT> <Error> <Deployer> <Diovanni> <examplesServer> <ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1116145754595> <BEA-149205> <Failed to initialize the application examplesWebApp due to error weblogic.application.ModuleException: [HTTP:101064][WebAppModule(examplesWebApp:examplesWebApp)] Error parsing descriptor in Web appplication "C:\bea\weblogic90b\samples\server\examples\build\examplesWebApp"
              weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND
              C:\bea\weblogic90b\samples\server\exam

  • [Moxy] setValidating is throwing an exception when used on DynamicContext

    Hi there,
    I was using Dynamic context and trying to turn on validation. I found some difficulties:
    - I need to provide schema to create dynamic context, why is it also needed to provide schema once again to unmarshaller? Schema shouldn't be there by design?
    - When i was tryign to setSchema() on unmarshaller and then setValidation(true) it is throwing an expection.
    Sample code
    DynamicJAXBContext jaxbContext = DynamicJAXBContextFactory.createContextFromXSD(streamSource, null, null, null);
    SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = sf.newSchema(streamSource2);
    final JAXBUnmarshaller unmarshaller = jaxbContext .createUnmarshaller();
    unmarshaller.setSchema(schema);
    unmarshaller.setValidating(true);
    gives an Exception:
    Exception Description: An error occurred resolving the XML Schema.
    Internal Exception: java.lang.NullPointerException
    Exception [EclipseLink-25012] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: An error occurred resolving the XML Schema.
    Internal Exception: java.lang.NullPointerException
    at org.eclipse.persistence.exceptions.XMLMarshalException.errorResolvingXMLSchema(XMLMarshalException.java:186)
    at org.eclipse.persistence.oxm.schema.XMLSchemaClassPathReference.getURL(XMLSchemaClassPathReference.java:48)
    at org.eclipse.persistence.oxm.XMLUnmarshaller.initializeSchemas(XMLUnmarshaller.java:211)
    at org.eclipse.persistence.oxm.XMLUnmarshaller.setValidationMode(XMLUnmarshaller.java:155)
    at org.eclipse.persistence.jaxb.JAXBUnmarshaller.setValidating(JAXBUnmarshaller.java:756)
    I found workaround, but it should be handled properly without such hacks.
    int numberOfSessions = ((XMLContext) jaxbContext.getXMLContext()).getSessions().size();
    for (int x = 0; x < numberOfSessions; x++) {
    final Collection values = ((CoreSession) jaxbContext.getXMLContext().getSessions().get(x)).getDescriptors().values();
    List<XMLDescriptor> proper = new LinkedList<>();
    URL schemaURL;
    final Iterator iterator = values.iterator();
    while (iterator.hasNext()) {
    final XMLDescriptor xmlDescriptor = (XMLDescriptor) iterator.next();
    final XMLSchemaReference schemaReference = xmlDescriptor.getSchemaReference();
    if (schemaReference.getResource() == null) {
    log.info("{}", ToStringBuilder.reflectionToString(schemaReference, ToStringStyle.DEFAULT_STYLE, true));
    XMLSchemaFileReference xmlSchemaFileReference = new XMLSchemaFileReference(xsd);
    xmlSchemaFileReference.setSchemaContext(schemaReference.getSchemaContext());
    xmlSchemaFileReference.setSchemaContextAsQName(schemaReference.getSchemaContextAsQName());
    xmlSchemaFileReference.setType(schemaReference.getType());
    xmlDescriptor.setSchemaReference(xmlSchemaFileReference);
    }

    Hi,
    This looks like a clear case when you try to run a WebLogic Portal/Platform with a WebLogic Server/Express license.
    Regards,
    LG

  • JAXB Unmarshaller/Marshaller operation differences.

    I am using jaxb-ra-2.1.8 and am trying to write a simple program to read xml marshall it to a file then immediately read it back in using the following:
    import java.io.File;
    import java.io.IOException;
    import javax.xml.XMLConstants;
    import javax.xml.bind.JAXBContext;
    import javax.xml.bind.JAXBException;
    import javax.xml.bind.Marshaller;
    import javax.xml.bind.Unmarshaller;
    import javax.xml.bind.ValidationEvent;
    import javax.xml.bind.ValidationEventHandler;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import org.xml.sax.SAXException;
    import com.namespace.test.base.Root;
    import com.namespace.test.extension.Extension;
    public class XmlJaxStuffWeb implements ValidationEventHandler{
         public static void main(String[] args) throws JAXBException, ParserConfigurationException, SAXException, IOException{
              JAXBContext jaxbContext = JAXBContext.newInstance("com.namespace.test.abstracttype:com.namespace.test.base");
              StreamSource[] streams = new StreamSource[3];
              streams[0] = new StreamSource(new File("C:/development/libraries/jaxb-ri-2.1.8/bin/abstract/Extension.xsd"));
              streams[1] = new StreamSource(new File("C:/development/libraries/jaxb-ri-2.1.8/bin/abstract/Base.xsd"));
              streams[2] = new StreamSource(new File("C:/development/libraries/jaxb-ri-2.1.8/bin/abstract/AbstractType.xsd"));
              Schema s = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(streams);
              //javax.xml.validation.Validator v = s.newValidator();
              writeXml(jaxbContext, s);
              readXml(jaxbContext, s);
              //System.out.println
              //System.out.println(jaxbContext.toString());
              //jaxbContext.createValidator();
         public static void readXml(JAXBContext jaxbContext, Schema s) throws JAXBException, SAXException, IOException{
              Unmarshaller un = jaxbContext.createUnmarshaller();
              un.setSchema(s);
              un.setEventHandler(new XmlJaxStuffWeb());
              //un.setValidating(true);
              Object obj = un.unmarshal(new File("c:/test.xml"));
              System.out.println(obj.getClass());
         public static void writeXml(JAXBContext jaxbContext, Schema s) throws JAXBException, SAXException, IOException{
              Root r = new Root();
              r.setHolder("Holder");
              Extension e = new Extension();
              e.setExtendedString("BLAH");
              e.setText("blah");
              com.namespace.test.extension.ObjectFactory f = new com.namespace.test.extension.ObjectFactory();
              r.setAbstractElement(f.createExtension(e));
              //StringWriter b = new StringWriter();
              Marshaller marshaller = jaxbContext.createMarshaller();
              marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
              marshaller.setSchema(s);
              marshaller.setEventHandler(new XmlJaxStuff());
              marshaller.marshal( r, new File("c:/test.xml") );
              //System.out.println(b);
         /* (non-Javadoc)
          * @see javax.xml.bind.ValidationEventHandler#handleEvent(javax.xml.bind.ValidationEvent)
         public boolean handleEvent(ValidationEvent arg0) {
              System.out.println(arg0.getMessage());
              //ValidationEventLocator l = arg0.getLocator();
              return false;
    }The write is performed without issue, but the read bombs saying an expected element is missing, which makes no sense since I do validation before marshalling and unmarshalling. It looks like the Unmarshaller is searching the JAXBContext (i.e. not reading the @XmlSeeAlso annotation) differently than the Marshaller because if I put the other package in the JAXBContext it works fine for both reads and writes. Is this expected or is there a bug that exists that causes this behavior?
    It may also be worth noting that I do not get an error if I don't specify a custom eventhandler.
    Edited by: JaM2003 on Oct 14, 2008 2:00 PM

    Hi Jason,
    Below is the sample.....You can use this..
    JAXBElement<Task> root = null;
              try {
                   ByteArrayInputStream input = new ByteArrayInputStream(
                             xmlStr.getBytes());
                   JAXBContext jc = JAXBContext.newInstance(Task.class);
                   Unmarshaller u = jc.createUnmarshaller();
                   StreamSource sc = new StreamSource(new StringReader(
                             xmlStr.toString()));
                   root = u.unmarshal(new StreamSource(input), Task.class);
              } catch (Exception e) {
                   e.printStackTrace();
              }

  • Unmarshaller failed and com.bea.xml.XmlException: failed to load java type

    Hello guys!
    i use weblogic 9.2.3 and JDK 150_12 and JDeveloper 10
    i set up a connection from JDeveloper to WeblogicServer
    now i want to deploy an application with the JDeveloper using "Deploy to WeblogicServer" in Application field of the JDeveloper, but i get this error-message!
    Can somebody help me?
    Stack trace for message 149004
    weblogic.management.DeploymentException: Unmarshaller failed
    at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:189)
    at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
    at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
    at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
    at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
    at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
    at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
    at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    com.bea.xml.XmlException: failed to load java type corresponding to e=application@http://java.sun.com/xml/ns/javaee
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:325)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:292)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:302)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:283)
    at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
    at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:136)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:280)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:248)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:749)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:378)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:720)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:729)
    at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:277)
    at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:174)
    at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
    at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
    at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
    at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
    at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
    at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
    at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    i opened the console and want to install the application with the EAR.file, but there appears new Errors:
    Error     Unable to access the selected application
    Error     Exception in AppMerge flows' progression
    and the log.file throws:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor /opt/oracle/bea/user_projects/domains/SOADomain/servers/AdminServer/tmp/.appmergegen_1234189517852_SOADEMO-CREDITSERVICE-CreditService-WS.ear/META-INF/application.xml of module SOADEMO-CREDITSERVICE-CreditService-WS.ear. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:147)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:280)
    at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:248)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:749)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:378)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:720)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:729)
    at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:277)
    at weblogic.application.compiler.CompilerCtx.setApplicationDescriptor(CompilerCtx.java:127)
    at weblogic.application.compiler.AppcUtils.setDDs(AppcUtils.java:139)
    at weblogic.application.compiler.flow.DescriptorParsingFlow.compile(DescriptorParsingFlow.java:64)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
    at weblogic.application.compiler.ReadOnlyEarMerger.merge(ReadOnlyEarMerger.java:43)
    at weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.java:94)
    at weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:47)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
    at weblogic.application.compiler.AppMerge.runBody(AppMerge.java:133)
    at weblogic.utils.compiler.Tool.run(Tool.java:158)
    at weblogic.utils.compiler.Tool.run(Tool.java:115)
    at weblogic.application.compiler.AppMerge.merge(AppMerge.java:145)
    at weblogic.deploy.api.internal.utils.AppMerger.merge(AppMerger.java:70)
    at weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:51)
    at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createDeployableObject(WebLogicDeployableObjectFactoryImpl.java:177)
    at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createLazyDeployableObject(WebLogicDeployableObjectFactoryImpl.java:150)
    at weblogic.deploy.api.tools.SessionHelper.inspect(SessionHelper.java:645)
    at com.bea.console.actions.app.install.Flow.appSelected(Flow.java:450)
    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:585)
    at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:869)
    at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:808)
    at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:477)
    at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:305)
    at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:335)
    at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:51)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:95)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2042)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:63)
    at org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:167)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.invoke(ActionInterceptors.java:49)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:57)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:86)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2114)
    at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:234)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:554)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:851)
    at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:630)
    at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:157)
    at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:241)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:130)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1169)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:688)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:144)
    at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:107)
    at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:99)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:180)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:168)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:222)
    at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:178)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:351)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:128)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:339)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:330)
    at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:162)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:137)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:419)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:267)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:197)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:237)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:124)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: com.bea.xml.XmlException: failed to load java type corresponding to e=application@http://java.sun.com/xml/ns/javaee
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:325)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:292)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:302)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:283)
    at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
    at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:136)
    ... 123 more

  • Help on creating and deleting xml child elements using Toplink please.

    Hi there,
    I am trying to build a toplink xml demo illustrating toplink acting as the layer between my java code and an xml datasource.
    After pulling my custom schema into toplink and following the steps in http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/jaxb/index.htm related to
    Click on Mapping Workbench Project...Click on From XML Schema (JAXB)...
    I am able to set up java code which can run get and sets against my xml datasource. However, I want to also be able create and delete elements within the xml data for child elements.
    i.e. in a simple scenario I have a xsd for departments which has an unbounded element of type employee. How does toplink allow me to add and or remove employees in a department on the marshalled xml data source? Only gets and sets for the elements seem accessible.
    In my experience with database schema based toplink demos I have seen methods such as:
    public void setEmployeesCollection(Collection EmployeesCollection) {
         this.employeesCollection = employeesCollection;
    Is this functionality available for xml backended toplink projects?
    cheers
    Nick

    Hi Nick,
    Below I'll give an example of using the generated JAXB object model to remove and add a new node. The available APIs are defined in the JAXB spec. TopLink also supports mapping your own objects to XML, your own objects could contain more convenient APIs for adding or removing collection members
    Example Schema
    The following XML Schema will be used to generate a JAXB model.
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="department">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="employee">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>---
    Example Input
    The following document will be used as input. For the purpose of this example this XML document is saved in a file called "employee-data.xml".
    <department>
         <employee>
              <name>Anne</name>
         </employee>
         <employee>
              <name>Bob</name>
         </employee>
    </department>---
    Example Code
    The following code demonstrates how to use the JAXB APIs to remove the object representing the first employee node, and to add a new Employee (with name = "Carol").
    JAXBContext jaxbContext = JAXBContext.newInstance("your_context_path");
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    File file = new File("employee-data.xml");
    Department department = (Department) unmarshaller.unmarshal(file);
    // Remove the first employee in the list
    department.getEmployee().remove(0);
    // Add a new employee
    ObjectFactory objectFactory = new ObjectFactory();
    Employee newEmployee = objectFactory.createEmployee();
    newEmployee.setName("Carol");
    department.getEmployee().add(newEmployee);
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    marshaller.marshal(department, System.out);---
    Example Output
    The following is the result of running the example code.
    <department>
         <employee>
              <name>Bob</name>
         </employee>
         <employee>
              <name>Carol</name>
         </employee>
    </department>

  • XML (un)marshalling with JAXB and "any" blocks

    I have 2 very simple XSD schema's.
    SchemaA.xsd:
    [request]-------[element_A] is xs:string
    |__(ANY)
    SchemaB.xsd:
    [body]--------[element_B] is xs:string
    The any block says that there can follow any type of xml after the element_a.
    In the xsd it is coded as: <xs:any />
    I compiled both schema's with jaxb, using this command line:
    xjc SchemaA.xsd -p test.request
    xjc SchemaB.xsd -p test.body -use-runtime test.request.impl.runtime
    I created the following code :
    test.request.ObjectFactory of1 = new test.request.ObjectFactory();
    test.body.ObjectFactory of2 = new test.body.ObjectFactory();
    Request r = of1.createRequest();
    r.setElementA("testing, element one");
    Body b = of2.createBody();
    b.setElementB("testing, element two");
    r.setAny(b);
    Marshaller m = of1.createMarshaller();
    m.marshal(r,System.out);
    And the result is what I expected:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <request><element_a>testing, element one</element_a><body><element_b>testing, element two</element_b></body></request>
    JAXB added the xml from the second schema to the first.
    Ok, so far so good. Now I'm trying to do it the other way around, I want to unmarshall that XML to objects again:
    String xml <- contains the outputted xml from the marshall (as pasted a few lines above)
    Unmarshaller um = of1.createUnmarshaller();
    Request r2 = (Request)um.unmarshal(new ByteArrayInputStream(xml.getBytes()));
    System.err.println(r2.getElementA());
    System.err.println(r2.getAny());
    The output:
    testing, element one
    null
    now, the first message is good. The second is not however...why is the "getAny" null ? I can't figure this one out. In the best possible case it should return an object that can be cast to "Body" .
    In the worst case it should just return the "<Body> ...." xml as string. But not null ...
    Any help on this is appreciated !

    JAXB does not support xs:any

  • Unmarshall and Marshall back to XML yeild different result

    Hi,
    Iam unmarshalling input.xml to an java object and marshal it back to xml string. Iam not getting the same result. Any light on this? Is is because of the anyType? If validate the unmarshalled object it throws an error, but if i dont validate the code works giving the following result.
    PTest.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com"
    elementFormDefault="qualified">
    <complexType name="POuterType" abstract="true">
    <sequence>
    <choice>
    <element name="Inner1" type="anyType" />
    <element name="Inner2" type="anyType"/>
    </choice>
    </sequence>
    </complexType>
    </schema>
    Test.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com" elementFormDefault="qualified" >
    <include schemaLocation="PTest.xsd"></include>
    <complexType name="OuterType">
    <complexContent>
    <restriction base="tns:POuterType">
    <sequence>
    <choice>
    <element name="Inner1">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    <element name="Inner2">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    </choice>
    </sequence>
    </restriction>
    </complexContent>
    </complexType>
    <element name="Outer" type="tnsuterType"></element>
    </schema>
    Test.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <tnsuter xmlns:tns="http://test.com"
    xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://test.com Test.xsd ">
    <tns:Inner1>
    <tns:TimeStamp>2001-12-31T12:00:00</tns:TimeStamp>
    </tns:Inner1>
    </tnsuter>
    Main.java
    public static void main(String[] args) throws Exception {
    JAXBContext ctx = JAXBContext.newInstance("test.vo" );
    Unmarshaller unmarsh = ctx.createUnmarshaller();
    Marshaller marsh = ctx.createMarshaller();
    marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
    marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://test.com Test.xsd");
    Validator validator = ctx.createValidator();
    //Create an Object
    ObjectFactory obj = new ObjectFactory();
    Outer out =
    (Outer)unmarsh.unmarshal(
    new FileInputStream( "e:/agilan/JAXBTest/JAXBTe/references/XMLSchema/test/Test.xml" ) );
    StringWriter sw2 = new StringWriter();
    marsh.marshal(out, new PrintWriter(sw2) );
    StringBuffer sb2 = sw2.getBuffer();
    System.out.println(sb2.toString() );
    Result
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Outer xsi:schemaLocation="http://test.com Test.xsd" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://test.com">
    <Inner1>
    </Inner1>
    </Outer>
    Please not the timestamp tag is missing, which is present in the input.xml
    Iam struck up with is problem for the past 5days, without any clue. Please help.
    Additionally if I add the validation code after unmarsh.unmarshal(..).
    Iam getting the following exception
    Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.POuterTypeImpl.serializeBody(POuterTypeImpl.java:61)
         at test.vo.impl.OuterTypeImpl.serializeBody(OuterTypeImpl.java:30)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:366)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.OuterImpl.serializeBody(OuterImpl.java:87)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    --------------- linked to ------------------
    javax.xml.bind.ValidationException
    - with linked exception:
    [com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>]
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:131)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
    Location: obj: test.vo.impl.OuterTypeImpl@f84386
    Iam badly struckup with this problem for the past 5 days please help

    Hi,
    Iam unmarshalling input.xml to an java object and marshal it back to xml string. Iam not getting the same result. Any light on this? Is is because of the anyType? If validate the unmarshalled object it throws an error, but if i dont validate the code works giving the following result.
    PTest.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com"
    elementFormDefault="qualified">
    <complexType name="POuterType" abstract="true">
    <sequence>
    <choice>
    <element name="Inner1" type="anyType" />
    <element name="Inner2" type="anyType"/>
    </choice>
    </sequence>
    </complexType>
    </schema>
    Test.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com" elementFormDefault="qualified" >
    <include schemaLocation="PTest.xsd"></include>
    <complexType name="OuterType">
    <complexContent>
    <restriction base="tns:POuterType">
    <sequence>
    <choice>
    <element name="Inner1">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    <element name="Inner2">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    </choice>
    </sequence>
    </restriction>
    </complexContent>
    </complexType>
    <element name="Outer" type="tnsuterType"></element>
    </schema>
    Test.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <tnsuter xmlns:tns="http://test.com"
    xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://test.com Test.xsd ">
    <tns:Inner1>
    <tns:TimeStamp>2001-12-31T12:00:00</tns:TimeStamp>
    </tns:Inner1>
    </tnsuter>
    Main.java
    public static void main(String[] args) throws Exception {
    JAXBContext ctx = JAXBContext.newInstance("test.vo" );
    Unmarshaller unmarsh = ctx.createUnmarshaller();
    Marshaller marsh = ctx.createMarshaller();
    marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
    marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://test.com Test.xsd");
    Validator validator = ctx.createValidator();
    //Create an Object
    ObjectFactory obj = new ObjectFactory();
    Outer out =
    (Outer)unmarsh.unmarshal(
    new FileInputStream( "e:/agilan/JAXBTest/JAXBTe/references/XMLSchema/test/Test.xml" ) );
    StringWriter sw2 = new StringWriter();
    marsh.marshal(out, new PrintWriter(sw2) );
    StringBuffer sb2 = sw2.getBuffer();
    System.out.println(sb2.toString() );
    Result
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Outer xsi:schemaLocation="http://test.com Test.xsd" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://test.com">
    <Inner1>
    </Inner1>
    </Outer>
    Please not the timestamp tag is missing, which is present in the input.xml
    Iam struck up with is problem for the past 5days, without any clue. Please help.
    Additionally if I add the validation code after unmarsh.unmarshal(..).
    Iam getting the following exception
    Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.POuterTypeImpl.serializeBody(POuterTypeImpl.java:61)
         at test.vo.impl.OuterTypeImpl.serializeBody(OuterTypeImpl.java:30)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:366)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.OuterImpl.serializeBody(OuterImpl.java:87)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    --------------- linked to ------------------
    javax.xml.bind.ValidationException
    - with linked exception:
    [com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>]
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:131)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
    Location: obj: test.vo.impl.OuterTypeImpl@f84386
    Iam badly struckup with this problem for the past 5 days please help

  • Update Unbounded element using SOAP_CLIENT and JAXB classes

    I am writing a custom worklist application using 10.1.3.3. I am able to successfully kick off my BPEL process from my Java application and I am even able to modify most of the fields defined in my XSD. My problem occurs when I try to update the unbounded elements. They are of complex type and each request can have an unlimited number of these elements.
    I used JDeveloper's tool to generate the JAXB classes I'm using to interact and modify the payload of my task. I know that JAXB does not generate setter methods for unbounded elements. I should be able to get the list of elements and simply add to it. Unfortunately, the new list elements are not being saved when I marshall my payload and update the task with the new payload.
    Any ideas on what I'm doing wrong or if there is another way to do this? I've posted code snippets below.
    Thanks!
    Quote Element from XSD:
    <xsd:element name="Quote" nillable="true" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="WorksheetId" type="xsd:int" minOccurs="0"/>
    <xsd:element name="QuoteId" type="xsd:int" minOccurs="0"/>
    <xsd:element name="Description" nillable="true" minOccurs="0">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="250"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Quantity" type="xsd:int" nillable="true" minOccurs="0"/>
    <xsd:element name="UnitPrice" type="xsd:float" nillable="true" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    AddQuote java code:
    JAXBContext jc = JAXBContext.newInstance("myproject.xml");
    Unmarshaller u = jc.createUnmarshaller();
    Task detailTask = wfSvcClient.getTaskQueryService().getTaskDetailsById(ctx, thisId);
    Element detailPayload = detailTask.getPayloadAsElement();
    ObjectFactory objFactory = new ObjectFactory();
    XMLWorksheet xRequest = objFactory.createWorksheet();
    xRequest = (XMLWorksheet)u.unmarshal(detailPayload.getFirstChild());
    List quotes = xRequest.getQuote();
    quotes.add(quote);
    Marshaller m = jc.createMarshaller();
    m.marshal(xRequest, detailPayload);
    detailTask.setPayloadAsElement(detailPayload);
    taskService.updateTask(ctx, detailTask);

    who actually managed to make the SOAP_CLIENT working ?
    What is the jar list and order you use ?
    Does it work with java 5 ?
    Thanks for the help!

  • JAXB, @XmlType(propOrder = { ... }) and @XmlAttribute

    Hi.
    Preamble: we are working with governmental authority, and we are using XML-files for information transfer.
    They (authority) support only strict elements and attributes order in files (not only for elements but also for attributes!). :(
    Now we are using manual assembly of XML-file.
    I found this JAXB example: http://www.vogella.com/articles/JAXB/article.html
    Here I found "@XmlType(propOrder = { "field2", "field1",.. })".
    I tried this and get first results - elements were in order that I specify.
    When I annotated 4 of 8 fields with @XmlAttribute, it also works fine, but I should inverse the order of attributes in propOrder - it's ok.
    It looks like I can use JAXB for my task.
    I use Java SE 1.6.0_35.
    Question is:
    Will this behaviour be as is in further releases of Java SE? In 1.7, 1.8 and so on.
    Test code:
    package com.mycompany.test8_jaxb_with_ordering;
    import javax.xml.bind.annotation.XmlAttribute;
    import javax.xml.bind.annotation.XmlRootElement;
    import javax.xml.bind.annotation.XmlType;
    @XmlRootElement(name = "TestClass")
    @XmlType(propOrder = { "test2", "test3", "test4", "test1", "test5", "test7", "test6", "test8" })
    public class TestClass {
    private String test1 = "test1&_text";
    private String test3 = "test3\"_text";
    private String test2 = "test2_text";
    private String test4 = "test4_text";
    private String test5 = "test5&_text";
    private String test7 = "test7\"_text";
    private String test6 = "test6_text";
    private String test8 = "test8_text";
    @XmlAttribute
    public String getTest1() {
    return test1;
    @XmlAttribute
    public String getTest2() {
    return test2;
    @XmlAttribute
    public String getTest3() {
    return test3;
    @XmlAttribute
    public String getTest4() {
    return test4;
    public String getTest5() {
    return test5;
    public String getTest6() {
    return test6;
    public String getTest7() {
    return test7;
    public String getTest8() {
    return test8;
    public void setTest1(String test1) {
    this.test1 = test1;
    public void setTest2(String test2) {
    this.test2 = test2;
    public void setTest3(String test3) {
    this.test3 = test3;
    public void setTest4(String test4) {
    this.test4 = test4;
    public void setTest5(String test5) {
    this.test5 = test5;
    public void setTest6(String test6) {
    this.test6 = test6;
    public void setTest7(String test7) {
    this.test7 = test7;
    public void setTest8(String test8) {
    this.test8 = test8;
    package com.mycompany.test8_jaxb_with_ordering;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.Writer;
    import javax.xml.bind.*;
    public class App {
    private static final String TEST_XML = "./test-jaxb.xml";
    public static void main(String[] args) throws PropertyException, JAXBException, IOException {
    TestClass tc = new TestClass();
    JAXBContext context = JAXBContext.newInstance(TestClass.class);
    Marshaller m = context.createMarshaller();
    m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    m.marshal(tc, System.out);
    Writer w = null;
    try {
    w = new FileWriter(TEST_XML);
    m.marshal(tc, w);
    } finally {
    try {
    w.close();
    } catch (Exception e) {
    // get variables from our xml file, created before
    System.out.println();
    System.out.println("Output from our XML File: ");
    Unmarshaller um = context.createUnmarshaller();
    TestClass tc2 = (TestClass) um.unmarshal(new FileReader(TEST_XML));
    System.out.println("tc2.test1 = "+tc2.getTest1());
    System.out.println("tc2.test2 = "+tc2.getTest2());
    System.out.println("tc2.test3 = "+tc2.getTest3());
    System.out.println("tc2.test4 = "+tc2.getTest4());
    System.out.println("tc2.test5 = "+tc2.getTest5());
    System.out.println("tc2.test6 = "+tc2.getTest6());
    System.out.println("tc2.test7 = "+tc2.getTest7());
    System.out.println("tc2.test8 = "+tc2.getTest8());
    -----

    Hello,
    @XmlType is only for elements.
    We cannot use attributes with it.
    Thanks

  • Strange problem with Eclipse, JAXB and JBoss

    Hello,
    I've been confronted to a very strange problem for the last week, and I still can't manage to fix it. I'm working on a J2EE application, using JBOSS. One of its functionality require the use of XML parsing. For this task, I've used JAXB since everyone in my company use this library. So I've written a small test class, that read my XML file, unmarshal it to java beans, and then write it back to another file (just for testing purpose only, I'm not trying to make the worst "copy" implementation ever done :) .)
    jaxbContext = JAXBContext.newInstance(ObjectFactory.class.getPackage().getName());
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    //Unmarshal from XML to Bean
    XMLResult result = (XMLResult)unmarshaller.unmarshal(new File("path/to/file/myTestFile.xml"));
    //[Test] marshal back to XML
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.marshal(result, new File("path/to/file/output.xml"));When I run this file, I first get an error about namespaces...
    unexpected element (uri:"http://myNamespace.com", local:"XMLResult"). Expected elements are <{http://myNamespace.com/}Patient>,<{}Episode>, ..... <{}XMLResult>, etc...
    (Result is the root, patient and episode are sub elements)
    I have absolutely no idea why my root (XMLResult) should have no namespace, but some other elements should, and some shouldn't... but that's not the real problem. I've tried to fix this for days, changing namespaces, removing them.. but it didn't work. And then, I once chose to clean my project in Eclipse, and re-run my test. and it worked... !
    After some changes to the XSD, I re-run XJC, then recompile my project, and re-deploy it to JBOSS. I ran my test once more and... same error as before. Then, again, I clean the project.. and the test worked.
    So when I use the basic compiler for eclipse, everything works, but if I choose to use ant to build and deploy, it won't... even if they are supposed to be the same (run configuration / jre / use same as workspace). Here is an example of XML file I'm trying to read, and the related XSD :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    targetNamespace="http://myNamespace.com"
    xmlns:ar="http://myNamespace.com">
    <xs:element name="XMLResult">
         <xs:complexType>
              <xs:sequence>               
                   <xs:element ref="ar:Patient"/>
                   <xs:element ref="ar:Episode"/>
              </xs:sequence>          
         </xs:complexType>
    </xs:element>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <XMLResult xmlns="http://myNamespace.com">
      <Patient >
      </Patient>
      <Episode >
      </Episode>
    </XMLResult>Any idea of what I'm doing wrong? I think I've tried everything.... and looked everywhere, but had no success :/ I still don't know why it work with the basic compilation, or why my namespaces are wrong... (if they are).

    I don?t know if its a bug of the lomboz, if it is,
    please tell me what to do.It is a bug in Lomboz. It has a forum here: http://forge.objectweb.org/forum/forum.php?forum_id=360.

  • JAXB using marshaller.setProperty to specify xalan

    Hi All,
    I'm developing an application using JAXB 1.0.4. I'm able to successfully generate xml from the JAXB compiled classes. My root element should look like
    <EzAp:Invoice xmlns:EzAp="http://siemens.com/einvoice" xmlns:xalan="http://xml.apache.org/xslt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://siemens.com/einvoice file:///C:/einvoice/xml/EzAp.xsd">.
    I'm not being able to specify the xalan namespace. Please let me know if I can do that through the marshaller.setProperty or any other work around.
    Thanks for the help
    Mahesh

    hai,
    i seen u r post.i am having problem with unmarshalling program.with your post i know u can definately solve my problem.because i am having problem in generating xml docemnt from the unmarshall program.pleae help me in thi regard.
    i wrote a sample xml file .and it's xml schema.i used this xml schma to jaxb compiler to generate the classes.it has generated the classes.
    then i wrote unmarshall program as follows
    public class indextestUnmarshal {
    public static void main(String args[]){
    try
         System.out.println("starting........");
         javax.xml.bind.JAXBContext jc= JAXBContext.newInstance("com.search");
         System.out.println("JAXB Instance.....");
         Unmarshaller unmarshaller = jc.createUnmarshaller();     
         System.out.println("calling unmarshal method.....");
         Searchblox coll = (Searchblox)unmarshaller.unmarshal(new File("search.xml"));
         System.out.println("searchblox...........");
    catch(JAXBException e)
         e.printStackTrace();
    program is unable to print the 4th stmt i.e searchblox.it's giving error as follows
    starting........
    JAXB Instance.....
    calling unmarshal method.....
    javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"searchblox"). Expected elements are (unknown)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:523)
         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199)
         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:194)
         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:71)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:920)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:364)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:345)
         at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:117)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:200)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:173)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:142)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:151)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:169)
         at indextestUnmarshal.main(indextestUnmarshal.java:39)
    please help me in this regard as soosn as possible
    Thanks in Advance
    -Rregards
    Rama

  • XML Encoder and Decoder???

    Hello all!
    Is there any XML Decoder and Encoder besides java.beans.XMLDecoder, java.beans.XMLEncoder?
    Because it seems that java.beans.XMLEncoder and XMLDecoder are not reliable when converting my object.
    Thanks in advance!

    Yes there is another XML decoder/encoder. Look at Castor. http://castor.exolab.org. Note you must have Java Beans. getters and setters.
    We are currently using it on the project that I am on. Here is a sample code that should get you started.
    //To create the XML file using CASTOR.
    FileWriter myWriter = new FileWriter();
    Mapping mapping = new Mapping(); //Yes you need a mapping file, probably.
    mapping.loadMapping(mappingFile);
    Marshaller marshaller = new Marshaller(myWriter);
    marshaller.setMapping(mapping);
    marshaller.marshal(myJavaObject);
    //To read an XML file (created with CASTOR.)
    FileReader freader = new FileReader(fileDir + "/" + inputFile);
    Mapping mapping = new Mapping(); //Yes you need a mapping file, probably.
    mapping.loadMapping(mappingFile);
    Unmarshaller unmar = new Unmarshaller(mapping);
    myJavaClass = (MyJavaClass) unmar.unmarshal(freader);
    If you need more advise please feel free to send me an e-mail. [email protected]
    Bill

  • Deploy ADF 11g to WebLogic Server: Unmarshaller failed

    Hello,
    I have an IBM server which was built with an Intel Xeon CPU; and I run Solaris 10 on it.
    It seems there is no WebLogc 10.3 package installer for Solaris x86 (SPARC only). So I must install WebLogic 10.2.
    Does JDeveloper 11g support WebLogic 10.2 ? (I see only 10.3 when create an Application Server connection)
    When I tried to deploy my ADF application to WebLogic Server (with the connection for WebLogic 10.3) from my computer, an exception occurred:
    weblogic.management.DeploymentException: Unmarshaller failed
    When I read the log file on the server, it said that there was an error in weblog-application.xml, related to the descriptor. (Sorry, I am not at the server right now; so I cannot write exactly what it said. If necessary, I'll post it later.)
    I hope someone will help me to resolve this problem.
    Thanks for reading my thread!

    There are messages in the log file:
    <1230546713435> <BEA-160197> <Unable to load descriptor /export/home/PhucNT/bea/wlserver_10.0/samples/domains/wl_server/./servers/examplesServer/upload/BKSync/app/BKSyncDeployment.ear/META-INF/weblogic-application.xml of module BKSyncDeployment.ear. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
         at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
         at weblogic.application.ApplicationDescriptor.getWeblogicApplicationDescriptor(ApplicationDescriptor.java:333)
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:177)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-application@http://www.bea.com/ns/weblogic/weblogic-application
         at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
         at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
         at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
         at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
         ... 28 more
    .>
    ####<Dec 29, 2008 5:31:53 PM ICT> <Error> <Deployer> <TLSolaris> <examplesServer> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1230546713523> <BEA-149605> <Failed to create App/Comp mbeans for AppDeploymentMBean BKSync. Error - weblogic.management.DeploymentException: Unmarshaller failed.
    weblogic.management.DeploymentException: Unmarshaller failed
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:189)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-application@http://www.bea.com/ns/weblogic/weblogic-application
         at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
         at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
         at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
         at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
         at weblogic.application.ApplicationDescriptor.getWeblogicApplicationDescriptor(ApplicationDescriptor.java:333)
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:177)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    >
    ####<Dec 29, 2008 5:31:53 PM ICT> <Error> <Deployer> <TLSolaris> <examplesServer> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1230546713552> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1230546711085' for task '0'. Error is: 'weblogic.management.DeploymentException: Unmarshaller failed'
    weblogic.management.DeploymentException: Unmarshaller failed
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:189)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-application@http://www.bea.com/ns/weblogic/weblogic-application
         at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
         at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
         at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
         at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
         at weblogic.application.ApplicationDescriptor.getWeblogicApplicationDescriptor(ApplicationDescriptor.java:333)
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:177)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    >
    ####<Dec 29, 2008 5:31:54 PM ICT> <Warning> <Deployer> <TLSolaris> <examplesServer> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1230546714489> <BEA-149004> <Failures were detected while initiating deploy task for application 'BKSync'.>
    ####<Dec 29, 2008 5:31:54 PM ICT> <Warning> <Deployer> <TLSolaris> <examplesServer> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1230546714490> <BEA-149078> <Stack trace for message 149004
    weblogic.management.DeploymentException: Unmarshaller failed
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:189)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-application@http://www.bea.com/ns/weblogic/weblogic-application
         at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
         at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
         at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
         at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
         at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
         at weblogic.application.ApplicationDescriptor.getWeblogicApplicationDescriptor(ApplicationDescriptor.java:333)
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:177)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:72)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:86)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

Maybe you are looking for

  • What is RID in non clustered index and its use

    Hi All, I need help regarding following articles on sql server 1) what is RID in non clustered index and its use. 2) What is Physical and virtual address space. Difference in 32 bit vs 64 bit Virtual address space Regards Rahul

  • Error Messages in a WebCenter Spaces Components

    Dears, we deployed a custom component for check the quota for the folder before add any new item (we deployed it on UCM 11g), the component is working properly from UCM side, so when override the quota for the folder the error message "you can't add

  • Using an External HD with USB 1.1 for Media (Movie files) storage?

    Many thanks for your attention. For a Media Storage (mostly movies) HD, I ordered a Maxtor OneTouch II with Firewire and the company mistakenly sent me one with USB 1.1 instead. I remember reading that for Media Storage, only the Firwire connection w

  • Display tree hierarchy in adobe print form scenario

    Hi Can someone suggest what is the best way to create a tree structure in adobe print scenario ? can we display icon also next to the text in the tree. For example I want to get folder and file icons also along with their names in hierarchial manner.

  • Re: Q150 DisplayPor​t to HDMI output FAIL

    Got it.  I replaced the Video driver package which has an audio driver as well