Re: Re: Re: Re: classloader issue with xercesImpl

"bernard.lupin" <[email protected]> Tue, 15 Feb 2011 15:42:56 +0100 (CET)
Newsgroups gmane.comp.java.objectweb.jonas
Message-ID <9620504.385453.1297780976383.JavaMail.www@wwinf8225>
Thank you very much Guillaume and Florent : The suggested configuration below works well when adding
org.apache.xerces; \
org.apache.xerces.parsers; \
to the org.osgi.framework.system.packages entry in my own felix-config.properties file.

However, this seems to be a non-standard customization, so I suppose that applications should not use Xerces nowadays.
Could you tell me in a few words what I should suggest to the project for their xml config file management in Jonas 5.1 / jdk6?

Regards,
Bernard


> Message du 15/02/11 15:31
> De : "Florent BENOIT"
> A : [email protected]
> Copie à :
> Objet : [jonas] Re: Re: Re: classloader issue with xercesImpl
>
>     Hi,
>
> For JOnAS 5.1.x, first locate the embedded properties file
> In $JONAS_ROOT/lib/bootstrap/felix-launcher.jar, search org/ow2/jonas/launcher/felix/default-config.properties
>
> Then copy this file for example in your JONAS_BASE/conf/felix-config.properties
> Then modify the file by adding org.apache.xerces or other packages
>
> Then run JOnAS with : -Djonas.felix.configuration.file=$JONAS_BASE/conf/felix-config.properties
>
> For JOnAS 5.2.x, this file is configurable in JONAS_BASE/conf/osgi
>
> Regards,
>
> Florent
>
> bernard.lupin wrote: Thank you Guillaume, but it seems that gateway.properties comes with Jonas 5.2 (http://wiki.jonas.ow2.org/xwiki/bin/view/Main/News?nbstart=10). I'm running Jonas 5.1.6...
> 

> In addition, I'm confused with your explanation. The schema available at http://jonas.ow2.org/JONAS_5_1_6/doc/doc-en/html/j2eeprogrammerguide.html#classloader.tools do not speak about lib/endorsed directories. How does this "exported package" functionnality operates with the existing "filtering classloader" option ?
>
> Do you have a work arround for jonas 5.1.x ?
>
> Regards,
> Bernard
>
>
> > Message du 15/02/11 10:10
> > De : "Guillaume Sauthier"
> > A : [email protected]
> > Copie à :
> > Objet : [jonas] Re: classloader issue with xercesImpl
> >
> >
> >
> > Le 14/02/2011 19:05, [email protected] a écrit :
> > > Hi all,
> > > I'm working on a migration from websphere to Jonas 5.1.6+JDK 1.6. For some
> > > reason, this application is doing :
> > > Class parserClass = Class.forName("org.apache.xerces.parsers.DOMParser");
> > >
> > > Runing this code gives me the following exception:
> > > java.lang.ClassNotFoundException: org.apache.xerces.parsers.DOMParser
> > >
> > > I wonder how this is possible, because xercesImpl-2.9.1.jar is in
> > > $JONAS_ROOT/lib/endorsed, so I was expecting that the included DOMParser class
> > > should be available everywhere.
> > >
> >
> > This is no more true with OSGi, there is no global type visibility
> > (endorsed or not)...
> > If you want this type to be visible to applications, you have to change
> > the list of system exported packages (See extra system package property
> > in conf/osgi/gateway.properties).
> >
> > --G
> >
> > > I have this error with java2-delegation-model set to true or false.
> > >
> > > I also tried to include xercesImpl-2.9.1.jar in my WEB-INF/lib war folder. This
> > > solves the previous error, but prevents jonas to compile jsps, giving me this
> > > error :
> > > java.lang.ClassCastException:
> > > org.apache.xerces.parsers.XIncludeAwareParserConfiguration incompatible with
> > > org.apache.xerces.xni.parser.XMLParserConfiguration.
> > >
> > > How should I solve the ClassNotFoundException mentionned ?
> > >
> > > Regards,
> > > Bernard
> > >
> > >
> > >
> > >
> > [ Guillaume_Sauthier.vcf (0.4 Ko) ] 
>
> 
> 

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net