I'm trying to make an adapter to be used in RQM to automate test script execution. I followed the instructions specified on this page https://wiki.eclipse.org/Lyo/BuildClient for building the client in Eclipse and also the "Running the RQMAutimationSample" part. (I changed the adapter.properties file to use my project area, user/password, etc.
I would like to have the Sample up and running to have an example on how it should look like..
I was able to successfully login and register my adapter to RQM.
After I created a Test Script for the adapter and added it to a Test Case and ran it, RQM executes the script and tells me that the script executed successfully but it stops at 50%. Eclipse shows me the following Log in the console:
Apr 06, 2016 3:55:41 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample configureAdapter
INFO: Loading cached adapter properties from file:/U:/git/org.eclipse.lyo.client/org.eclipse.lyo.client.java.sample/target/classes/org/eclipse/lyo/client/oslc/samples/automation/adapter.properties
Apr 06, 2016 3:55:42 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample configureAdapter
INFO: Logging into service provider at https://rb-alm-12-p.de.bosch.com/qm
Apr 06, 2016 3:55:52 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample configureAdapter
INFO: Registering with service provider
Apr 06, 2016 3:55:54 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample begin
INFO: Starting heart beat thread for adapter at https://rb-alm-12-p.de.bosch.com/qm/oslc_auto_test/contexts/_QEvkT8NGEeStnojX_LZzWw/resources/com.ibm.rqm.execution.ToolAdapter/_ZIaH4PvsEeWx6KzxgbNObA
Apr 06, 2016 3:55:54 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample begin
INFO: Starting adapter polling at https://rb-alm-12-p.de.bosch.com/qm/oslc_auto_test/contexts/_QEvkT8NGEeStnojX_LZzWw/resources/com.ibm.rqm.execution.ExecutionRequest?oslc.where=rqm_auto%3AexecutesOnAdapter%3D%3Chttps%3A%2F%2Frb-alm-12-p.de.bosch.com%2Fqm%2Foslc_auto_test%2Fcontexts%2F_QEvkT8NGEeStnojX_LZzWw%2Fresources%2Fcom.ibm.rqm.execution.ToolAdapter%2F_ZIaH4PvsEeWx6KzxgbNObA%3E+and+rqm_auto%3Ataken%3Dfalse+and+oslc_auto%3Astate%21%3D%3Chttp%3A%2F%2Fopen-services.net%2Fns%2Fauto%23canceled%3E
Apr 06, 2016 4:04:59 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample handleAutomationRequest
INFO: Adapter has been assigned an Automation Request at https://rb-alm-12-p.de.bosch.com/qm/oslc_auto_test/contexts/_QEvkT8NGEeStnojX_LZzWw/resources/com.ibm.rqm.execution.ExecutionRequest/_ighWwfwAEeWx6KzxgbNObA
Apr 06, 2016 4:05:00 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample executeScript
INFO: Running script named 'test'
Apr 06, 2016 4:05:00 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample executeScript
INFO: Input parameters:
ERROR [main] (OutPart.java:100) - The system could not find a writer for class [B and application/octet-stream; name=sample.png. Locate a DataSourceProvider for the JavaBeans Activation Framework (JAF).
Exception in thread "main" org.eclipse.lyo.client.oslc.samples.automation.AutomationException: org.apache.wink.client.ClientRuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.handleAutomationRequest(RQMAutomationSample.java:221)
at org.eclipse.lyo.client.oslc.samples.automation.AutomationAdapter.start(AutomationAdapter.java:513)
at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.begin(RQMAutomationSample.java:91)
at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.main(RQMAutomationSample.java:59)
Caused by: org.apache.wink.client.ClientRuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:240)
at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:189)
at org.apache.wink.client.internal.ResourceImpl.invokeNoException(ResourceImpl.java:181)
at org.apache.wink.client.internal.ResourceImpl.post(ResourceImpl.java:322)
at org.eclipse.lyo.client.oslc.OslcClient.createResource(OslcClient.java:347)
at org.eclipse.lyo.client.oslc.OslcClient.createResource(OslcClient.java:326)
at org.eclipse.lyo.client.oslc.samples.automation.AutomationAdapter.uploadAttachment(AutomationAdapter.java:1266)
at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.handleAutomationRequest(RQMAutomationSample.java:183)
... 3 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.handle(ApacheHttpClientConnectionHandler.java:90)
at org.apache.wink.client.internal.handlers.HandlerContextImpl.doChain(HandlerContextImpl.java:52)
at org.apache.wink.client.internal.handlers.AcceptHeaderHandler.handle(AcceptHeaderHandler.java:79)
at org.apache.wink.client.internal.handlers.HandlerContextImpl.doChain(HandlerContextImpl.java:52)
at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:227)
... 10 more
Caused by: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.processRequest(ApacheHttpClientConnectionHandler.java:116)
at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.handle(ApacheHttpClientConnectionHandler.java:87)
... 14 more
Caused by: javax.ws.rs.WebApplicationException
at org.apache.wink.common.model.multipart.OutPart.writeBody(OutPart.java:103)
at org.apache.wink.common.model.multipart.OutPart.writePart(OutPart.java:130)
at org.apache.wink.common.model.multipart.OutMultiPart.write(OutMultiPart.java:76)
at org.apache.wink.common.internal.providers.multipart.OutMultiPartProvider.writeTo(OutMultiPartProvider.java:71)
at org.apache.wink.common.internal.providers.multipart.OutMultiPartProvider.writeTo(OutMultiPartProvider.java:39)
at org.apache.wink.client.internal.handlers.AbstractConnectionHandler.writeEntity(AbstractConnectionHandler.java:116)
at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.access$200(ApacheHttpClientConnectionHandler.java:72)
at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler$EntityWriter.writeTo(ApacheHttpClientConnectionHandler.java:405)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:622)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.processRequest(ApacheHttpClientConnectionHandler.java:113)
... 15 more
Do you know what might help me solve this problem?
Thanks in advance
Comments
Hi,
the wink client version defined in the POM of the client (org.eclipse.lyo.client.git) is not correct. It's set to 1.1.3-incubating but it should be 1.2.1-incubating