- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Spring Boot 1.4.1.RELEASE 在 WAS 9.0.0.1 上构建一个新应用程序
EAR 依赖项:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
数据源应该从 jndi 加载,这是我的 application.properties
spring.datasource.jndi-name=jdbc/bcCore
application.code=BCC
当我启动应用程序时,WAS 似乎阻止了持久性上下文和持久性单元的加载,然后抛出一个错误,它找不到它刚刚阻止的类
[11/4/16 9:45:34:021 EET] 00000195 SystemOut O 2016-11-04 09:45:34.020 WARN 8920 --- [bContainer : 27] c.i.w.r.component.ApplicationMgrImpl : WSVR0200I: Starting application: core-ear
[11/4/16 9:45:34:022 EET] 00000195 SystemOut O 2016-11-04 09:45:34.022 WARN 8920 --- [bContainer : 27] c.i.w.r.component.ApplicationMgrImpl : WSVR0203I: Application: core-ear Application build level: 1.0.0.1
[11/4/16 9:45:34:420 EET] 00000195 SystemOut O 09:45:34.417 [WebContainer : 27] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
[11/4/16 9:45:34:479 EET] 00000195 SystemOut O 2016-11-04 09:45:34.479 WARN 8920 --- [bContainer : 27] com.ibm.ws.ffdc.impl.FfdcProvider : FFDC1003I: FFDC Incident emitted on D:\IBM\WebSphere9\AppServer\profiles\AppSrv01\logs\ffdc\server1_2995a52e_16.11.04_09.45.34.4463170190477703144327.txt com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory 773
[11/4/16 9:45:34:479 EET] 00000195 SystemOut O 2016-11-04 09:45:34.479 ERROR 8920 --- [bContainer : 27] com.ibm.ws.jpa.management.JPAPUnitInfo : CREATE_CONTAINER_ENTITYMANAGER_FACTORY_ERROR_CWWJP0015E
[11/4/16 9:45:41:631 EET] 00000195 SystemOut O 2016-11-04 09:45:41.631 WARN 8920 --- [bContainer : 27] c.i.w.i.AbstractInjectionEngine : CWNEN0070W: The javax.persistence.PersistenceContext annotation class will not be recognized because it was loaded from the file:/D:/IBM/WebSphere9/AppServer/profiles/AppSrv01/installedApps/NBCDANISOR1Node03Cell/core-ear.ear/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar location rather than from a product class loader.
[11/4/16 9:45:41:631 EET] 00000195 SystemOut O 2016-11-04 09:45:41.631 WARN 8920 --- [bContainer : 27] c.i.w.i.AbstractInjectionEngine : CWNEN0070W: The javax.persistence.PersistenceUnit annotation class will not be recognized because it was loaded from the file:/D:/IBM/WebSphere9/AppServer/profiles/AppSrv01/installedApps/NBCDANISOR1Node03Cell/core-ear.ear/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar location rather than from a product class loader.
[11/4/16 9:45:41:655 EET] 00000195 SystemOut O 09:45:41.655 [WebContainer : 27] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
[11/4/16 9:45:41:656 EET] 00000195 SystemOut O 09:45:41.656 [WebContainer : 27] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
[11/4/16 9:45:41:656 EET] 00000195 SystemOut O 09:45:41.656 [WebContainer : 27] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
[11/4/16 9:45:41:657 EET] 00000195 SystemOut O 09:45:41.657 [WebContainer : 27] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Found Equinox FileLocator for OSGi bundle URL resolution
[11/4/16 9:45:41:658 EET] 00000195 SystemOut O 09:45:41.658 [WebContainer : 27] INFO org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension - Activating CDI extension for Spring Data JPA repositories.
[11/4/16 9:45:41:659 EET] 00000195 SystemOut O 09:45:41.659 [WebContainer : 27] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
[11/4/16 9:45:41:659 EET] 00000195 SystemOut O 09:45:41.659 [WebContainer : 27] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
[11/4/16 9:45:41:659 EET] 00000195 SystemOut O 09:45:41.659 [WebContainer : 27] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
[11/4/16 9:45:41:659 EET] 00000195 SystemOut O 09:45:41.659 [WebContainer : 27] INFO org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension - Activating CDI extension for Spring Data JPA repositories.
[11/4/16 9:45:41:743 EET] 00000195 SystemOut O 2016-11-04 09:45:41.743 INFO 8920 --- [bContainer : 27] org.jboss.weld.Event : WELD-000411: Observer method [BackedAnnotatedMethod] protected org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport.processAnnotatedType(@Observes ProcessAnnotatedType<X>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[11/4/16 9:45:41:744 EET] 00000195 SystemOut O 2016-11-04 09:45:41.744 INFO 8920 --- [bContainer : 27] org.jboss.weld.Event : WELD-000411: Observer method [BackedAnnotatedMethod] protected org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport.processAnnotatedType(@Observes ProcessAnnotatedType<X>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[11/4/16 9:45:41:896 EET] 00000195 SystemOut O 2016-11-04 09:45:41.896 INFO 8920 --- [bContainer : 27] com.ibm.ws.webcontainer.webapp : SRVE0169I: Loading Web Module: core-web-1.0.0.war.
[11/4/16 9:45:41:904 EET] 00000195 SystemOut O 2016-11-04 09:45:41.904 INFO 8920 --- [bContainer : 27] com.ibm.ws.session.WASSessionCore : SESN0176I: Will create a new session context for application key default_host/core-rest
[11/4/16 9:45:41:920 EET] 00000195 SystemOut O 2016-11-04 09:45:41.920 INFO 8920 --- [bContainer : 27] com.ibm.ws.webcontainer.webapp : SRVE0292I: Servlet Message - [core-ear#core-web-1.0.0.war]:.1 Spring WebApplicationInitializers detected on classpath
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O . ____ _ __ _ _
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O \\/ ___)| |_)| | | | | || (_| | ) ) ) )
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O ' |____| .__|_| |_|_| |_\__, | / / / /
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O =========|_|==============|___/=/_/_/_/
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O :: Spring Boot :: (v1.4.1.RELEASE)
[11/4/16 9:45:42:349 EET] 00000195 SystemOut O
[11/4/16 9:45:42:374 EET] 00000195 SystemOut O 2016-11-04 09:45:42.374 INFO 8920 --- [bContainer : 27] ro.test.ServletInitializer : Starting ServletInitializer on NBCDANISOR1 with PID 8920 (D:\IBM\WebSphere9\AppServer\profiles\AppSrv01\installedApps\NBCDANISOR1Node03Cell\core-ear.ear\core-web-1.0.0.war\WEB-INF\classes started by cosmin.danisor in D:\IBM\WebSphere9\AppServer\profiles\AppSrv01\bin)
[11/4/16 9:45:42:375 EET] 00000195 SystemOut O 2016-11-04 09:45:42.375 INFO 8920 --- [bContainer : 27] ro.test.ServletInitializer : No active profile set, falling back to default profiles: default
[11/4/16 9:45:42:394 EET] 00000195 SystemOut O 2016-11-04 09:45:42.394 INFO 8920 --- [bContainer : 27] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@62e4bebf: startup date [Fri Nov 04 09:45:42 EET 2016]; root of context hierarchy
[11/4/16 9:45:43:614 EET] 00000195 SystemOut O 2016-11-04 09:45:43.614 INFO 8920 --- [bContainer : 27] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[11/4/16 9:45:43:696 EET] 00000195 SystemOut O 2016-11-04 09:45:43.696 INFO 8920 --- [bContainer : 27] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$39abe309] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[11/4/16 9:45:43:734 EET] 00000195 SystemOut O 2016-11-04 09:45:43.734 INFO 8920 --- [bContainer : 27] com.ibm.ws.webcontainer.webapp : SRVE0292I: Servlet Message - [core-ear#core-web-1.0.0.war]:.Initializing Spring embedded WebApplicationContext
[11/4/16 9:45:43:734 EET] 00000195 SystemOut O 2016-11-04 09:45:43.734 INFO 8920 --- [bContainer : 27] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1340 ms
[11/4/16 9:45:43:927 EET] 00000195 SystemOut O 2016-11-04 09:45:43.926 WARN 8920 --- [bContainer : 27] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is javax.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception.
[11/4/16 9:45:43:939 EET] 00000195 SystemOut O 2016-11-04 09:45:43.938 ERROR 8920 --- [bContainer : 27] o.s.boot.SpringApplication : Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is javax.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
...
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) [com.ibm.ws.runtime.jar:na]
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) [com.ibm.ws.runtime.jar:na]
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) [com.ibm.ws.runtime.jar:na]
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) [com.ibm.ws.runtime.jar:na]
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892) [com.ibm.ws.runtime.jar:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is javax.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception.
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1148) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1051) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
...
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:168) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
... 114 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is javax.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception.
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:351) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:302) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1128) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1056) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
... 142 common frames omitted
Caused by: javax.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception.
at org.hibernate.validator.internal.engine.ValidatorImpl.isReachable(ValidatorImpl.java:1621) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1597) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:609) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:580) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForSingleDefaultGroupElement(ValidatorImpl.java:524) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:492) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:457) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:407) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:205) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:93) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.validation.DataBinder.validate(DataBinder.java:852) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.boot.bind.PropertiesConfigurationFactory.validate(PropertiesConfigurationFactory.java:367) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:287) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:256) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:346) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
... 156 common frames omitted
Caused by: javax.persistence.PersistenceException: java.lang.ClassNotFoundException: com.ibm.websphere.persistence.PersistenceProviderImpl
at javax.persistence.spi.PersistenceProviderResolverHolder$PersistenceProviderResolverPerClassLoader$CachingPersistenceProviderResolver.loadResolverClasses(PersistenceProviderResolverHolder.java:160) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at javax.persistence.spi.PersistenceProviderResolverHolder$PersistenceProviderResolverPerClassLoader$CachingPersistenceProviderResolver.<init>(PersistenceProviderResolverHolder.java:122) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at javax.persistence.spi.PersistenceProviderResolverHolder$PersistenceProviderResolverPerClassLoader.getPersistenceProviders(PersistenceProviderResolverHolder.java:80) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at javax.persistence.Persistence.getProviders(Persistence.java:69) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at javax.persistence.Persistence.access$000(Persistence.java:23) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at javax.persistence.Persistence$1.isLoaded(Persistence.java:109) ~[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.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:128) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.resolver.CachingTraversableResolverForSingleValidation.isReachable(CachingTraversableResolverForSingleValidation.java:36) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
at org.hibernate.validator.internal.engine.ValidatorImpl.isReachable(ValidatorImpl.java:1612) ~[hibernate-validator-5.2.4.Final.jar:5.2.4.Final]
... 170 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.ibm.websphere.persistence.PersistenceProviderImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:607) ~[na:1.8.0]
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:243) ~[bootstrap.jar:WAS90.SERV1 [cf011635.01]]
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:846) ~[na:1.8.0]
at java.lang.ClassLoader.loadClass(ClassLoader.java:825) ~[na:1.8.0]
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:134) ~[bootstrap.jar:WAS90.SERV1 [cf011635.01]]
at java.lang.ClassLoader.loadClass(ClassLoader.java:805) ~[na:1.8.0]
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62) ~[com.ibm.ws.runtime.jar:WAS90.SERV1 [cf011635.01]]
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58) ~[com.ibm.ws.runtime.jar:WAS90.SERV1 [cf011635.01]]
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:619) ~[com.ibm.ws.runtime.jar:WAS90.SERV1 [cf011635.01]]
at java.lang.ClassLoader.loadClass(ClassLoader.java:805) ~[na:1.8.0]
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:619) ~[com.ibm.ws.runtime.jar:WAS90.SERV1 [cf011635.01]]
at java.lang.ClassLoader.loadClass(ClassLoader.java:805) ~[na:1.8.0]
at javax.persistence.spi.PersistenceProviderResolverHolder$PersistenceProviderResolverPerClassLoader$CachingPersistenceProviderResolver.loadResolverClasses(PersistenceProviderResolverHolder.java:142) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
... 179 common frames omitted
我敢肯定没有多少人尝试过将这两者混合在一起,但它应该会起作用。
[INFO] ro.test:core-ear:ear:1.0.0
[INFO] +- ro.test:core-web:war:1.0.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.4.1.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.4.1.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.4.1.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.1.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.4.1.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.21:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
[INFO] | | +- org.springframework:spring-core:jar:4.3.3.RELEASE:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] | +- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.3:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.3:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.3:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:4.3.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:4.3.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:4.3.3.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.3.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.3.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.1.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:1.4.1.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.8.9:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.4.1.RELEASE:compile
[INFO] | | +- org.apache.tomcat:tomcat-jdbc:jar:8.5.5:compile
[INFO] | | | \- org.apache.tomcat:tomcat-juli:jar:8.5.5:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.3.3.RELEASE:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.0.11.Final:compile
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | +- org.hibernate:hibernate-entitymanager:jar:5.0.11.Final:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.10.3.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.12.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-orm:jar:4.3.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-tx:jar:4.3.3.RELEASE:compile
[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] | | \- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
[INFO] | \- org.springframework:spring-aspects:jar:4.3.3.RELEASE:compile
[INFO] +- net.sf.saxon:Saxon-HE:jar:9.7.0-10:compile
[INFO] \- org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.1.RELEASE:provided
[INFO] +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.5:provided
[INFO] +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.5:provided
[INFO] \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.5:provided
最佳答案
我终于设法让它工作了。谢谢你 dunni 的帮助,你让我走上了正确的道路。
<dependency>
<groupId>ro.bpmwave</groupId>
<artifactId>core-web</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
我已经将这些设置添加到 WebMvc 配置类
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter{
@Autowired
private javax.sql.DataSource dataSource;
@Bean
public SessionInterceptor sessionInterceptor() {
SessionInterceptor sessionInterceptor = new SessionInterceptor();
return sessionInterceptor;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(sessionInterceptor());
}
@Bean
LocalSessionFactoryBean sessionFactory() throws IOException {
LocalSessionFactoryBean factoryBean = new LocalSessionFactoryBean();
factoryBean.setHibernateProperties(getHibernateProperties());
factoryBean.setDataSource(dataSource);
factoryBean.setPackagesToScan("ro.test");
return factoryBean;
}
private Properties getHibernateProperties() {
Properties properties = new Properties();
properties.put("hibernate.dialect", DB2Dialect.class.getName());
properties.put("hibernate.show_sql", "false");
properties.put("hibernate.transaction.coordinator_class", "jta");
properties.put("hibernate.transaction.factory_class", "org.hibernate.transaction.CMTTransactionFactory");
return properties;
}
}
现在它就像一个魅力:)
关于java - Spring Boot 1.4.1 和 WAS 9 冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40417723/
我尝试阅读有关 Spring BOM、Spring Boot 和 Spring IO 的文档。 但是没有说明,我们应该如何一起使用它们? 在我的项目中,我们已经有了自己的 Parent POM ,所以
我正在开发的很酷的企业应用程序正在转向 Spring。这对所有团队来说都是非常酷和令人兴奋的练习,但也是一个巨大的压力源。我们所做的是逐渐将遗留组件移至 Spring 上下文。现在我们有一个 huuu
我正在尝试使用 @Scheduled 运行 Spring 批处理作业注释如下: @Scheduled(cron = "* * * * * ?") public void launchMessageDi
我对这两个概念有点困惑。阅读 Spring 文档,我发现,例如。 bean 工厂是 Spring 容器。我还读到“ApplicationContext 是 BeanFactory 的完整超集”。但两者
我们有一个使用 Spring BlazeDS 集成的应用程序。到目前为止,我们一直在使用 Spring 和 Flex,它运行良好。我们现在还需要添加一些 Spring MVC Controller 。
假设我有一个类(class) Person带属性name和 age ,它可以像这样用 Spring 配置: 我想要一个自定义的 Spring 模式元素,这很容易做到,允许我在我的 Sp
如何在 Java 中以编程方式使用 Spring Data 创建 MongoDB 复合索引? 使用 MongoTemplate 我可以创建一个这样的索引:mongoTemplate.indexOps(
我想使用 spring-complex-task 执行我的应用程序,并且我已经构建了复杂的 spring-batch Flow Jobs,它执行得非常好。 你能解释一下spring批处理流作业与spr
我实现了 spring-boot 应用程序,现在我想将它用作非 spring 应用程序的库。 如何初始化 lib 类,以便 Autowiring 的依赖项按预期工作?显然,如果我使用“new”创建类实
我刚开始学习 spring cloud security,我有一个基本问题。它与 Spring Security 有何不同?我们是否需要在 spring boot 上构建我们的应用程序才能使用 spr
有很多人建议我使用 Spring Boot 而不是 Spring 来开发 REST Web 服务。我想知道这两者到底有什么区别? 最佳答案 总之 Spring Boot 减少了编写大量配置和样板代码的
您能向我解释一下如何使用 Spring 正确构建 Web 应用程序吗?我知道 Spring 框架的最新版本是 4.0.0.RELEASE,但是 Spring Security 的最新版本是 3.2.0
我如何才能知道作为 Spring Boot 应用程序的一部分加载的所有 bean 的名称?我想在 main 方法中有一些代码来打印服务器启动后加载的 bean 的详细信息。 最佳答案 如spring-
我有一个使用 Spring 3.1 构建的 RESTful API,也使用 Spring Security。我有一个 Web 应用程序,也是一个 Spring 3.1 MVC 应用程序。我计划让移动客
升级到 Spring 5 后,我在 Spring Rabbit 和 Spring AMQP 中遇到错误。 两者现在都设置为 1.5.6.RELEASE 有谁知道哪些版本应该与 Spring 5 兼容?
我现在已经使用 Spring Framework 3.0.5 和 Spring Security 3.0.5 多次了。我知道Spring框架使用DI和AOP。我还知道 Spring Security
我收到错误 Unable to Location NamespaceHandler when using context:annotation-config running (java -jar) 由
在 Spring 应用程序中嵌入唯一版本号的策略是什么? 我有一个使用 Spring Boot 和 Spring Web 的应用程序。 它已经足够成熟,我想对其进行版本控制并在运行时看到它显示在屏幕上
我正在使用 spring data jpa 进行持久化。如果存在多个具有相同名称的实体,是否有一种方法可以将一个实体标记为默认值。类似@Primary注解的东西用来解决多个bean的依赖问题 @Ent
我阅读了 Spring 框架的 DAOSupport 类。但是我无法理解这些 DAOSuport 类的优点。在 DAOSupport 类中,我们调用 getXXXTemplate() 方法来获取特定的
我是一名优秀的程序员,十分优秀!