tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tryte (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENEJB-2067) Wrong URL when hot-deploying @WebService to TomEE+ 1.6.0
Date Tue, 11 Feb 2014 09:53:20 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13897682#comment-13897682
] 

tryte commented on OPENEJB-2067:
--------------------------------

I'm seeing a similar stacktrace with an application that worked just fine in v1.5.2. TomEE
v1.6.0 and v1.6.1-20140211.041339-72 (-SNAPSHOT) however yield the following stacktrace:

{noformat}
Feb 11, 2014 10:32:13 AM org.apache.openejb.server.rest.RESTService logOldDeploymentUsage
INFO: Using deployment by endpoint instead of by application for JAXRS deployment because
an old configuration (by class/ejb) was found on com.example.tomee.agent.rest.HttpdRestService
Feb 11, 2014 10:32:13 AM org.apache.openejb.server.cxf.rs.CxfRsHttpListener configureFactory
INFO: Using providers [org.apache.cxf.jaxrs.provider.json.JSONProvider@38b01071]
Feb 11, 2014 10:32:13 AM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:8080/agent
Feb 11, 2014 10:32:13 AM org.apache.openejb.server.rest.RESTService deployPojo
INFO: REST Service: http://localhost:8080/agent/tomee/*  -> Pojo com.example.tomee.agent.rest.TomeeRestService
Feb 11, 2014 10:32:13 AM org.apache.openejb.server.cxf.rs.CxfRsHttpListener configureFactory
INFO: Using providers [org.apache.cxf.jaxrs.provider.json.JSONProvider@63f55210]
Feb 11, 2014 10:32:13 AM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:8080/agent
Feb 11, 2014 10:32:13 AM org.apache.openejb.observer.ObserverManager fireEvent
SEVERE: error invoking Observer{class=org.apache.tomee.webservices.TomeeJaxRsService}
org.apache.cxf.service.factory.ServiceConstructionException
        at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:194)
        at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:306)
        at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:259)
        at org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:712)
        at org.apache.openejb.server.rest.RESTService.fullServletDeployment(RESTService.java:409)
        at org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:276)
        at org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:149)
        at org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
        at org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:108)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1602)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:113)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: Already a destination on http://localhost:8080/agent
        at org.apache.cxf.transport.http.DestinationRegistryImpl.addDestination(DestinationRegistryImpl.java:49)
        at org.apache.cxf.transport.http.AbstractHTTPDestination.activate(AbstractHTTPDestination.java:854)
        at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:49)
        at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(AbstractBaseBindingFactory.java:97)
        at org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:89)
        at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)
        at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:185)
        ... 30 more

Feb 11, 2014 10:32:13 AM org.apache.catalina.startup.HostConfig deployDirectory
{noformat}

None of the 2 JAX-RS POJOs in that webapp uses {{@Path("/")}} or similar. Restarting TomEE
or doing a hot-deploy does not fix the problem.

> Wrong URL when hot-deploying @WebService to TomEE+ 1.6.0
> --------------------------------------------------------
>
>                 Key: OPENEJB-2067
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-2067
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 4.6.0
>         Environment: Windows, Linux
>            Reporter: rop
>            Assignee: Romain Manni-Bucau
>            Priority: Minor
>             Fix For: 4.6.1
>
>
> When deploying a war-file with webservice denoted only 
> with @Stateless @WebService annotation (no arguments, and empty web.xml config), there
is a problem with hot-deploy in TomEE.
> How to reproduce the error:
> 0. Build the simple source-code example below with: mvn install
> 1. Start TomEE, and then hot-deploy the war-file. It gets deployed to URL like this
>   http://localhost:8080/ws/webservices/App
> which is OK.
> 2. Do hot-UNdeploy. Also OK.
> 3. Next, hot-deploy the war-file a second time. 
> Apparently, it is trying to deploy to a weird URL:
>   http://App:80
> which fails of course. I get the Exception below.
> All subsequent hot-deploy attempts will raise the same Exception.
> If you leave the war-file in webapps, and shutdown + restart TomEE, it gets correctly
deployed again.
> SEVERE: Error deploying JAX-WS Web Service for EJB App
> java.lang.RuntimeException: Already a destination on http://App:80
>         at org.apache.cxf.transport.http.DestinationRegistryImpl.addDestination(DestinationRegistryImpl.java:49)
>         at org.apache.cxf.transport.http.AbstractHTTPDestination.activate(AbstractHTTPDestination.java:853)
>         at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:49)
>         at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(AbstractBaseBindingFactory.java:97)
>         at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:837)
>         at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)
>         at org.apache.openejb.server.cxf.CxfEndpoint.doPublish(CxfEndpoint.java:222)
>         at org.apache.openejb.server.cxf.CxfEndpoint.publish(CxfEndpoint.java:161)
>         at org.apache.openejb.server.cxf.CxfWsContainer.start(CxfWsContainer.java:51)
>         at org.apache.openejb.server.cxf.CxfService.createEjbWsContainer(CxfService.java:83)
>         at org.apache.openejb.server.webservices.WsService.deployApp(WsService.java:278)
>         at org.apache.openejb.server.webservices.WsService.afterApplicationCreated(WsService.java:224)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:149)
>         at org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
>         at org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:108)
>         at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:882)
>         at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:612)
>         at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1205)
>         at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1051)
>         at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
> Simple source-code example:
> -------------------------------------
> src/main/java/ws/App.java:
> -------------------------------------
> package ws;
> import javax.ejb.Stateless;
> import javax.jws.WebService;
> @Stateless
> @WebService
> public class App 
> {
>   public String hello(String name){
>     return "Hello, "+name+"!";
>   }
> }
> -------------------------------------
> src/main/webapp/WEB-INF/web.xml:
> -------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/javaee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>          metadata-complete="false"
>          version="2.5">
> </web-app>
> -------------------------------------
> 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>ws</groupId>
>   <artifactId>ws</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <packaging>war</packaging>
>   <name>ws</name>
>   <url>http://maven.apache.org</url>
>   <properties>
>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>   </properties>
>   
>   <build>
>    <finalName>ws</finalName>
>   </build>
>   <dependencies>
>       <dependency>
>       <groupId>org.apache.openejb</groupId>
>       <artifactId>javaee-api</artifactId>
>       <version>6.0-5</version>
>     </dependency>
>   </dependencies>
> </project>



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message