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

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.

  • 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?

  • 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!

  • HELP: where is "com.sun.awt.svg"?

    Hi,
    there is sample code "HelloSVGWorld.java" for SVG generator at
    http://wwws.sun.com/software/xml/developers/svg/java2d-api/
    can anyone kindly tell me where the package com.sun.awt.svg is. Many thanks.

    I did download batik but there are about 20 jar files and anyone knows if "com.sun.awt.svg" is contained in one of these jar files. Thanks a lot.

  • Where is com.sun.xml.tree.XmlDocument ???

    Where can I get this package (com.sun.xml.tree.*) ???
    Where where where can iiiii get ?????????
    Please, where?

    Hey guys,
    I've got the same problem.
    please help me to [email protected]
    Thanks.
    Basically, i am running a program which needs to import "com.sun.xml.tree.XmlDocument", but the system can't find it!!
    I've downloaded J2SE 5.0 already, was thinking JAXP already included, but still not working. Can somebody tell me why please?
    Big thanks again
    ^__^

  • Where is com.sun.estore.cart.ejb found??

    Could someone tell me what i have to download to get the classes in com.sun.estoer.cart.ejb. I thought it is in jsdk2ee.jar but it is not there. WHERE IS THE JAR ?

    It seems you are talking about the very early version of the Java Pet Store sample application that was part of the J2EE Blueprints.
    See http://java.sun.com/j2ee/blueprints/jps10/src for source code.

  • Supplemental/vda-migrate fails: missing com/sun/vda/service/TextCipher

    Hi,
    just tried vda-migrate to upgrade my test installation (single host) from vda_3.0 to the new 3.1 version.
    This fails as seen below (added -verbose:class to the line calling java in vda-migrate:doExport).
    Any idea where class 'com/sun/vda/service/TextCipher' could be found (at least it's not defined in
    any .jar-file in vda_3.{0,1}/Solaris_10+/i386/Packages/SUNWvda*...)
    Kurt
    [Loaded java.security.cert.Certificate from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    [Loaded com.sun.vda.migrate.VdaMigrateExport from file:/var/home/ks/vda_3.1_image/.install/vdamigrate.jar]
    [Loaded java.io.FileNotFoundException from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    [Loaded java.util.Queue from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    [Loaded java.util.Deque from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    [Loaded java.util.AbstractSequentialList from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    [Loaded java.util.LinkedList from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    [Loaded java.util.LinkedList$Entry from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/vda/service/TextCipher
    Caused by: java.lang.ClassNotFoundException: com.sun.vda.service.TextCipher
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    [Loaded java.lang.Shutdown from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    [Loaded java.lang.Shutdown$Lock from /usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar]
    Could not find the main class: com.sun.vda.migrate.VdaMigrateExport. Program will exit.
    Data exported to directory '/tmp/asdf'
    After installing and configuring Sun VDI 3.1 execute '/opt/SUNWvda/sbin/vda-migrate -i /tmp/asdf'
    A log file is available at '/var/adm/log/vda-migrate.2009_09_15_21:47:25.log'.

    Hi,
    The VDI upgrade from 3.0 to 3.1 is not supported in 3.1 Early Access version.
    vda-migrate 3.0-->3.1 will be available only in the 3.1 final release.
    Thanks,
    --Chirag                                                                                                                                                                                                                                                                                                                                                       

  • 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.

  • Where do i find com.sun.xml

    Hi,
    i need to import com.sun.xml package but i get an error message: The import cannot be resolved. Evidently i miss some API. Where do i find it.
    Thanks in advance.

    Hi,
    i need to import com.sun.xml package but i get an
    error message: The import cannot be resolved.
    Evidently i miss some API. Where do i find it.
    Thanks in advance.It's a good thing you can't find it anyways, because it is not a standard class. Nothing from com.sun.* should be directly used - only java.*, javax.* (and other names that come with the JRE), your own packages, and true 3rd-party packages. com.sun.* doesn't fit any of those categories, they're internal classes (I'm pretty sure anyway).

  • URGENT!!!! help me!Where I can get package com.sun.awt.svg.*

    Hello,everybody!
    I want to know Where I can get package com.sun.awt.svg.* ??

    Requirements
    JDK 1.3 Software -
    To use the Graphics2D SVG Generator, you need to have installed the Java 2 Software Developer's Kit (SDK). You can obtain the Java 2 SDK from the Sun Java 2 web site (http://java.sun.com/j2se/).
    The Graphics2D SVG Generator software was tested with version 1.3, so you should use the same version or a newer one.
    DOM Implementation -
    A DOM level 1 implementation is needed to use the Graphics2D SVG Generator. You can obtain a Java language DOM implementation from the following:
    Apache Xerces (http://xml.apache.org/xerces-j/index.html)
    Sun Microsystem's Project X
    (http://developer.java.sun.com/developer/products/xml)
    You also need to put the corresponding jar files in the classpath. The following table shows commands for doing this.
    Operating System DOM Implementation Command
    Windows 98 Xerces set classpath=%classpath%;
    xercesinstalldir\xerces.jar
    Windows 98 Project X set classpath=%classpath%;
    projectxinstalldir\xml.jar
    UNIX Xerces setenv CLASSPATH ${CLASSPATH}:
    xercesInstallDir/xerces.jar
    UNIX Project X setenv CLASSPATH ${CLASSPATH}:
    projectxinstalldir/xml.jar
    SVG Viewer
    To view the generated SVG files, you need to have an SVG viewer. You can find a list of available SVG viewers at the W3C SVG web site (http://www.w3.org/Graphics/SVG/SVG-Implementations).
    top of the page
    Installing the Graphics2D SVG Generator Software
    IMPORTANT:
    Before installing the software, make sure you agree to the license terms.
    To install the software, perform the following steps:
    Step 1: Uncompress the distribution file in the desired installation directory. Use these commands (from the command line):
    > cd installDir
    > jar xf j2d2svg.zip
    The j2d2svg.jar file expands into a directory (j2d2svg) that contains the following:
    README.html (this file) -- Provides important information about installing and using the Graphics2D SVG Generator.
    svggraphic_license.html -- License agreement.
    svggen.jar -- A jar (java archive) file that contains the SVGGraphics2D classes.
    glf.jar -- A jar file that contains the Graphic Layers Framework classes.
    svggenDoc.jar -- A jar file that contains the software's API documentation in HTML.
    HelloSVG.java -- Example file.
    HelloManipulatedSVG.java -- Example file.
    Step 2: Add svggen.jar to the classpath.
    On Windows, use this command:
    - set classpath=%classpath%;<j2d2svginstalldir>\svggen.jar
    On UNIX, use this command:
    - setenv CLASSPATH=${CLASSPATH}:j2d2svginstalldir/svggen.jar
    To use the Graphic Layer Framework conversion utility (i.e., to use the com.sun.awt.svg.util.GlfSVGPrettyPrint), you will also need to add the glf.jar file to your classpath. However, this is not required to run the examples.

  • Where can i find package com.sun.awt.svg.*??

    where can i find package com.sun.awt.svg.*??
    urgent!!! please help me!
    thanks in advance!!!

    Perhaps you might find some useful information here;-
    http://forum.java.sun.com/thread.jsp?forum=54&thread=427144&tstart=15&trange=15
    (pillock)

  • Where I can get package com.sun.awt.svg.*

    Hi:
    Anyone know Where I can get package com.sun.awt.svg.* ??
    My Email is :[email protected]
    thank you !

    I do not know,
    but if you need to deal with SVG take a look at Batik at xml.apache.org,
    http://xml.apache.org/batik/index.html

  • Dumb newbie question - where do I download com.sun.web.me.*?

    Hi,
    I am new to j2me programming & have just started developing apps for mobile phones. So far so good, I have Netbeans 5.5.1 with the mobility pack and have created a couple of Midlets already. To braoden my knowledge, I have downloaded a coupe of samples from https://meapplicationdevelopers.dev.java.net/ but when I try and build them, I get errors regarding the import of classes com.sun.me.web.*
    Where/how can I download & install these libraries for use in Netbeans 5.5.1?
    Many thanks
    Chris

    Thanks for the response,
    I have serached my computer for anything that looks like it might contain the required libraries, but top no avail
    My code has the following lines which the compiler objects to:
    import com.sun.me.web.path.Result;
    import com.sun.me.web.path.ResultException;
    import com.sun.me.web.request.Arg;
    import com.sun.me.web.request.ProgressInputStream;
    import com.sun.me.web.request.ProgressListener;
    import com.sun.me.web.request.Request;
    import com.sun.me.web.request.RequestListener;
    import com.sun.me.web.request.Response;
    so any help on where I might find them would be appreciated

  • Where is the source for com.sun.media.rtp?

    Is the source for com.sun.media.rtp available for download?
    I downloaded the JMF source code, but, it's not there. I have downloaded the source for J2SE and it's not there.
    Where is it?
    Greg Silverman
    NGC
    San Jose, CA

    Hi,
    This forum is exclusively for discussions related to Sun Java Studio Creator. Please post your question in the appropriate forum.
    Thanks,
    RK.

Maybe you are looking for

  • How to place digital photos onto a colored background?

    I have old photographs that I shot with my DSLR to digitize them.  I would like to combine two differently-sized photos onto a colored background to create one image.  I am brand-new to PS and LR (and very excited to finally have them!) and could use

  • 10.4.11 Security update and bank of America

    I installed the update last night. I attempted to access my Bank of America credit card account today. When I try sign in at the "enter online ID" step, I get a page the says: "Bad request, your browser sent a query that this server could not underst

  • About the system wide wifi proxy setting

    I'm currently using BlackBerry Q10, and I love it, just for you know, I turn from iPhone5 to it. As I'm using it mostly inside China, the network connecttion is so bad, I need use proxy for accessing Google or Twitter service, so the wifi's proxy is

  • All of a sudden, I can't print .html documents on Firefox (I can on IE.) What happened?

    As of yesterday, I cannot print an .html document while on Firefox. I print a lot of recipes from different sites and also was trying to print a credit card bill. I went to Internet Explorer and can print just fine there. What is going on?

  • ITunes won't convert .wma

    For as long as I can remember, my iTunes will not accept .wma files (they are not digitally copy protected) into the Library to convert. Perhaps one of my setting is wrong in Preferences, but does anyone have any help? I cannot even drag the files in