Bug 1147657 - [GSS] (6.4.0) POJO JAX-WS endpoints should not be processed if packaged in EJB-jar
Summary: [GSS] (6.4.0) POJO JAX-WS endpoints should not be processed if packaged in EJ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: DR9
: EAP 6.4.0
Assignee: Jim Ma
QA Contact: Rostislav Svoboda
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-29 18:47 UTC by Kyle Lape
Modified: 2019-08-19 12:41 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-3905 0 Major Closed POJO JAX-WS endpoints should not be processed if packaged in EJB-jar 2017-12-21 06:52:10 UTC

Description Kyle Lape 2014-09-29 18:47:29 UTC
If a POJO is defined like this in an EJB-jar:

package com.redhat.gss.ws; 

    @javax.jws.WebService 
    public class HelloService { 
      public String sayHello() { 
        return "Hello World!"; 
      } 
    }

Deployment structure:

    klape@localhost ws-java.jar$ tree
    .
    ├── com
    │   └── redhat
    │       └── gss
    │           └── ws
    │               └── HelloService.java
    └── META-INF
        └── MANIFEST.MF

    5 directories, 2 files
    klape@localhost ws-java.jar$

Upon deployment, you get this in the log:

----------------------------------------
16:52:51,372 INFO  [org.jboss.ws.cxf.metadata] (MSC service thread 1-7) JBWS024061: Adding service endpoint metadata: id=com.redhat.gss.ws.HelloService
 address=http://localhost:8080/ws-java/HelloService
 implementor=com.redhat.gss.ws.HelloService
 serviceName={http://ws.gss.redhat.com/}HelloServiceService
 portName={http://ws.gss.redhat.com/}HelloServicePort
 annotationWsdlLocation=null
 wsdlLocationOverride=null
 mtomEnabled=false
16:52:51,571 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-7) Creating Service {http://ws.gss.redhat.com/}HelloServiceService from class com.redhat.gss.ws.HelloService
16:52:51,879 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-7) Setting the server's publish address to be http://localhost:8080/ws-java/HelloService
16:52:51,925 INFO  [org.jboss.ws.cxf.deployment] (MSC service thread 1-7) JBWS024074: WSDL published to: file:/home/remote/klape/work/archives/wildfly-8.1.0.Final/standalone/data/wsdl/ws-java.jar/HelloServiceService.wsdl
----------------------------------------

Yet when you try to get the WSDL at http://localhost:8080/ws-java/HelloService?wsdl (pulled from the metadata in the log), you get a 404 error.

JBossWS should not be trying to deploy the POJO endpoint from within an EJB-jar.

Comment 1 Kabir Khan 2014-11-07 13:47:50 UTC
Merged

Comment 2 Jan Blizňák 2014-11-13 15:50:22 UTC
Using test deployment as stated in #c0, with the older version of EAP such deployment fails (which is different from what is in #c0, but that was clearly made for wildfly): 

16:46:30,076 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "test.jar" (runtime-name: "test.jar")
16:46:30,150 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."test.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "test.jar"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.0.Final-redhat-9.jar:7.5.0.Final-redhat-9]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component com.redhat.gss.ws.HelloService
	at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:94)
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.5.0.Final-redhat-9.jar:7.5.0.Final-redhat-9]
	... 5 more
Caused by: java.lang.ClassNotFoundException: com.redhat.gss.ws.HelloService from [Module "deployment.test.jar:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.4.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.4.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.4.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.4.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.4.Final-redhat-1]
	at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_67]
	at java.lang.Class.forName(Class.java:270) [rt.jar:1.7.0_67]
	at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.5.0.Final-redhat-9.jar:7.5.0.Final-redhat-9]
	at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:78)
	... 6 more

16:46:30,155 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) JBAS014612: Operation ("deploy") failed - address: ({"deployment" => "test.jar"}) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.jar\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"test.jar\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component com.redhat.gss.ws.HelloService
    Caused by: java.lang.ClassNotFoundException: com.redhat.gss.ws.HelloService from [Module \"deployment.test.jar:main\" from Service Module Loader]"}}
16:46:30,158 ERROR [org.jboss.as.server] (management-handler-thread - 4) JBAS015870: Deploy of deployment "test.jar" was rolled back with the following failure message: 
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.jar\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"test.jar\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component com.redhat.gss.ws.HelloService
    Caused by: java.lang.ClassNotFoundException: com.redhat.gss.ws.HelloService from [Module \"deployment.test.jar:main\" from Service Module Loader]"}}
16:46:30,167 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment test.jar (runtime-name: test.jar) in 9ms
16:46:30,168 INFO  [org.jboss.as.controller] (management-handler-thread - 4) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."test.jar".INSTALL


In 6.4.0.DR9, the deployment is now successful with nothing published:

15:58:40,995 INFO  [org.jboss.as.repository] (management-handler-thread - 2) JBAS014900: Content added at location /home/development/jbossqe/JBEAP-6.4.0.DR9/build/jboss-eap-6.4/standalone/data/content/4a/4d5f1a40ff18336816aa1edebd2985f6b09dd4/content
15:58:40,997 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "test.jar" (runtime-name: "test.jar")
15:58:41,063 INFO  [org.jboss.as.server] (management-handler-thread - 2) JBAS018559: Deployed "test.jar" (runtime-name : "test.jar")


We agreed with Allesio that it might be also useful to add some debug or warning that the deployment actually contains POJO webservice, but is not processed because it isn't in a war archive, new BZ/JIRA will be done for that.


Verified on 6.4.0.DR9


Note You need to log in before you can comment on or make changes to this bug.