users@glassfish.java.net

Programmatic deployment of EAR application

From: <forums_at_java.net>
Date: Tue, 19 Jul 2011 07:52:18 -0500 (CDT)

Hi all,

Since two day i try to fix a problem of EAR deployment ij Glassfish V2. It
give me crazy ... I explain:

Actually, I am working with a glassfish in localhost, port 4848, on http.

I have to change the connection in order to use secure certificate, with
protocol https. Its done via the Glassfish Admin, no problem.

But running my "Redeployement" program of EAR is not more working. I get a 
Ugly ERROR when I launched It.

Exception in thread "main" java.lang.IllegalStateException:
java.io.IOException: Unexpected end of file from server
    at
com.sun.enterprise.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:228)
    at
com.blablabla.utils.appserver.glassfish.DeploymentHelper.deploy(DeploymentHelper.java:121)
    at
com.blablabla.utils.appserver.glassfish.GlassFishManager.deployArchive(GlassFishManager.java:399)
    at
com.myproject.installer.AssembleAndRedeploy.refreshApplication(AssembleAndRedeploy.java:111)
    at
com.myproject.installer.AssembleAndRedeploy.main(AssembleAndRedeploy.java:144)
Caused by: java.lang.RuntimeException: java.io.IOException: Unexpected end of
file from server
    at
com.sun.appserv.management.client.ProxyFactory.getInstance(ProxyFactory.java:459)
    at
com.sun.appserv.management.client.ProxyFactory.getInstance(ProxyFactory.java:409)
    at
com.sun.enterprise.deployapi.SunDeploymentManager.getProxyFactory(SunDeploymentManager.java:1661)
    at
com.sun.enterprise.deployapi.SunDeploymentManager.getRootProxy(SunDeploymentManager.java:1638)
    at
com.sun.enterprise.deployapi.SunDeploymentManager.getDomainConfigProxy(SunDeploymentManager.java:1650)
    at
com.sun.enterprise.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:199)
    ... 4 more
Caused by: java.io.IOException: Unexpected end of file from server
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1491)
    at java.security.AccessController.doPrivileged(Native Method)
    at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1485)
    at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
    at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
    at
com.sun.enterprise.admin.jmx.remote.comm.ServletConnection.handleException(ServletConnection.java:261)
    at
com.sun.enterprise.admin.jmx.remote.comm.ServletConnection.receive(ServletConnection.java:148)
    at
com.sun.enterprise.admin.jmx.remote.comm.MBeanServerMessageConductor.invoke(MBeanServerMessageConductor.java:84)
    at
com.sun.enterprise.admin.jmx.remote.internal.RemoteMBeanServerConnection.getAttribute(RemoteMBeanServerConnection.java:297)
    at
com.sun.appserv.management.util.jmx.JMXUtil.getMBeanServerID(JMXUtil.java:123)
    at
com.sun.appserv.management.client.ProxyFactory.getInstance(ProxyFactory.java:445)
    ... 9 more
Caused by: java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
    at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
    at
com.sun.enterprise.admin.jmx.remote.comm.ServletConnection.receive(ServletConnection.java:127)
    ... 13 more
 

I use Connection with AppserverConnectionSource class as follow:

new AppserverConnectionSource(
                AppserverConnectionSource.PROTOCOL_RMI,
                host, 8686, adminUsername, adminPassword,
createTLSParam(), null);

and Deployment URL

deployer:Sun:AppServer::localhost:4848:https used in the class
"javax.enterprise.deploy.spi.DeploymentManager"

If somebody has an idea ...

 

 

 

 

 

 


--
[Message sent by forum member 'nikles007']
View Post: http://forums.java.net/node/823716