I'm using JBoss 4.0.4 GA with EJB3-RC9-FD and JBossWS 1.0.3. NPE is thrown by org.jboss.ws.tools.schema.SchemaTypeCreator.java:578 during deployment.
After digging through the code I found Introspector, BeanInfo and PropertyDescriptor were causing the problem while analyzing one of my EJB methods. The method signature is:
public MyComplexType getMyComplexType();
public int getCodeCount(int type);
if (fieldType.equals(ParameterWrapping.WrapperType.class))
if (fieldType != null && fieldType.equals(ParameterWrapping.WrapperType.class)) continue;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import javax.ejb.SessionBean;
public class TestIt
{
public int getCodeCount(int type)
{
return 1;
}
public static void main(String[] args)
{
try {
Class javaType = TestIt.class;
// taken from SchemaTypeCreator.java
BeanInfo beanInfo = Introspector.getBeanInfo(javaType, Object.class);
PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
int len = props != null ? props.length : 0;
for (int i = 0; i < len && SessionBean.class.isAssignableFrom(javaType) == false; i++)
{
PropertyDescriptor prop = props;
String fieldname = prop.getName();
Class fieldType = prop.getPropertyType();
// End of borrowed code...the next line throws NPE
System.out.println(fieldType.getName());
}
} catch(Exception ex) {
ex.printStackTrace();
}
}
}