Selma BA
Selma BA

Reputation: 149

How to make GlassFish partially stopped

I am using GlassFish (GlassFish 4) an application server for my JAVA Enterprise application.

Sometimes,i need to restart it, usually when the fames error appeared:

Could not find sub module [MyApp_webapp.war] as defined in application.xml

To resolve this error, i try to delete the cache of the Ear from the folder application located in the domaine folder of Glassfish. To delete the folder,i need to stop the server before.

Of course, a stopping of the server will not let the other application running! and this is not good especially when those application are in use!

I tried to create two different domain:

domain1 and domain2 with the following properties:

domain1: Glassfish Admin console url= localhost:4848 and

<network-listeners>
              <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
              <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
              <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>

domain2: url= localhost:4242 and

 <network-listeners>
          <network-listener port="8081" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
          <network-listener port="8182" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
          <network-listener port="4242" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
 </network-listeners>

Then i tried to deploy two EARs : app1.ear on domain1 and app2.ear on domain2.

the first app1.ear can be launched on localhost:8080/app1-web the second one app2.ear cannot be launched on localhost:8081/app2-web and i got this error on log file:

[2016-01-27T18:09:44.956+0100] [glassfish 4.1] [SEVERE] [AS-WEB-CORE-00037] [javax.enterprise.web.core] [tid: _ThreadID=123 _ThreadName=http-listener-1(5)] [timeMillis: 1453914584956] [levelValue: 1000] [[ An exception or error occurred in the container during the request processing java.lang.ClassCastException: org.glassfish.grizzly.config.ContextRootInfo cannot be cast to org.apache.catalina.Context at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:597) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:353) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang.Thread.run(Thread.java:745) ]]

Am i missing something to configure on My different domains?

Thanks a lot

Upvotes: 0

Views: 1133

Answers (1)

Andrea Catania
Andrea Catania

Reputation: 1383

I think the solution is undeploy your ear archive. check this: https://docs.oracle.com/cd/E18930_01/html/821-2432/geyvr.html

It's for glassfish 3.1 but i think it's the same for GF4

Upvotes: 0

Related Questions