ok this is what i found:
i do all my test on websphere application server 6.1 with the latest fix pack (6.1.0.29)
1) WAS 6.1 use jdk 1.5 and Roo 1.0.2 does not run by default on jdk 1.5
Error creating bean with name 'org.springframework.validation.beanvalidation.Loc alValidatorFactoryBean#0': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
You need to add to pom.xml something like this:
Code:
<profiles>
<profile>
<id>jdk5</id>
<activation>
<jdk>1.7</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1.3</version>
</dependency>
</dependencies>
</profile>
<profiles>
2) WAS 6.1 default classloader does not work with Roo 1.0.2
Error creating bean with name 'transactionManager' defined in file [/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/localhostNode01Cell/ejemplo-roo.ear/ejemplo-roo-0.1.0-SNAPSHOT.war/WEB-INF/classes/META-INF/spring/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in file [/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/localhostNode01Cell/ejemplo-roo.ear/ejemplo-roo-0.1.0-SNAPSHOT.war/WEB-INF/classes/META-INF/spring/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org/aspectj/runtime/reflect/Factory.makeConstructorSig(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String
Lorg/aspectj/lang/reflect/ConstructorSignature;
In
Applications/Enterprise Applications/Your Application/Class loading and update detection/
You need to change:
"Classes loaded with parent class loader first" to "Classes loaded with application class loader first"
and
"Class loader for each WAR file in application" to "Single class loader for application"
3) WAS 6.1 is J2EE 1.4 compliant and Roo 1.0.2 use some Java EE 5 jars
You need to remove:
Code:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet.jsp.jstl</artifactId>
<version>1.2.0</version>
</dependency>
and add 2 new profiles
Code:
<profile>
<id>j2ee14</id>
<dependencies>
<!-- General dependencies for standard applications -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet</artifactId>
<version>2.4.0</version>
<scope>provided</scope>
</dependency>
<!-- ROO dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet.jsp.jstl</artifactId>
<version>1.1.2</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>javaee5</id>
<!-- General dependencies for standard applications -->
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>
<!-- ROO dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet.jsp.jstl</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</profile>
then you can generate your j2ee 1.4 war (WAS 6.1) with:
Code:
mvn -P j2ee14 clean package
or your java ee 5 war with:
Code:
mvn -P javaee5 clean package
4) WAS 6.1 has some problems with filters after fix pack 3
Requested Resource Not Found
Sorry, we did not find the resource you were looking for
You need to add in:
Servers/Application Servers/Your Server/Web Container Settings/Web Container/Custom Properties
a new property
name: com.ibm.ws.webcontainer.invokefilterscompatibility
value: true
and restart your server
5) WAS 6.1 does not like jstl fn:substring in el
Unable to locate the el function substring in the tld with uri http://java.sun.com/jsp/jstl/core
I have no solution for this. If i remove fn:substring from list.jspx
Code:
<c:out value="${fn:substring(client.name, 0, 10)}"/>
to
Code:
<c:out value="${client.name}"/>
everything works ok ... but i dont want to change the files scaffold generate
Your help will be very aprecciated with this last error.
Thanks
Ignacio