I was wondering if anyone can help me out with the following issue:
I'm migrating an application from Jboss 4.2 to 5.1 EAP. The application was built with EJB 2 and Spring 1.2. I've found some similar problems and tried all the possible alternative solutions without any luck.
My project has the following structure:
+ <package-structure> // classes go here.
When deploying, I get this error message:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '<class-name>' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [<package-name>.<class-name>Delegate]: Constructor threw exception; nested exception is javax.ejb.EJBException: Could not instantiate bean.
The weird thing here is that when deploying 1st. myApp.jar, 2nd myApp-spring.spring (getting the file out of the JAR) and 3rd myApp.war... putting these files (one by one) in <JBOSS_HOME>/jboss-as/server/<my-instance>/deploy, it works. But, putting the entire EAR project or the other 3 artifacts (one by one) in any other order then the specified, jboss server gives me the error pointed out above.
This is my myApp-spring.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!-- ============== DataSource ============== -->
<bean id="juiciosDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<!-- ============== DAO Layer (Persistence) ============== -->
Any help will be appreciated!!!!!