Thursday 31 January 2013

Spring AOP and JBossAS 7


I  was testing my old  web application (developed for deployment on tomcat)  on JBossAS 7.
This web application i am talking about was built on J2SE 7.0, Servlet 3, Spring 3.2.0.Release and Hibernate 3.6.

I though it should be cake walk as i was very sure that my application is 100 % portable in terms of JEE Server/ Servlet Container
Bad Luck, I faced problems while deploying and running my web application to JBossAS 7. It wasn't cake walk as i thought.

The biggest problem i faced was, my Spring AOP code stopped working.  I was not even able to deploy the application. It was giving the error "
java.lang.IllegalArgumentException: warning no match for this type name: com.some.other.poc.service.user.UserManager [Xlint:invalidAbsoluteTypeName]
"

I was wondering what this error would mean.  Is dynamic proxy mechanism of Spring AOP not working in JBoss AS 7.
I had burn many hours but no breakthrough.  This was getting nowhere. i thought, i will deploy this sample web application and try to explore more on JEE 6 on JBossAS 7.
I must confess , i am novice for JBoss Application Server. One of my college suggested to add one JBoss Module as dependency in my war. 

It worked.

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <deployment>
        <dependencies>
            <module name="org.jboss.ironjacamar.jdbcadapters" slot="main"></module>
        </dependencies>
    </deployment>
</jboss-deployment-structure>
The explanation of above can be checked here

5 comments: