cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan.minarovi...@external.t-mobile.at
Subject Antwort: Pb with configuration with CXF and various Spring [Virus checked]
Date Tue, 29 Jul 2008 13:38:02 GMT
did you read reply i sent you?

i told you how to force jboss 4.x to use separete classloaders.

Read something about jboss classloading
http://wiki.jboss.org/wiki/ClassLoadingConfiguration
http://wiki.jboss.org/wiki/JBossClassLoadingUseCases

if you will not use separate classloaders, or you will use classloader 
which uses repository which could contain resources from different spring 
version, you will run into troubles.


Another issue you will experience if you are sharing classloaders will be 
e.g. that during bean factory initialization it'll load also configuration 
from another ear and do initialization of it's beans .. 
or another issue you can have (depends on configuration) is if you have 
the classes in different version in different EARs, always will be used 
once loaded first (it's possible to configure if class from your EAR 
should be loaded first or first it should check if loader repository 
contains already loaded definition - note that this is different from 
loading resources, because when loading resources, it'll return you list 
of resources - which will always contain all possible (from all ears) if 
you don't have separate classloaders).

jano





Maxime Orain <Maxime.Orain@thomsonreuters.com> 
07/29/2008 15:28
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Pb with configuration with CXF and various Spring  [Virus checked]






I found my classloader pb ? It s more a config pb? 
It?s vicious

CXF uses WAR:
-------------
spring-core-2.0.8.jar
spring-beans-2.0.8.jar
spring-context-2.0.8.jar
spring-web-2.0.8.jar


At init Spring loads the namespace handlers:
-------------------------------------------- 
org.springframework.beans.factory.xml.UtilNamespaceHandler
org.springframework.aop.config.AopNamespaceHandler
org.springframework.scripting.config.LangNamespaceHandler
org.springframework.transaction.config.TxNamespaceHandler
org.springframework.ejb.config.JeeNamespaceHandler
org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler


If CXF is alone in the application server:
------------------------------------------
14:44:49,980 DEBUG [DefaultNamespaceHandlerResolver] Ignoring namespace 
handler [org.springframework.scripting.config.LangNamespaceHandler]: 
handler class not found
java.lang.ClassNotFoundException: 
org.springframework.scripting.config.LangNamespaceHandler
        at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)

        It?s a warning : normal.

But If I have another EAR/WAR which uses other spring versions (In my 
---------------------------------------------------------------------
example one ear contains spring-2.5.1.jar) I?ve got this error:
----------------------------------------------------------------

java.lang.IllegalArgumentException: Class 
[org.springframework.scripting.config.LangNamespaceHandler] does not 
implement the NamespaceHandler interface"


                                 There it s an error. It searches the 
class org.springframework.scripting.config.LangNamespaceHandler in the 
classloader and this one is defined in the spring-2.5.1.jar but like it?s 
a different version this one cause an error!

If someone knows how to configure CXF or Spring to avoid this it would be 
very appreciated!

Thanks in advance

Max.



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message