]
Bartosz Majsak reassigned ARQ-1566:
-----------------------------------
Assignee: Bartosz Majsak
NPE in GlassFishClientService when connecting to a ssl only
glassfish
---------------------------------------------------------------------
Key: ARQ-1566
URL:
https://issues.jboss.org/browse/ARQ-1566
Project: Arquillian
Issue Type: Bug
Components: GlassFish Containers
Affects Versions: glassfish_1.0.0.CR4
Reporter: Daniel G
Assignee: Bartosz Majsak
When connecting to a remote-glassfish that has no http port open
{noformat:title=related domain.xml excerpt}
<network-listeners>
<network-listener port="${HTTP_LISTENER_PORT}"
enabled="false" protocol="http-listener-1" transport="tcp"
name
="http-listener-1"
thread-pool="http-thread-pool"></network-listener>
...
{noformat}
the test-startup crashes with a NullPointerException.
{noformat}
java.lang.NullPointerException: null
at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
at java.util.regex.Matcher.reset(Matcher.java:308)
at java.util.regex.Matcher.<init>(Matcher.java:228)
at java.util.regex.Pattern.matcher(Pattern.java:1088)
at
org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService.getPortValue(GlassFishClientService.java:673)
at
org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService.access$500(GlassFishClientService.java:41)
at
org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService$ClusterServer.getNodeAddressList(GlassFishClientService.java:880)
at
org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService.startUp(GlassFishClientService.java:133)
at
org.jboss.arquillian.container.glassfish.CommonGlassFishManager.start(CommonGlassFishManager.java:72)
at
org.jboss.arquillian.container.glassfish.remote_3_1.GlassFishRestDeployableContainer.start(GlassFishRestDeployableContainer.java:59)
at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199)
at
org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)
at
org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)
at
org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)
at
org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
{noformat}
so i forked the build (
https://github.com/dgeissl/arquillian-container-glassfish.git) and
fixed the corresponding codelines.
to finaly see that the basic https support is missing in Arquillian, cause now i get this
exception:
{noformat}
java.lang.IllegalStateException: Error launching test MyTest public void MyTest.testMe()
at
org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:103)
at
org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120)
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
...
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at
org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:183)
at
org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:121)
at
org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
... 75 more
{noformat}
So the basic NPE cause can be fixed but for the https support we need core changes
right?
Like mentioned in ARQ-643