-
1. Re: Arquillian with WebSphere
aslak Aug 18, 2010 6:31 PM (in response to michaelschuetz)It shouldn't be to hard at all.
Get your friend on the forum or to #jbosstesting, I can guide him threw the steps.
I'm 100% sure WebSphere has some usable remote deployment api.
-
2. Re: Arquillian with WebSphere
aslak Aug 18, 2010 6:38 PM (in response to aslak)If someone knows those API's, the DeployableContainer implementation shouldn't take much more then an hour to write.
Basically
DeployableContianer
- setup
prepare configuration etc
- start
start the container or connect to it
- deploy
use the ShrinkWrap Exporters to export it as a ZipStream into the Server Deployer
- undeploy
get the archive name and undeploy the archive
- stop
stop the container or disconnect
++ a ContainerConfiguration SPI impl for defining connection params etc and a AuxiliaryArchiveAppender api impl for bundling up e.g. the TestEnrichers like CDI, EJB, Resources.
-
3. Re: Arquillian with WebSphere
michaelschuetz Aug 18, 2010 8:06 PM (in response to aslak)Aslak, thanks.
Cool - this does sound quite straight forward.
-
4. Re: Arquillian with WebSphere
aslak Aug 25, 2010 12:35 PM (in response to michaelschuetz)I couldn't help my self..
https://jira.jboss.org/browse/ARQ-264
http://github.com/aslakknutsen/arquillian/tree/ARQ-264
The impl use the Websphere JMXAdmin API over SOAP. According to the JMX notifications etc all deploy ok, but I can't see the deployment in the admin console nor can it be reached via http... ?!
I used WebSphere 7.0 express trail, the artifacts in the pom use websphere_home to resolve some systemPaths.
The JMX API seems to only be able to deploy ear files?!
At least it's a start if someone wants to play with it further and get it to work..
-aslak-
-
5. Re: Arquillian with WebSphere
michaelschuetz Aug 29, 2010 4:42 PM (in response to aslak)Aslak, thanks for doing first implementation steps.
I will help to find people with appropriate WebSphere container knowledge.
Michael
-
6. Re: Arquillian with WebSphere
marc.walter Apr 14, 2011 4:59 AM (in response to michaelschuetz)Hi all,
and did anyone play with it and got it to work in the meantime as Aslak proposed?
Anyone out there willing to share the results or obstacles getting Arquillian to run with WebSphere?
I would highly appreciate any howto or documentation! :-)
Thanks!
Marc
Edit:
I saw that https://issues.jboss.org/browse/ARQ-264 is still in progress. Is the feature request still followed up or has it come to a dead end?
-
7. Re: Arquillian with WebSphere
aslak Apr 14, 2011 10:51 AM (in response to marc.walter)Oh yea, Gerhard Poul has done a great job here. It is not released yet, but the latest source can be found here:
https://github.com/arquillian/arquillian-container-was/tree/ARQ-264
There are some minor fixes in Gerhard's arquillian-core branch as well that you might want to add, basically adding a new WebSphere EJB name mapping to the EJBInjectionEnricher and a Sevlet Test Runner fix(not sure if this is needed for it to run. ?)
https://github.com/gpoul/arquillian-core/commits/master
Please take it for a spin and give some feedback.
-
8. Re: Arquillian with WebSphere
marc.walter Apr 15, 2011 3:40 AM (in response to aslak)Well okay how do I get Gerhard's branch actually?
I tried to add everything in my Maven pom as described in the documentation but I get an error saying "The POM for org.jboss.arquillian.container:arquillian-websphere-remote-7:jar:1.0.0-SNAPSHOT is missing, no dependency information available". What do I have to do to get the WebSphere 7 container implementation for Arquillian?
If I click on "download" at github I only get the 1.0.0-ALPHAx versions to choose from. And they don't contain the WebSphere stuff.
Thanks for your help!
-
9. Re: Arquillian with WebSphere
aslak Apr 16, 2011 5:43 AM (in response to marc.walter)You need to checkout and build it
example:
git clone git://github.com/arquillian/arquillian-container-was.git
cd arquillian-container-was
git checkout ARQ-264
export WAS_HOME=/root/to/my/websphere-7/install
mvn clean install
If all goes well, yoiu should have a artifact called arquillian-was-remote-7 in your maven repo you can include in your build.
-
10. Re: Arquillian with WebSphere
marc.walter Apr 18, 2011 8:57 AM (in response to aslak)Hi Aslak,
I got git to work but I had to use http protocol instead of git in order to avoid "fatal: unable to connect a socket" errors.
But building with Maven fails. I get the following error when I run "mvn clean install":
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.arquillian.container.was.remote_7.WebsphereIntegrationClientTestCase
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.953 sec <<< FAILURE!
Results :
Tests in error:
initializationError(org.jboss.arquillian.container.was.remote_7.WebsphereIntegrationClientTestCase)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
So the build does not finish and there is no arquillian-was-remote-7.jar generated.
Do I have to edit the arquillian.xml under src/test/resouces accordingly or do I have to start the WebSphere server before executing the Maven build?
Edit:
In arquillian.xml I switched the SOAP port to my servers default SOAP port 8880 but I still get an error:
org.jboss.arquillian.spi.client.container.LifecycleException: Could not create AdminClient: ADMC0016E: [...]
and
com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Software caused connection abort: recv failed; targetException=java.net.SocketException: Software caused connection abort: recv failed]
Does anyone have a hint what's wrong?
Nachricht geändert durch Marc Walter
-
11. Re: Arquillian with WebSphere
aslak Apr 18, 2011 8:06 AM (in response to marc.walter)You need to start the server or disable the tests.
-
12. Re: Arquillian with WebSphere
marc.walter Apr 18, 2011 9:07 AM (in response to aslak)Server is running but I still get the error.
There is another surefire-report. Maybe this gives a hint what's wrong with my configuration:
18.04.2011 15:03:24 org.jboss.arquillian.impl.client.container.ContainerRegistryCreator getActivatedConfiguration
INFO: Could not read active container configuration: null
18.04.2011 15:03:25 null null
WARNING: ADMC0046W
18.04.2011 15:03:26 null null
WARNING: Could not find tmx4jTransform.jar in null/etc/tmx4jTransform.jar - Interoperability to older versions of WebSphere is disabled
18.04.2011 15:03:26 null null
INFO: ssl.disable.url.hostname.verification.CWPKI0027I
18.04.2011 15:03:26 null null
INFO: Client code attempting to load security configuration
18.04.2011 15:03:26 null null
SEVERE: ssl.keystore.load.error.CWPKI0033E
-
13. Re: Arquillian with WebSphere
aslak Apr 18, 2011 10:29 AM (in response to marc.walter)maybe environment WAS_HOME is not set?
what version are you running of was?
-
14. Re: Arquillian with WebSphere
marc.walter Apr 18, 2011 11:05 AM (in response to aslak)Yes, WAS_HOME is set. I'm using WebSphere Platform 7.0.0.11.
I think I have some sort of encryption or parsing issue.
In the org.jboss.arquillian.container.was.remote_7.WebsphereIntegrationClientTestCase.txt file I have a nested SOAPException:
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status line " ": java.util.NoSuchElementException; targetException=java.lang.IllegalArgumentException: Error parsing HTTP status line " ": java.util.NoSuchElementException]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:469)
at org.apache.soap.rpc.Call.WASinvoke(Call.java:451)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:371)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:364)
... 85 more
So it seems that the SOAP service is working basically. But it cannot interpret the strange looking characters (" ") inside the HTTP status line. It seems that it is encrypted somehow. But I have no idea how to fix this.
Edit:
Great! The forum software doesn't know how to interpret the characters as well...