servlet的context.xml中
UPDATE table SET value=value + 1 WHERE id='$id'
/网络/ WEB-INF / lib中:
<mvc:annotation-driven/>
<context:component-scan base-package="com.app">
<context:exclude-filter type="regex" expression="com\.test.*"/>
</context:component-scan>
WebLogic 10.3.6 setDomainEnv.cmd
hibernate-jpa-2.1-api-1.0.0.Final.jar
hibernate-commons-annotations-5.0.1.Final.jar
hibernate-core-5.0.7.Final.jar
hibernate-entitymanager-5.0.7.Final.jar
hibernate-validator-5.2.3.Final.jar
validation-api-1.1.0.Final.jar
classmate-1.1.0.jar
weblogic.xml中
set MW_MODULE=C:\oracle\MIDDLEWARE\modules
set PRE_CLASSPATH=%MW_MODULE%\hibernate-jpa-2.1-api-1.0.0.Final.jar;%MW_MODULE%\hibernate-commons-annotations-5.0.1.Final.jar;%MW_MODULE%\hibernate-core-5.0.7.Final.jar;%MW_MODULE%\hibernate-entitymanager-5.0.7.Final.jar;%MW_MODULE%\hibernate-validator-5.2.3.Final.jar;%MW_MODULE%\validation-api-1.1.0.Final.jar;%MW_MODULE%\classmate-1.1.0.jar;%PRE_CLASSPATH%
堆栈追踪:
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>java.persistence.*</wls:package-name>
<wls:package-name>org.hibernate.*</wls:package-name>
<wls:package-name>org.hibernate.validator.*</wls:package-name>
<wls:package-name>javax.validator.*</wls:package-name>
<wls:package-name>javassist.*</wls:package-name>
<wls:package-name>org.slf4j.*</wls:package-name>
<wls:package-name>org.apache.logging.log4j.*</wls:package-name>
</wls:prefer-application-packages>
<wls:prefer-application-resources>
<wls:resource-name>java.persistence.*</wls:resource-name>
<wls:resource-name>org.hibernate.*</wls:resource-name>
<wls:resource-name>org.hibernate.validator.*</wls:resource-name>
<wls:resource-name>javax.validator.*</wls:resource-name>
<wls:resource-name>javassist.*</wls:resource-name>
<wls:resource-name>org.slf4j.*</wls:resource-name>
<wls:resource-name>org.apache.logging.log4j.*</wls:resource-name>
</wls:prefer-application-resources>
</wls:container-descriptor>
SomeController.java
Caused by: java.lang.AbstractMethodError
at javax.persistence.Persistence$1.isLoaded(Persistence.java:111) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:46) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:128) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.resolver.CachingTraversableResolverForSingleValidation.isReachable(CachingTraversableResolverForSingleValidation.java:36) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.isReachable(ValidatorImpl.java:1522) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1507) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:584) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:555) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:490) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:454) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:406) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:204) ~[hibernate-validator-5.2.3.Final.jar:5.2.3.Final]
at com.app.controller.SomeController.retrievePage(SomeController.java:68) ~[_wl_cls_gen.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_75]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_75]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_75]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_75]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814) ~[spring-webmvc-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737) ~[spring-webmvc-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.2.4.RELEASE.jar:4.2.4.RELEASE]
我花了两天的时间在网上搜索我能找到的任何内容来帮助纠正这个错误,但没有任何效果。