[jbossws-users] [JBossWS] - SchemaTypeCreator.introspectJavaProperties Exception w/ POJO

aschmidt1978 do-not-reply at jboss.com
Mon Jan 15 18:50:34 EST 2007


Hi,

I've created a simple POJO web service which has a method that returns a generated data type from an XML schema (using xjc). On deploying the web application that contains the service, I get the following exception:

java.lang.NullPointerException
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaProperties(SchemaTypeCreator.java:578)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(SchemaTypeCreator.java:332)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTypeCreator.java:273)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:132)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:127)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.createFieldParticle(SchemaTypeCreator.java:607)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaProperties(SchemaTypeCreator.java:592)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(SchemaTypeCreator.java:332)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTypeCreator.java:273)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:132)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:127)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.createFieldParticle(SchemaTypeCreator.java:607)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaProperties(SchemaTypeCreator.java:592)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(SchemaTypeCreator.java:332)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTypeCreator.java:273)
  |         at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:132)
  |         at org.jboss.ws.tools.JavaToXSD.generateForSingleType(JavaToXSD.java:109)
  |         at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateType(JavaToWSDLHelper.java:556)
  |         at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateTypesForXSD(JavaToWSDLHelper.java:141)
  |         at org.jboss.ws.tools.JavaToWSDL11.handleJavaToWSDLGeneration(JavaToWSDL11.java:245)
  |         at org.jboss.ws.tools.JavaToWSDL11.generate(JavaToWSDL11.java:168)
  |         at org.jboss.ws.tools.JavaToWSDL.generate(JavaToWSDL.java:318)
  |         at org.jboss.ws.deployment.JSR181MetaDataBuilder.processOrGenerateWSDL(JSR181MetaDataBuilder.java:289)
  |         at org.jboss.ws.deployment.JSR181MetaDataBuilder.setupEndpointFromAnnotations(JSR181MetaDataBuilder.java:231)
  |         at org.jboss.ws.deployment.JSR181MetaDataBuilderJSE.buildMetaData(JSR181MetaDataBuilderJSE.java:72)
  |         at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:92)
  |         at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:80)
  |         at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(DeployerInterceptorJSE.java:74)
  |         at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
  |         at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  |         at $Proxy105.create(Unknown Source)
  |         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  |         at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  |         at $Proxy8.deploy(Unknown Source)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

Schema is as follows (classes generated with package com.example.message):

<?xml version="1.0" encoding="UTF-8"?>
  | <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/MessageService" xmlns:tns="http://www.example.org/MessageService" elementFormDefault="qualified">
  | 
  |     <complexType name="ComplexMessageType">
  |     	<sequence>
  |     		<element name="MessageContent" type="string"></element>
  |     		<element name="ServerTime" type="dateTime"></element>
  |     	</sequence>
  |     </complexType>
  |     
  |     <element name="ComplexMessage" type="tns:ComplexMessageType"></element>
  | </schema>

POJO Web service code is as follows:

package com.example.service;
  | 
  | import java.util.GregorianCalendar;
  | 
  | import javax.jws.*;
  | import javax.xml.datatype.*;
  | import com.example.message.*;
  | 
  | @WebService(name="Example", serviceName="ExampleService", targetNamespace="http://www.example.org/MessageService")
  | public class ExampleService implements ExampleServiceSEI {
  | 
  | 	@WebMethod(operationName="EchoMessage")
  | 	public @WebResult(name="OutMessage") String echoMessage(@WebParam(name="InMessage") String message) {
  | 		return "Hello, " + message;
  | 	}
  | 
  | 	@WebMethod(operationName="EchoComplexMessage")
  | 	public @WebResult(name="OutMessage") ComplexMessageType echoComplexMessage(@WebParam(name="InMessage") String message) {
  | 		ComplexMessageType result = new ObjectFactory().createComplexMessageType();
  | 		result.setMessageContent("Hello, " + message);
  | 		try {
  | 			result.setServerTime(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()));
  | 		} catch (DatatypeConfigurationException e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		}
  | 		return result;
  | 	}
  | 
  | }
  | 

This deployment was done on a clean install of jboss-4.0.5.GA from the jems-installer-1.2.0.GA installer package.

Is there something I've missed, or is this feature slated for the next JBossWS release? If there's something that needs to be done re: configuration or updating software, what is it?

Has anyone else experienced this problem?

Thanks in advance.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002017#4002017

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002017



More information about the jbossws-users mailing list