Not a proxy instance
parressh Jan 28, 2005 11:05 AMI have a J2EE 1.4 web service client that is working fine when called from a WAR, but is not working when I package it inside of an EJB JAR. I am using JBoss 4.0.1 in the default configuration.
Here is the basic code that is called from a Stateless Session Bean. The last line is throwing the exception.
InitialContext iniCtx = getInitialContext(); Service service = (EnrollmentServiceService) iniCtx.lookup("java:comp/env/service/EnrollmentService"); EnrollmentService enrollmentService = (EnrollmentService) service.getPort( EnrollmentService.class);
Here is part of the ejb-jar.xml file
<service-ref> <service-ref-name>service/EnrollmentService</service-ref-name> <service-interface>javax.xml.rpc.Service</service-interface> <wsdl-file>META-INF/wsdl/EnrollmentService.wsdl</wsdl-file> <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file> </service-ref>
Here is the relevant part of the exception stack trace I get:
java.lang.IllegalArgumentException: not a proxy instance at java.lang.reflect.Proxy.getInvocationHandler(Proxy.java:620) at org.jboss.webservice.client.PortProxy.<init>(PortProxy.java:67) at org.jboss.webservice.client.ServiceImpl.getPort(ServiceImpl.java:177) 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:585) at org.jboss.webservice.client.ServiceProxy.invoke(ServiceProxy.java:116) at $Proxy63.getPort(Unknown Source)
I am also getting some Class not found warnings about Array definitions in the WSDL. Neither Axis nor wscompile are creating Java Array classes:
WARN [2005-01-28 08:57:36,787] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_CTStdLeadStatus WARN [2005-01-28 08:57:36,787] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_CTNote WARN [2005-01-28 08:57:36,787] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_CTStudentScheduleSummary WARN [2005-01-28 08:57:36,818] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_CTClassSchedule WARN [2005-01-28 08:57:36,834] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_xsd_long WARN [2005-01-28 08:57:36,834] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_DemographicsFacade WARN [2005-01-28 08:57:36,850] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_CTDemographicsFacade WARN [2005-01-28 08:57:36,850] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_CTCourseInfoSummary WARN [2005-01-28 08:57:36,865] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_ResultList WARN [2005-01-28 08:57:36,897] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_xsd_string WARN [2005-01-28 08:57:36,912] (TypeMappingDescription.java:202) - Class not found: aaa.bbb.ccc.client.enrollment.ArrayOf_tns1_WSContactEventLog
Does anyone know why this is happening?
Thanks,
Matthew