use*_*544 5 java netbeans web-services maven
我有一个 Maven JEE 应用程序在 TomEE 中运行良好。我在 Netbeans: 中创建了一个 SOAP Web 服务New - Web Service,它创建了一个简单的“hello”服务。出于某种原因,我收到一条消息
您选择的 Web 服务器似乎不支持 JSR 109 规范。要使 Web 服务器能够处理带注释的 Web 服务,应创建 sun-jaxws.xml 文件,并且需要在 web.xml 文件中生成 Web 服务的 servlets 条目
我接受、清理、构建……无论我做什么,每次打开 Netbeans 时我总是收到这条消息。就像变化不是持久的一样。
那么主要的问题是当我尝试运行该项目时。我收到一长串错误
在服务器日志中
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomee.catalina.JavaeeInstanceManager
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5066)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
Run Code Online (Sandbox Code Playgroud)
在日志中
SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebServiceTest]
org.apache.openejb.OpenEJBException: Unable to load servlet class: com.sun.xml.ws.tx.coord.v11.endpoint.RegistrationRequesterPortImpl: null
at org.apache.openejb.config.WsDeployer.processPorts(WsDeployer.java:234)
....
Caused by: java.lang.NullPointerException
at org.apache.openejb.config.WsDeployer.readWsdl(WsDeployer.java:451)
SEVERE: ContainerBase.removeChild: destroy:
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebServiceTest]] in state [STARTING_PREP]
at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:291)
....
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebServiceTest]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
....
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Unable to load servlet class: com.sun.xml.ws.tx.coord.v11.endpoint.RegistrationRequesterPortImpl: null
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1270)
....
Caused by: org.apache.openejb.OpenEJBException: Unable to load servlet class: com.sun.xml.ws.tx.coord.v11.endpoint.RegistrationRequesterPortImpl: null
at org.apache.openejb.config.WsDeployer.processPorts(WsDeployer.java:234)
....
Caused by: java.lang.NullPointerException
at org.apache.openejb.config.WsDeployer.readWsdl(WsDeployer.java:451)
....
SEVERE: Error deploying configuration descriptor C:\Program Files\Apache-Tomee-jaxrs-1.7.4\conf\Catalina\localhost\WebServiceTest.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebServiceTest]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903)
....
Run Code Online (Sandbox Code Playgroud)
编辑
我已经添加了这些依赖项,但在构建/运行时仍然出现相同的错误
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina-ws -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina-ws</artifactId>
<version>7.0.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.xml/jaxrpc-api -->
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
除了 Maven 依赖项之外,我还手动复制了文件jaxrpc-api-1.1.jar和tomcat-catalina-ws-7.0.5.jarTomEE lib 文件夹中的文件。该文件wsdl4j-1.6.3.jar已经存在。我重新启动了 Netbeans。不确定这些是所需的罐子,但它们不能解决问题。
| 归档时间: |
|
| 查看次数: |
3458 次 |
| 最近记录: |