You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Mark Swanson <ma...@ScheduleWorld.com> on 2004/01/04 19:22:54 UTC

why are the jre/lib/ext jars ignored?

Hello,

Normal code with no classpath set that uses SunJCE.class (found in 
jre/lib/ext/sunjce_provider.jar) works fine, but the same code won't work in 
James unless I copy the sunjce_provider.jar into the SAR-INF/lib directory.

I'm curious as to why James doesn't use jars in the ext directory?

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: why are the jre/lib/ext jars ignored?

Posted by Stephen McConnell <mc...@apache.org>.
Mark Swanson wrote:
> Hello,
> 
> Normal code with no classpath set that uses SunJCE.class (found in 
> jre/lib/ext/sunjce_provider.jar) works fine, but the same code won't work in 
> James unless I copy the sunjce_provider.jar into the SAR-INF/lib directory.
> 
> I'm curious as to why James doesn't use jars in the ext directory?


The reason is that problems can arise related to the JRE extension 
loading.  Irrespective of the extension spec, the JRE will add all jar 
files in the /ext directory into the system classpath.  This can cause 
all sort of trouble if you are running some particular version of a xml 
parse that's not compatible with something bundled in the JRE ext 
directory. The solution in Phoenix is to declare a different ext 
directory u default.  The solution in Merlin is to use the standard ext 
directory but allow the possibility to override this if there is a problem.

Cheers, Steve.


> 
> Thanks.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


-- 
|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: why are the jre/lib/ext jars ignored?

Posted by Carl <mu...@altern.org>.
... so wrong guess :-(

Carl



Brian C. Dilley wrote:

> 	Well, any class that isn't loaded by the avalon classloader (ie:
> java.lang.String) is forwarded up the classloader chain... and
> eventually the system classloader loads it.
> 
> 
> On Sun, 2004-01-04 at 16:56, Carl wrote:
> 
>>I guess because of Avalon classloader, but I'm not qualified enough to 
>>answer. I'm curious to see if I was right ;-)
>>
>>Carl
>>
>>
>>Mark Swanson wrote:
>>
>>
>>>Hello,
>>>
>>>Normal code with no classpath set that uses SunJCE.class (found in 
>>>jre/lib/ext/sunjce_provider.jar) works fine, but the same code won't work in 
>>>James unless I copy the sunjce_provider.jar into the SAR-INF/lib directory.
>>>
>>>I'm curious as to why James doesn't use jars in the ext directory?
>>>
>>>Thanks.
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: why are the jre/lib/ext jars ignored?

Posted by "Brian C. Dilley" <br...@briandilley.com>.
	Well, any class that isn't loaded by the avalon classloader (ie:
java.lang.String) is forwarded up the classloader chain... and
eventually the system classloader loads it.


On Sun, 2004-01-04 at 16:56, Carl wrote:
> I guess because of Avalon classloader, but I'm not qualified enough to 
> answer. I'm curious to see if I was right ;-)
> 
> Carl
> 
> 
> Mark Swanson wrote:
> 
> > Hello,
> > 
> > Normal code with no classpath set that uses SunJCE.class (found in 
> > jre/lib/ext/sunjce_provider.jar) works fine, but the same code won't work in 
> > James unless I copy the sunjce_provider.jar into the SAR-INF/lib directory.
> > 
> > I'm curious as to why James doesn't use jars in the ext directory?
> > 
> > Thanks.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: why are the jre/lib/ext jars ignored?

Posted by Carl <mu...@altern.org>.
I guess because of Avalon classloader, but I'm not qualified enough to 
answer. I'm curious to see if I was right ;-)

Carl


Mark Swanson wrote:

> Hello,
> 
> Normal code with no classpath set that uses SunJCE.class (found in 
> jre/lib/ext/sunjce_provider.jar) works fine, but the same code won't work in 
> James unless I copy the sunjce_provider.jar into the SAR-INF/lib directory.
> 
> I'm curious as to why James doesn't use jars in the ext directory?
> 
> Thanks.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org