Multi-threading: java.lang.RuntimeException: Data binding error
---------------------------------------------------------------
Key: AXIS2-3355
URL: https://issues.apache.org/jira/browse/AXIS2-3355
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: databinding
Affects Versions: 1.2
Environment: - MS Windows XP Professional SP2
- Axis2 1.3 with XML Beans data binding (axiom-api1.2.4, kernel 1.2,
stax 1.0.1, xbean 2.2.0)
- Websphere 6.1 and Tomcat 6
- JDK 1.5.0_12
- Maven 2.0.7 with java2wsdl and wsdl2java codegens
Reporter: Pat Bateman
Service.xml
<service name="SpringInit" class="com.SpringInit">
<description>
This web service initializes Spring.
</description>
<parameter name="ServiceClass">
com.SpringInit
</parameter>
<!-- Make sure the Spring class loader is used for the Web service,
allowing it to properly instantiate the Spring application context -->
<parameter name="ServiceTCCL">composite</parameter>
<!-- Ensure the service loads up immediately on startup, creating the
Spring application context -->
<parameter name="load-on-startup">true</parameter>
<operation name="springInit">
<messageReceiver
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation>
</service>
<service name="OurService" scope="request">
<description>
Our Web Service.
</description>
<parameter name="ServiceClass" locked="false">
com.RecommendationService
</parameter>
<parameter name="ServiceObjectSupplier">
org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier
</parameter>
<parameter name="SpringBeanName">ourService</parameter>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
</service>
Two methods:
public void updateSubscriber(SubscriberRequest request) {
long time = System.currentTimeMillis();
try {
Thread.sleep(20000);
} catch (Exception e) {
}
log.warn("UPDATE " + request.getClientId() + " : " +
String.valueOf(time));
}
public void disableSubscriber(SubscriberRequest request) {
long time = System.currentTimeMillis();
try {
Thread.sleep(20000);
} catch (Exception e) {
}
log.warn("DISABLE " + request.getClientId() + " : " +
String.valueOf(time));
}
The client looks like this:
OurServiceSOAP11PortStub portal =
new OurServiceSOAP11PortStub (url);
ServiceClient serviceClient = portal._getServiceClient();
Options options = serviceClient.getOptions();
options.setProperty(HTTPConstants.CHUNKED, new Boolean(false));
client.setPortal(portal);
Scenario:
We have 2 instances of the client, client1 and client2.
1- Client1 calls updateSubscriber
2- A couple of seconds later, client2 calls disableSubscriber
3- Client2 obtains a valid response, and the following log line is printed
WARN
[http-8080-1][][com.qualcomm.bcs.recommendation.RecommendationServiceImpl]
DISABLE client2 : 1195034820156
4- Client1, after printing the following log line...
WARN
[http-8080-2][][com.qualcomm.bcs.recommendation.RecommendationServiceImpl]
DISABLE client1 : 1195034819759
(Which is printed BEFORE the client2's one. Note the log.warn() call is the
same, but the request and the millis are not)
... throws this exception
java.lang.RuntimeException: Data binding error
at com.OurServiceSOAP11PortStub.fromOM(Recommend
ationServiceRecommendationServiceSOAP11PortStub.java:3318)
at com.ws.OurServiceSOAP11PortStub.updateSubscriber
(OurServiceSOAP11PortStub.java:1255)
at com.testclient.TestClient.updateSubscriber(TestClient.java:918)
at com.testclient.TestClient.performOperation(TestClient.java:552)
at com.testclient.TestClient.main(TestClient.java:1176)
Caused by: org.apache.xmlbeans.XmlException: Element [EMAIL PROTECTED]://com/xs
d is not a valid [EMAIL PROTECTED]://com/xsd document or a valid substitution.
at
org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:322)
at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:850)
at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)
at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)
at
com.xsd.UpdateSubscriberResponseDocument$Factory.parse(UpdateSubscriberResponseDo
cument.java:138)
at com.ws.
OurServiceSOAP11PortStub.fromOM(OurServiceSOAP11PortStub.java:3307)
Highlighted in bold the mismatch between what was supposed to be an
updateResponse and got a disableResponse instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]