A clean build on a new checkout of trunk fails to compile in "step2" with JDK
6:

  mvn -Dmaven.test.skip=true -Pstep2 install

Installing the JAXB 2.1 binaries in the "endorsed" directory causes
compilations errors, as noted in the thread. See details below.

-Jan


Details:

At revision 607497.
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
Maven version: 2.0.8
Java version: 1.6.0_03
OS name: "linux" version: "2.6.22.13-0.3-default" arch: "i386" Family:
"unix"


[INFO] ...done.
[INFO] [cxf-codegen:wsdl2java {execution: generate-test-sources}]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] JAXB 2.0 API is being loaded from the bootstrap classloader, but this
RI (from
jar:file:/home/jan/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.4/jaxb-impl-2.1.4.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class)
needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in
the bootstrap classloader. (See
http://java.sun.com/j2se/1.5.0/docs/guide/standards/)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: JAXB 2.0 API is
being loaded from the bootstrap classloader, but this RI (from
jar:file:/home/jan/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.4/jaxb-impl-2.1.4.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class)
needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in
the bootstrap classloader. (See
http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: JAXB 2.0 API is
being loaded from the bootstrap classloader, but this RI (from
jar:file:/home/jan/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.4/jaxb-impl-2.1.4.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class)
needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in
the bootstrap classloader. (See
http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
        at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:263)
        at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:161)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more
Caused by: java.lang.LinkageError: JAXB 2.0 API is being loaded from the
bootstrap classloader, but this RI (from
jar:file:/home/jan/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.4/jaxb-impl-2.1.4.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class)
needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in
the bootstrap classloader. (See
http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
        at
com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:172)
        at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
        at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188)
        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 javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
        at 
org.apache.cxf.tools.wsdlto.core.PluginLoader.init(PluginLoader.java:83)
        at
org.apache.cxf.tools.wsdlto.core.PluginLoader.<init>(PluginLoader.java:73)
        at
org.apache.cxf.tools.wsdlto.core.PluginLoader.getInstance(PluginLoader.java:122)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.<init>(WSDLToJava.java:44)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:168)
        at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:250)
        ... 19 more





dkulp wrote:
> 
> 
> JAXB 2.1 should be OK.   JAX-WS 2.1, no.   (for CXF 2.0.x)
> 
> Dan
> 
> 
> On Wednesday 19 December 2007, Guillaume Nodet wrote:
>> Another question: is jaxb 2.1 backward compatible with 2.0 ?
>> Can we just use 2.1 and expect cxf 2.0.4 to work.
>>
>> On Dec 19, 2007 9:12 AM, Freeman Fang <[EMAIL PROTECTED]> wrote:
>> > Yes, that's same problem with two sides effect, any jaxws version
>> > shipped with jdk6 may bring us troubles, it depend on which jaxws
>> > version we want to use, and endorse is not a graceful way to solve
>> > this problem
>> >
>> > Seems Sun realize this problem and in the next opensource jdk7, they
>> > leave the option for user, user can select which module is in the
>> > jdk, [1] for more introduction.
>> > [1]http://download.java.net/jdk7/docs/build/README-JRL.html
>> >
>> > Best Regards
>> >
>> > Freeman
>> >
>> > Guillaume Nodet wrote:
>> > > I suppose that if JDK 6 ships with jaxb 2.1, we will have problems
>> > > when compiling ServiceMix 3.2 on JDK 6 then :-(
>> > > Anyway, thx for the infos.
>> > >
>> > > On Dec 19, 2007 8:45 AM, Freeman Fang <[EMAIL PROTECTED]> 
> wrote:
>> > >> Hi Guillaume,
>> > >>
>> > >> The main problem is that jdk 6 update3( the latest official
>> > >> release) shipped with jaxws 2.0 and jaxb 2.0,  which is conflict
>> > >> with cxf 2.1 (where jaxws 2.1 and jaxb 2.1 needed). As Chris
>> > >> point out, we may use endorse way to get it work around.
>> > >> Another solution is that next version of jdk6 is going to shipped
>> > >> with jaxws 2.1 and jaxb2.1, [1] can download the ea version of
>> > >> jdk6 shipped with jaxws2.1 and jaxb2.1, so use that version,
>> > >> everything should be
>> >
>> > fine
>> >
>> > >> [1]http://download.java.net/jdk6/binaries/
>> > >>
>> > >> Best Regards
>> > >>
>> > >> Freeman
>> > >>
>> > >> Chris Custine wrote:
>> > >>> Apparently you can, but the only workaround I have been able to
>> > >>> find
>> >
>> > is
>> >
>> > >> to
>> > >>
>> > >>> download and install the JAXB 2.1 API and RI jars in the
>> > >>> lib/endorsed
>> > >>
>> > >> dirs
>> > >>
>> > >>> as mentioned here:
>> >
>> > http://weblogs.java.net/blog/kohsuke/archive/2006/12/jaxb_21_release
>> >.html
>> >
>> > >>> There is a mention of a fix implemented in JAXB recently in
>> > >>> these two
>> > >>
>> > >> blog
>> > >>
>> > >>> entries (not sure which JAXB release), but based on the
>> > >>> classloader
>> > >>
>> > >> trick he
>> > >>
>> > >>> apparently uses I think this will break in OSGi.
>> >
>> > http://weblogs.java.net/blog/kohsuke/archive/2007/02/running_jaxbws.
>> >html
>> >
>> >
>> >
>> > http://weblogs.java.net/blog/kohsuke/archive/2007/02/howitworks_runn
>> >.html
>> >
>> > >>> Thanks,
>> > >>> Chris
>> > >>>
>> > >>> On Dec 19, 2007 12:07 AM, Guillaume Nodet <[EMAIL PROTECTED]> 
> wrote:
>> > >>>> Does this mean we can't compile trunk on JDK 1.6 ?
>> > >>>>
>> > >>>> On Dec 19, 2007 3:19 AM, Freeman Fang <[EMAIL PROTECTED]> 
> wrote:
>> > >>>>> Hi Chris,
>> > >>>>> To fix SM-1168, we need a fix in cxf, both cxf 2.0.4 snapshot
>> > >>>>> and
>> >
>> > cxf
>> >
>> > >>>>> 2.1 snapshot include this fix
>> > >>>>> For servicemix  3.2.2 snapshot, we use cxf 2.0.4 snapshot,
>> > >>>>> which is still based on jaxws2.0 and jaxb 2.0, so you have no
>> > >>>>> jdk1.6 issue.
>> >
>> > And
>> >
>> > >>>>> for servicemix 3.2.x release we can get a stable cxf 2.0.4
>> > >>>>> version
>> > >>
>> > >> which
>> > >>
>> > >>>>> is not changed so much but have update we need.
>> > >>>>>
>> > >>>>> But for servicemix 3.3 snapshot, I think we should support
>> >
>> > jaxws2.1and
>> >
>> > >>>>> jaxb 2.1 for long term run, so I introduce cxf 2.1 snapshot
>> > >>>>> here.
>> > >>>>>
>> > >>>>> Thanks for your patch and I will apply it soon
>> > >>>>>
>> > >>>>> Best Regards
>> > >>>>>
>> > >>>>> Freeman
>> > >>>>>
>> > >>>>> Chris Custine wrote:
>> > >>>>>> Following up, I just realized that you did apply this to 3.2
>> > >>>>>> and it
>> > >>>>
>> > >>>> did
>> > >>>>
>> > >>>>> not
>> > >>>>>
>> > >>>>>> require CXF 2.1 from the looks of it.
>> > >>>>>>
>> > >>>>>> I found the cause for the compile failure in trunk and
>> > >>>>>> created a
>> >
>> > Jira
>> >
>> > >>>>> with
>> > >>>>>
>> > >>>>>> the fix here:
>> > >>>>>> https://issues.apache.org/activemq/browse/SM-1181
>> > >>>>>>
>> > >>>>>> Thanks,
>> > >>>>>> Chris
>> > >>>>>>
>> > >>>>>> On Dec 18, 2007 4:56 PM, Chris Custine <[EMAIL PROTECTED]> 
> wrote:
>> > >>>>>>> I noticed that Freeman's fix for SM-1168<
>> > >>>>>
>> > >>>>> https://issues.apache.org/activemq/browse/SM-1168>included an
>> >
>> > upgrade
>> >
>> > >> to
>> > >>
>> > >>>>> CXF
>> > >>>>>
>> > >>>>>>> 2.1 SNAPSHOT and I was wondering if that was intentional and
>> > >>>>>>> part
>> >
>> > of
>> >
>> > >>>>> the
>> > >>>>>
>> > >>>>>>> fix for the issue, or if it was not related to SM-1168?  CXF
>> > >>>>>
>> > >>>>> 2.1apparently has a dependency on JAXB
>> > >>>>>
>> > >>>>>>> 2.1 which I am pretty sure is going to cause problems if
>> > >>>>>>> compiling
>> > >>>>>
>> > >>>>> under
>> > >>>>>
>> > >>>>>>> JDK 1.6 since 1.6 already includes JAXB 2.0 (there are
>> >
>> > workarounds,
>> >
>> > >>>> but
>> > >>>>
>> > >>>>>>> they require manual installation of endorsed JAXB 2.1 jars).
>> > >>>>>>>
>> > >>>>>>> In addition, downgrading to JDK 1.5 to build seems to have
>> > >>>>>>> some
>> > >>>>
>> > >>>> issues
>> > >>>>
>> > >>>>>>> while building wsdl-first-jsr181-su (and maybe others)
>> > >>>>>>> because
>> >
>> > some
>> >
>> > >>>> of
>> > >>>>
>> > >>>>> the
>> > >>>>>
>> > >>>>>>> xfire tooling has specified JAXB 2.0 API and the build fails
>> > >>>>>>> at
>> >
>> > that
>> >
>> > >>>>>>> point.
>> > >>>>>>>
>> > >>>>>>> I was hoping Freeman can give a little info on the move to
>> > >>>>>>> CXF
>> > >>>>>
>> > >>>>> 2.1snapshot and if there is any way way we can implement this
>> > >>>>> fix
>> >
>> > for
>> >
>> > >>>>> SM-1168
>> > >>>>>
>> > >>>>>>> without it since we probably need to fix this issue for 3.2
>> > >>>>>>> as
>> >
>> > well
>> >
>> > >>>> and
>> > >>>>
>> > >>>>> I
>> > >>>>>
>> > >>>>>>> think upgrading to CXF 2.1 might be too much for a bug fix
>> > >>>>>>> branch.
>> > >>>>>>>
>> > >>>>>>> Thanks,
>> > >>>>>>> Chris
>> > >>>>
>> > >>>> --
>> > >>>> Cheers,
>> > >>>> Guillaume Nodet
>> > >>>> ------------------------
>> > >>>> Blog: http://gnodet.blogspot.com/
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer, IONA
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CXF-version-in-SMX-trunk-tp14408457s12049p14543379.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Reply via email to