You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Wolf, Chris (IT)" <Ch...@morganstanley.com> on 2008/06/23 20:37:55 UTC

Re: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

Just switched up to CXF-2.1.1 from 2.0.  I see that JAXB in now
available 
in JDK-1.6.0_04, so I remove external JAXB jars, however, I then get
two problems:

1.) wsdl2java won't run.  To fix this, I need to put back the external
JAXB jar, "jaxb-xjc.jar",
    however, I can still leave out jaxb-api.jar and jaxb-impl.jar and
let the JRE classes
    satisfy those dependencies.

2.) ...but, then I get the error: "javax.xml.bind.annotation.XmlSeeAlso
cannot be resolved"
    even though it appears to be in the runtime:
    /opt/1.6.0_04/jre/lib> unzip -t rt.jar | grep XmlSeeAlso
    testing: javax/xml/bind/annotation/XmlSeeAlso.class   OK

What do I do?  Ignore the JRE JAXB impl and put back all the external
JAXB jars?

Thanks,

Chris Wolf
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

RE: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

Posted by "Wolf, Chris (IT)" <Ch...@morganstanley.com>.
The missing XmlSeeAlso was due to my mistake - I actually had 1.6.0_02
configured
rather then 1.6.0_04, sorry about that.

As you suggest Dan, I still needed to put the JAXB-2.1.6 jars back in.

I found without them, I was getting
com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper
not found.

So the summary is: even though 1.6.0_04 has a JAXB impl, it does not
have the code compiler,
so I needed jaxb-xjc.jar for wsdl2java, in addition, even for runtime,
because of the missing
"NamespacePrefixMapper" (and maybe other problems) I still need the
separate jaxb-impl.jar from 
jaxb-2.1.6 or higher.

Thanks,


    -Chris W.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Monday, June 23, 2008 3:14 PM
To: users@cxf.apache.org
Subject: Re: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen


Glen,

JDK 1.6.0_04 now include JAXB 2.1.3 instead of the 2.0 versions used  
in the older versions of the JDK.   Thus, it shouldn't be necessary,  
even for Metro.

That said, we ship 2.1.6 (and I just noticed 2.1.7 is out) which  
includes some performances fixes that you may want anyway.   Thus, I'd  
recommend keeping the jars we ship (or update to 2.1.7).   Also, I  
think for soap with attachments to properly work, we require the "real"
jar and  not the version in the JDK as we have to make a direct call on
an internal class and I don't think that works with the versions in the
JDK as they renamed the packages in that version.

I have no idea why the XmlSeeAlso annotation wasn't found unless you  
have a 2.0 jar in the endorsed dir or something.   That is very strange.

Dan



On Jun 23, 2008, at 3:01 PM, Glen Mazza wrote:

>
> I think so, but this might be more of a Dan Kulp question.  As best I 
> know, if you use Metro, they want you to put the 2.1 JAXB jars in the 
> endorsed directory of the SDK because the default JAXB in the JRE is 
> 2.0, and Metro can't work with those.  It *may* be the same story with

> CXF, i.e., JAXB 2.1 is needed.
>
> HTH,
> Glen
>
>
> Wolf, Chris (IT) wrote:
>>
>> Just switched up to CXF-2.1.1 from 2.0.  I see that JAXB in now 
>> available in JDK-1.6.0_04, so I remove external JAXB jars, however, I

>> then get two problems:
>>
>> 1.) wsdl2java won't run.  To fix this, I need to put back the 
>> external JAXB jar, "jaxb-xjc.jar",
>>    however, I can still leave out jaxb-api.jar and jaxb-impl.jar and 
>> let the JRE classes
>>    satisfy those dependencies.
>>
>> 2.) ...but, then I get the error:  
>> "javax.xml.bind.annotation.XmlSeeAlso
>> cannot be resolved"
>>    even though it appears to be in the runtime:
>>    /opt/1.6.0_04/jre/lib> unzip -t rt.jar | grep XmlSeeAlso
>>    testing: javax/xml/bind/annotation/XmlSeeAlso.class   OK
>>
>> What do I do?  Ignore the JRE JAXB impl and put back all the external

>> JAXB jars?
>>
>> Thanks,
>>
>> Chris Wolf
>> --------------------------------------------------------
>>
>> NOTICE: If received in error, please destroy and notify sender.  
>> Sender
>> does not intend to waive confidentiality or privilege. Use of this 
>> email is prohibited when received in error.
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Re%3A-CXF-2.1.1%2C-JAXB%2C-JRE-1.6.0_04-and-code
> gen-tp18075503p18075987.html Sent from the cxf-user mailing list 
> archive at Nabble.com.
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

Re: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

Posted by Daniel Kulp <dk...@apache.org>.
Glen,

JDK 1.6.0_04 now include JAXB 2.1.3 instead of the 2.0 versions used  
in the older versions of the JDK.   Thus, it shouldn't be necessary,  
even for Metro.

That said, we ship 2.1.6 (and I just noticed 2.1.7 is out) which  
includes some performances fixes that you may want anyway.   Thus, I'd  
recommend keeping the jars we ship (or update to 2.1.7).   Also, I  
think for soap with attachments to properly work, we require the  
"real" jar and  not the version in the JDK as we have to make a direct  
call on an internal class and I don't think that works with the  
versions in the JDK as they renamed the packages in that version.

I have no idea why the XmlSeeAlso annotation wasn't found unless you  
have a 2.0 jar in the endorsed dir or something.   That is very strange.

Dan



On Jun 23, 2008, at 3:01 PM, Glen Mazza wrote:

>
> I think so, but this might be more of a Dan Kulp question.  As best  
> I know,
> if you use Metro, they want you to put the 2.1 JAXB jars in the  
> endorsed
> directory of the SDK because the default JAXB in the JRE is 2.0, and  
> Metro
> can't work with those.  It *may* be the same story with CXF, i.e.,  
> JAXB 2.1
> is needed.
>
> HTH,
> Glen
>
>
> Wolf, Chris (IT) wrote:
>>
>> Just switched up to CXF-2.1.1 from 2.0.  I see that JAXB in now
>> available
>> in JDK-1.6.0_04, so I remove external JAXB jars, however, I then get
>> two problems:
>>
>> 1.) wsdl2java won't run.  To fix this, I need to put back the  
>> external
>> JAXB jar, "jaxb-xjc.jar",
>>    however, I can still leave out jaxb-api.jar and jaxb-impl.jar and
>> let the JRE classes
>>    satisfy those dependencies.
>>
>> 2.) ...but, then I get the error:  
>> "javax.xml.bind.annotation.XmlSeeAlso
>> cannot be resolved"
>>    even though it appears to be in the runtime:
>>    /opt/1.6.0_04/jre/lib> unzip -t rt.jar | grep XmlSeeAlso
>>    testing: javax/xml/bind/annotation/XmlSeeAlso.class   OK
>>
>> What do I do?  Ignore the JRE JAXB impl and put back all the external
>> JAXB jars?
>>
>> Thanks,
>>
>> Chris Wolf
>> --------------------------------------------------------
>>
>> NOTICE: If received in error, please destroy and notify sender.  
>> Sender
>> does not intend to waive confidentiality or privilege. Use of this  
>> email
>> is prohibited when received in error.
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Re%3A-CXF-2.1.1%2C-JAXB%2C-JRE-1.6.0_04-and-codegen-tp18075503p18075987.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Re: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

Posted by Glen Mazza <gl...@gmail.com>.
I think so, but this might be more of a Dan Kulp question.  As best I know,
if you use Metro, they want you to put the 2.1 JAXB jars in the endorsed
directory of the SDK because the default JAXB in the JRE is 2.0, and Metro
can't work with those.  It *may* be the same story with CXF, i.e., JAXB 2.1
is needed.

HTH,
Glen


Wolf, Chris (IT) wrote:
> 
> Just switched up to CXF-2.1.1 from 2.0.  I see that JAXB in now
> available 
> in JDK-1.6.0_04, so I remove external JAXB jars, however, I then get
> two problems:
> 
> 1.) wsdl2java won't run.  To fix this, I need to put back the external
> JAXB jar, "jaxb-xjc.jar",
>     however, I can still leave out jaxb-api.jar and jaxb-impl.jar and
> let the JRE classes
>     satisfy those dependencies.
> 
> 2.) ...but, then I get the error: "javax.xml.bind.annotation.XmlSeeAlso
> cannot be resolved"
>     even though it appears to be in the runtime:
>     /opt/1.6.0_04/jre/lib> unzip -t rt.jar | grep XmlSeeAlso
>     testing: javax/xml/bind/annotation/XmlSeeAlso.class   OK
> 
> What do I do?  Ignore the JRE JAXB impl and put back all the external
> JAXB jars?
> 
> Thanks,
> 
> Chris Wolf
> --------------------------------------------------------
> 
> NOTICE: If received in error, please destroy and notify sender. Sender
> does not intend to waive confidentiality or privilege. Use of this email
> is prohibited when received in error.
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-CXF-2.1.1%2C-JAXB%2C-JRE-1.6.0_04-and-codegen-tp18075503p18075987.html
Sent from the cxf-user mailing list archive at Nabble.com.