Re: Re: Re: classloader issue with xercesImpl

Florent BENOIT <[email protected]> Tue, 15 Feb 2011 11:39:45 +0100
Newsgroups gmane.comp.java.objectweb.jonas
Message-ID <[email protected]>
    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) ]
>
>
>
> Pieddemail 
> <https://compte.laposte.net/inscription/index.do?jeux=2011FOOTER_generique>