Announcement Announcement Module
Collapse
No announcement yet.
library spring-web.jar Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • library spring-web.jar

    Hello, I have a little app in jboss server, and there is an error:

    "Error configurando escuchador de aplicación de clase org.springframework.web.context.ContextLoaderListe ner
    java.lang.ClassNotFountdException: org.springframework.web.context.ContextLoaderListe ner"

    I see in forums that I must copy this library en directory WEB-Inf of my app, or look up pom.xml and to put the following;

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>2.5.0</version>
    </dependency>

    I had done both things, and I have same error. It seems that server not found the org.springframework.web.context.ContextLoaderListe ner class, but I have the library spring-web.jar in WEF-Inf/lib directory, and this jar contains this class.

    Please, can you help me? Thank, and regards

  • #2
    Have you tried just declaring the following in your pom files? ContextLoaderListener is located in the web package of the spring 2.5.5 jar. If you want to use Spring MVC your also need to include the spring-webmvc dependency.


    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring</artifactId>
    <version>2.5.5</version>
    <scope>compile</scope>
    </dependency>

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>2.5.5</version>
    </dependency>

    Comment


    • #3
      Hello, this is my pom.xml:

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>

      <name>JBoss Web Services - Stack Native Management</name>
      <artifactId>jbossws-native-management</artifactId>
      <packaging>war</packaging>

      <parent>
      <groupId>org.jboss.ws.native</groupId>
      <artifactId>jbossws-native</artifactId>
      <version>3.0.4.SP1</version>
      <relativePath>../../pom.xml</relativePath>
      </parent>

      <dependencies>
      <!--
      These runtime dependencies are picked up by the assembly-deploy-artifacts
      descriptor. They have no real relevants to this module.
      -->
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-framework</artifactId>
      <scope>runtime</scope>
      </dependency>
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-framework</artifactId>
      <classifier>testsuite</classifier>
      <scope>runtime</scope>
      <type>zip</type>
      </dependency>
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-jboss422</artifactId>
      <scope>runtime</scope>
      </dependency>
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-jboss423</artifactId>
      <scope>runtime</scope>
      </dependency>
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-jboss424x</artifactId>
      <scope>runtime</scope>
      </dependency>
      <!-- [JBWS-2263] -->
      <!-- START -->
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-jboss500CR2</artifactId>
      <scope>runtime</scope>
      </dependency>
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-jboss500CR2</artifactId>
      <classifier>container</classifier>
      <scope>runtime</scope>
      </dependency>
      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-jboss500x</artifactId>
      <scope>runtime</scope>
      </dependency>


      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
      <version>2.5.5</version>
      <scope>compile</scope>
      </dependency>

      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>2.5.5</version>
      </dependency>
      <dependency>

      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>2.5.5</version>
      </dependency>
      <dependency>

      <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-jboss500x</artifactId>
      <classifier>container</classifier>
      <scope>runtime</scope>
      </dependency>
      <!-- END -->
      <dependency>
      <groupId>org.jboss.jaxr</groupId>
      <artifactId>juddi-service</artifactId>
      <scope>runtime</scope>
      <type>sar</type>
      </dependency>
      </dependencies>

      <!-- Build -->
      <build>
      <plugins>
      <plugin>
      <!-- PRE: scm is correctly configured in parent pom -->
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>buildnumber-maven-plugin</artifactId>
      <executions>
      <execution>
      <phase>validate</phase>
      <goals>
      <goal>create</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
      <format>{0,date,yyyyMMddHHmm}</format>
      <items>
      <item>timestamp</item>
      </items>
      <doUpdate>false</doUpdate>
      </configuration>
      </plugin>
      <plugin>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
      <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
      <webResources>
      <resource>
      <directory>src/main/webapp</directory>
      <filtering>true</filtering>
      </resource>
      </webResources>
      </configuration>
      </plugin>
      </plugins>
      </build>
      </project>

      and I have same error. I don't know what more doing. Can you help me? Thanks, and regards

      Elena

      Comment

      Working...
      X