users@glassfish.java.net

Two classes have the same XML type name ???

From: Stefan Schilling <mail.suse_at_gmx.de>
Date: Wed, 27 Feb 2008 14:14:20 +0100

Hello!

I'm trying to deploy a number of Beans that offer WebServices. But when I try to deploy, I get the following exception:

[#|2008-02-27T13:53:43.655+0100|INFO|sun-appserver9.1|javax.enterprise.resource.webservices.jaxws.wstx.wsat|_ThreadID=73;_ThreadName=Thread-123;|WSTX-COMMON-2007: Map CMT EJB web method 'test.middleware.beans.HelloManagement'.'sayHelloToMe' with effective transaction attribute of 'REQUIRED' to wsdl bounded operation '{http://beans.middleware.mobileDevice.jco.schilling.clavis.biz/}middlewarePort':'sayHelloToMe' with WS-AT policy assertion(s) 'middlewarePortBinding_sayHelloToMe_WSAT_Policy'|#]

[#|2008-02-27T13:53:43.655+0100|INFO|sun-appserver9.1|javax.enterprise.resource.webservices.jaxws.wstx.wsat|_ThreadID=73;_ThreadName=Thread-123;|WSTX-COMMON-2007: Map CMT EJB web method 'test.middleware.beans.HelloManagement'.'sayHello' with effective transaction attribute of 'REQUIRED' to wsdl bounded operation '{http://beans.middleware.mobileDevice.jco.schilling.clavis.biz/}middlewarePort':'sayHello' with WS-AT policy assertion(s) 'middlewarePortBinding_sayHello_WSAT_Policy'|#]

[#|2008-02-27T13:53:43.675+0100|WARNING|sun-appserver9.1|com.sun.xml.ws.transport.http.servlet.ServletAdapter|_ThreadID=73;_ThreadName=Thread-123;_RequestID=8c046517-5d49-4555-b0fb-c0ed208d3771;|Container com.sun.enterprise.webservice.JAXWSContainer_at_12d3e1a doesn't support class com.sun.xml.ws.api.server.Module|#]

[#|2008-02-27T13:53:43.691+0100|INFO|sun-appserver9.1|javax.enterprise.system.core.naming|_ThreadID=73;_ThreadName=Thread-123;java:comp/env/test.middleware.beans.AlmMeTobMeasrmntDocManagement/em;|naming.bind|#]

[#|2008-02-27T13:53:43.718+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=73;_ThreadName=Thread-123;_RequestID=8c046517-5d49-4555-b0fb-c0ed208d3771;|Cannot initialize endpoint : error is : Unable to create JAXBContext due to the security restriction|#]

[#|2008-02-27T13:53:43.770+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=73;_ThreadName=Thread-123;_RequestID=8c046517-5d49-4555-b0fb-c0ed208d3771;|
javax.xml.ws.WebServiceException: Unable to create JAXBContext due to the security restriction
 at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
 at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:83)
 at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:260)
 at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
 at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
 at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
 at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:510)
 at com.sun.enterprise.webservice.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:299)
 at com.sun.enterprise.webservice.EjbRuntimeEndpointInfo.initRuntimeInfo(EjbRuntimeEndpointInfo.java:342)
 at com.sun.enterprise.webservice.WebServiceEjbEndpointRegistry.registerEjbWebServiceEndpoint(WebServiceEjbEndpointRegistry.java:122)
 at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:329)
 at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:654)
 at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:536)
 at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:171)
 at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:244)
 at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:232)
 at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:187)
 at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:419)
 at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974)
 at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)
 at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)
 at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
 at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
 at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
 at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
 at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
 at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
 at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
 at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
 at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
 at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
 at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
 at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
 at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
 at $Proxy1.invoke(Unknown Source)
 at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
 at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
 at com.sun.enterprise.deployment.client.DeploymentClientUtils.startApplication(DeploymentClientUtils.java:145)
 at com.sun.enterprise.deployment.client.DeployAction.run(DeployAction.java:537)
 at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://beans.middleware.mobileDevice.jco.schilling.clavis.biz/}addAlmMeTobMeasrmntDocResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
 this problem is related to the following location:
 at test.middleware.entities.AddAlmMeTobMeasrmntDocResponse
 at private test.middleware.entities.AddAlmMeTobMeasrmntDocResponse test.middleware.beans.jaxws.AddAlmMeTobMeasrmntDocResponse._return
 at test.middleware.beans.jaxws.AddAlmMeTobMeasrmntDocResponse
 this problem is related to the following location:
 at test.middleware.beans.jaxws.AddAlmMeTobMeasrmntDocResponse

 at java.security.AccessController.doPrivileged(Native Method)
 at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:144)
 ... 49 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://beans.middleware.mobileDevice.jco.schilling.clavis.biz/}addAlmMeTobMeasrmntDocResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
 this problem is related to the following location:
 at test.middleware.entities.AddAlmMeTobMeasrmntDocResponse
 at private test.middleware.entities.AddAlmMeTobMeasrmntDocResponse test.middleware.beans.jaxws.AddAlmMeTobMeasrmntDocResponse._return
 at test.middleware.beans.jaxws.AddAlmMeTobMeasrmntDocResponse
 this problem is related to the following location:
 at test.middleware.beans.jaxws.AddAlmMeTobMeasrmntDocResponse

 at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
 at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
 at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
 at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
 at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105)
 at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:146)
 at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:145)
 ... 51 more
|#]

[#|2008-02-27T13:53:43.870+0100|INFO|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=73;_ThreadName=Thread-123;MobileDeviceDemoMiddleware;|LDR5010: All ejb(s) of [MobileDeviceDemoMiddleware] loaded successfully!|#]

[#|2008-02-27T13:57:42.148+0100|WARNING|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=54;_ThreadName=httpWorkerThread-4848-3;_RequestID=a6e80dd8-b07d-4bf4-8238-88f798de4375;|com.sun.enterprise.admin.mbeans.J2EEModule:getStringForDDxml FileNotFoundException C:/Users/schilling/glassfish/domains/domain1\generated\xml\j2ee-modules\MobileDeviceDemoMiddleware\null|#]

[#|2008-02-27T13:57:47.547+0100|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=64;_ThreadName=httpSSLWorkerThread-8080-1;|parsing WSDL...

|#]

[#|2008-02-27T13:57:48.245+0100|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=64;_ThreadName=httpSSLWorkerThread-8080-1;|
generating code...
|#]

[#|2008-02-27T13:57:48.510+0100|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=64;_ThreadName=httpSSLWorkerThread-8080-1;|

compiling code...
|#]

[#|2008-02-27T13:57:58.429+0100|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=64;_ThreadName=httpSSLWorkerThread-8080-1;|Invoking wsimport with http://192.168.0.76:8080/middleware/HelloManagement?WSDL|#]

[#|2008-02-27T13:57:58.429+0100|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=64;_ThreadName=httpSSLWorkerThread-8080-1;|wsimport successful|#]



I don't understand why it argues for finding the same class name more than once. Every class in my project has its own, unique name (even over all packages, no name comes up twice).


In short, here are the used Interfaces:

package test.middleware;

import test.middleware.entities.AddAlmMeTobMeasrmntDocResponse;
import test.middleware.entities.AlmMeTobMeasrmntDoc;
import test.middleware.entities.MessageIdentification;

public interface AlmMeTobMeasrmntDocManagementIF {
        
        public AddAlmMeTobMeasrmntDocResponse addAlmMeTobMeasrmntDoc(
                        MessageIdentification messageID,
                        AlmMeTobMeasrmntDoc almMeTobMeasrmntDoc );

        public String sayHelloToMe( String hello );

}

package test.middleware;

import test.middleware.entities.Hello;
import test.middleware.entities.MessageIdentification;

public interface HelloManagementIF {

        public String sayHelloToMe( String hello );
        
        public Hello sayHello( MessageIdentification messageID, Hello hello );
}

package test.middleware;

import test.middleware.entities.MessageIdentification;
import test.middleware.entities.SapLoginData;
import test.middleware.entities.SapLoginResponse;

public interface LoginManagementIF {

        public boolean logout( MessageIdentification messageID );
        
        public SapLoginResponse login( MessageIdentification messageID, SapLoginData sapLoginData );

        public String testConnection();
        
        public String sayHelloToMe( String hello );
}

As it argues about my test.middleware.entities.AddAlmMeTobMeasrmntDocResponse class, here it is:

package test.middleware.entities;

import java.io.Serializable;

import javax.persistence.Entity;

@Entity
public class AddAlmMeTobMeasrmntDocResponse extends ReturnedObject
                        implements Serializable {

        private static final long serialVersionUID = 4779450387203369779L;
        int measureReceipt;
        private boolean stillWaiting = false;

        public AddAlmMeTobMeasrmntDocResponse(){
                
        }
        
        public boolean isStillWaiting() {
                return stillWaiting;
        }

        public void setStillWaiting(boolean stillWaiting) {
                this.stillWaiting = stillWaiting;
        }
        
        public AddAlmMeTobMeasrmntDocResponse( int measureReceipt ){
                this.measureReceipt = measureReceipt;
        }

        public int getMeasureReceipt() {
                return measureReceipt;
        }

        public void setMeasureReceipt(int measureReceipt) {
                this.measureReceipt = measureReceipt;
        }
}

and the extended test.middleware.entities.ReturnedObject class:

package test.middleware.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class ReturnedObject implements Serializable {


        private static final long serialVersionUID = -2297503444720736615L;
        protected int id;

        public ReturnedObject(){
                
        }

        @Id
        @GeneratedValue(strategy=GenerationType.AUTO)
        public int getId() {
                return id;
        }

        public void setId(int id) {
                this.id = id;
        }
}

Can anybody help me please?

I'm using glassfish-installer-v2ur1-b09d-windows

Thanks a lot.

Regards,
Stefan


-- 
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
http://games.entertainment.web.de/de/entertainment/games/free