1 2 3 4 Previous Next 45 Replies Latest reply on Mar 9, 2014 5:13 AM by Gerhard Poul

    Arquillian with WebSphere

    Michael Schuetz Novice

      Hi to all,

       

      friend of mine does really like Arquillian concepts.

       

      Only "problem" ist, that he relies on using WebSphere AS.

       

      So, what do you think? Is it possible to support this container?

       

      Could imagine remote container implementation for WS AS 7 (EE5 compliant). Anyway, AFAIK lots of people still using WS AS 6.1 (with EJB3 featurepack).

       

       

      Thanks an regards

      Michael

        • 1. Re: Arquillian with WebSphere
          Aslak Knutsen Master

          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 Knutsen Master

            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
              Michael Schuetz Novice

              Aslak, thanks.

               

              Cool - this does sound quite straight forward.

              • 4. Re: Arquillian with WebSphere
                Aslak Knutsen Master

                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
                  Michael Schuetz Novice

                  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 Newbie

                    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 Knutsen Master

                      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 Newbie

                        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 Knutsen Master

                          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 Newbie

                            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 Knutsen Master

                              You need to start the server or disable the tests.

                              • 12. Re: Arquillian with WebSphere
                                Marc Walter Newbie

                                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 Knutsen Master

                                  maybe environment WAS_HOME is not set?

                                   

                                  what version are you running of was?

                                  • 14. Re: Arquillian with WebSphere
                                    Marc Walter Newbie

                                    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 &quot;      &quot;: 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...

                                    1 2 3 4 Previous Next