> From: webservices_developm...@csx.com
> To: user@ant.apache.org
> Subject: RE: Need help with ANT javac classpath
> Date: Tue, 16 Sep 2014 14:19:47 +0000
> 
> �I think I may not have articulated my problem correctly
MG>for 6 weeks this summer I was answering all questions in spanish.. I thought 
the mis-interpretation was mine!
> 
> I am using WAS 8.5 JDK 1.7 set-up as general build set-up for my ANT, but for 
> this particular application, it uses separate JAXB1.0 jars on JAXB 1.0 
> generated classes. 
MG>i would not drop application specific jars into endorsed
MG>since this is specific to one application dropping jaxb jars to endorsed 
would impact all implementations that use the JVM
MG>potentially causing mis-behaviour side-effect by other applications 
implementing their own JAXB implementation

The web-inf/lib contains jaxb-api.jar, jaxb-impl.jar, jaxb-xjc.jar and 
jaxb-libs.jar and some other jars used by the application.
MG>WEB-INF/lib is where a servlet container will look for all java jars
MG>WEB-INF/classes is where servlet container will look for java classes

MG>decidedly safest (and the most specific) implementation would be to use java 
-Djava.endorsed.dirs=
MG>http://documentation.progress.com/output/Iona/orbix/6.1/migrate/migrate_from_51/rebuilding_corba_java11.html

MG>Martin-
----------------------------------------------------------------------------------
At just over 49 miles long Panama Railway is probably the shortest railway in 
the world
As there was no roads from 1885-1914 Panama Railway carried materials and men 
to vital locations for the new Panama Canal
http://en.wikipedia.org/wiki/Panama_Canal_Railway

> -----Original Message-----
> From: Martin Gainty [mailto:mgai...@hotmail.com] 
> Sent: Monday, September 15, 2014 5:39 PM
> To: Ant Users List
> Subject: RE: Need help with ANT javac classpath
> 
> 
> 
> > From: webservices_developm...@csx.com
> > To: user@ant.apache.org
> > Subject: RE: Need help with ANT javac classpath
> > Date: Mon, 15 Sep 2014 16:06:55 +0000
> > 
> > Thanks.  
> > 
> > This is a common build script that we have, so I didn't add fork for the 
> > javac task - as it would affect other builds as well, that use the latest 
> > java version and follow the default build.
> > 
> > If it is not possible at all to incorporate something in the common build, 
> > I will take a look at separating this one out, but want to avoid it, if I 
> > can.
> > 
> > I had looked at the endorsed directory, but I got the impression that it is 
> > to be used when you want to use a later version, not earlier. Is that not 
> > true?   Also, if I can use it for earlier version, can I use the JAXB jars 
> > from the WEB-INF/lib directory for the path for - 
> > Djava.endorsed.dirs=/relative-path-to/WEB-INF/lib?   Would other jars in 
> > that location cause any issues for endorsed directory? 
> > 
> MG>as stated earlier which JAXB jar is loaded depends on which 
> MG>classloader is in use obviously when your container loads servlets  
> MG>./WEB-INF/lib should take precendence in CLASSPATH Dominiques link to 
> Glassfish has the best solution:
> MG>https://jaxb.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html#Using_JAXB_2_1_or_JAXB_2_2_with_JavaSE_6
>  
> MG>to resolve correct version of JAXB either:
> 
>                                       Place the 2.1/2.2 jaxb-api.jar into 
> $JRE_HOME/lib/endorsed.
>  This essentially makes your JRE to "JRE 6 + JAXB 2.x". This won't affect any 
> other applications
>                                         that use this JRE, and it's easy. On 
> the other hand, in various scenarios you may not be able to alter the JRE.
>                               
>                                       Use the system property 
> java.endorsed.dirs when you launch your application, and have it point to the 
> directory that contains 
>                                         the 2.1/2.2 jaxb-api.jar. This allows 
> you use use JAXB 2.1/2.2 without modifying the JRE. Make sure not to include 
> any other JAXB RI jar files
>                                         (such as jsr173-api.jar or 
> jaxb-impl.jar.)
>                               
>                                       Implement a custom ClassLoader and 
> block delegation to javax.xml.bind package, so that code running inside this 
> class loader will load the JAXB API
>                                         from elsewhere. This is a very 
> advanced approach.
> 
> MG>-Djava.endorsed.dirs= has the least side-effects which says for this 
> MG>execution only java.endorsed.dirs will take precedence HTH
> 
> -----Original Message-----
> > From: Dominique Devienne [mailto:ddevie...@gmail.com]
> > Sent: Monday, September 15, 2014 11:30 AM
> > To: Ant Users List
> > Subject: Re: Need help with ANT javac classpath
> > 
> > On Mon, Sep 15, 2014 at 5:15 PM, WebServices Development < 
> > webservices_developm...@csx.com> wrote:
> > 
> > > P.S - I tried adding includejavaruntime="false"   and
> > > includeantruntime="false" attributes -  both together as well as 
> > > individually - to the javac task - but I still get the error.  The 
> > > error is  -  createBinder() in ObjectFactory cannot override
> > > createBinder() in JAXBContext
> > >
> > 
> > Did you fork="true" too, for <javac>? That way you can have better control 
> > of the environment the JDK javac (implemented in Java) runs with, separate 
> > the from environment Ant itself runs in.
> > 
> > Also look into
> > http://docs.oracle.com/javase/6/docs/technotes/guides/standards/
> > 
> > A quick Google also turned up
> > http://stackoverflow.com/questions/16215409/is-it-possible-to-replace-
> > the-version-of-the-jaxb-implementation-in-java-jre-1-6
> > 
> > --DD
> > 
>   
> 
> 
> This email transmission and any accompanying attachments may contain CSX 
> privileged and confidential information intended only for the use of the 
> intended addressee. Any dissemination, distribution, copying or action taken 
> in reliance on the contents of this email by anyone other than the intended 
> recipient is strictly prohibited. If you have received this email in error 
> please immediately delete it and notify sender at the above CSX email 
> address. Sender and CSX accept no liability for any damage caused directly or 
> indirectly by receipt of this email.
> �Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���âW6W"�V�7V'67&�&T�B�6�R��&pФf�"FF�F����6����G2�R���âW6W"ֆV��B�6�R��&p
                                          

Reply via email to