Re: Re: Re: classloader issue with xercesImpl
Guillaume Sauthier <[email protected]> Tue, 15 Feb 2011 13:15:52 +0100
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Organization | Objectweb Consortium |
| Message-ID | <[email protected]> |
Le 15/02/2011 10:36, bernard.lupin a écrit : > > 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... > Oops my bad Florent gaves you in a reply the way to go ... > > 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 ? Filtering ClassLoader is only a way to reduce type visibility. In your case, you want to expose other package(s) from the system (lib/endorsed libs are provided by the system classloader). --G > > 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>
Guillaume_Sauthier.vcf
(text/x-vcard, 398 B)
begin:vcard fn:Guillaume Sauthier n:Sauthier;Guillaume org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a> adr:;;;;;;France email;internet:[email protected] title:<a href="http://jonas.ow2.org">JOnAS Application Server</a> url:http://jonas.ow2.org version:2.1 end:vcard