Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Roo 1.0.2 + Websphere 6.1

  1. #1
    Join Date
    Aug 2004
    Location
    San Jose - Costa Rica
    Posts
    42

    Default Roo 1.0.2 + Websphere 6.1

    Im trying to deploy a Roo 1.0.2 aplication to websphere 6.1 but i get this error:

    Error Message: Filter [Spring OpenEntityManagerInViewFilter]: filter is unavailable.
    Error Code: 500
    Target Servlet: null
    Error Stack:
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager' defined in file [/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/localhostNode01Cell/ejemplo-roo-0_1_0-SNAPSHOT_war.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-0_1_0-SNAPSHOT_war.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/StringLorg/aspectj/lang/reflect/ConstructorSignature;
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:106)
    ......

    is roo 1.0.2 compatible with websphere 6.1 ?

    Thanks
    Ignacio
    Last edited by igalmarino; Mar 26th, 2010 at 09:39 AM.

  2. #2
    Join Date
    Dec 2005
    Posts
    929

    Default

    Your problem appears to be with aspectj? Can you please provide a full stack trace from the WebSphere sysout log?

    Have you changed the Class loader order for your war module in WebSphere to be "Classes loaded with application class loader first" ? (or parent last).
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Aug 2004
    Location
    San Jose - Costa Rica
    Posts
    42

    Default

    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/StringLorg/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

  4. #4
    Join Date
    Dec 2005
    Posts
    929

    Default

    The "unable to locate the el function" in your last error maybe to do with a missing Apache taglibs standard dependency in your javaee14 profile:
    Code:
    	
                     <dependency>
    			<groupId>taglibs</groupId>
    			<artifactId>standard</artifactId>
    			<version>1.1.2</version>
    		</dependency>
    The com.springsource.javax.servlet.jsp.jstl jar alone does not contain the Functions class. Try adding this jar.

    If this fixes your problem, there is something else to consider and that is I had a problem with el functions a few years ago in WebSphere 6.1. The particular fix IBM provided me was covered in APAR PK53233 (see http://www-01.ibm.com/support/docvie...id=swg1PK53233). However you say you are using 6.1.0.29 but the above fix was included in 6.1.0.15 so you should not be affected by this.
    Thanks
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5
    Join Date
    Aug 2004
    Location
    San Jose - Costa Rica
    Posts
    42

    Default

    Nop ... still get the same error ....

    The app works great on tomcat 5.5 (without standar.jar) but fail on Websphere 6.1 ......

    Ignacio

  6. #6
    Join Date
    Dec 2005
    Posts
    929

    Default

    Hmmm. I have used fn:substring in apps deployed to WebSphere 6.1 and 7.0 in the past. Can you list the contents of your WEB-INF/lib directory of the built WAR that you deploy to WebSphere?
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  7. #7
    Join Date
    Aug 2004
    Location
    San Jose - Costa Rica
    Posts
    42

    Default

    Code:
    activation-1.1.jar                                           com.springsource.org.hibernate-3.2.6.ga.jar
    com.springsource.antlr-2.7.6.jar                             com.springsource.org.hibernate.annotations-3.3.1.ga.jar
    com.springsource.edu.emory.mathcs.backport-3.1.0.jar         com.springsource.org.hibernate.annotations.common-3.3.0.ga.jar
    com.springsource.edu.oswego.cs.dl.util.concurrent-1.3.4.jar  com.springsource.org.hibernate.ejb-3.3.2.GA.jar
    com.springsource.javassist-3.3.0.ga.jar                      com.springsource.org.hibernate.validator-4.0.0.GA.jar
    com.springsource.javax.annotation-1.0.0.jar                  com.springsource.org.hsqldb-1.8.0.9.jar
    com.springsource.javax.persistence-1.0.0.jar                 com.springsource.org.jboss.util-2.0.4.GA.jar
    com.springsource.javax.servlet.jsp.jstl-1.1.2.jar            com.springsource.org.joda.time-1.6.0.jar
    com.springsource.javax.transaction-1.1.0.jar                 com.springsource.org.objectweb.asm-1.5.3.jar
    com.springsource.javax.validation-1.0.0.GA.jar               com.springsource.org.objectweb.asm.attrs-1.5.3.jar
    com.springsource.net.sf.cglib-2.1.3.jar                      com.springsource.org.tuckey.web.filters.urlrewrite-3.1.0.jar
    com.springsource.net.sf.ehcache-1.4.1.jar                    com.springsource.slf4j.api-1.5.6.jar
    com.springsource.net.sf.jsr107cache-1.0.0.jar                com.springsource.slf4j.log4j-1.5.6.jar
    com.springsource.org.aopalliance-1.0.0.jar                   jaxb-api-2.1.jar
    com.springsource.org.apache.commons.beanutils-1.8.0.jar      jaxb-impl-2.1.3.jar
    com.springsource.org.apache.commons.collections-3.2.0.jar    org.springframework.aop-3.0.0.RELEASE.jar
    com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar      org.springframework.asm-3.0.0.RELEASE.jar
    com.springsource.org.apache.commons.digester-1.8.1.jar       org.springframework.aspects-3.0.0.RELEASE.jar
    com.springsource.org.apache.commons.fileupload-1.2.0.jar     org.springframework.beans-3.0.0.RELEASE.jar
    com.springsource.org.apache.commons.io-1.4.0.jar             org.springframework.context-3.0.0.RELEASE.jar
    com.springsource.org.apache.commons.logging-1.1.1.jar        org.springframework.core-3.0.0.RELEASE.jar
    com.springsource.org.apache.commons.pool-1.3.0.jar           org.springframework.expression-3.0.0.RELEASE.jar
    com.springsource.org.apache.el-6.0.20.jar                    org.springframework.jdbc-3.0.0.RELEASE.jar
    com.springsource.org.apache.log4j-1.2.15.jar                 org.springframework.js-2.0.8.RELEASE.jar
    com.springsource.org.apache.taglibs.standard-1.1.2.jar       org.springframework.orm-3.0.0.RELEASE.jar
    com.springsource.org.apache.tiles-2.1.3.jar                  org.springframework.transaction-3.0.0.RELEASE.jar
    com.springsource.org.apache.tiles.core-2.1.3.jar             org.springframework.web-3.0.0.RELEASE.jar
    com.springsource.org.apache.tiles.jsp-2.1.3.jar              org.springframework.web.servlet-3.0.0.RELEASE.jar
    com.springsource.org.apache.tiles.servlet-2.1.3.jar          standard-1.1.2.jar
    com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar       stax-api-1.0-2.jar
    com.springsource.org.dom4j-1.6.1.jar

  8. #8

    Default I am having similar issue

    any leads on this el fn:substring function not being recognized?
    This is the first time i have used roo and I am using Java1.5 and Websphere 6.1 too.
    I used all the above mentioned solutions but dint work for me .
    Last edited by roofirstimer; Apr 19th, 2010 at 04:32 PM. Reason: missed out a point

  9. #9
    Join Date
    Aug 2004
    Location
    San Jose - Costa Rica
    Posts
    42

    Default

    No ... i still dont know why fn:substring fail in WAS 6.1. I hope roo 1.1 solved this problem ....

  10. #10
    Join Date
    May 2006
    Location
    Madrid
    Posts
    382

    Default

    Did you solve the problem?

    Which IDE do you use (if any)? (STS, RAD...)

    I've got a similar problem using a Websphere 6.1 Server within RAD 7 (7.0.0.10) [local server]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •