- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Rest EJB 创建项目。当我尝试在 Jboss 上部署时抛出以下错误
我使用jboss独立版进行数据库配置
12:14:06,358 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 70) JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service 'webservice.war#webUnit'
12:14:06,359 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016009: Stopping weld service for deployment webservice.war
12:14:06,370 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 70) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'webservice.war#webUnit'
12:14:06,383 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment webservice.war (runtime-name: webservice.war) in 30ms
12:14:06,383 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "webservice.war" (runtime-name: "webservice.war")
12:14:06,588 INFO [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for webUnit
12:14:06,616 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 70) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'webservice.war#webUnit'
12:14:06,616 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 70) HHH000204: Processing PersistenceUnitInfo [
name: webUnit
...]
12:14:06,627 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment webservice.war
12:14:06,630 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named EmployeeEJBImpl in deployment unit deployment "webservice.war" are as follows:
java:global/webservice/EmployeeEJBImpl!com.webservice.service.EmployeeEJBIf
java:app/webservice/EmployeeEJBImpl!com.webservice.service.EmployeeEJBIf
java:module/EmployeeEJBImpl!com.webservice.service.EmployeeEJBIf
java:global/webservice/EmployeeEJBImpl
java:app/webservice/EmployeeEJBImpl
java:module/EmployeeEJBImpl
12:14:06,650 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: webservice.war
12:14:06,653 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment webservice.war
12:14:06,657 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 70) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'webservice.war#webUnit'
12:14:06,659 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 70) HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
12:14:06,660 INFO [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (ServerService Thread Pool -- 70) HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
12:14:06,663 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 70) HHH000397: Using ASTQueryTranslatorFactory
12:14:06,663 WARN [org.hibernate.cfg.SettingsFactory] (ServerService Thread Pool -- 70) Unrecognized value for "hibernate.hbm2ddl.auto": none
12:14:06,798 WARN [org.jboss.as.weld] (MSC service thread 1-3) JBAS016018: Using deployment classloader to load proxy classes for module org.jboss.resteasy.resteasy-jaxrs:main. Package-private access will not work. To fix this the module should declare dependencies on [org.jboss.weld.core, org.jboss.weld.spi]
12:14:06,843 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./webservice: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./webservice: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.ExceptionInInitializerError
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199)
at com.google.common.cache.LocalCache.get(LocalCache.java:3934)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:204)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:736)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:762)
at org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:61)
at org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:89)
at org.jboss.resteasy.cdi.CdiConstructorInjector.construct(CdiConstructorInjector.java:64)
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
at org.jboss.resteasy.spi.ResteasyProviderFactory.addClientExceptionMapper(ResteasyProviderFactory.java:1048)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1438)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1346)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1268)
at org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:531)
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:338)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241)
at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
... 3 more
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_40]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_40]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_40]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_40]
at java.lang.Class.newInstance(Class.java:442) [rt.jar:1.8.0_40]
at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33)
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_40]
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:303)
at org.jboss.weld.bean.proxy.ClientProxyFactory.create(ClientProxyFactory.java:111)
at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:180)
at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:170)
at org.jboss.weld.bean.proxy.ClientProxyProvider.access$100(ClientProxyProvider.java:45)
at org.jboss.weld.bean.proxy.ClientProxyProvider$CreateClientProxy.load(ClientProxyProvider.java:56)
at org.jboss.weld.bean.proxy.ClientProxyProvider$CreateClientProxy.load(ClientProxyProvider.java:52)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195)
... 29 more
Caused by: java.security.PrivilegedActionException: java.lang.NoSuchMethodException: org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper.mapHttpException(org.apache.http.HttpException)
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_40]
at org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper$Proxy$_$$_WeldClientProxy.<clinit>(Unknown Source)
... 47 more
Caused by: java.lang.NoSuchMethodException: org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper.mapHttpException(org.apache.http.HttpException)
at java.lang.Class.getDeclaredMethod(Class.java:2130) [rt.jar:1.8.0_40]
at org.jboss.weld.security.GetDeclaredMethodAction.run(GetDeclaredMethodAction.java:39)
at org.jboss.weld.security.GetDeclaredMethodAction.run(GetDeclaredMethodAction.java:22)
... 49 more
12:14:06,850 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./webservice" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./webservice: Failed to start service
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.ExceptionInInitializerError
Caused by: java.lang.ExceptionInInitializerError
Caused by: java.security.PrivilegedActionException: java.lang.NoSuchMethodException: org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper.mapHttpException(org.apache.http.HttpException)
Caused by: java.lang.NoSuchMethodException: org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper.mapHttpException(org.apache.http.HttpException)"}}
12:14:06,875 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "webservice.war" with deployment "webservice.war"
12:14:06,875 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.unit."webservice.war".component.EmployeeEJBImpl.START (unavailable) dependents: [service jboss.deployment.unit."webservice.war".deploymentCompleteService]
service jboss.deployment.unit."webservice.war".component."org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap".START (unavailable) dependents: [service jboss.deployment.unit."webservice.war".deploymentCompleteService]
service jboss.deployment.unit."webservice.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (unavailable) dependents: [service jboss.deployment.unit."webservice.war".deploymentCompleteService]
service jboss.persistenceunit."webservice.war#webUnit" (unavailable) dependents: [service jboss.deployment.unit."webservice.war".deploymentCompleteService]
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./webservice: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./webservice: Failed to start service
service jboss.undertow.deployment.default-server.default-host./webservice
但是如果我从 web.xml 中删除以下行,它就会部署
<listener>
<listener-class>
org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
</listener-class>
</listener>
但是访问我的 url( http://localhost:8080/webservice/ ) 会抛出此错误
12:22:05,207 WARN [org.jboss.as.weld] (default task-3) JBAS016018: Using deployment classloader to load proxy classes for module org.jboss.resteasy.resteasy-jaxrs:main. Package-private access will not work. To fix this the module should declare dependencies on [org.jboss.weld.core, org.jboss.weld.spi]
12:22:05,247 ERROR [io.undertow.request] (default task-3) UT005023: Exception handling request to /webservice/: com.google.common.util.concurrent.ExecutionError: java.lang.ExceptionInInitializerError
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199)
at com.google.common.cache.LocalCache.get(LocalCache.java:3934)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:204) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:736) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:762) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:61) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:89) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.resteasy.cdi.CdiConstructorInjector.construct(CdiConstructorInjector.java:64) [resteasy-cdi-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyProviderFactory.addClientExceptionMapper(ResteasyProviderFactory.java:1048) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1438) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1346) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1268) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:531) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:338) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112) [resteasy-jaxrs-3.0.10.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-3.0.10.Final.jar:]
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:79)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:220) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.core.ManagedServlet.getServlet(ManagedServlet.java:163) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:84) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_40]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_40]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_40]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_40]
at java.lang.Class.newInstance(Class.java:442) [rt.jar:1.8.0_40]
at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_40]
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:303) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.proxy.ClientProxyFactory.create(ClientProxyFactory.java:111) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:180) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:170) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.proxy.ClientProxyProvider.access$100(ClientProxyProvider.java:45) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.proxy.ClientProxyProvider$CreateClientProxy.load(ClientProxyProvider.java:56) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.bean.proxy.ClientProxyProvider$CreateClientProxy.load(ClientProxyProvider.java:52) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195)
... 52 more
Caused by: java.security.PrivilegedActionException: java.lang.NoSuchMethodException: org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper.mapHttpException(org.apache.http.HttpException)
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_40]
at org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper$Proxy$_$$_WeldClientProxy.<clinit>(Unknown Source) [resteasy-jaxrs-3.0.10.Final.jar:]
... 70 more
Caused by: java.lang.NoSuchMethodException: org.jboss.resteasy.client.exception.mapper.ApacheHttpClient4ExceptionMapper.mapHttpException(org.apache.http.HttpException)
at java.lang.Class.getDeclaredMethod(Class.java:2130) [rt.jar:1.8.0_40]
at org.jboss.weld.security.GetDeclaredMethodAction.run(GetDeclaredMethodAction.java:39) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.security.GetDeclaredMethodAction.run(GetDeclaredMethodAction.java:22) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
... 72 more
这是我的 pom.xml
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.webservice</groupId>
<artifactId>webservice</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.13.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<version>1.0.2.Final</version>
</dependency>
<!-- Validationg Form -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<!-- logger -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
<scope>provided</scope>
</dependency>
<!-- Inject -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
</dependencies>
<!-- imp this will force deployed file name to be artifacid else in url
we need to provide complete file name including 0.0.1-SNAPSHOT -->
<build>
<finalName>${project.artifactId}</finalName>
</build>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>webservice</display-name>
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/</param-value>
</context-param>
<listener>
<listener-class>
org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
</listener-class>
</listener>
<servlet>
<servlet-name>resteasy-servlet</servlet-name>
<servlet-class>
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>resteasy-servlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>html/welcome.html</welcome-file>
</welcome-file-list>
</web-app>
持久性.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="webUnit">
<jta-data-source>java:jboss/datasources/webDS</jta-data-source>
<class>com.webservice.model.Employee</class>
<properties>
<property name="hibernate.hbm2ddl.auto" value="none" />
<property name="hibernate.archive.autodetection" value="class,hbm" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
</properties>
</persistence-unit>
</persistence>
最佳答案
通过更改为依赖项提供的范围解决了问题
<scope>provided</scope>
这是默认范围,如果未指定则使用。编译依赖项在项目的所有类路径中都可用。此外,这些依赖项会传播到依赖项目。
这很像编译,但表示您希望 JDK 或容器在运行时提供依赖项。例如,在为 Java Enterprise Edition 构建 Web 应用程序时,您可以将 Servlet API 和相关 Java EE API 的依赖关系设置为提供的范围,因为 Web 容器提供了这些类。此作用域仅在编译和测试类路径上可用,并且不可传递。
如
中所述Difference between maven scope compile and provided for JAR packaging
关于Rest EJB 项目未部署在 Wildfly 8.0 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32676737/
我想保护托管在我的 Widlfly AS 上的一些 ejb,所以我开始创建我的安全域。我不想在 ApplicationRealm 上进行身份验证,所以我定义了我的安全领域并将其指向我的安全域。我想将凭
我在 Wildfly 10 上有一个 Web 应用程序 并且在 Web 应用程序目录中,我放置了一个 zip 文件,当用户单击超链接时我想下载该文件。 在我的用户界面上 片段 ','_self')">
我们正在使用 wildfly,在我们的 wildflyhome/standalone/log 目录中,它充满了日志并最终耗尽了磁盘空间。我想设置滚动日志并且知道这是可能的,但只是不知道该怎么做。任何帮
是否可以在 WildFly 10 中配置压缩日志? 无法在此处找到正确的配置: https://docs.jboss.org/author/display/WFLY10/Handlers 最佳答案 日
在开发过程中,我希望能够在 Web 应用程序打开时运行我的 arquillian 测试。两者都使用不同的 WildFly 实例: 我的 Arquillian 测试使用托管(甚至嵌入式)wildfly
我想编写一个脚本来管理 WildFly 启动和部署,但我现在遇到了麻烦。要检查服务器是否已启动,我找到了命令 ./jboss-cli.sh -c command=':read-attribute(na
我们在旧版本中使用 -b 0.0.0.0 来完成此操作。但是当我们在 WildFly 中设置这个地址时,它会失败。在 WildFly-8.2 中执行此操作的替代方法是什么? 最佳答案 按以下方式更改您
在 WildFly 13 中禁用管理控制台的正确方法是什么?我在 http-interface 上设置了 console-enabled="false" 属性,但运行 WildFly 13 后我仍然看
我想向 STOMP 客户端公开我的 WildFly 服务器,但我还没有找到任何最近的样本。据我了解,最近 WildFly 版本中的所有通信都通过单个套接字(默认情况下监听 8080)。我需要更改任何配
我想将 Wildfly 服务器的日志子系统用于我的应用程序。在一些在线博客的帮助下,我在 standalone.xml 中为我的应用程序添加了一个日志配置文件。
从 JBoss 5.1 升级到 WildFly 8.2 后,我收到了下一个错误日志。同时 - 所有工作都有效。 2015-07-13 18:28:35,201 EJB default - 2 ERRO
在 WildFly 13 中禁用管理控制台的正确方法是什么?我在 http-interface 上设置了 console-enabled="false" 属性,但运行 WildFly 13 后我仍然看
我有一个在 Wildfly 8.0.0 Final 上运行的 JavaEE 应用程序。 应用程序使用了很多图像,我不想将它们存储在数据库中,因此将它们写入硬盘。 如何配置 Wildfly/Undert
我之前在 Glassfish 上有过一些代码,但我想将它移植到 WildFly。 但是,我似乎无法让 WildFly 调用该模块。 ServletContextListener初始化模块如下 Auth
Wildfly 和 Java 的初学者,如果这个问题非常基础,我深表歉意。任何帮助将不胜感激。 备注: 启动 Wildfly 服务器没有任何问题。 问题: 我正在尝试从以下位置开始 hello wor
Wildfly 和 Java 的初学者,如果这个问题非常基础,我深表歉意。任何帮助将不胜感激。 备注: 启动 Wildfly 服务器没有任何问题。 问题: 我正在尝试从以下位置开始 hello wor
我正在尝试将 JMC 连接到在 Windows8 机器上作为服务运行的 WildFly,但是当我打开 JMC 时,它不显示正在运行的 Wildfly,只显示运行 jmc 的 jvm。尝试以这种方式连接
有没有人有使用 CLI 在 Wildfly 中设置消息传递子系统的示例脚本? 一个完美的例子是 CLI 需要使用一个运行 standalone.xml 的服务器,在运行 CLI 脚本之后,它有一个在
在 NetBeans 下运行的 WildFly 8.1.0.Final 安装中,我不断收到以下看似随机的错误: 08:51:09,742 ERROR [io.undertow.request] (de
在 Wildfly 11 中部署 test.war 期间,我看到了一些警告: 09:45:32,714 WARN [org.jboss.weld.Validator] (MSC service th
我是一名优秀的程序员,十分优秀!