2 Replies Latest reply on Oct 13, 2015 7:31 PM by armahdi

    Wildfly, ModuleNotFoundException for spring-tx jar

    armahdi

      Hello All

       

      I am trying to deploy an ear file that has a simple jar file. It is giving me some issues. So i tried to deploy the jar only. so that i cna get a stacktrace only for the jar.: the stacktrace is below. I added a module for spring-tx-2.5.4.jar as well and created a module.xml, Thei tried to deploy the ear file and it also failed with the same error even though the spring-tx library was packaged inside the ear, and listed in the manifest.mf as well.

       

      modules\org\springframework\spring-tx\main\module.xml

      <module xmlns="urn:jboss:module:1.3" name="org.springframework.spring-tx">

          <resources>

              <resource-root path="spring-tx-2.5.4.jar"/>

          </resources>

        

      </module>

      jboss-deployment-structure.xml 

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

      <jboss-deployment-structure>  

          <deployment>  

              <dependencies>  

                  <module name="org.springframework.spring-tx" />

             </dependencies>

          </deployment>  

      </jboss-deployment-structure> 

       

      Stack trace

      16:24:55,460 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "myApp-adapter-1.3.jar" (runtime-name: "myApp-adapter-1.3.jar")

      16:24:55,469 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry commons-logging-1.1.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar

      does not point to a valid jar for a Class-Path reference.

      16:24:55,470 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry ProgressCommunicatorSNAPSHOT.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.

      3.jar  does not point to a valid jar for a Class-Path reference.

      16:24:55,470 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry messages-10.2b07.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar  doe

      s not point to a valid jar for a Class-Path reference.

      16:24:55,471 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry o4glrt-10.2b07.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar  does

      not point to a valid jar for a Class-Path reference.

      16:24:55,471 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry connector-api-1.5.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar  do

      es not point to a valid jar for a Class-Path reference.

      16:24:55,471 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry spring-tx-2.5.4.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar  does

      not point to a valid jar for a Class-Path reference.

      16:24:55,472 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry spring-beans-2.5.4.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar  d

      oes not point to a valid jar for a Class-Path reference.

      16:24:55,472 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry spring-context-2.5.4.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar

      does not point to a valid jar for a Class-Path reference.

      16:24:55,472 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry spring-core-2.5.4.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/myApp-adapter-1.3.jar  do

      es not point to a valid jar for a Class-Path reference.

      16:24:55,480 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.module.service."deployment.myApp-adapter-1.3.jar".main: org.jboss.msc.service.StartExcep

      tion in service jboss.module.service."deployment.myApp-adapter-1.3.jar".main: WFLYSRV0179: Failed to load module: deployment.myApp-adapter-1.3.jar:main

              at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:722)

      Caused by: org.jboss.modules.ModuleNotFoundException: spring-tx-2.5.4.jar:main

              at org.jboss.modules.Module.addPaths(Module.java:1042)

              at org.jboss.modules.Module.link(Module.java:1398)

              at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)

              at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)

              ... 5 more

       

       

       

       

      16:24:55,483 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "myApp-adapter-1.3.jar")]) - failure description:

      {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.myApp-adapter-1.3.jar\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.myApp-adapter-1.

      3.jar\".main: WFLYSRV0179: Failed to load module: deployment.myApp-adapter-1.3.jar:main

          Caused by: org.jboss.modules.ModuleNotFoundException: spring-tx-2.5.4.jar:main"}}

      16:24:55,484 ERROR [org.jboss.as.server] (XNIO-1 task-1) WFLYSRV0021: Deploy of deployment "myApp-adapter-1.3.jar" was rolled back with the following failure message:

      {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.myApp-adapter-1.3.jar\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.myApp-adapter-1.3

      .jar\".main: WFLYSRV0179: Failed to load module: deployment.myApp-adapter-1.3.jar:main

          Caused by: org.jboss.modules.ModuleNotFoundException: spring-tx-2.5.4.jar:main"}}

      16:24:55,486 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment myApp-adapter-1.3.jar (runtime-name: myApp-adapter-1.3.jar) in 2ms

      16:24:55,488 INFO  [org.jboss.as.controller] (XNIO-1 task-1) WFLYCTL0183: Service status report

      WFLYCTL0186:   Services which failed to start:      service jboss.module.service."deployment.myApp-adapter-1.3.jar".main

       

      what is wrong here, It is a jar so I am not going to add the spring-tx jar inside the jar, that should not be the case here. and in case of ear the lib is already packaged in the ear so it should not give me this error.

       

      Any help will be appreciated (My experience with jboss is ok but this is the first time I am using wildfly)

        • 1. Re: Wildfly, ModuleNotFoundException for spring-tx jar
          jaysensharma

          Your module name is "org.springframework.spring-tx"  Not "spring-tx-2.5.4.jar". 

          The WildFly is complaining that it is not able to find  [ModuleNotFoundException: spring-tx-2.5.4.jar:main

           

          Which means by mistake in your application you might be pointing to that module spring-tx-2.5.4.jar that does not exist.   So please check the  "myApp-adapter-1.3.jar/META-INF/MANIFEST.MF" file to see if by mistake you have given wrong "Dependencies" name there.

           

          In case of EAR files you should declare all the dependencies inside the "$EAR/META-INF/jboss-deployment-structure.xml"  

          • 2. Re: Wildfly, ModuleNotFoundException for spring-tx jar
            armahdi

            Thanks Jay,

             

            OK in my adapter ejb project i had added this line in my pom file for  manifest entries. it was totally un needed.

             

            <build>

              <plugins>

              <plugin>

              <groupId>org.apache.maven.plugins</groupId>

              <artifactId>maven-ejb-plugin</artifactId>

              <version>2.3</version>

              <configuration>

              <ejbVersion>3.0</ejbVersion>

              <clientExcludes>

              <clientExclude>**/ejb/*Bean.class</clientExclude>

              </clientExcludes>

              <archive>

                                   <!-- <manifestEntries>

                                        <Dependencies>spring-tx-2.5.4.jar</Dependencies>

                                    </manifestEntries>   -->

              <manifest>

              <addClasspath>true</addClasspath>

              </manifest>

              </archive>

              </configuration>

              </plugin>

              </plugins>

              </build>