-
1. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
sfcoy May 30, 2013 7:30 AM (in response to georgesg)What is a typical value of ${mobilematrix.home} and how is that value being initialised?
-
2. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
georgesg May 30, 2013 10:37 PM (in response to sfcoy)The value is set in the standalone.sh as a jvm parameter (-D). Attached is the script.
-
3. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
georgesg May 30, 2013 10:50 PM (in response to georgesg)Even i tried setting the property as below in the standalone-full.xml. But still got the same injection NullPointerException. This was working fine in jboss4.3
<system-properties> <property name="mobilematrix.home" value="/export/home/provider/u01/app/mmtxprv_mmx11_dev"/> </system-properties> -
4. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
sfcoy May 30, 2013 10:53 PM (in response to georgesg)So, ${mobilematrix.home} resolves to
{code:bash}/export/home/provider/u01/app/mmtxprv_mmx11_dev{code}
According to Composing XML-based configuration metadata, this will be looked up as a classpath resource relative to cxf-servlet.xml.
I think it will work correctly if you change
{code:bash}export HOME=/export/home/provider{code}
to
{code:bash}export HOME="file:///export/home/provider"{code}
You may choose to add the "file://" URL indicator anywhere in your evaluation path to mobilematrix.home.
-
5. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
sfcoy May 30, 2013 10:59 PM (in response to georgesg)Earlier versions of JBoss had a quite generous notion of what was considered to be part of the classpath. This was sometimes a blessing and sometimes a pain, but it was certainly not spec compliant.
-
6. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
georgesg May 30, 2013 11:57 PM (in response to sfcoy)I changed the import as below and retried testing.
<import resource="file://${mobilematrix.home}/config/motap_handler/WSMOTAPSHandler.xml"/>
But still the spring injection not working
So, i suspect whether ${mobilematrix.home} is getting resolved correctly in the first place. I will hardcode the location and try to do one round of testing to confirm this
-
7. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
sfcoy May 31, 2013 12:12 AM (in response to georgesg)1 of 1 people found this helpfulOK.
The fact that you have no deployment errors suggests that cxf-servlet.xml is not being picked up by Spring.
Are you using the JBoss provided Apache CXF implementation? Please check out Apache CXF integration, in particular the Spring references near the bottom.
-
8. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
georgesg May 31, 2013 2:01 AM (in response to sfcoy)No. We don't use Jboss provided Apached CXF. We are using CXF 2.3.9 which is packaged as a part of war/ear deployments.
Though there are no deployment exceptions. I do noticed the below warning message which is related to cxf and spring.
14:05:20,401 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,402 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,402 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,403 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,403 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,403 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,406 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,406 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,417 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
14:05:20,407 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
-
9. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
sfcoy May 31, 2013 2:54 AM (in response to georgesg)I recommend that you migrate to the JBoss provided implementation. Replacing the AS provided web service implementation is not trivial.
-
10. Re: Jboss4.3 to Jboss eap 6.1.0.alpha migration - Spring Setter injection from an external file not working
georgesg May 31, 2013 3:24 AM (in response to sfcoy)I followed the recommendation asper the below thread.
https://community.jboss.org/thread/221654
This resolved the cxf issues. Am not sure how robust this solution is. But it is quite clear that it is the Jboss AS CXF which is not allowing the cxf 2.3.9 in the application deployment from not pickingup the cxf-servlet.xml.