WebSphere Application Server 8.5.5.6 java.lang.NoSuchMethodError:javax / persistence / Table.indexes()[Ljavax / persistence / Index

时间:2017-06-13 13:21:20

标签: java websphere

尝试在WebSphere Application Server 8.5.5.6上部署应用程序ReportServer,该应用程序在apache-tomcat-7.0上运行良好,但遇到以下错误:

java.lang.NoSuchMethodError: javax/persistence/Table.indexes()[Ljavax/persistence/Index

Following are the logs. Kindly suggest a solution.

[6/13/17 18:13:07:179 IST] 00000067 LogHelper     Z org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation HHH000204: Processing PersistenceUnitInfo [
    name: reportServerPU
    ...]
[6/13/17 18:13:07:195 IST] 00000067 deprecation   Z org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl populate HHH90000006: Attempted to specify unsupported NamingStrategy via setting [hibernate.ejb.naming_strategy]; NamingStrategy has been removed in favor of the split ImplicitNamingStrategy and PhysicalNamingStrategy; use [hibernate.implicit_naming_strategy] or [hibernate.physical_naming_strategy], respectively, instead.
[6/13/17 18:13:07:357 IST] 00000067 C3P0Connectio Z org.hibernate.c3p0.internal.C3P0ConnectionProvider configure HHH010002: C3P0 using driver: com.microsoft.sqlserver.jdbc.SQLServerDriver at URL: jdbc:sqlserver://10.80.49.34:21443;databaseName=RSReports
[6/13/17 18:13:07:359 IST] 00000067 C3P0Connectio Z org.hibernate.c3p0.internal.C3P0ConnectionProvider configure HHH000046: Connection properties: {user=rm_user, password=****, autocommit=false}
[6/13/17 18:13:07:360 IST] 00000067 C3P0Connectio Z org.hibernate.c3p0.internal.C3P0ConnectionProvider configure HHH000006: Autocommit mode: false
[6/13/17 18:13:07:487 IST] 00000067 C3P0Connectio Z org.hibernate.c3p0.internal.C3P0ConnectionProvider configure HHH000149: JDBC isolation level: <unknown>
[6/13/17 18:13:07:529 IST] 00000067 Dialect       Z org.hibernate.dialect.Dialect <init> HHH000400: Using dialect: net.datenwerke.rs.utils.hibernate.SQLServerDialect
[6/13/17 18:13:07:583 IST] 00000067 EnversService Z org.hibernate.envers.boot.internal.EnversServiceImpl configure Envers integration enabled? : true
[6/13/17 18:13:07:676 IST] 00000067 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[GenericServletWrapper]: java.lang.NoSuchMethodError: javax/persistence/Table.indexes()[Ljavax/persistence/Index;
    at org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:1080)
    at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:765)
    at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:245)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:222)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:770)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:797)
    at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:152)
    at com.google.inject.persist.jpa.JpaPersistService.start(JpaPersistService.java:91)
    at com.google.inject.persist.PersistFilter.init(PersistFilter.java:77)
    at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:114)
    at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:98)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:172)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:145)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:607)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:514)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:319)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:392)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:931)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:939)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)

1 个答案:

答案 0 :(得分:0)

如果在运行时期间与编译时库版本不同,则会发生此类错误。似乎您的Websphere服务器使用版本小于2.1的JPA lib,因为Table.indexes()首先出现在JPA 2.1中。这篇文章可能有助于在运行时期间维护正确的JPA依赖关系:https://stackoverflow.com/a/34487223/4563745