Om.sun.msv.verifier.ValidityViolation

Hi,
I am getting com.sun.msv.verifier.ValidityViolation: the
value does not match the regular expression "\d{14}". error
while running a batch program.
the version of isorelax.jar in version.properties is
version=20010815
And version of msv.jar in version.properties is
version=20010925
The problem is even when the input file used for batch
processing is good ( has no errors ) this errors is been
thrown out, but when jvm are recycled this error goes away.
the validation rules under the xsd file
<xsd:simpleType name="batchDateTime">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{14}"/>
</xsd:restriction>
</xsd:simpleType>

I found the answer myself. It is because I wrongly used a SAX1 parser instead of a SAX2 parser.

Similar Messages

  • Java.io.InvalidClassException: com.sun.msv.grammar.trex.TREXGrammar

    Hi,
    I am running JAXB 1.0 (JWSDP 1.1) with Weblogic 6.1 Below is the code that is causing the exception. Inspite of the error JAXB reads the XML in fine and everything proceeds normally. Any help would be greatly appreciated.
    Thanks in advance,
    Abhijit
    JAXBContext jc = JAXBContext.newInstance("my.package");
    // create an Unmarshaller
    Unmarshaller u = jc.createUnmarshaller();
    // enable validation
    u.setValidating( true );
    // unmarshal an instance document into a tree of Java content
    ProductsType prods = (ProductsType)u.unmarshal(new FileInputStream( "products.xml" ) );
    The last line above causes the following error
    java.io.InvalidClassException: com.sun.msv.grammar.trex.TREXGrammar; Local class
    not compatible: stream classdesc serialVersionUID=7316616993473479596 local cla
    ss serialVersionUID=1
    at java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:5
    18)
    at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562)
    at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
    :931)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
    at com.sun.xml.bind.GrammarInfo.getGrammar(GrammarInfo.java:63)
    at com.sun.xml.bind.GrammarInfoFacade.getGrammar(GrammarInfoFacade.java:
    129)
    at com.sun.xml.bind.DefaultJAXBContextImpl.getGrammar(DefaultJAXBContext
    Impl.java:76)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.createUnmarshallerHand
    ler(UnmarshallerImpl.java:98)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(Unmarshaller
    Impl.java:112)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm
    arshallerImpl.java:139)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm
    arshallerImpl.java:186)
    at com.manu.tp.product.ProductInputSessionBean.bindXmlDocument(ProductIn
    putSessionBean.java:98)
    at com.manu.tp.product.ProductInputSessionBean.processProducts(ProductIn
    putSessionBean.java:31)
    at com.manu.tp.product.ProductInputSessionBean_j5odob_EOImpl.processProd
    ucts(ProductInputSessionBean_j5odob_EOImpl.java:1393)
    at com.manu.tp.product.ProductInputSessionBean_j5odob_EOImpl_WLSkel.invo
    ke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
    ef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:274)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- linked to ------------------
    javax.xml.bind.JAXBException: unable to extract the schema information
    - with linked exception:
    [java.io.InvalidClassException: com.sun.msv.grammar.trex.TREXGrammar; Local class not compatible: stream classdesc serialVersionUID=7316616993473479596 local cl
    ass serialVersionUID=1]
    at com.sun.xml.bind.GrammarInfo.getGrammar(GrammarInfo.java:70)
    at com.sun.xml.bind.GrammarInfoFacade.getGrammar(GrammarInfoFacade.java:
    129)
    at com.sun.xml.bind.DefaultJAXBContextImpl.getGrammar(DefaultJAXBContext
    Impl.java:76)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.createUnmarshallerHand
    ler(UnmarshallerImpl.java:98)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(Unmarshaller
    Impl.java:112)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm
    arshallerImpl.java:139)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm
    arshallerImpl.java:186)
    at com.manu.tp.product.ProductInputSessionBean.bindXmlDocument(ProductIn
    putSessionBean.java:98)
    at com.manu.tp.product.ProductInputSessionBean.processProducts(ProductIn
    putSessionBean.java:31)
    at com.manu.tp.product.ProductInputSessionBean_j5odob_EOImpl.processProd
    ucts(ProductInputSessionBean_j5odob_EOImpl.java:1393)
    at com.manu.tp.product.ProductInputSessionBean_j5odob_EOImpl_WLSkel.invo
    ke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
    ef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:274)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

    java.io.InvalidClassException: com.sun.msv.grammar.trex.TREXGrammar; >Local class not compatible: stream classdesc
    serialVersionUID=7316616993473479596 local class serialVersionUID=1This is the problem. Basically this tells that the class on the receiving end (the local class) and the one that was serialized to the stream are different versions. Every class is assigned a serialVersionUID when it's compiled, and if two classes that are otherwise the same have different serialVersionUIDs, they are considered to be different versions and the above exception is raised.
    You should check that the JAR files on both VMs are exactly the same versions.
    What's worrying is the UID of the local class, 1. This doesn't look like something that was automatically generated by the compiler but more like that somebody explicitly defined a serialVersionUID field when trying to avoid class incompatibility issues and initialized it to the value of 1. This is indeed extremely bad programming practice and should not be used.
    .P.

  • Please assist: NoClassDefFoundError: com/sun/msv/datatype/xsd/IntType

    Hi,
    I've developed a very simple schema and used jaxb of jwsdp-1.2 to generate the related data model.
    After that, I created a number of generated objects, and marshaled them out to an XML file. It worked perfectly, however, after making some unrelated changes, I've come back and re-ran the generation, only to see it fail. I'll post the details below, any help or guidance will be truly appreciated. Thanks in advance!
    Schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="database" type="DatabaseType"/>
    <xsd:complexType name="DatabaseType">
         <xsd:sequence>
              <xsd:element name="name" minOccurs="0" type="xsd:string"/>
              <xsd:element name="card" minOccurs="0" maxOccurs="unbounded" type="CardType"/>          
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CardType">
    <xsd:sequence>
    <xsd:element name="id" minOccurs="0" type="xsd:int"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Stack Trace:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/msv/datatype/xsd/IntType
         at com.sun.xml.bind.DatatypeConverterImpl.printInt(DatatypeConverterImpl.java:252)
         at javax.xml.bind.DatatypeConverter.printInt(DatatypeConverter.java:393)
         at com.zzz.generatedObj.impl.CardTypeImpl.serializeElementBody(CardTypeImpl.java:323)
         at com.zzz.generatedObj.impl.runtime.SAXMarshaller.childAsElementBody(SAXMarshaller.java:378)
         at com.zzz.generatedObj.impl.DatabaseTypeImpl.serializeElementBody(DatabaseTypeImpl.java:103)
         at com.zzz.generatedObj.impl.DatabaseImpl.serializeElementBody(DatabaseImpl.java:43)
         at com.zzz.generatedObj.impl.runtime.MarshallerImpl.write(MarshallerImpl.java:161)
         at com.zzz.generatedObj.impl.runtime.MarshallerImpl.marshal(MarshallerImpl.java:134)
         at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:66)
         at com.zzz.CardLoader.main(CardLoader.java:134)
    And to look at the CardSerializeCode:
    public void serializeElementBody(com.zzz.generatedObj.impl.runtime.XMLSerializer context)
    throws org.xml.sax.SAXException
    if (has_Id) {
    context.startElement("", "id");
    context.endNamespaceDecls();
    context.endAttributes();
    try {
    //HERE IS THE LINE IT DISLIKES-->>
    context.text(javax.xml.bind.DatatypeConverter.printInt(((int) _Id))); //this is the line it dislikes <--- <---
    } catch (java.lang.Exception e) {
    com.zzz.generatedObj.impl.runtime.Util.handlePrintConversionException(this, e, context);
    context.endElement();
    I'm running:
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
    on Linux.
    Thanks again!!

    I've done some experimenting with this. Aparently, not only is the xsd:int type no longer valid, but neither is xsd:boolean or xsd:integer (BigInteger).
    I can see that the com.sun.msv.datatype package cannot be found, (even though it's still a mystery how this disappeared.) but I have no idea how to search for the correct jar...
    ps. Wouldn't it be great for someone to keep an online database of jar's searchable by package name/class?
    I'm going to try some more things... but still I would appreciate it if someone can help speed things along - Thanks!

  • Cannot find JavaDoc for the com.sun.msv package

    Where can I find the JavaDoc for the com.sun.msv package ?

    What is the msv package? I also (after a quick google search) can't find any mention of this.
    What is the package for?

  • Where is com.sun.msv.grammar.Grammar?

    I generated some java classes using the JAXB compiler from my XML schema. When attempting to compile said classes I fail to find com.sun.msv.grammar.Grammar. I can't seem to locate it in any of the jar files that came with Java Web Services developer pack 1.3. If anyone can point me in the right direction, I'd appreciate it.
    -S

    Nevermind. jaxb-libs.jar got dropped.
    -S

  • Using Ant  or JUnit with Sun's Verifier

    Hi,
    I am trying to integrate Sun's J2EE "Verifier" into the build process. I am trying two different approaches, but am encountering similar issues.
    Using Ant
    One approach I am trying is with an Ant target. I keep getting this error "No local string for com.sun.enterprise.tools. ....etc...". I suspect the problem is with the setting of J2EE_HOME or the setting of a system property "com.sun.enterprise.home". I see this is set in verifier.bat...and I have decompiled Verifier.class and I see that this environmental variable is read at line 377 of Verifier.class. I am trying to set it...but ....there is the error that seems to indicate that the property file LocalStrings.properties is not being found. Of course the Verifier works when I run verifier.bat.
    <?xml version="1.0"?>
    <project name="verify" default="verify" basedir = "C:\j2sdkee1.3.1\">
    <target name="verify">
    <java fork="yes" classname="com.sun.enterprise.tools.verifier.Verifier">
    <classpath>
    <pathelement path="C:/j2sdkee1.3.1/lib/j2eetools.jar" />
              <pathelement path="c:/j2sdkee1.3.1/lib/j2ee.jar" />
    </classpath>
    <sysproperty key="com.sun.enterprise.home" value="C:\j2sdkee1.3.1\" />
         <sysproperty key="J2EE_HOME" value="C:\j2sdkee1.3.1\" />     
         <sysproperty key="LOCALEDIR" value="C:\j2sdkee1.3.1/lib/locale/" />          
    <arg value="C:/Ascential/RTIServer/apps/jboss/server/default/deploy/RTI.ear"/>
         <arg value="-oc:/verifierant/result"/>
    <arg value="-f"/>     
    </java>
    </target>
    </project>
    From JUnit
    I am trying to call the main() method of the Verifier...but getting similar "No local string..." errors.
    String[] args = { "I:\Release_30Sep2003\development\deploy\build\jboss\RTI.ear",
    "-oI:\Release_30Sep2003\development\deploy\build\jboss\results",
    "-f"};
    Verifier.main(args);
    Has anyone integrated this tool into Ant or Junit that could offer me some advice?
    Thanks,
    Mike Foley
    [email protected]

    How about running verifier.bat using ants exec task?

  • Namespace error with JAXB

    Hello everyone! This is my problem:
    I am using jaxb to unmarshall a xml file. When I unmarshall, the program doesn�t work at this point:
    JAXBContext jc = JAXBContext.newInstance("com.claynet.core.clom");
    Unmarshaller u = jc.createUnmarshaller();
    u.setValidating(true);
    Clom clom =
    (Clom)u.unmarshal(
    new FileInputStream( ".." + File.separatorChar +
    "webapps"+ File.separatorChar + "claybrary" + File.separatorChar
    + "objetosCLOM" + File.separatorChar + file_name.trim()) );
    The error I get is the following one:
    javax.xml.bind.UnmarshalException: Probably namespace URI of tag "clom" is wrong (correct one is "http://www.clayformacion.com/xsd/clomv1.0")
    - with linked exception:
    [com.sun.msv.verifier.ValidityViolation: Probably namespace URI of tag "clom" is wrong (correct one is "http://www.clayformacion.com/xsd/clomv1.0")]
    The problem seems to be a conflict with the namespace, but the schema has the namespace correctly set:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:clom="http://www.clayformacion.com/xsd/clomv1.0" xmlns="http://www.clayformacion.com/xsd/clomv1.0" targetNamespace="http://www.clayformacion.com/xsd/clomv1.0" elementFormDefault="qualified">
    The validation inside the unmarshalling crash.
    Is there any errors with the code? Can Anyone help me?
    Thanks

    Looks like error is clear namespace mismatch...try changing the following url in wsdl and regen the code
    http://example.ws found http://example.ws/xsd

  • JAXB NPE

    I have a simple JAXB project, but when I try to unmarshal from a file,
    I get the following rather mysterious errors:
    validating unmarshaller:
    com.sun.msv.verifier.ValidityViolation:
    tag name "WMS_IN" is not allowed. Possible tag names are: <WMS_IN>
    at com.sun.msv.verifier.Verifier.onError(Verifier.java:319)
    at com.sun.msv.verifier.Verifier.onError(Verifier.java:315)
    at com.sun.msv.verifier.Verifier.startElement(Verifier.java:188)
    at com.sun.msv.verifier.VerifierFilter.startElement (VerifierFilter.java:97)
    at org.iso_relax.verifier.impl.ForkContentHandler.startElement(Unknown Source)
    at com.sun.xml.bind.validator.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:104)
    at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:109)
    at com.sun.xml.bind.unmarshaller.DOMScanner.parse(DOMScanner.java:64)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal (UnmarshallerImpl.java:149)
    non-validating unmarshaller, using default namespace in the document:
    java.lang.NullPointerException
    at com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.startElement(SAXUnmarshallerHandlerImpl.java:87)
    at org.iso_relax.verifier.impl.ForkContentHandler.startElement(Unknown Source)
    at com.sun.xml.bind.validator.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:104)
    at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:109)
    at com.sun.xml.bind.unmarshaller.DOMScanner.parse(DOMScanner.java:64)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:149)
    non-validating unmarshaller, using namespace prefix in the document:
    java.lang.NullPointerException
    at org.xml.sax.helpers.NamespaceSupport.declarePrefix(Unknown Source)
    at com.sun.msv.verifier.AbstractVerifier.startPrefixMapping(AbstractVerifier.java:70)
    at com.sun.msv.verifier.VerifierFilter.startPrefixMapping(VerifierFilter.java:87)
    at org.iso_relax.verifier.impl.ForkContentHandler.startPrefixMapping(Unknown Source)
    at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:89)
    at com.sun.xml.bind.unmarshaller.DOMScanner.parse(DOMScanner.java:64)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal (UnmarshallerImpl.java:149)
    All those NPEs cannot be good.
    Any help much appreciated. In the meantime I will try to
    reproduce it with a trivial schema that I can post.
    Mik

    I should have said I was unmarshalling from a DOM read from a file.
    Seems that the problems arise because the JAXP DocumentBuilderFactory
    defaults to not being namespace aware, and I needed to do this
    before I get a parser:
    myDocumentBuilderFactory.setNamespaceAware( true );

  • Identifying the failed node name

    I use javax.xml.bind.Unmarshaller to unmarshall the xml object. When the schema validation fails, the unmarshaller throws the invalid value found in the xml. I need to identify the invalid value as well as the node name which failed the validation. I am using com.sun.msv.verifier.ValidityViolation to find out, but this shows the value alone. How to identify the node which has failed the validation?

    Want to make sure I understand this myself since we are seeing imbalance across our nodes. If my connection pool does not subscribe to the FAN events, then the only way to get balanced connections is to use the "stale reaping" capability of the pool to close idle connections.
    If I'm just using the oracle driver but a different pool (say C3PO) and the traffic on a given app server keeps the connections from going idle, they will never get rebalanced... is that correct?
    What about the server-side load balancing. Even if all of my connections are pointed at Node 1... will the RAC listener still portion out requests between Node 1 and Node 2 based on load even though all network traffic from the app server is hitting Node 1?

  • Help find JAXB mistake..

    Hi,
    I have a schema looks like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" jaxb:version="1.0">
         <xs:element name="authorDetails" type="author-details-type"/>
         <xs:complexType name="author-details-type">
              <xs:sequence>
                   <xs:element name="author" type="authorType" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="authorType">
              <xs:sequence>
         <xs:element name="author_type" type="xs:string"/>
         <xs:element name="author_name" type="xs:string"/>
         <xs:element name="author_email" type="xs:string"/>
         <xs:element name="author_ph_no" type="xs:string"/>
         <xs:element name="author_organization" type="xs:string"/>
         </xs:sequence>
         <xs:attribute name="author_id" type="xs:ID" use="required"/>
         </xs:complexType>
    </xs:schema>
    When I try to add a same record twice using JAXB, it doesn't complain about the duplication but does it the third time. My insert method looks like this. I have tried validating both before and after marshalling, but it's the same result. I also tried to check if the value AuthorID already exists in the list before inserting, but it returns false. Can anyone point the mistake I am making here that I am not able to find.
    JAXBContext jaxbCntxt = JAXBContext.newInstance("dhs.familynet.feedback.author");
    author.ObjectFactory objFactory = new .author.ObjectFactory();
    //Creating an object of insertElement class that contains this method
    insertElement ie = new insertElement();
    // Call Unmarshaller method in my class to create umnarsha object
    Unmarshaller authorDetailsUnmarshaller = ie.createUnmarshallerObject();
    // Create a validator
    Validator authorDetailsValidator = jaxbCntxt.createValidator();
    author.AuthorDetails authDetails= (author.AuthorDetails)
    authorDetailsUnmarshaller.unmarshal(new File("authorDetails.xml"));
    author.AuthorType AuthorTypeObject = objFactory.createAuthorType();
    System.out.println("Validator returned " + authorDetailsValidator.validate(authDetails));
    authDetails = (author.AuthorDetails) authorDetailsUnmarshaller.unmarshal(new File("authorDetails.xml"));
    List authList = authDetails.getAuthor();
    AuthorTypeObject.setAuthorPhNo("230-89-34342");
    AuthorTypeObject.setAuthorOrganization("ASFaf");
    AuthorTypeObject.setAuthorName("Re");
    AuthorTypeObject.setAuthorType("User3");
    AuthorTypeObject.setAuthorId("o");
    AuthorTypeObject.setAuthorEmail("ASFaf@home");
    authList.add(AuthorTypeObject);
    System.out.println("Validator returned " + authorDetailsValidator.validate(authDetails));
    System.out.println("Created a content tree and marshalled it to Authoutput.xml");
    Marshaller authorDetailsMarshaller = ie.createMarshallerObject();
    authorDetailsMarshaller.marshal(authDetails, new FileOutputStream("authorDetails.xml"));
    THanks

    Thanks for responding..This is the error I get the THIRD TIME I run with same values for all items.
    DefaultValidationEventHandler: [ERROR]: "o" is used as an ID value more than once.
    com.sun.msv.verifier.ValidityViolation: "o" is used as an ID value more than once.
    at com.sun.msv.verifier.Verifier.onError(Verifier.java:319)
    at com.sun.msv.verifier.Verifier.endDocument(Verifier.java:383)
    at com.sun.msv.verifier.VerifierFilter.endDocument(VerifierFilter.java:82)
    at org.iso_relax.verifier.impl.ForkContentHandler.endDocument(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:708)
    at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:530)
    at org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1503)
    at org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.java:3564)
    at org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(XMLEntityManager.java:32
    34)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(XMLDocument
    ScannerImpl.java:1102)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentSca
    nnerImpl.java:346)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:529)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:585)
    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1142)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:130)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    39)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    44)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    53)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    71)
    at dhs.familynet.feedback.insertElement.insert(insertElement.java:77)
    at dhs.familynet.feedback.test.main(test.java:30)
    --------------- linked to ------------------
    javax.xml.bind.UnmarshalException
    - with linked exception:
    [com.sun.msv.verifier.ValidityViolation: "o" is used as an ID value more than once.]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarsha
    llerImpl.java:306)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:134)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    39)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    44)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    53)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:1
    71)
    at dhs.familynet.feedback.insertElement.insert(insertElement.java:77)
    at dhs.familynet.feedback.test.main(test.java:30)

  • Xsd:dateTime formatting problems

    This is driving me nuts. I've been playing around with JAXB and it has worked great so far. Until now.
    I have an xml file with this little block
       <timestamps>
          <created>2000-03-04T20:00:00Z</created>
          <last_modified>2003-03-14T02:20:02-05:00</last_modified>
       </timestamps>and in my xsd file I have
        <xsd:element name="timestamps" type="timestampsType" />
      <xsd:complexType name="timestampsType">
        <xsd:sequence>
          <xsd:element name="created" type="xsd:dateTime" />
          <xsd:element name="last_modified" type="xsd:dateTime" />
        </xsd:sequence>
      </xsd:complexType>Previously I had used just xsd:date instead of xsd:dateTime, and that worked fine, but then I realized that I needed more timing precision so I made the change. I can generate my java files with xjc without any problems. But when I go to unmarshall the xml file with validation on, I always get a complaint about the formatting of my date time values. More specificaly I see:
    "com.sun.msv.verifier.ValidityViolation: "2000-03-04T20:00:00Z" does not satisfy the "date" type"
    despite the fact that I copied this date directly from the XSD specification page at http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/
    And believe me, I've tried about a dozen other variations.... Different dates, with extra milliseconds, with and without the timezone part at the end. I get the same error every time. So what am I doing wrong?

    Thanks, but unfortunately that did not do the trick. Interestingly enough everything works perfectly, all other things the same, when I let Validation be set to false.

  • JAXB help needed

    I have the following schema file...
    <?xml version="1.0"?>
    <xs:schema
    targetNamespace="lrpfull.namespace"
    xmlns:lrpfull="lrpfull.namespace"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    >
    <!--****************************************************************************************************************************************-->
    <xs:element name="FullApplication">
    <xs:complexType>
                   <xs:all>
         <xs:element name="ProjectTitle" type="lrpfull:ProjectTitle"/>
                        <xs:element name="AccessionNumber" type="xs:string"/>
                        <xs:element name="localProposalID" type="xs:string" minOccurs="0"/>
         <xs:element name="timestamp" type="xs:dateTime"/>
                        <xs:element name="MessageID" type="xs:string" minOccurs="0"/>
         <xs:element name="ApplicationAttachnment" type="lrpfull:FileIdentifierType"/>
                   </xs:all>
              </xs:complexType>
         </xs:element>
         <!-- ****************** Simple Types Definitions ****************** -->
         <xs:simpleType name="FileIdentifierType">
              <xs:restriction base="xs:string"/>
         </xs:simpleType>
         <xs:simpleType name="ProjectTitle">
              <xs:restriction base="xs:string"/>
         </xs:simpleType>
    </xs:schema
    and the coressponding xml file is :-
    <?xml version="1.0" encoding="UTF-8"?>
    <lrpfull:FullApplication xmlns:lrpfull="lrpfull.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="lrpfull.namespace
    C:\lrp\lrpfullschema.xsd">
         <ProjectTitle>Test Project</ProjectTitle>
         <AccessionNumber>123112312</AccessionNumber>
         <localProposalID>0001 </localProposalID>
         <timestamp>2001-12-17T09:30:47-05:00</timestamp>
         <MessageID>DK92-20</MessageID>
         <ApplicationAttachnment>abstract </ApplicationAttachnment>
    </lrpfull:FullApplication>
    When I try to unmarshall the Stream using the JAXB
                   JAXBContext jc = JAXBContext.newInstance(getCONTEXT());
              // create an Unmarshaller
                   Unmarshaller u = jc.createUnmarshaller();
    u.setValidating(true);
    unmarshalledObject = u.unmarshal(istream);
    i get the following error..
         at hk.hku.cecid.phoenix.message.handler.Request$Monitor.run(Request.java:284)
    Caused by: javax.xml.bind.UnmarshalException
    - with linked exception:
    [com.sun.msv.verifier.ValidityViolation: unexpected attribute "xmlns:lrpfull"]
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:306)
         at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:134)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:139)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:186)
    Can anyone please help. The xml is well formatted and valid.

    hi srikant,
    u r using jaxb2.0 as part of jwsdp2.0.
    when u try to generate jaxb classes with .xsd file using jaxb2.0, u will never get those impl as well as runtime folders created and files under them. Jaxb2.0 has feature to bind these data in the few files generated.
    If u really want these files generated, try using jaxb1.0 or jaxb 1.0.x
    See the below topic pasted by me for compatability issues:
    http://forum.java.sun.com/thread.jspa?threadID=5235499&tstart=0
    topic name:what is the jaxb version compatible with jdk1.3
    reply back if u have any questions...
    hema

  • Problems with Sun xmlInstance Generator

    I am completly new to this Sun-tool and when I try to generate a xml instance from a very simple schema
    I get this error:
    Exception in thread "main" java.lang.InternalError: namespace URI is null
    at com.sun.msv.util.StringPair.<init>(StringPair.java:28)
    at com.sun.msv.verifier.regexp.CombinedChildContentExpCreator.get(Combin
    edChildContentExpCreator.java:210)
    at com.sun.msv.verifier.regexp.ExpressionAcceptor.createChildAcceptor(Ex
    pressionAcceptor.java:113)
    at com.sun.msv.verifier.Verifier.startElement(Verifier.java:175)
    at com.sun.msv.generator.DOM2toSAX2.onElement(Unknown Source)
    at com.sun.msv.generator.DOM2toSAX2.onElement(Unknown Source)
    at com.sun.msv.generator.DOM2toSAX2.traverse(Unknown Source)
    at com.sun.msv.generator.Driver.run(Unknown Source)
    at com.sun.msv.generator.Driver.main(Unknown Source)
    Like the example given in the "howto" I typed following in command line:
    java -jar xmlgen.jar Untitled2.xsd -root {}root
    Here is my schema-file:
    Untitled2.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="root">
         <xs:complexType>
         <xs:sequence>
         <xs:element name="myElement" type="xs:string" maxOccurs="unbounded">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:element name="myElementB" type="xs:string" maxOccurs="1"></xs:element>
         </xs:sequence>
         </xs:complexType>
         </xs:element>
    </xs:schema>
    Did anyone work with this tool and has some experience with it? Or can give me some examples for using?
    Please help!!

    I think that the elementFormQualified attribute requires these other attributes also: targetNameSpace="http://myURL" xmlns="http://myURL" This syntax defines the namespace that will be used for the actual xml. Then in the actual xml next to the topmost element, you would have this: xmlns="http://myURL". This is because there can be conflicts among elements with the same name. For example, you might have half a dozen or more types called "name" in some xml. This identifies which definition of name is being used in a particular case. The xmlns syntax identifies a particular default name space for the xml (and xsd) that it appears in. That way, you don't have to use a prefix for each and every element and attribute that is user-defined in the xml (or xsd). For example, if you say, <Mine xmlns="http://myUrl"> then a child tag such as <yours> does not need an element such as <m:yours>. Otherwise, it would. This way, only element and attribute names that come from some other schema need to have a prefix. Confusing at first, but it does work.

  • Error with ALBPM 10g / JAX-WS and WebLogic 10g

    Folks/People/Community:
    I have an application client running over weblogic 10g. This application needs to be integrated with an external WebServices running under ALBPM 10g and implemented using jax-ws.
    So far our application client running in standalone mode outside the weblogic server works without problems. But, running inside WebLogic 10g the application cannot establish connection with this external webservice and the exception is attached here. Also I'm sending our client source code.
    Please, do you know if WebLogic 10g requires special configurations in order to enable this type of communication?. We have other applications already integrated with other WebService providers without problems so far today. Only this interface is failing and honestly I don't know what is the problem.
    Thanks a lot in advance for your help!.
    Gabriel.
    log startup:
    starting weblogic with Java version:
    java version "1.6.0_05"
    <Dec 29, 2009 9:57:33 AM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967 >
    ---------------[BEGIN CUT HERE CODE]-----------
    private String SECURITY_NAMESPACE =
    "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
    private String PAPI_ENDPOINT =
    "http://internal_hostname.domain.net:8780/papiws/PapiWebServiceEndpoint";
    private PapiWebService webService;
    private void initialize() throws MalformedURLException, SOAPException, OperationException_Exception {
         QName qName = new QName("http://bea.com/albpm/PapiWebService", "PapiWebService");
         Service service = PapiWebService_Service.create(new URL(PAPI_ENDPOINT), qName);
    // ERROR HERE ERROR HERE ERROR HERE
         webService = service.getPort(PapiWebService.class);
         // Authentication (OBPM)
         String sUsername = "mUser";
         String sPassword = "myPassword";
         addUsernameTokenProfile(webService, sUsername, sPassword);
         // Authentication (weblogic realm)
    sUsername = "weblogic";
    sPassword = "weblogic";
    addHttpBasicAuthentication(webService, sUsername, sPassword);
    ---------------[END CODE]-----------
    ---------------[BEGIN CUT HERE STACKTRACE]-----------
    org.quartz.SchedulerException: Job threw an unhandled exception. [See nested
    exception: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee.jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/Proyectos/Software/bea/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529
    Caused by: com.sun.xml.ws.util.ServiceConfigurationError:
    com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee .jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/Proyectos/Software/bea/wlserver_10.3/server/lib/weblogic.jar!/M
    ETA
    -INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException
    at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233)
    at
    com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:141)
    at
    com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:379)
    at
    com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFac
    tory.java:104)
    at
    com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFac
    tory.java:78)
    at
    com.sun.xml.ws.client.WSServiceDelegate.createPipeline(WSServiceDelegate.jav
    a:442)
    at
    com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceD
    elegate.java:639)
    at
    com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:342)
    at
    com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:324)
    at
    com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at
    com.bea.albpm.papiwebservice.PapiWebService_Service.getPapiWebServicePort(Pa
    piWebService_Service.java:56)
    at
    com.company.latam.bpm.connector.albpm10g.BPMClient10g.initialize(BPMClient10g.j
    ava:159)
    at
    com.company.latam.bpm.connector.albpm10g.BPMClient10g.<init>(BPMClient10g.java:
    63)
    at
    com.company.latam.bpm.connector.ConnectorFactory.getInstance(ConnectorFactory.j
    ava:22)
    at
    com.company.latam.bpm.connector.impl.BPMConnectorImpl.bpmAddAbstractRole(BPMCon
    nectorImpl.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy57.bpmAddAbstractRole(Unknown Source)
    at
    com.company.latam.bpm.business.impl.BPMBusinessImpl.sendBPMNotificationAddFunct
    ion(BPMBusinessImpl.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy58.sendBPMNotificationAddFunction(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Tr
    ansactionInterceptor.java:106)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy59.sendBPMNotificationAddFunction(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy59.sendBPMNotificationAddFunction(Unknown Source)
    at
    com.company.latam.sg.external.communicator.business.impl.ExternalCommunicatorBu
    sinessImpl.forwardNotificationAddFunctionAn
    dGroup(ExternalCommunicatorBusinessImpl.java:659)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy60.forwardNotificationAddFunctionAndGroup(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Tr
    ansactionInterceptor.java:106)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy61.forwardNotificationAddFunctionAndGroup(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy61.forwardNotificationAddFunctionAndGroup(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxy
    Factory.java:416)
    at
    org.apache.wicket.proxy.$Proxy82.forwardNotificationAddFunctionAndGroup(Unkn
    own Source)
    at
    com.citi.company.sg.external.communicator.jobs.AddEnttlementsJob.execute(AddEn
    ttlementsJob.java:16)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    ... 1 more
    Caused by: java.lang.ClassCastException
    at java.lang.Class.cast(Class.java:2990)
    at
    com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
    ... 146 more
    ---------------[END STACKTRACE]-----------------------------

    Hi,
    This happens when the Classes gets Loaded from Different classLoaders and Create Conflicts...If you are using any EAR file then Please First of all...Place all the JAR files inside the "*<EAR_NAME>/APP-INF/lib*" directory and then Provide the "*weblogic-application.xml*" file inside the "*<EAR_NAME>/META-INF*"
    And Please add the Following Tags inside your "*weblogic-application.xml*" ...
    *<prefer-application-packages>*
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>     
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>
    *</prefer-application-packages>*
    All the Above Packages are related to WebServices .... And needs to be loaded from one ClassLoader only....to avoid conflicts.
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • Exception when parsing schema with XJC

    Using the command "xjc -d C:\Temp -p sbxml C:\Temp\sb2.xsd" in attempt to generate java classes for my schema I get the error below. The schema is well-formed and valid according to XMLSpy. The schema in question is found below the error. Thanks.
    Mark
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
    at com.sun.msv.verifier.identity.IDConstraintChecker.feedAttribute(IDConstraintChecker.java:218)
    at com.sun.msv.verifier.Verifier.startElement(Verifier.java:204)
    at org.iso_relax.verifier.impl.VerifierFilterImpl.startElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221)
    at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:874)
    at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:591)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScanner
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:151)
    at com.sun.xml.xsom.impl.parser.XSOMParser.parse(XSOMParser.java:116)
    at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:511)
    at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
    at com.sun.tools.xjc.Driver.run(Driver.java:268)
    at com.sun.tools.xjc.Driver.main(Driver.java:88)
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by Mark (CMH) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="INFO_EX">
              <xs:annotation>
                   <xs:documentation>Collection of data for any number of days</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="DAILY_INFO" minOccurs="0" maxOccurs="unbounded">
                             <xs:annotation>
                                  <xs:documentation>Collection of data for all areas for a single day</xs:documentation>
                             </xs:annotation>
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="AREA_INFO" type="AREA_INFO_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                                  </xs:sequence>
                                  <xs:attribute name="DATE_TODAY" type="xs:date" use="required"/>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="AREA_INFO_TYPE">
              <xs:annotation>
                   <xs:documentation>Collection of data for a single area for a single day</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="FIELD_OBS" type="FIELD_OBS_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="AVALANCHE" type="AV_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="NOTABLE" type="NOTABLE_TYPE" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
              <xs:attribute name="AREA_ABBREV" type="AREA_ABBREV_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="FIELD_OBS_TYPE">
              <xs:annotation>
                   <xs:documentation>Collection of a day's field observations</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="GEO_ID" type="SB_ID_TYPE"/>
                   <xs:element name="SKY_PM" type="SKY_TYPE"/>
                   <xs:element name="SKY_AM" type="SKY_TYPE"/>
                   <xs:element name="SKI_ELEV_MAX" type="xs:unsignedShort"/>
                   <xs:element name="SKI_ELEV_MIN" type="xs:unsignedShort"/>
                   <xs:element name="SKI_METERS" type="xs:unsignedShort"/>
                   <xs:element name="SKI_QUALITY">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="P"/>
                                  <xs:enumeration value="F"/>
                                  <xs:enumeration value="G"/>
                                  <xs:enumeration value="E"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="HI_TEMP" type="xs:decimal"/>
                   <xs:element name="LO_TEMP" type="xs:decimal"/>
                   <xs:element name="XPORT_AM" type="TRANSPORT_TYPE"/>
                   <xs:element name="XPORT_PM" type="TRANSPORT_TYPE"/>
                   <xs:element name="HN24" type="xs:int"/>
                   <xs:element name="FO_DATE" type="xs:date" minOccurs="0"/>
                   <xs:element name="W_SPD_AM" type="WIND_SPEED_TYPE"/>
                   <xs:element name="W_SPD_PM" type="WIND_SPEED_TYPE"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="AV_ACTIVITY" type="xs:string"/>
                   <xs:element name="PRECIP_AM" type="PRECIP_TYPE"/>
                   <xs:element name="PRECIP_PM" type="PRECIP_TYPE"/>
                   <xs:element name="FO_REMARK" type="xs:string"/>
                   <xs:element name="NIL_NEW" type="xs:boolean"/>
                   <xs:element name="PERCENT_OBS" type="xs:unsignedShort"/>
                   <xs:element name="HS" type="xs:integer"/>
                   <xs:element name="W_DIR_AM" type="WIND_DIRECTION_TYPE"/>
                   <xs:element name="W_DIR_PM" type="WIND_DIRECTION_TYPE"/>
                   <xs:element name="SFC2" type="SURFACE_TYPE"/>
                   <xs:element name="SFC1" type="SURFACE_TYPE"/>
                   <xs:element name="XPORT_DIR_AM" type="TRANSPORT_DIRECTION_TYPE"/>
                   <xs:element name="XPORT_DIR_PM" type="TRANSPORT_DIRECTION_TYPE"/>
              </xs:sequence>
              <xs:attribute name="FO_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="NOTABLE_TYPE">
              <xs:annotation>
                   <xs:documentation>Data concerning a notable event</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="AV_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="PARTY_SIZE" type="xs:unsignedShort"/>
                   <xs:element name="CAUGHT" type="xs:unsignedShort"/>
                   <xs:element name="PARTLY_BURIED" type="xs:unsignedShort"/>
                   <xs:element name="BURIED" type="xs:unsignedShort"/>
                   <xs:element name="INJURED" type="xs:unsignedShort"/>
                   <xs:element name="FATALITIES" type="xs:unsignedShort"/>
                   <xs:element name="REMARK" type="xs:string"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="NTBL_IMG" type="xs:hexBinary" minOccurs="0"/>
                   <xs:element name="NTBL_TIME" type="xs:time"/>
                   <xs:element name="NTBL_DATE" type="xs:date"/>
                   <xs:element name="MAIN_IMGLINK_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="NTBL_GEO_ID" type="SB_ID_TYPE" minOccurs="0"/>
              </xs:sequence>
              <xs:attribute name="NOTABLE_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="AV_TYPE">
              <xs:annotation>
                   <xs:documentation>Data concerning a single avalanche</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="LENGTH_MIN" type="xs:unsignedInt"/>
                   <xs:element name="LENGTH_MAX" type="xs:unsignedInt"/>
                   <xs:element name="REMARK" type="xs:string"/>
                   <xs:element name="LWC">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Dry"/>
                                  <xs:enumeration value="Moist"/>
                                  <xs:enumeration value="Wet"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_SIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:float">
                                  <xs:minInclusive value="1"/>
                                  <xs:maxInclusive value="5"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="SKIABLE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Y"/>
                                  <xs:enumeration value="N"/>
                                  <xs:enumeration value="N-Y"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="GEO_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="THICK_MIN" type="xs:unsignedInt"/>
                   <xs:element name="NUM">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:pattern value="[0-9]*"/>
                                  <xs:pattern value="Sev"/>
                                  <xs:pattern value="Num"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WIDTH_MIN" type="xs:unsignedInt"/>
                   <xs:element name="WIDTH_MAX" type="xs:unsignedInt"/>
                   <xs:element name="MAIN_IMGLINK_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="THICK_MAX" type="xs:unsignedInt"/>
                   <xs:element name="THICK_MIN" type="xs:unsignedInt"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="TYPE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Slab"/>
                                  <xs:enumeration value="Loose"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_DATE" type="xs:date"/>
                   <xs:element name="AV_TIME" type="xs:time"/>
                   <xs:element name="AV_TRIGGER">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="15"/>
                                  <xs:pattern value="N[aci].*|S[acry].*|H[acry].*|X[hcryer].*"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="BEDSFC_FORMANDSIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="RG"/>
                                  <xs:enumeration value="DF"/>
                                  <xs:enumeration value="CR"/>
                                  <xs:enumeration value="IM"/>
                                  <xs:enumeration value="WG"/>
                                  <xs:enumeration value="FC"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_LEVEL">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Old"/>
                                  <xs:enumeration value="Storm"/>
                                  <xs:enumeration value="Ground"/>
                                  <xs:enumeration value="Glacier"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ASPECT">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="N"/>
                                  <xs:enumeration value="NE"/>
                                  <xs:enumeration value="E"/>
                                  <xs:enumeration value="SE"/>
                                  <xs:enumeration value="S"/>
                                  <xs:enumeration value="SW"/>
                                  <xs:enumeration value="W"/>
                                  <xs:enumeration value="NW"/>
                                  <xs:enumeration value="All"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WKLYR_DATE"/>
                   <xs:element name="TIMERANGE" type="xs:unsignedInt"/>
                   <xs:element name="INCLINE">
                        <xs:simpleType>
                             <xs:restriction base="xs:unsignedInt">
                                  <xs:minInclusive value="0"/>
                                  <xs:maxInclusive value="180"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ELEV_MIN" type="xs:unsignedInt"/>
                   <xs:element name="ELEV_MAX" type="xs:unsignedInt"/>
                   <xs:element name="AV_CUTBLOCK">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="LOC_DESCRIPTION">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="30"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WKLYR_FORMANDSIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="PP"/>
                                  <xs:enumeration value="SH"/>
                                  <xs:enumeration value="FC"/>
                                  <xs:enumeration value="DF"/>
                                  <xs:enumeration value="WG"/>
                                  <xs:enumeration value="DH"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="NTBL" type="xs:boolean"/>
              </xs:sequence>
              <xs:attribute name="AV_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:simpleType name="SB_ID_TYPE">
              <xs:annotation>
                   <xs:documentation>Reference type</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:maxLength value="10"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="AREA_ABBREV_TYPE">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="AD"/>
                   <xs:enumeration value="BB"/>
                   <xs:enumeration value="BU"/>
                   <xs:enumeration value="BA"/>
                   <xs:enumeration value="CA"/>
                   <xs:enumeration value="GL"/>
                   <xs:enumeration value="GO"/>
                   <xs:enumeration value="MO"/>
                   <xs:enumeration value="MB"/>
                   <xs:enumeration value="RE"/>
                   <xs:enumeration value="KO"/>
                   <xs:enumeration value="VA"/>
                   <xs:enumeration value="ST"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SKY_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts choices of sky observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="CLR"/>
                   <xs:enumeration value="OVC"/>
                   <xs:enumeration value="BKN"/>
                   <xs:enumeration value="SCT"/>
                   <xs:enumeration value="X"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="PRECIP_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts choices of precipation observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="NIL"/>
                   <xs:enumeration value="S-1"/>
                   <xs:enumeration value="S1"/>
                   <xs:enumeration value="S2"/>
                   <xs:enumeration value="S3"/>
                   <xs:enumeration value="S4"/>
                   <xs:enumeration value="RV"/>
                   <xs:enumeration value="RL"/>
                   <xs:enumeration value="RH"/>
                   <xs:enumeration value="RS"/>
                   <xs:enumeration value="G"/>
                   <xs:enumeration value="ZR"/>
                   <xs:enumeration value=""/>
                   <xs:enumeration value="RM"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="WIND_SPEED_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of wind speed observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="C"/>
                   <xs:enumeration value="L"/>
                   <xs:enumeration value="M"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="X"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="TRANSPORT_DIRECTION_TYPE">
              <xs:annotation>
                   <xs:documentation>Enumeration of directions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="N"/>
                   <xs:enumeration value="NE"/>
                   <xs:enumeration value="E"/>
                   <xs:enumeration value="SE"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="SW"/>
                   <xs:enumeration value="W"/>
                   <xs:enumeration value="NW"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="TRANSPORT_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of transport observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Nil"/>
                   <xs:enumeration value="Prv"/>
                   <xs:enumeration value="M"/>
                   <xs:enumeration value="I"/>
                   <xs:enumeration value="U"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SURFACE_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of the surface descriptions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PP"/>
                   <xs:enumeration value="DF"/>
                   <xs:enumeration value="RG"/>
                   <xs:enumeration value="FC"/>
                   <xs:enumeration value="DH"/>
                   <xs:enumeration value="WG"/>
                   <xs:enumeration value="SH"/>
                   <xs:enumeration value="IM"/>
                   <xs:enumeration value="CR"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="WIND_DIRECTION_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts possible observed wind directions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="N"/>
                   <xs:enumeration value="NE"/>
                   <xs:enumeration value="E"/>
                   <xs:enumeration value="SE"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="SW"/>
                   <xs:enumeration value="W"/>
                   <xs:enumeration value="NW"/>
                   <xs:enumeration value="V"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>

    myhrem, I've just come across exactly the same problem after amemding my schema. Fortunatley I hadn't changed much so it was possible to find out what caused the error. It is the empty enumeration element where value is equal to "" that causes xjc to throw the error.
    I don't know if its right or wrong, in my case I was able to remove the empty element from the xsd.

Maybe you are looking for

  • Procedure for deleting a role which is already in Production

    Hi, can any one explain me the procedure for deleting a role which is already in production i want to know procedure for deletion of 1.single role 2.composite role 3.derived role 4.parent role thanks, SSSS

  • How to upload a binary file with Firefox 7

    Don't know if this is the right forum to ask this - if not, please point me in the right direction. I am an embedded developer using Firefox as the user interface to an embedded web server. In the past I've been using file.getAsBinary() to read the l

  • Cannot save query as local object

    Dear community, One of our users is not able to save a query change as a local object (not to be transported).  While another user is able to do this. Since we don't want the query changes to be transported, I must find a way to allow the save as loc

  • Genius

    Hey guys I was curious if anyone knew if there was a way to do a genius search of a song or artist in the iTunes Store....  If not, I think it would be cool, and make more sales on my end!!!            Thanks

  • Performed System Recovery but first Burned my Music onto a DVD

    I am wondering how, now that I have re-installed itunes, to import my music files from the DVD back into Itunes. Can you help? I'd appreciate it...thanks!