java - 使用 JBOSS 开发人员工作室部署 Web 服务时,Java8 和 JBoss EAP 7 是否存在严重的兼容性问题

标签 java web-services jboss jboss7.x

当我设置服务器来部署 .war 文件时,我在 JBoss 开发工作室上收到此错误日志:

我正在使用 Java 1.8.0-161 以及 JBOSS EAP 7.0.0.GA Core 2.1.2.Final-redhat-1 和 JBOSS Red Hat Developer Studio 版本 10.4.0.GA 尝试部署一个服务,该服务是确实也很老了。但之前工作得很好。但我收到以下错误日志并且安装被中止。

10:37:36,403 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-1) Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@551b90d9: defining beans [supportsTransactionTemplate,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,berichtFactoryComponent,protokollService]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@2f390677
10:37:37,653 INFO  [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-1) Creating Service {http://webservice.webkash.bgs.datagroup.de/import/V1}KashEImportWebserviceImplService from class de.datagroup.bgs.kashe.webservice.KashEImportWebserviceImpl
10:37:37,676 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."Web.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Web.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "Web.war"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154) [wildfly-server-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_161]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_161]
      at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_161]
Caused by: java.lang.VerifyError: (class: de/datagroup/bgs/kashe/webservice/jaxws_asm/ImportData, method: setImportRequest signature: (Lde/datagroup/bgs/kashe/webservice/model/ImportRequest;)V) Illegal instruction found at offset 1
      at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.8.0_161]
      at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) [rt.jar:1.8.0_161]
      at java.lang.Class.getConstructor0(Unknown Source) [rt.jar:1.8.0_161]
      at java.lang.Class.getDeclaredConstructor(Unknown Source) [rt.jar:1.8.0_161]
      at org.apache.cxf.common.util.ReflectionUtil$4.run(ReflectionUtil.java:105)
      at org.apache.cxf.common.util.ReflectionUtil$4.run(ReflectionUtil.java:102)
      at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_161]
      at org.apache.cxf.common.util.ReflectionUtil.getDeclaredConstructor(ReflectionUtil.java:102)
      at org.apache.cxf.common.jaxb.JAXBUtils.getValidClass(JAXBUtils.java:582)
      at org.apache.cxf.jaxb.JAXBContextInitializer.addClass(JAXBContextInitializer.java:309)
      at org.apache.cxf.jaxb.JAXBContextInitializer.begin(JAXBContextInitializer.java:187)
      at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:97)
      at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:74)
      at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:315)
      at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
      at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:467)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:696)
      at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:527)
      at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
      at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
      at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
      at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:460)
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:338)
      at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:79)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:543)
      at org.jboss.wsf.stack.cxf.configuration.BusHolder.configure(BusHolder.java:234)
      at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:97)
      at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:59)
      at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147) [wildfly-server-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
      ... 5 more

10:37:37,676 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "Web.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"Web.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Web.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"Web.war\"
    Caused by: java.lang.VerifyError: (class: de/datagroup/bgs/kashe/webservice/jaxws_asm/ImportData, method: setImportRequest signature: (Lde/datagroup/bgs/kashe/webservice/model/ImportRequest;)V) Illegal instruction found at offset 1"}}
10:37:37,801 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 31) WFLYSRV0010: Deployed "Web.war" (runtime-name : "Web.war")
10:37:37,801 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."Web.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Web.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "Web.war"

10:37:38,020 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
10:37:38,020 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
10:37:38,020 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: JBoss EAP 7.0.0.GA (WildFly Core 2.1.2.Final-redhat-1) started (with errors) in 38736ms - Started 259 of 449 services (1 services failed or missing dependencies, 251 services are lazy, passive or on-demand)
10:37:38,098 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-5) HV000001: Hibernate Validator 5.2.4.Final-redhat-1
10:37:41,473 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment Web.war (runtime-name: Web.war) in 3406ms
10:37:41,556 INFO  [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0002: Content removed from location C:\Users\KASHAd\devstudio\runtimes\jboss-eap\standalone\data\content\76\c572c3aa6c2bac786b47d25711fe91d5708b64\content
10:37:41,556 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "Web.war" (runtime-name: "Web.war")
10:37:41,556 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."Web.war".INSTALL

它在 Windows Server 2012 RC2 上运行。我尝试一遍又一遍地重新配置standalone.xml 文件,但没有任何帮助。

最佳答案

如上所述here ,当您针对与运行时实际使用的库不同的库进行编译时,可能会发生java.lang.VerifyError。特别是在这种情况下,我猜您正在使用不同的 JDK 进行编译和执行,可能是因为 Developer Studio 上的默认值发生了更改。

关于java - 使用 JBOSS 开发人员工作室部署 Web 服务时,Java8 和 JBoss EAP 7 是否存在严重的兼容性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57804354/

相关文章:

hibernate - JBoss Hibernate 与 SessionFactory 和 JNDI 冲突

java - 使用扫描仪读取

java - 如何在对等 2 对等设置中连接两个套接字连接

c# - 通过 ssl 调用 web 服务并使用客户端传递

java - 仅使用 JAX-WS 在请求的字符串参数上添加 CDATA

ruby - Sinatra 以编程方式获取端口和有关服务的其他信息

java - org.springframework.web.context.ContextLoaderListener(java.lang.ClassNotFoundException)

java - 当我使用 Liberty 将 Java 应用程序部署到 IBM Bluemix 时,构建包将其重命名为 myapp.war。如何保留原来的war文件名?

java - 软删除实现 Hibernate

java - Jboss eap7.0 支持 JDK 7 或 8