users@jaxb.java.net

RE: JAXB dependent on xercesImpl.jar? - without it get missing resource: org.apache.xerces.impl.xpath.regex.message, locale en_GB

From: Perry, Steve <Steve.Perry_at_fnf.com>
Date: Tue, 22 Jun 2004 10:22:58 -0500

You may not have JAXP installed correctly. Here is the information from
the JWSDP installation:
 
For standalone Java(TM) applications to work with the Java(TM) Web
Services Developer Pack, the JAXP classes built into JDK 1.4.x must be
overridden. Overriding these classes is not necessary in order to run
the bundled tomcat or the samples, since the provided scripts set
"java.endorsed.dirs".
 
For JDK 1.4.x users, set the java.endorsed.dirs system property to:
 
  C:\jwsdp-1.3\jaxp\lib\endorsed
 
Alternatively, create the directory:
 
 <JAVA_HOME>\jre\lib\endorsed
 
and then copy the files in the following directory to the newly created
directory:
 
 C:\jwsdp-1.3\jaxp\lib\endorsed
 
--steve

        -----Original Message-----
        From: Andrew Ferguson [mailto:Andrew.Ferguson_at_arm.com]
        Sent: Tuesday, June 22, 2004 6:01 AM
        To: users_at_jaxb.dev.java.net
        Subject: JAXB dependent on xercesImpl.jar? - without it get
missing resource: org.apache.xerces.impl.xpath.regex.message, locale
en_GB
        
        

        hi,

         In my app. everything works fine except for validation (via
Unmarshaller.setValidating) - at which point the following exception is
thrown:

        java.io.IOException: XML cache initialisation exception: unable
to extract the schema information
                at
com.arm.project.wh.jaxb.JAXBRootCache.<init>(JAXBRootCache.java:39)
                at
com.arm.project.wh.jaxb.JAXBOperations.<init>(JAXBOperations.java:21)
                at
com.arm.project.wh.jaxb.JAXBFactory.createOperations(JAXBFactory.java:18
)
                at
com.arm.project.wh.DefaultWarehouse.<init>(DefaultWarehouse.java:27)
                at
com.arm.project.wh.DefaultWarehouse.<init>(DefaultWarehouse.java:43)
                at
com.arm.project.wh.DefaultFactory.createWarehouse(DefaultFactory.java:69
)
                at
com.arm.project.wh.DefaultFactory.createWarehouse(DefaultFactory.java:43
)
                at
com.arm.project.ui.WarehouseTools.handleCommandLine(WarehouseTools.java:
89)
                at
com.arm.project.ui.WarehouseTools.entry(WarehouseTools.java:34)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at com.arm.project.ui.Launcher.main(Launcher.java:50)
        Caused by: javax.xml.bind.JAXBException: unable to extract the
schema information
         - with linked exception:
        [java.lang.RuntimeException: Installation Problem??? Couldn't
load messages: Can't find bundle for base name org.
        apache.xerces.impl.xpath.regex.message, locale en_GB]
                at
com.arm.project.wh.jaxb.wxml.impl.runtime.GrammarInfoImpl.getGrammar(Gra
mmarInfoImpl.java:161)
                at
com.arm.project.wh.jaxb.wxml.impl.runtime.DefaultJAXBContextImpl.getGram
mar(DefaultJAXBContextImpl.ja
        va:90)
                at
com.arm.project.wh.jaxb.wxml.impl.runtime.UnmarshallerImpl.setValidating
(UnmarshallerImpl.java:71)
                at
com.arm.project.wh.jaxb.JAXBRootCache.<init>(JAXBRootCache.java:33)
                ... 13 more

        where I think the interesting bit is:

        [java.lang.RuntimeException: Installation Problem??? Couldn't
load messages:
                Can't find bundle for base name
org.apache.xerces.impl.xpath.regex.message, locale en_GB]

        I've located this resource in the xercesImpl.jar which is
distributed as part of SAX and was wondering if JAXB was meant to have
this dependency on xerces?

        the redistributables link
http://java.sun.com/webservices/docs/1.3/ReleaseNotes.html#Redistributab
leComponents
<http://java.sun.com/webservices/docs/1.3/ReleaseNotes.html#Redistributa
bleComponents> doesn't include xercesImpl.jar as a dependency

        also xsdlib.jar seems to contain a resource

                com/sun/msv/datatype/xsd/regex/message.properties

        which is a superset of the properties in xercesImpl.jar?

        thanks,
        Andrew
        ps. my application loads the JAXB redistributable jars into the
runtime via a URLClassLoader but I don't think this is a factor here?
(putting xercesImpl.jar in the directory which the URLClassLoader loads
the contents of solves the problem)