Announcement Announcement Module
Collapse
No announcement yet.
Roo 1.0.2 + Websphere 6.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 10:39 AM.

  • #2
    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).

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment


        • #5
          Nop ... still get the same error ....

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

          Ignacio

          Comment


          • #6
            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?

            Comment


            • #7
              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

              Comment


              • #8
                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, 05:32 PM. Reason: missed out a point

                Comment


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

                  Comment


                  • #10
                    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]

                    Comment


                    • #11
                      I have not solved it yet

                      I use STS 2.3.2 and the app is deployed to an standalone WAS 6.1 with all the latest fixpacks ....

                      Its really a shame Roo 1.0 does not work on WAS ...

                      Comment


                      • #12
                        It's a pitty, indeed.

                        I'm working with both STS 2.3.2 and RAD 7.

                        Maybe I can fany solution using the local embebed websphere 6.1 server.

                        Maybe the JSP, Servlets, AspectJ or some other technology used by Roo is totally incompatible with this "old" application server as it seems to happen with tomcat 5.5.

                        However, I think it should worth trying to get Roo working in this widely used appserver.

                        Comment


                        • #13
                          Got rid of fn:substring

                          we downloaded the roo 1.1 code and create a project out of it [ to test if the issue is resolved in the upcoming version]but it still persist.
                          So we ended up removing the fn:substring function in the auto generated jsps .
                          Now it works fine on WAS 6.1

                          Comment


                          • #14
                            Happy to hear the problem was related to EL and not Roo itself.

                            Comment


                            • #15
                              Partial solve for fn:substring, fn:split

                              Well I was investigate this thing , first I make a simple test, I am using the this jars:

                              Code:
                                <dependency>
                                          <groupId>taglibs</groupId>
                                          <artifactId>standard</artifactId>
                                          <version>1.1.2</version>
                                      </dependency>
                              
                                      <dependency>
                                          <groupId>jstl</groupId>
                                          <artifactId>jstl</artifactId>
                                          <version>1.1.2</version>
                                          </dependency>

                              then I maje a simple.jsp
                              Code:
                              <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
                              <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
                                 <c:out value="test"/>
                                           <br/>
                                            <c:out value="${4+4}"/>
                                              <br/>
                                              <c:forEach var="num" items="${fn:split('hola,tomas,test', ',')}">
                                                      <c:out value="${num}" /> <br/>
                                                  </c:forEach>
                              And it works then I make a jspx

                              Code:
                              <?xml version="1.0" encoding="windows-1252"?>
                              
                              <div xmlns:c="http://java.sun.com/jsp/jstl/core"
                                        xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                                        xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
                              
                                  <jsp:directive.page contentType="text/html" pageEncoding="windows-1252"/>
                              
                                  <!-- any content can be specified here, e.g.: -->
                                  <jsp:element name="text">
                                      <jsp:attribute name="lang">EN</jsp:attribute>
                                      <jsp:body>Hello World!</jsp:body>
                              
                                    
                              
                                     
                                  </jsp:element>
                              
                                      <br/>
                              
                                      <div>
                              
                                           <c:out value="test"/>
                                           <br/>
                                            <c:out value="${4+4}"/>
                                              <br/>
                                              <c:forEach var="num" items="${fn:split('hola,tomas,test', ',')}">
                                                      <c:out value="${num}" /> <br/>
                                                  </c:forEach>
                              
                              
                                      </div>
                              
                              
                              </div>
                              And it fails, then I review the logs and they say something validation so, I just change the div dor <jsp:root> and it works


                              Code:
                              <?xml version="1.0" encoding="windows-1252"?>
                              
                              <jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core"
                                        xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                                        xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
                              
                                  <jsp:directive.page contentType="text/html" pageEncoding="windows-1252"/>
                              
                                  <!-- any content can be specified here, e.g.: -->
                                  <jsp:element name="text">
                                      <jsp:attribute name="lang">EN</jsp:attribute>
                                      <jsp:body>Hello World!</jsp:body>
                              
                                    
                              
                                     
                                  </jsp:element>
                              
                                      <br/>
                              
                                      <div>
                              
                                           <c:out value="test"/>
                                           <br/>
                                            <c:out value="${4+4}"/>
                                              <br/>
                                              <c:forEach var="num" items="${fn:split('hola,tomas,test', ',')}">
                                                      <c:out value="${num}" /> <br/>
                                                  </c:forEach>
                              
                              
                                      </div>
                              
                              
                              </jsp:root>
                              I think that ibm is making something wrong because the div just should work. I also tested that is not necessary to change the libraries for jstl the library that spring provide for jstl are right. Just remember to change the <div xmls by <jsp:root xmls
                              Last edited by atomsfat; Jul 1st, 2010, 07:19 PM. Reason: I add make more testing

                              Comment

                              Working...
                              X