users@jaxb.java.net

Re: NamespaceContext"'s signer information issues when unmarshalling

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 09 Mar 2006 16:43:10 -0800

Is this JAXB1? I suspect so, since if you are using JAXB2, then you must
be running on Tiger, in which case all javax.xml.namespace files are in
rt.jar, so this error shouldn't occur.

Looks like you are missing jax-qname.jar from the classpath, which
contains a signed javax.xml.namespace.QName class. You are probably
picking that up from somewhere else, which isn't signed.

Do the following and check where your classes are loaded from:

URL url1 = classLoader.getResource("javax/xml/namespace/QName.class");
URL url2 =
classLoader.getResource("javax/xml/namespace/NamespaceContext.class");

Our experience with bug 6180120 is that this error happens because you
have those two classes in two different jar files (one signed one
unsigned), and the above code should let you check where those two jars are.

Where to get that ClassLoader depends on where you are running this
code, but if it's in a unit test, try "test.getClass().getClassLoader()"
which gives you the class loader that loaded the test code.

Once you confirm that QName is coming from an unsigned jar, add
jax-qname.jar (which is a part of JWSDP) to your classpath and make
surethe above code returns an URL that points into jax-qname.jar


Magalie.Derhille_at_clearstream.com wrote:
> Hello,
>
> I'm running in this error message, after having googled and searched on
> mailing lists for now 2 days I'm hopeless, so I posted on
> http://forum.java.sun.com/thread.jspa?threadID=270291&messageID=4105342
> but maybe here is a more suitable place to ask for help.
>
> I just want to unmarshall, the generation of the sources and class files
> went fine, just to mention that the xsd using namespaces so I didn't need
> to specify one a generation time.
>
> Caused an ERROR
> [junit] null
> [junit] javax.xml.bind.JAXBException
> [junit] - with linked exception:
> [junit] [javax.xml.bind.JAXBException
> [junit] - with linked exception:
> [junit] [java.lang.SecurityException: class
> "javax.xml.namespace.NamespaceContext"'s signer information does not match
> signer information of other classes in the same package]]
>
> print out from ant debug of the claspath:
> ..\external\Parser\xalan2.jar
> ..\external\Parser\xerces.jar
> ..\external\Parser\jaxp.jar
> ..\Logger.jar
> ..\commonobjectidentifierWleEjb.jar
> C:\bea814\weblogic81\server\lib\ojdbc14.jar
> C:\bea814\weblogic81\server\lib\weblogic.jar
> ..\external\Axis\axis-ant.jar
> ..\external\Axis\axis.jar
> ..\external\Axis\commons-discovery.jar
> ..\external\Axis\commons-logging.jar
> ..\external\Axis\jaxrpc.jar
> ..\external\Axis\log4j-1.2.8.jar
> ..\external\Axis\saaj.jar
> ..\external\Axis\wsdl4j.jar
> ..\securitiesvalidationfeedback.jar
> ..\cashvalidationfeedback.jar
> ..\StargateBase.jar
> ..\stargate-ejb-iws-deployed.jar
> ..\StargateCommon.jar
> ..\external\junit-3.8.1.jar
> ..\external\jmock\jmock-1.0.1.jar
> ..\external\jmock\jmock-cglib-1.0.1.jar
> ..\external\jmock\cglib-full-2.0.2.jar
> ..\unit-test
> ..\jaxb
> ..\external\jwsdp\jaxb\lib\jaxb-xjc.jar
> C:\apache-ant-1.5.3-1\lib\ant.jar
> C:\apache-ant-1.5.3-1\lib\optional.jar
>
> I get the error when getting a context :
> jaxbContext = JAXBContext.newInstance(JAXB_CONTEXT_PATH,
> MyClass.class.getClassLoader());
>
> I've checked the jaxb.properties file is indeed in the folder mapping the
> package given in JAXB_CONTEXT_PATH.
>
> I've searched all the jars for the ones containing the package
> javax.xml.namespace, and the only one to show are:
> - namespace.jar (from JWSDP)
> - jaxb-xjc.jar
>
> Following bug 6180120
> (http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=de561b0a3a0805a7edff361db51a:WuuT?bug_id=6180120)
> recommendation the jaxb-xjc.jar is at the end of the classpath.
>
> Any idea what's wrong ?
> I'm pretty new to jaxb, so I'm not familiar with all the possible
> interactions ...
>
> Regards and thanks for the help
>
> M.D.
>
>
> -----------------------------------------
> To make communications with Clearstream easier, Clearstream has
> recently changed the email address format to conform with industry
> standards. The new format is 'firstname.familyname_at_clearstream.com'.
>
> Visit us at http://www.clearstream.com
>
> IMPORTANT MESSAGE
>
> Internet communications are not secure and therefore Clearstream
> International does not accept legal responsibility for the contents of
> this message.
>
> The information contained in this e-mail is confidential and may be
> legally privileged. It is intended solely for the addressee. If you are
> not the intended recipient, any disclosure, copying, distribution or
> any action taken or omitted to be taken in reliance on it, is
> prohibited and may be unlawful. Any views expressed in this e-mail are
> those of the individual sender, except where the sender specifically
> states them to be the views of Clearstream International or of any of
> its affiliates or subsidiaries.
>
> END OF DISCLAIMER
>


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com