ex19_1: WSException: Cannot obtain java type mapping
tph1 Jun 7, 2007 7:51 PM$ echo $JBOSS_HOME
C:\jboss-4.2.0.GA
$ echo $JAVA_HOME
C:\Programs\Java\jdk1.5.0_12
The client in example 19_1 fails. I am running JBoss 4.2. Am I doing something wrong? Is the example obsolete in someway?
I would appreciate a way to resolve this.
Thanks, -Tim
I ran into 2 types of errors while attempting to run example 19 out of oreilly-ejb3-workbook_for_jboss404_GA.zip.
At first, 'ant run.client' complains:
[java] javax.naming.NamingException: Could not dereference object [Root exception is org.jboss.ws.metadata.wsdl.WSDLException: Cannot parse wsdlLocation: http://localhost:8080/titan/TravelAgentBean?wsdl]
I worked around this by editing both of these configuration files to make the WSDL settings match what was really deployed ("http://localhost:8080/TravelAgentBeanService/TravelAgentBean"):
But now, I am stymied by an error that the client hits:
run.client:
[java] javax.naming.NamingException: Could not dereference object [Root exception is org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://travelagent.titan.com/}createCabin]
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
[java] at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
[java] at $Proxy0.lookup(Unknown Source)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:351)
[java] at com.titan.clients.Client.main(Client.java:14)
[java] Caused by: org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://travelagent.titan.com/}createCabin
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.processDocElement(JAXRPCMetaDataBuilder.java:627)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataDoc(JAXRPCMetaDataBuilder.java:886)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:214)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:216)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
[java] at org.jboss.ws.core.jaxrpc.client.ServiceImpl.(ServiceImpl.java:126)
[java] at org.jboss.ws.core.jaxrpc.client.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:141)
[java] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
[java] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
[java] ... 5 more
Here are some lines from the log that occur during deployment:
:
16:34:26,050 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.units:jar=titan.jar,unitName=titan
16:34:26,081 INFO [Ejb3Configuration] found EJB3 Entity bean: com.titan.domain.Cabin
16:34:26,081 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
16:34:26,081 INFO [Configuration] Reading mappings from resource : META-INF/orm.xml
16:34:26,081 INFO [Ejb3Configuration] [PersistenceUnit: titan] no META-INF/orm.xml found
16:34:26,081 INFO [AnnotationBinder] Binding entity from annotated class: com.titan.domain.Cabin
:
16:34:26,206 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=titan.jar,name=TravelAgentBean,service=EJB3 with dependencies:
16:34:26,206 INFO [JmxKernelAbstraction] persistence.units:jar=titan.jar,unitName=titan
16:34:26,253 INFO [EJBContainer] STARTED EJB: com.titan.travelagent.TravelAgentBean ejbName: TravelAgentBean
16:34:26,316 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.0.GA/server/default/deploy/titan.jar
16:34:26,331 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.0.GA/server/default/data/wsdl/titan.jar/TravelAgentService58108.wsdl
16:34:26,394 INFO [ServiceEndpointManager] WebService started: http://localhost:8080/TravelAgentBeanService/TravelAgentBean