[JBossWS] - NotSerializableException: org.jboss.ws.core.soap.SOAPFaultIm
by lafr
I'm using JBoss-4.2.4GA with jbossws-3.0.1-native-2.0.4.GA.
I used wsconsume to generate the client artefacts from an MS Dynamics Axapta 2009 instance.
Calling a Webservice I get this exception:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.jboss.ws.core.soap.SOAPFaultImpl
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:239)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:133)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:120)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:945)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:633)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy3.sendAggregatedValues(Unknown Source)
| ...
| Caused by: java.io.NotSerializableException: org.jboss.ws.core.soap.SOAPFaultImpl
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
| at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
| at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
| at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
| at java.lang.Throwable.writeObject(Throwable.java:648)
| at sun.reflect.GeneratedMethodAccessor206.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
| at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObjectVersion2_2(JavaSerializationManager.java:120)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:95)
| at org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120)
| at org.jboss.remoting.transport.socket.ServerThread.versionedWrite(ServerThread.java:841)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:641)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
|
All operations have a Fault message
<wsdl:binding name="BasicHttpBinding_GeneralJournalService" type="tns:GeneralJournalService">
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
| <wsdl:operation name="create">
| <soap:operation soapAction="http://schemas.microsoft.com/dynamics/2008/01/services/GeneralJournalServ..."
| style="document"/>
| <wsdl:input name="GeneralJournalServiceCreateRequest">
| <soap:body use="literal"/>
| </wsdl:input>
| <wsdl:output name="GeneralJournalServiceCreateResponse">
| <soap:body use="literal"/>
| </wsdl:output>
| <wsdl:fault name="AifFaultFault">
| <soap:fault name="AifFaultFault" use="literal"/>
| </wsdl:fault>
| </wsdl:operation>
| <wsdl:operation name="find">
| <soap:operation soapAction="http://schemas.microsoft.com/dynamics/2008/01/services/GeneralJournalServ..."
| style="document"/>
| <wsdl:input name="GeneralJournalServiceFindRequest">
| <soap:body use="literal"/>
| </wsdl:input>
| <wsdl:output name="GeneralJournalServiceFindResponse">
| <soap:body use="literal"/>
| </wsdl:output>
| <wsdl:fault name="AifFaultFault">
| <soap:fault name="AifFaultFault" use="literal"/>
| </wsdl:fault>
| </wsdl:operation>
| <wsdl:operation name="read">
| <soap:operation soapAction="http://schemas.microsoft.com/dynamics/2008/01/services/GeneralJournalServ..."
| style="document"/>
| <wsdl:input name="GeneralJournalServiceReadRequest">
| <soap:body use="literal"/>
| </wsdl:input>
| <wsdl:output name="GeneralJournalServiceReadResponse">
| <soap:body use="literal"/>
| </wsdl:output>
| <wsdl:fault name="AifFaultFault">
| <soap:fault name="AifFaultFault" use="literal"/>
| </wsdl:fault>
| </wsdl:operation>
| </wsdl:binding>
| which probably is part of the problem.
It's the first time I try to consume a WS defined this way.
What's missing or wrong here?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232869#4232869
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232869
15 years, 7 months
[JBossWS] - Eorros of creating WS client stub class
by SARA1232007
Hi,
I'm using jboss-4.2.2.GA and jbossws-native-3.0.5.GA. I create the WS client using jbossws. But when I run WS client, I get the excpetions when I invoke the creation of WS client stub class. The exceptions are as following:
Exception in thread "main" java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
| at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:94)
| at javax.xml.ws.spi.Provider.provider(Provider.java:80)
| at javax.xml.ws.Service.<init>(Service.java:79)
| at org.openuri._2004._04.helloworld.HelloWorldPOJOService.<init>(HelloWorldPOJOService.java:45)
| at samples.webservice.ClientTester.main(ClientTester.java:8)
| Caused by: java.lang.ExceptionInInitializerError
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at java.lang.Class.newInstance0(Unknown Source)
| at java.lang.Class.newInstance(Unknown Source)
| at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:89)
| ... 4 more
| Caused by: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference.
| at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:222)
| at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218)
| at java.security.AccessController.doPrivileged(Native Method)
| at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:217)
| at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
| ... 11 more
| Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
| Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them.
| this problem is related to the following location:
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
| at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
| this problem is related to the following location:
| at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
| at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
| at javax.xml.ws.wsaddressing.W3CEndpointReference
| Two classes have the same XML type name "elements". Use @XmlType.name and @XmlType.namespace to assign different names to them.
| this problem is related to the following location:
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
| at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
| at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
| this problem is related to the following location:
| at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
| at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
| at javax.xml.ws.wsaddressing.W3CEndpointReference
|
| 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.v2.ContextFactory.createContext(ContextFactory.java:117)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
| at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
| at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
| at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
| at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220)
| ... 15 more
|
|
|
Can anyone tell me what's wrong?
Thanks.
Sara
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232724#4232724
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232724
15 years, 7 months
[JBossWS] - JBossWS client not sending Basic Authentication
by leobaz2
Hi, I have a web service client that is trying to call a webservice secured with basic authentication. I had this working with JAVA 6 but not with JAVA 5.
I am setting the username and password correctly as seen below but I am still getting a 401 error code back. When I used tcpmon to inspect the request\response, I can see that the username and password is not being passed to the client.
| Map requestContext = ((BindingProvider) manager).getRequestContext();
| requestContext.put(BindingProvider.USERNAME_PROPERTY, username);
| requestContext.put(BindingProvider.PASSWORD_PROPERTY, password);
|
When I debug, I can see that the web service proxy has the username and password in its Map. So why are they not being sent along with the webservice call? Does it have something to do with the versions of the Jars I am using? I am using JBoss 4.2.3 and the jars are.
| jboss\client\xmlsec.jar
| jboss\client\jboss-jaxws.jar
| jboss\client\jbossws-client.jar
| jboss\client\jboss-common-client.jar
| jboss\lib\endorsed\serializer.jar
| jboss\lib\endorsed\xalan.jar
| jboss\lib\endorsed\xercesImpl.jar
| commons-validator
| commons-logging-api
| <my client stubs jar> created using jwsc ant task
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232592#4232592
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232592
15 years, 7 months
[JBossWS] - Memory leak with Provider<Source> webservice implementation
by Sintetik7
Hi,
I have a problem running my app that implements webservice using Provider api. After ~4hrs of mild load AS goes out of memory.
I'm using JBoss 5.0.1 with sun jdk 1.6.0_14. Configuration is
-Xms256m -Xmx1024m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -XX:+UseConcMarkSweepGC -Dsun.rmi.dgc.client.gcInterval=1800000 -Dsun.rmi.dgc.server.gcInterval=1800000
My endpoints defined as follows:
| @WebServiceProvider(serviceName = "StorageService", portName = "External", wsdlLocation = "WEB-INF/wsdl/storage.wsdl")
| @BindingType(value = HTTPBinding.HTTP_BINDING)
| @ServiceMode(value = Service.Mode.PAYLOAD)
| public class StorageServiceExternalProvider extends AbstractServiceProvider implements Provider<Source> {
|
| @Resource(type = Object.class)
| protected WebServiceContext wsContext;
|
| public Source invoke(Source req) {
| MessageContext mc = wsContext.getMessageContext();
| String path = ((String) mc.get(MessageContext.PATH_INFO)).substring(1);
| return invoke(path, req);
| }
|
| protected String getJndiNameSLSB() {
| return "StorageExternalSarco/local";
| }
| }
|
|
| public abstract class AbstractServiceProvider {
| private static Logger log = Logger.getLogger(AbstractServiceProvider.class);
|
| protected abstract String getJndiNameSLSB();
|
| public Source invoke(String path, Source req) {
|
| JAXBContext jc = null;
| Object local;
| Method[] localMethods;
|
| try {
| InitialContext ic = new InitialContext();
| local = ic.lookup(getJndiNameSLSB());
| ic.close();
| localMethods = local.getClass().getMethods();
|
| jc = StorageJAXBContext.getContext();
|
| } catch (Throwable t) {
| log.error("Unable to initialize", t);
| return new DOMSource();
| }
|
| Reader decoded;
| Object in = null;
| try {
|
| decoded = new StringReader(URLDecoder.decode(req.toString(), "utf8"));
| in = jc.createUnmarshaller().unmarshal(decoded);
|
| if (in instanceof JAXBElement<?>)
| in = ((JAXBElement<?>)in).getValue();
|
| for (Method m : localMethods)
| if (m.getName().equals(path))
| {
| Object result = m.invoke(local, in);
| Class<?> retType = m.getReturnType();
| if (retType == Void.TYPE)
| return new DOMSource();
| else
| return new JAXBSource(jc, result);
| }
|
| throw new Exception("Accessing invalid path: " + path);
|
| } catch (Throwable e) {
| log.error("Error processing invocation for path: " + path + ", input type is: " + (in == null ? "NULL" : in.getClass()), e);
| return new DOMSource();
| }
| }
|
web.xml:
<servlet>
| <servlet-name>StorageServiceExternalProvider</servlet-name>
| <servlet-class>com.photoholding.storage.StorageServiceExternalProvider</servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>StorageServiceExternalProvider</servlet-name>
| <url-pattern>/External/*</url-pattern>
| </servlet-mapping>
I tried to do jmap profiling and it shows lots of B[ and C[ objects growing with time. Looks like "Provider" instance is never released and GC skips it - size of the OldGen grows until GC can't handle it.
Any help is appreciated.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232449#4232449
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232449
15 years, 7 months