Jetty で Web アプリケーションを起動すると問題が発生しますが、Tomcat-07 で起動するとそのような問題は発生しません。
エラー :
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'hbmSessionFactory' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]:
Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
javax.persistence.OneToMany.orphanRemoval()Z
理由は何ですか?
ありがとう、
<properties>
<org.springframework.version>3.0.5.RELEASE</org.springframework.version>
<slf4j.version>1.5.6</slf4j.version><cxf.version>2.3.3</cxf.version>
<ehcacheVersion>2.4.2</ehcacheVersion><toolkitVersion>3.3.0</toolkitVersion>
</properties><dependencies>
<dependency><groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId><version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-expression</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-beans</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-aop</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-tx</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-jdbc</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-orm</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-oxm</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-webmvc-portlet</artifactId>
<version>${org.springframework.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId><artifactId>spring-test</artifactId>
<version>${org.springframework.version}</version><scope>test</scope>
</dependency><dependency>
<groupId>javax.servlet</groupId><artifactId>servlet-api</artifactId>
<version>2.5</version><type>jar</type><scope>compile</scope>
</dependency><dependency>
<groupId>javax.servlet</groupId><artifactId>jstl</artifactId>
<version>1.2</version>
</dependency><dependency>
<groupId>taglibs</groupId><artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency><dependency>
<groupId>javax.transaction</groupId><artifactId>jta</artifactId>
<version>1.1</version>
</dependency><dependency>
<groupId>org.aspectj</groupId><artifactId>aspectjrt</artifactId>
<version>1.6.2</version>
</dependency><dependency>
<groupId>commons-io</groupId><artifactId>commons-io</artifactId>
<version>2.0</version>
</dependency><dependency>
<groupId>commons-dbcp</groupId><artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency><dependency>
<groupId>commons-pool</groupId><artifactId>commons-pool</artifactId>
<version>1.4</version>
</dependency><dependency>
<groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId>
<version>5.1.18</version>
</dependency><dependency>
<groupId>org.hibernate</groupId><artifactId>hibernate-entitymanager</artifactId>
<version>3.5.5-Final</version>
</dependency><dependency>
<groupId>org.hibernate.java-persistence</groupId><artifactId>jpa-api</artifactId>
<version>2.0-cr-1</version>
</dependency><dependency>
<groupId>javax.ws.rs</groupId><artifactId>jsr311-api</artifactId>
<version>0.11</version>
</dependency><dependency>
<groupId>javax.validation</groupId><artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency><dependency>
<groupId>org.hibernate</groupId><artifactId>hibernate-validator</artifactId>
<version>4.0.2.GA</version>
</dependency><dependency>
<groupId>javax.annotation</groupId><artifactId>jsr250-api</artifactId>
<version>1.0</version><scope>provided</scope>
</dependency></dependencies>
返信ありがとうございます。すべての依存関係が適切に読み込まれています。mvn clean compile パッケージ war:war も正常に動作しており、その war ファイルには Tomcat-7 に関する問題はありませんが、jetty で上記のエラーが発生していますか?