Announcement Announcement Module
Collapse
No announcement yet.
Help Me Friends to solve " ERROR initServletBean, Context initialization failed " Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help Me Friends to solve " ERROR initServletBean, Context initialization failed "

    Code:
    ERROR  initServletBean, Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getResourceLoader()Lorg/springframework/core/io/ResourceLoader;
    Caused by: 
    java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getResourceLoader()Lorg/springframework/core/io/ResourceLoader;

  • #2
    What version of Spring are you attempting to use? I say attempting because your missing, in this case, spring-core from your classpath.

    Comment


    • #3


      thanks for ur reply friend..
      this is my maven pom.xml

      Code:
      <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>
      	<groupId>Spring3HibernateMaven</groupId>
      	<artifactId>Spring3HibernateMaven</artifactId>
      	<packaging>war</packaging>
      	<version>0.0.1-SNAPSHOT</version>
      	<name>Spring3HibernateMaven</name>
      	<repositories>
      		<repository>
      			<id>maven2-repository.java.net</id>
      			<name>Java.net Repository for Maven</name>
      			<url>http://download.java.net/maven/2/</url>
      			<layout>default</layout>
      		</repository>
      		<repository>
      			<id>JBoss Repo</id>
      			<url>http://repository.jboss.com/maven2</url>
      		</repository>
      		<repository>
      			<id>jboss-public-repository-group</id>
      			<name>JBoss Public Maven
      				Repository Group</name>
      			<url>https://repository.jboss.org/nexus/content/groups/public-jboss/
      			</url>
      			<layout>default</layout>
      			<releases>
      				<enabled>true</enabled>
      				<updatePolicy>never</updatePolicy>
      			</releases>
      			<snapshots>
      				<enabled>true</enabled>
      				<updatePolicy>never</updatePolicy>
      			</snapshots>
      		</repository>
      		<repository>
      			<id>jboss-deprecated-repository</id>
      			<name>JBoss Deprecated Maven Repository</name>
      			<url>https://repository.jboss.org/nexus/content/repositories/deprecated/
      			</url>
      			<layout>default</layout>
      			<releases>
      				<enabled>true</enabled>
      				<updatePolicy>never</updatePolicy>
      			</releases>
      			<snapshots>
      				<enabled>false</enabled>
      				<updatePolicy>never</updatePolicy>
      			</snapshots>
      		</repository>
      	</repositories>
      	<build>
      		<plugins>
      			<plugin>
      				<groupId>org.apache.maven.plugins</groupId>
      				<artifactId>maven-compiler-plugin</artifactId>
      				<configuration>
      					<source>1.5</source>
      					<target>1.5</target>
      				</configuration>
      			</plugin>
      			<plugin>
      				<groupId>org.mortbay.jetty</groupId>
      				<artifactId>maven-jetty-plugin</artifactId>
      				<version>6.1.24</version>
      				<configuration>
      
      
      
      					<!-- Redeploy every x seconds if changes are detected, 0 for no automatic 
      						redeployment -->
      
      					<!-- make sure Jetty also finds the widgetset -->
      					<webAppConfig>
      						<contextPath>/ISforCabSys</contextPath>
      						<baseResource implementation="org.mortbay.resource.ResourceCollection">
      							<!-- Workaround for Maven/Jetty issue http://jira.codehaus.org/browse/JETTY-680 -->
      							<resources>src/main/webapp,${project.build.directory}/${project.build.finalName}
      							</resources>
      							<!-- <resourcesAsCSV>src/main/webapp,${project.build.directory}/${project.build.finalName}</resourcesAsCSV> -->
      						</baseResource>
      					</webAppConfig>
      				</configuration>
      			</plugin>
      		</plugins>
      	</build>
      	<dependencies>
      
      		<dependency>
      			<groupId>org.hibernate</groupId>
      			<artifactId>hibernate-annotations</artifactId>
      			<version>3.3.1.GA</version>
      		</dependency>
      <!-- 	<dependency>
      			<groupId>taglibs</groupId>
      			<artifactId>standard</artifactId>
      			<version>1.0.6</version>
      		</dependency> -->
      		<dependency>
      			<groupId>taglibs</groupId>
      			<artifactId>standard</artifactId>
      			<version>1.1.2</version>
      		</dependency>
      		<dependency>
      			<groupId>org.codehaus.mojo</groupId>
      			<artifactId>cobertura-maven-plugin</artifactId>
      			<version>2.5</version>
      		</dependency>
      		<dependency>
      			<groupId>com.vaadin</groupId>
      			<artifactId>vaadin</artifactId>
      			<version>6.4.4</version>
      		</dependency>
      		<dependency>
      			<groupId>org.slf4j</groupId>
      			<artifactId>slf4j-api</artifactId>
      			<version>1.6.1</version>
      		</dependency>
      		<dependency>
      			<groupId>commons-collections</groupId>
      			<artifactId>commons-collections</artifactId>
      			<version>3.1</version>
      		</dependency>		
      		<dependency>
      			<groupId>org.slf4j</groupId>
      			<artifactId>slf4j-log4j12</artifactId>
      			<version>1.4.2</version>
      		</dependency> 
      
      		<dependency>
      			<groupId>javax.transaction</groupId>
      			<artifactId>jta</artifactId>
      			<version>1.1</version>
      		</dependency>
      
      		<dependency>
      			<groupId>junit</groupId>
      			<artifactId>junit</artifactId>
      			<version>4.7</version>
      			<scope>test</scope>
      		</dependency>
      		<dependency>
      			<groupId>junit-addons</groupId>
      			<artifactId>junit-addons</artifactId>
      			<version>1.4</version>
      			<scope>test</scope>
      		</dependency>
         <!-- <dependency>
      			<groupId>org.mortbay.jetty</groupId>
      			<artifactId>servlet-api-2.5</artifactId>
      			<version>6.1H.14.1</version>
      		</dependency> -->
      		<dependency>
      			<groupId>javax.servlet</groupId>
      			<artifactId>servlet-api</artifactId>
      			<version>2.5</version>
      		</dependency>
      		<!-- JPA & Hibernate -->
      		<dependency>
      			<groupId>org.hibernate</groupId>
      			<artifactId>hibernate-entitymanager</artifactId>
      			<version>3.3.2.GA</version>
      		</dependency>
      
      		<dependency>
      			<groupId>hibernate</groupId>
      			<artifactId>hibernate3</artifactId>
      			<version>3.2.3.GA</version>
      		</dependency>
      		<dependency>
      			<groupId>org.hibernate.javax.persistence</groupId>
      			<artifactId>hibernate-jpa-2.0-api</artifactId>
      			<version>1.0.0.Final</version>
      		</dependency>
      		<dependency>
      			<groupId>hibernate-entitymanager</groupId>
      			<artifactId>ejb3-persistence</artifactId>
      			<version>3.3.2.GA</version>
      		</dependency>
      
      		<!-- MySQL -->
         <!-- <dependency>
      			<groupId>mysql</groupId>
      			<artifactId>mysql-connector-java</artifactId>
      			<version>5.1.6</version>
      		</dependency> -->
      		<dependency>
      			<groupId>mysql</groupId>
      			<artifactId>mysql-connector-java</artifactId>
      			<version>5.1.10</version>
      		</dependency>
      		<dependency>
      			<groupId>commons-pool</groupId>
      			<artifactId>commons-pool</artifactId>
      			<version>20030825.183949</version>
      		</dependency>
      		<dependency>
      			<groupId>javax.servlet</groupId>
      			<artifactId>jstl</artifactId>
      			<version>1.1.2</version>
      		</dependency>
      <!-- 	<dependency>
      			<groupId>javax.servlet</groupId>
      			<artifactId>jstl</artifactId>
      			<version>1.2</version>
      			<scope>provided</scope>
      		</dependency> -->
      
      
      <!-- 	<dependency>
      			<groupId>org.apache.openejb</groupId>
      			<artifactId>commons-dbcp-all</artifactId>
      			<version>1.3</version>
      		</dependency> -->
      		<dependency>
      			<groupId>commons-dbcp</groupId>
      			<artifactId>commons-dbcp</artifactId>
      			<version>20030825.184428</version>
      		</dependency>		
      		<dependency>
      			<groupId>com.kenai.nbpwr</groupId>
      			<artifactId>net-sf-cglib</artifactId>
      			<version>2.1.3-201003011305</version>
      		</dependency>		
      		<!-- Spring -->
      
      		<!-- spring-beans -->
      		<!-- spring-jdbc -->
      		<!-- spring-web -->
      		<!-- spring-webmvc -->
      		<!-- spring-orm -->
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-beans</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-jdbc</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-web</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-webmvc</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-orm</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
         			<groupId>org.springmodules</groupId>
         			<artifactId>spring-modules-validation</artifactId>
         			<version>0.8</version>
      		</dependency>	
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-tx</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>dom4j</groupId>
      			<artifactId>dom4j</artifactId>
      			<version>1.6.1</version>
      		</dependency>
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-aop</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-context-support</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>antlr</groupId>
      			<artifactId>antlr</artifactId>
      			<version>2.7.6</version>
      		</dependency>
      		
      		<!-- <dependency> -->
      		<!-- <groupId>org.springframework</groupId> -->
      		<!-- <artifactId>spring-beans</artifactId> -->
      		<!-- <version>3.0.5.RELEASE</version> -->
      		<!-- </dependency> -->
      
      		<!-- <dependency> -->
      		<!-- <groupId>org.springframework</groupId> -->
      		<!-- <artifactId>spring-webmvc</artifactId> -->
      		<!-- <version>3.0.5.RELEASE</version> -->
      		<!-- </dependency> -->
      
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-context</artifactId>
      			<version>3.0.2.RELEASE</version>
      		</dependency>
      		<dependency>
      			<groupId>org.springframework</groupId>
      			<artifactId>spring-core</artifactId>
      			<version>3.0.2.RELEASE</version>
      			<exclusions>
      				<exclusion>
      					<groupId>org.springframework</groupId>
      					<artifactId>spring-core</artifactId>
      				</exclusion>
      			</exclusions>
      
      		</dependency>
      		<!-- <dependency> -->
      		<!-- <groupid>org.springframework</groupid> -->
      		<!-- <artifactid>spring-orm</artifactid> -->
      		<!-- <version>3.0.5.release</version> -->
      		<!-- </dependency> -->
      
      	</dependencies>
      
      </project>

      Comment


      • #4


        I have doubt about this part..is it ok or not.? ?

        Code:
        		<dependency>
        			<groupId>org.springframework</groupId>
        			<artifactId>spring-core</artifactId>
        			<version>3.0.2.RELEASE</version>
        			<exclusions>
        				<exclusion>
        					<groupId>org.springframework</groupId>
        					<artifactId>spring-core</artifactId>
        				</exclusion>
        			</exclusions>
        
        		</dependency>

        Comment

        Working...
        X