5 Replies Latest reply on Jul 12, 2013 8:49 AM by mgammoudi

    Timeout with Spring in JBoss AS 7.1.1(JBAS015052)

    michael.h

      Hi all,

       

      we have a problem with migrating an EAR from JBoss AS 4.2.2 to JBoss AS 7.1.1. Today the application runs under JBoss AS 6. However the application does not run on JBoos AS 7.1.1. We have a timeout and the server break down. (look at attached console output)

       

      The problem:

      We have reduced the Problem to the spring framework. If we don't use the spring framework everything works fine.

      For a better understanding, we have modified a small example from http://www.mkyong.com/spring/spring-auto-wiring-beans-with-autowired-annotat.

      The application runs without success in JBoss AS 7.1.1.

      We get a timeout without any error message. Only the timeout is displayed

       

      We set the log level to ‘ALL’ but there were no more information.

      Even the update to then latest spring framework did no success.

      In a war everything works fine.

      The example is programmed with NetBeans 7.1 and runs under Windows

       

      We ask for your help.

      Thanks in advance

      Michael

      Attached our small sample and issues.

       

       

      Here the console output.

       

      ===============================================================================

       

        JBoss Bootstrap Environment

       

        JBOSS_HOME: C:\jboss\jboss-as-7.1.1.Final

       

        JAVA: C:\Java\jdk1.6.0_30\bin\java

       

        JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M

        -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.cl

      1. ient.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

      -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war ning=true -Djboss.modules.system.pkgs=org.jboss.byteman

      -Djboss.server.default.config=standalone.xml

       

      ===============================================================================

       

      11:35:05,858 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

      11:35:06,080 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

      11:35:06,119 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes"

      starting

      11:35:07,047 INFO  [org.xnio] XNIO Version 3.0.3.GA

      11:35:07,048 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

      11:35:07,061 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

      11:35:07,070 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

      11:35:07,098 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      11:35:07,161 INFO  [org.jboss.as.webservices] (ServerService Thread Pool --

      48) JBAS015537: Activating WebServices Extension

      11:35:07,181 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38)

      JBAS011800: Activating Naming Subsystem

      11:35:07,193 INFO  [org.jboss.as.connector] (MSC service thread 1-6)

      JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

      11:35:07,192 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

      11:35:07,189 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39)

      JBAS011940: Activating OSGi Subsystem

      11:35:07,184 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44)

      JBAS013101: Activating Security Subsystem

      11:35:07,183 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool --

      26) JBAS016200: Activating ConfigAdmin Subsystem

      11:35:07,304 INFO  [org.jboss.as.security] (MSC service thread 1-1)

      JBAS013100: Current PicketBox version=4.0.7.Final

      11:35:07,349 INFO  [org.jboss.as.naming] (MSC service thread 1-6) JBAS011802:

      Starting Naming Service

      11:35:07,353 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-6)

      JBAS015400: Bound mail session [java:jboss/mail/Default]

      11:35:07,374 INFO [org.jboss.as.connector.subsystems.datasources]

      (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      11:35:07,755 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080

      11:35:07,814 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-7) JBoss Web Services - Stack CXF Server 4.0.2.GA

      11:35:07,902 INFO  [org.jboss.as.remoting] (MSC service thread 1-7)

      JBAS017100: Listening on /127.0.0.1:9999

      11:35:07,903 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss\jboss-as-7.1.1.Final\standalone\deployments

      11:35:07,905 INFO [org.jboss.as.server.deployment.scanner]

      (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment AS7.ear

      11:35:07,902 INFO  [org.jboss.as.remoting] (MSC service thread 1-3)

      JBAS017100: Listening on /127.0.0.1:4447

      11:35:07,919 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      11:35:07,985 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4)

      JBAS015876: Starting deployment of "AS7.ear"

      11:35:08,064 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8)

      JBAS015876: Starting deployment of "AS7-war.war"

      11:36:07,972 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2)

      JBAS015870: Deploy of deployment "AS7.ear" wasrolled back with failure message Operation cancelled

      11:36:07,972 ERROR [org.jboss.as.server.deployment.scanner]

      (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.

       

       

       

      Here the code of the example

       

      import javax.faces.bean.ManagedBean;

      import javax.faces.bean.SessionScoped;

      import org.springframework.context.ApplicationContext;

      import org.springframework.context.support.ClassPathXmlApplicationContext;

       

      @ManagedBean

      @SessionScoped

      public class App {

       

          public String tuewas () {

                      ApplicationContext context = new

      ClassPathXmlApplicationContext("beans.xml");

       

                      Customer cust = (Customer) context.getBean("customer");

                      System.out.println(cust);

                      return "index.xhtml";

              }

      }

       

      import org.springframework.beans.factory.annotation.Autowired;

       

      public class Customer {

       

              @Autowired(required=false)

              private Person person;

              private int type;

              private String action;

       

              public Person getPerson() {

                      return person;

              }

       

              public void setPerson(Person person) {

                      this.person = person;

              }

       

              public int getType() {

                      return type;

              }

       

              public void setType(int type) {

                      this.type = type;

              }

       

              public String getAction() {

                      return action;

              }

       

              public void setAction(String action) {

                      this.action = action;

              }

       

              @Override

              public String toString() {

                      return "Customer [person=" + person + ", type=" + type + ",

                      action="

                                      + action + "]";

              }

      }

       

      public class Person {

              private String name;

       

              public String getName() {

                      return name;

              }

       

              public void setName(String name) {

                      this.name = name;

              }

       

              @Override

              public String toString() {

                      return "Person [name=" + name + "]";

              }

       

      Content of beans.xml

      <beans xmlns="http://www.springframework.org/schema/beans"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="http://www.springframework.org/schema/beans

      http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

       

              <bean

      class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>

       

              <bean id="customer" class="Customer" >

                      <property name="action" value="buy" />

                      <property name="type" value="1" />

              </bean>

       

              <bean id="personA" class="Person" >

                      <property name="name" value="mkyongA" />

              </bean>

       

      </beans>

       

      Here the jboss-deployment-structure

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

      <deployment>

      <dependencies>

      <module name="org.springframework" export="true"> <imports> <include path="META-INF**"/> <include path="org**"/> </imports> </module> </dependencies> </deployment> </jboss-deployment-structure>}

       

      The MANINFEST.MF is empty.