[GLASSFISH-21509] AsyncRunLevelContext (from hk2-runlevel.jar) is not on the classpath Created: 04/Feb/16  Updated: 10/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: daniel_armbrust Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It appears that the way that GlassFish is configuring the classloader for a deployed war is preventing the class AsyncRunLevelContext from being visible.

This breaks the ability to deploy code that utilizes HK2 internally, with the RunLevelController - any attempt to use the RunLevelController results in failure.

While debugging this issue: http://stackoverflow.com/questions/35190359/hk2-glassfish-jersey-incompatibility

I noticed that if I deploy code that attempts to do this:

ServiceLocator locator = ServiceLocatorUtilities.createAndPopulateServiceLocator();
looker.getService(RunLevelController.class));
locator.getService(AsyncRunLevelContext.class));

It will result in the RunLevelController service coming back with null, and the AsyncRunLevelContext doing this:

[2016-02-03T21:14:30.483-0500] [glassfish 4.1] [SEVERE] [] [javax.enterprise.web] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1454552070483] [levelValue: 1000] [[
  WebModule[/isaac-rest-1.0-SNAPSHOT]StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/glassfish/hk2/runlevel/internal/AsyncRunLevelContext
    at gov.vha.isaac.ochre.api.LookupService.get(LookupService.java:114)
    at gov.vha.isaac.rest.ApplicationConfig.onStartup(ApplicationConfig.java:55)
    at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:1165)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:172)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:362)
    at javax.servlet.GenericServlet.init(GenericServlet.java:244)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1382)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5732)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5977)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932)
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Unknown Source)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Unknown Source)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
    at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
    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.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:375)
    at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
    at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
    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:206)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    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:283)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
    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:591)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1783)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
    ... 84 more
]]

Not sure if this has anything to do with it, but both of those implementation classes are flagged as:

@Visibility(DescriptorVisibility.LOCAL)
public class RunLevelControllerImpl implements RunLevelController {

The docs for DescriptorVisiblity don't say anything about impacting the classpath.

Why are these classes which are provided by the hk2-runlevel.jar file - which is in the modules folder of GlassFish - available to a ServiceLocator I construct?

If I provide my own copy of the hk2-runlevel.jar file - then these classes are available - but classloader confusion seems to take over, and the ServiceLocator can't seem to locate any of my other HK2 annotated services.



 Comments   
Comment by daniel_armbrust [ 04/Feb/16 ]

The question at the end should say "Why are these classses ... NOT available" .... - I guess I'm not allowed to edit the submission to make corrections.

Comment by jwells [ 04/Feb/16 ]

The DescriptorVisibility is (probably) not part of the problem, all that controls is whether or not children of a ServiceLocator can see the service. This is much more likely some problem with the configuration of the Application classloader.

Comment by daniel_armbrust [ 10/Feb/16 ]

I have also verified at this point that my code which utilizes HK2 deploys fine on Tomcat, WebLogic and Wildfly.

So, not an HK2 issue, purely a Glassfish / Classpath issue with how it is exposing HK2 services (and/or not letting applications deploy their own versions of HK2)





[GLASSFISH-21514] HTTP errors: Connection is closed, Broken Pipe, TimeoutException Created: 09/Feb/16  Updated: 09/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: pranahata Assignee: Joe Di Pol
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GF 4.1.1.
JDK 1.8 u72
CentOS 64 bit VM



 Description   

Lots of these recently, most of our HTTP calls are used for transmitting serialized data or uploading files.

2016-02-09 08:12:53,288 ryan 58.110.161.175 http-listener-1(3) ERROR c.a.util.transport.rpc.client.server.RpcServlet Exception serializing response from Rpc
Request

{clazzName=com.tbi.bms.service.InspectionDashboardService, methodName=findAll, methodParamTypeNames=[com.tbi.bms.model.inspection.InspectionStatus, java.lang.String, com.tb i.bms.model.user.AppUser, java.util.Date, java.util.Date], args=[null, , null, Fri Jan 09 00:00:00 AWST 2015, Wed Mar 09 08:07:26 AWST 2016]}

org.apache.commons.lang3.SerializationException: java.io.IOException: Connection is closed
at org.apache.commons.lang3.SerializationUtils.serialize(SerializationUtils.java:157) ~[commons-lang3-3.3.2.jar:3.3.2]
at com.anahata.util.transport.rpc.RpcStreamer.serialize(RpcStreamer.java:185) ~[anahata-util-1.5.10-SNAPSHOT.jar:na]
at com.anahata.util.transport.rpc.RpcStreamer.stream(RpcStreamer.java:241) ~[anahata-util-1.5.10-SNAPSHOT.jar:na]
at com.anahata.util.transport.rpc.client.server.RpcServlet.service(RpcServlet.java:145) ~[anahata-util-1.5.10-SNAPSHOT.jar:na]
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) [web-core.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) [web-core.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [web-core.jar:na]
at com.anahata.util.web.remoteinfo.RemoteInfoFilter.doFilter(RemoteInfoFilter.java:48) [yam-server-1.6.4-SNAPSHOT.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) [web-core.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [web-core.jar:na]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) [web-core.jar:na]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) [web-core.jar:na]
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) [web-core.jar:na]
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) [web-core.jar:na]
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) [web-glue.jar:na]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) [web-core.jar:na]
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) [web-core.jar:na]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) [web-core.jar:na]
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) [kernel.jar:na]
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) [kernel.jar:na]
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.Proc

Also lots of these:

2016-02-05 16:34:47,514 Tony 60.224.19.14 http-listener-1(18) ERROR c.a.util.transport.rpc.client.server.RpcServlet Exception caught from service invocation
org.apache.commons.lang3.SerializationException: java.io.IOException: java.util.concurrent.TimeoutException
at org.apache.commons.lang3.SerializationUtils.deserialize(SerializationUtils.java:232) ~[commons-lang3-3.3.2.jar:3.3.2]
at com.anahata.util.transport.rpc.RpcStreamer.deserialize(RpcStreamer.java:299) ~[anahata-util-1.5.10-SNAPSHOT.jar:na]
at com.anahata.util.transport.rpc.RpcStreamer.receiveStreaming(RpcStreamer.java:292) ~[anahata-util-1.5.10-SNAPSHOT.jar:na]
at com.anahata.util.transport.rpc.client.server.RpcServlet.service(RpcServlet.java:95) ~[anahata-util-1.5.10-SNAPSHOT.jar:na]
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) [web-core.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) [web-core.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [web-core.jar:na]
at com.anahata.util.web.remoteinfo.RemoteInfoFilter.doFilter(RemoteInfoFilter.java:48) [yam-server-1.6.4-SNAPSHOT.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) [web-core.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [web-core.jar:na]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) [web-core.jar:na]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) [web-core.jar:na]
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) [web-core.jar:na]
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) [web-core.jar:na]
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) [web-glue.jar:na]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) [web-core.jar:na]
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) [web-core.jar:na]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) [web-core.jar:na]
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) [kernel.jar:na]
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) [kernel.jar:na]
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) [nucleus-grizzly-all.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]
Caused by: java.io.IOException: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:90) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) [nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:736) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.io.InputBuffer.blockingRead(InputBuffer.java:1107) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead(ServerInputBuffer.java:95) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.io.InputBuffer.fill(InputBuffer.java:1131) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.http.io.InputBuffer.read(InputBuffer.java:348) ~[nucleus-grizzly-all.jar:na]
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:267) ~[web-core.jar:na]
at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:270) ~[web-core.jar:na]
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:238) ~[na:1.8.0_72]
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) ~[na:1.8.0_72]
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122) ~[na:1.8.0_72]
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2303) ~[na:1.8.0_72]
at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2596) ~[na:1.8.0_72]
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2606) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readTypeString(ObjectInputStream.java:1413) ~[na:1.8.0_72]
at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:719) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:831) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1602) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_72]
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:238) ~[na:1.8.0_72]
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) ~[na:1.8.0_72]
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122) ~[na:1.8.0_72]
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2303) ~[na:1.8.0_72]
at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2596) ~[na:1.8.0_72]
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2606) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readTypeString(ObjectInputStream.java:1413) ~[na:1.8.0_72]
at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:719) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:831) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1602) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371) ~[na:1.8.0_72]
at java.util.ArrayList.readObject(ArrayList.java:791) ~[na:1.8.0_72]
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_72]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_72]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_72]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_72]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1707) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345) ~[na:1.8.0_72]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_72]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371) ~[na:1.8.0_72]
at org.apache.commons.lang3.SerializationUtils.deserialize(SerializationUtils.java:224) ~[commons-lang3-3.3.2.jar:3.3.2]
... 36 common frames omitted
Caused by: java.util.concurrent.TimeoutException: null
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:126) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:75) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.AbstractReader.read(AbstractReader.java:72) ~[nucleus-grizzly-all.jar:na]
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:77) ~[nucleus-grizzly-all.jar:na]
... 122 common frames omitted






[GLASSFISH-9048] Unable to build domains under 1.7.0-ea Created: 06/Aug/09  Updated: 08/Feb/16

Status: Open
Project: glassfish
Component/s: installation
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: esmithbss Assignee: Snjezana Sevo-Zenzerovic
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Linux


Issuezilla Id: 9,048
Status Whiteboard:

v3_exclude

Tags: 3_1-exclude, future-exclude

 Description   

I just installed Glassfish 2.1-b60e Jar under Ubuntu Linux 9.04 (EEEbuntu 3.0)
and during the domain creation received the following error:

BUILD FAILED
/home/esmith/Apps/Glassfish-2.1/setup.xml:161: The following error occurred
while executing this line:
/home/esmith/Apps/Glassfish-2.1/setup.xml:151: Glassfish requires JDK 1.5 or
higher, you have java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b59)
Java HotSpot(TM) Server VM (build 16.0-b03, mixed mode)

It appears that the setup script cannot determine that 1.7.0 is greater than 1.5.x



 Comments   
Comment by ne110415 [ 19/Aug/09 ]

Changing to right component.

Comment by Snjezana Sevo-Zenzerovic [ 14/Sep/09 ]

Issue not applicable to v3, adjusting target milestone and exclude keyword.

Comment by Snjezana Sevo-Zenzerovic [ 30/Aug/10 ]

...

Comment by Snjezana Sevo-Zenzerovic [ 30/Aug/10 ]

...

Comment by scatari [ 05/Jul/11 ]

Not a bug on 3.1.1.

Comment by stephenwilburn [ 28/Dec/11 ]

To get around this issue I edited the setup.xml file to include my current JDK version "1.7.0_02"

This allowed for a successful build.

(around lines 145-150 of the setup.xml file in the % glassfish directory)

<condition property="java.version.acceptable">
<or>
<contains string="$

{targeted.java.version}" substring="1.5"/>
<contains string="${targeted.java.version}

" substring="1.7.0_02"/>
</or>
</condition>

Comment by vovtz [ 08/Feb/16 ]

For a project that still uses GlassFish 2.1.1 in 2016, I changed the setup.xml like this:

    <condition property="java.version.acceptable">
       <or>
         <contains string="${targeted.java.version}" substring="1.5"/>
         <contains string="${targeted.java.version}" substring="1.6"/>
         <contains string="${targeted.java.version}" substring="1.7"/>
         <contains string="${targeted.java.version}" substring="1.8"/>
       </or>
    </condition>




[GLASSFISH-21513] HTTP status 404 - Not Found on instance the cluster and Local Exception Stack Created: 06/Feb/16  Updated: 06/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: nickyfulls Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

have create the cluster "mycluster", two local instance and the resources jms/Queue1, jms/Queue2 and jms/Topic with target server and cluster.

So in this way I created the cluster:

create-cluster mycluster

create-instance --node localhost-domain1 --cluster mycluster instance01

create-instance --node localhost-domain1 --cluster mycluster instance02

[...]

start-cluster mycluster

deploy --target mycluster Coo.ear

Application deployed with name Coo.

Warning: Command _deploy did not complete successfully on server instance instance01: remote failure: Failed to load the application on instance instance01. The application will not run properly. Please fix your application and redeploy.

Exception while loading the app : EJB Container initialization error. Please see server.log for more details.

Warning: Command _deploy did not complete successfully on server instance instance02: remote failure: Failed to load the application on instance instance02. The application will not run properly. Please fix your application and redeploy.

Exception while loading the app : EJB Container initialization error. Please see server.log for more details. Command deploy completed with warnings.

[...]

On [server]: hostname:8080/FE-war/ all right.

On [instance01 the cluster] hostname:28080/FE-war

and

On [instance02 the cluster] hostname:28081/FE-war

I get this desperate HTTP status 404 - Not Found ((((

Complete logs file server, instance01, instance02, [...]:

https://drive.google.com/folderview?id=0B7CqU8774DG8RGx0VkRVeEZXclE&usp=sharing

2016-02-06T17:00:24.593+0100] [glassfish 4.1] [SEVERE] [] [org.eclipse.persistence.session./file:/home/glassfish/glassfish4/glassfish/nodes/localhost-domain1/Coo1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.ejb] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454774410800] [timeMillis: 1454774424593] [levelValue: 1000] [[

Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Errore di connessione al server localhost sulla porta 1527 con messaggio Connessione rifiutata. Error Code: 0 [...]






[GLASSFISH-21512] cluster glassfish istance and deploy application jdbc/__TimerPool' Created: 06/Feb/16  Updated: 06/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Task Priority: Major
Reporter: nickyfulls Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have create the cluster and deploy my application example.ear and I get

Log server: http://paste.debian.net/378868

Log instance coo1: https://justpaste.it/r661

How do I fix?

[2016-02-06T14:38:19.840+0100] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=22 _ThreadName=Thread-9] [timeMillis: 1454765899840] [levelValue: 1000] [[
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv=

{com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.deployEJBTimerService(PersistentEJBTimerService.java:1464)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.initEJBTimerService(PersistentEJBTimerService.java:1370)
at org.glassfish.ejb.persistent.timer.DistributedEJBTimerService.initPersistentTimerService(DistributedEJBTimerService.java:98)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:230)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:825)
at com.sun.ejb.containers.AbstractSingletonContainer.<init>(AbstractSingletonContainer.java:127)
at com.sun.ejb.containers.CMCSingletonContainer.<init>(CMCSingletonContainer.java:76)
at com.sun.ejb.containers.SingletonContainerFactory.createContainer(SingletonContainerFactory.java:68)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.glassfish.resourcebase.resources.naming.ResourceNamingService.lookup(ResourceNamingService.java:236)
at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:224)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:511)
at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
... 40 more
Caused by: javax.naming.NameNotFoundException: __TimerPool not found
at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 49 more]]

[2016-02-06T14:38:19.845+0100] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454765883971] [timeMillis: 1454765899845] [levelValue: 1000] [[
Exception while preparing the app]]

[2016-02-06T14:38:19.847+0100] [glassfish 4.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454765883971] [timeMillis: 1454765899847] [levelValue: 1000] [[
Exception during lifecycle processing
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv=

{com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.deployEJBTimerService(PersistentEJBTimerService.java:1464)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.initEJBTimerService(PersistentEJBTimerService.java:1370)
at org.glassfish.ejb.persistent.timer.DistributedEJBTimerService.initPersistentTimerService(DistributedEJBTimerService.java:98)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:230)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:825)
at com.sun.ejb.containers.AbstractSingletonContainer.<init>(AbstractSingletonContainer.java:127)
at com.sun.ejb.containers.CMCSingletonContainer.<init>(CMCSingletonContainer.java:76)
at com.sun.ejb.containers.SingletonContainerFactory.createContainer(SingletonContainerFactory.java:68)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.glassfish.resourcebase.resources.naming.ResourceNamingService.lookup(ResourceNamingService.java:236)
at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:224)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:511)
at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
... 40 more
Caused by: javax.naming.NameNotFoundException: __TimerPool not found
at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 49 more
]]

[2016-02-06T14:38:19.891+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454765883971] [timeMillis: 1454765899891] [levelValue: 900] [[
Cannot deploy or load EJBTimerService:
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv=

{com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.deployEJBTimerService(PersistentEJBTimerService.java:1464)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.initEJBTimerService(PersistentEJBTimerService.java:1370)
at org.glassfish.ejb.persistent.timer.DistributedEJBTimerService.initPersistentTimerService(DistributedEJBTimerService.java:98)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:230)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:825)
at com.sun.ejb.containers.AbstractSingletonContainer.<init>(AbstractSingletonContainer.java:127)
at com.sun.ejb.containers.CMCSingletonContainer.<init>(CMCSingletonContainer.java:76)
at com.sun.ejb.containers.SingletonContainerFactory.createContainer(SingletonContainerFactory.java:68)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.glassfish.resourcebase.resources.naming.ResourceNamingService.lookup(ResourceNamingService.java:236)
at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:224)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:511)
at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
... 40 more
Caused by: javax.naming.NameNotFoundException: __TimerPool not found
at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 49 more
]]






[GLASSFISH-21511] cluster glassfish instance Created: 05/Feb/16  Updated: 06/Feb/16

Status: Open
Project: glassfish
Component/s: admin, jms
Affects Version/s: 4.1
Fix Version/s: None

Type: Task Priority: Major
Reporter: nickyfulls Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

How can I solve the following problem? What does it mean ?

[2016-02-05T16:12:27.897+0100] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=122 _ThreadName=Thread-9] [timeMillis: 1454685147897] [levelValue: 1000] [[
gogo: FileNotFoundException: /home/glassfish/glassfish4/glassfish/nodes/localhost-domain1/Coo1/config/noop=true (File o directory non esistente)]]
zito.2016
[2016-02-05T16:12:27.925+0100] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=122 _ThreadName=Thread-9] [timeMillis: 1454685147925] [levelValue: 1000] [[
java.io.FileNotFoundException: /home/glassfish/glassfish4/glassfish/nodes/localhost-domain1/Coo1/config/noop=true (File o directory non esistente)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at org.apache.felix.gogo.shell.Shell.readScript(Shell.java:218)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Thread.java:745)]]



 Comments   
Comment by saad_ab [ 06/Feb/16 ]

nodes not created successfully!





[GLASSFISH-21496] Directory traversal exposes file system resources Created: 28/Jan/16  Updated: 05/Feb/16

Status: Open
Project: glassfish
Component/s: admin, web_container
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: ggierer Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tested on both windows and linux



 Description   

This vulnerability has been tested on windows and linux, GlassFish version 4.1, but is most likely in previous versions as well.

Assuming the GlassFish 4.1 admin console is running locally on 4848 use the following URL to display the asenv.conf file in a browser (no logon required):

http://localhost:4848/theme/META-INF/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/config/asenv.conf

A similar URL can be crafted to examine file system resources or web application resources. I have examples of URLs that can display the WEB-INF/web.xml or even the /etc/passwd file on a unix server.

Note that I have added this as a "critical" priority due to the nature of the potential security threat. Application level servlet filtering can be used to remove the threat but the only option with the admin console is to block the port via a firewall. Please contact me for more information if required.



 Comments   
Comment by makiey [ 02/Feb/16 ]

howdy,
a possible workaround: it seems we need an extra-check for malformed utf-8 input in org.glassfish.grizzly.http.util.UTF8Decoder.
i.e. with a little help of java.nio.charset.CharsetDecoder.decode(...) - we could then examine the coderResult and - if error/malformed - throw a new CharConversionException to stop request processing.

public int convert(final byte[] buffer, final int srcOff, final char[] c, int dstOff, final int length) throws IOException {
final CharsetDecoder cd = StandardCharsets.UTF_8.newDecoder();
final byte[] bufferClone = buffer.clone();
final char[] cClone = c.clone();

final CoderResult decRes = cd.decode(ByteBuffer.wrap(bufferClone), CharBuffer.wrap(cClone), false);
if ((decRes != null) && (decRes.isError() || decRes.isMalformed()))

{ throw new CharConversionException("Conversion error"); }

....

Would be great if someone from grizzly team could take a look at it (Grizzly Framework 2.3.23).

Comment by ggierer [ 03/Feb/16 ]

Hi Guys,

This is a critical issue for our environment. Can you point me in the right direction to perhaps deploy a patch? Is it as simple as modifying org.glassfish.grizzly.http.util.UTF8Decoder and deploying this class? Any help would be greatly appreciated.

Gerald

Comment by makiey [ 04/Feb/16 ]

I think the mentioned workaround should help you. Patch the org.glassfish.grizzly.http.util.UTF8Decoder as described above, compile and put it into the nucleus-grizzly-all.jar (in glassfish/modules), evtl. distribute nucleus-grizzly-all.jar to all your machines, evtl. clear the osgi-caches, restart domain and test it thoughtfully - overlong control characters should cause the CharConversionExceptions.

Comment by ggierer [ 04/Feb/16 ]

Hi,

Thanks for the update. Where can I find the file org.glassfish.grizzly.http.util.UTF8Decoder appropriate to V4.1? Can you attach it to this issue or send to me directly at gerald.gierer@gieman.com? Many thanks for your help!

Comment by makiey [ 04/Feb/16 ]

4.1 -> http://search.maven.org/#artifactdetails|org.glassfish.grizzly|grizzly-http|2.3.15|bundle
4.1.1 -> http://search.maven.org/#artifactdetails|org.glassfish.grizzly|grizzly-http|2.3.23|bundle

Comment by ggierer [ 04/Feb/16 ]

Many thanks!

Comment by ggierer [ 05/Feb/16 ]

Have implemented the suggested fix and all seems well. Thank you very much for your help!





[GLASSFISH-21510] class including invokedynamic is breaking deployment - BufferUnderflowException Created: 04/Feb/16  Updated: 04/Feb/16

Status: Open
Project: glassfish
Component/s: deployment
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: floR Assignee: Hong Zhang
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

java 1.8.0_72
glassfish 4.1.1
ubuntu 14.4



 Description   

When trying to deploy an enterprise application including classes with bytecode containing invokedynamic, the deployment randomly stops with throwing a BufferUnderflowException:

java.nio.BufferUnderflowException
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:151)
at com.sun.enterprise.deployment.annotation.introspection.ConstantPoolInfo.containsAnnotation(ConstantPoolInfo.java:86)
...

This is always preceeded by severe warnings like

Severe: Unknow type constant pool 18 at position5
Severe: Unknow type constant pool 0 at position6
Severe: Unknow type constant pool 0 at position7

This is a problem especially when using Java 8's method reference operator/lamdas.



 Comments   
Comment by floR [ 04/Feb/16 ]

The problem seems to be the missing support of Java 7's contstant pool types Method handle, Method type and InvokeDynamic (ids 15, 16 and 18) in the class
com.sun.enterprise.deployment.annotation.introspection.ConstantPoolInfo of modules/dol.jar.

This class is used for checking the existence of annotations. For that reason, it inspects the constant pool part of the .class files byte by byte.
When trying to process any of the unsupported types, it simply logs the warning "Unknow [sic] type constant pool x at position i" and proceeds processing with the next byte, missing to skip bytes blonging to the types data structure.

This can result in trying to read bytes belonging to an irregular inferred constant pool entry of type string with an illegal length (inferred from the constant pool entry) => BufferUnderflowException.





[GLASSFISH-20818] Can't provide password for create-file-user Created: 19/Sep/13  Updated: 02/Feb/16

Status: Open
Project: glassfish
Component/s: command_line_interface, embedded
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mkwapisz Assignee: martin.mares
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64 JDK7u25



 Description   

I tired to create a user in a file realm from my Java code (embedded glassfish v4).

result = runner.
run(command, "--authrealmname", realmName,
"-groups", groups, "-passwordfile", userPasswordFilePath, user);

I get the following exception running above command:

SEVERE: PlainTextActionReporterFAILUREorg.jvnet.hk2.config.UnsatisfiedDependencyException: injection failed on com.sun.enterprise.security.cli.CreateFileUser.userpassword with class java.lang.StringDescription: create-file-user commandCannot find userpassword in create-file-user command model, file a bug
Usage: create-file-user
[--authrealmname ] [--target target]
[--groups user_groups[:user_groups]*]
[?|-help[=]] username

--passwordfile option points to a file with AS_ADMIN_USERPASSWORD=password content.

From asadmin create-file-user works fine for a glassfish instance

I used maven to download source code and found that in CommandExecutorImpl.getParameters there is:

if (globalOptions.size() > 0) {
String pwfile = globalOptions.getOne(ProgramOptions.PASSWORDFILE);
if (pwfile != null && pwfile.length() > 0) {
Map passwords = CLIUtil.readPasswordFileOptions(pwfile, true);
for (CommandModel.ParamModel opt : commandModel.getParameters()) {
if (opt.getParam().password()) {
String pwdname = opt.getName();
String pwd = passwords.get(pwdname);//looks for userpassword, not for AS_ADMIN_USERPASSWORD
if (pwd != null) {
options.set(pwdname, pwd);
}
}
}
}
}

CLIUtil.readPasswordFileOptions(pwfile, true) method is called with withPrefix set to true

for (Object key : prop.keySet()) {
final String entry = (String)key;
if (entry.startsWith(Environment.getPrefix())) {
final String optionName = withPrefix ? entry :
entry.substring(Environment.getPrefix().length()).toLowerCase(Locale.ENGLISH);//optionName is AS_ADMIN_USERPASSWORD, but should be userpassword
final String optionValue = prop.getProperty(entry);
passwordOptions.put(optionName, optionValue);
}
}



 Comments   
Comment by pdudits [ 02/Feb/16 ]

Proposed fix (using CLIUtil.readPasswordFileOptions(pwfile, false)) submitted to Payara. https://github.com/payara/Payara/pull/640





[GLASSFISH-21508] A failure when running a WebSocket application on Java EE 7 RI Created: 02/Feb/16  Updated: 02/Feb/16

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: xj Assignee: Shing Wai Chan
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

One licensee found a failure upon processing a request when running a WebSocket application on Java EE 7 RI.
Could you please forward this to the responsible engineer to answer their questions.
It is easily reproduced with our RI.

After deploying a WebSocket application(App1) on Domain Administration Server(DAS), the following error (a) occurred when accessing App1's URL after re-starting DAS.
(a)
-------------------------------------
javax.websocket.server.ServerContainer=null
-------------------------------------

The expected value (b) returned from App1 is below.
(b)
-------------------------------------
javax.websocket.server.ServerContainer=org.glassfish.tyrus.servlet.TyrusServletContainerInitializer$<Object hash>
-------------------------------------

Return value is changed every time (a) or (b) if DAS is re-started. There are 50% chances that (a) is returned.

The two similiar issues has been reported here.
https://java.net/jira/browse/GLASSFISH-16872
https://java.net/jira/browse/GLASSFISH-19551

Below is Hitachi's investigation result and they thought it is a defect in Java EE 7 RI.

1. The root cause is the attribute "javax.websocket.server.ServerContainer" is not set in ServletContext.

The set of "javax.websocket.server.ServerContainer" is done at line 123 of org.glassfish.tyrus.servlet.TyrusServletContainerInitializer.onStartup(Set, ServletContext). It returns without doing anything if the passed parameter classes is null or empty.
The above problem occurred because classes is null.

2. The reason about why the parameter classes of TyrusServletContainerInitializer is null.

At the line 455 of org.glassfish.web.loader.ServletContainerInitializerUtil.checkAgainstInterestList(Types, Map, List, Map, Set, ClassLoader),
-----------------------------
Type type = classInfo.getBy(c.getName());
-----------------------------

classInfo.getBy(c.getName()) returns null when the variable c is "javax.websocket.Endpoint".

3. The reason why the return value of TypesCtr.getBy(String) becomes null.

The method org.glassfish.hk2.classmodel.reflect.impl.TypesCtr.getBy(String) searches storage.values() which is a HashMap whose key is type of Class and it looks for the first hit and returns TypeProxy.get();

The problem is both of ClassModel and InterfaceModel are registered in the key of storage. The return value is null or not depending on which is first found as java.util.Map.values() is unordered.

4. The reason why InterfaceModel is registered as "javax.websocket.Endpoint".

In org.glassfish.hk2.classmodel.reflect.impl.SignatureVisitorImpl.visitClassType(String), it makes a determination if the parameter "s" is InterfaceModel by using TypeBuilder.getHolder(String, Class).
-----------------------------
public void visitClassType(String s) {
String interfaceName = org.glassfish.hk2.external.org.objectweb.asm.Type.getObjectType(s).getClassName();
TypeProxy<InterfaceModel> interfaceTypeProxy = typeBuilder.getHolder(interfaceName, InterfaceModel.class);
if (interfaceTypeProxy!=null) {
: <If "s" is the interface>
}
}
-----------------------------

If TypeBuilder.getHolder is invoked, that class is registered as InterfaceModel and null is never returned.

Due to the method SignatureVisitorImpl.visitClassType, if anonymous class is used as below, BBB is registered as InterfaceModel in storage though BBB is not interface.
---------------------------------
new AAA<BBB> {
:
}
---------------------------------

Using getHolder() to determine if it is of InterfaceModel is the root cause.

And the similar implementation was found in SignatureVisitorImpl.visitTypeVariable(String).

Questions:
1. Is this symptom a defect?
2. By setting true at system property "org.glassfish.web.parsing" can work around this problem. Does Oracle's engineer has any comment on this?
3. If it is a bug, do we have a plan to address it?

To reproduce:
1. Deploy attached war file on Java EE server
2. Re-start the Java EE server.
3. Access http://<host>:<port>/test/TestServle
4. If the following message is back, jump back to step 2.
javax.websocket.server.ServerContainer=org.glassfish.tyrus.servlet.TyrusServletContainerInitializer$<Object hash>






[GLASSFISH-21484] Observed CDI event anotated with TransactionPhase.AFTER_SUCCESS throws IllegalStateException: Transaction is not active in the current thread Created: 20/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: fmachado Assignee: Joe Di Pol
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I'm not sure if this is an issue that should be fixed on Glassfish or Weld side but, as I was not able to replicate it with the latest Wildfly version, I'm reporting here first.

From a JMS message that was received asynchronously, I'm calling a Stateless LocalBean that, at some point, will fire a CDI event. With another SLB that I'm using as the event handler, a method annotated with @Observes(during = TransactionPhase.AFTER_SUCCESS) will fail and throw java.lang.IllegalStateException: Transaction is not active in the current thread if this method tries to access any EJB (even if it is annotated with @TransactionManagement(TransactionManagementType.BEAN)).

[2016-01-20T03:57:41.238+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=101 _ThreadName=p: thread-pool-1; w: 1] [timeMillis: 1453258661238] [levelValue: 900] [[
  Exception during Singleton ResourceHandler processing
java.lang.IllegalStateException: Transaction is not active in the current thread.
	at com.sun.enterprise.transaction.JavaEETransactionImpl.checkTransationActive(JavaEETransactionImpl.java:722)
	at com.sun.enterprise.transaction.JavaEETransactionImpl.registerSynchronization(JavaEETransactionImpl.java:692)
	at com.sun.ejb.containers.SimpleEjbResourceHandlerImpl.checkTransaction(SimpleEjbResourceHandlerImpl.java:120)
	at com.sun.ejb.containers.SimpleEjbResourceHandlerImpl.<init>(SimpleEjbResourceHandlerImpl.java:69)
	at com.sun.ejb.containers.SimpleEjbResourceHandlerImpl.getResourceHandler(SimpleEjbResourceHandlerImpl.java:88)
	at com.sun.ejb.containers.AbstractSingletonContainer.setResourceHandler(AbstractSingletonContainer.java:182)
	at com.sun.ejb.containers.AbstractSingletonContainer.createEjbInvocation(AbstractSingletonContainer.java:171)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
	at com.sun.proxy.$Proxy185.isEnabled(Unknown Source)
	at com.fmachado.jeetest.ejb.__EJB31_Generated__MySingleton__Intf____Bean__.isEnabled(Unknown Source)
	at com.fmachado.jeetest.ejb.event.MyBusinessEventHandler.handleEvent(MyBusinessEventHandler.java:27)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
	at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
	at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
	at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
	at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
	at com.sun.proxy.$Proxy183.handleEvent(Unknown Source)
	at com.fmachado.jeetest.ejb.event.__EJB31_Generated__MyBusinessEventHandler__Intf____Bean__.handleEvent(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:414)
	at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
	at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
	at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:65)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
	at com.fmachado.jeetest.ejb.event.MyBusinessEventHandler$Proxy$_$$_Weld$EnterpriseProxy$.handleEvent(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:271)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:258)
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:237)
	at org.jboss.weld.event.DeferredEventNotification$1.execute(DeferredEventNotification.java:63)
	at org.jboss.weld.event.DeferredEventNotification$RunInRequest.run(DeferredEventNotification.java:100)
	at org.jboss.weld.event.DeferredEventNotification.run(DeferredEventNotification.java:57)
	at org.jboss.weld.event.TransactionSynchronizedRunnable.afterCompletion(TransactionSynchronizedRunnable.java:54)
	at com.sun.jts.jta.SynchronizationImpl.after_completion(SynchronizationImpl.java:156)
	at com.sun.jts.CosTransactions.RegisteredSyncs.distributeAfter(RegisteredSyncs.java:191)
	at com.sun.jts.CosTransactions.TopCoordinator.afterCompletion(TopCoordinator.java:2589)
	at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:414)
	at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:231)
	at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:622)
	at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:331)
	at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:174)
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:859)
	at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:719)
	at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
	at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
	at org.glassfish.ejb.mdb.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1326)
	at org.glassfish.ejb.mdb.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1301)
	at org.glassfish.ejb.mdb.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:86)
	at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:143)
	at com.sun.proxy.$Proxy258.afterDelivery(Unknown Source)
	at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:361)
	at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:107)
	at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
	at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
]]

I'm attaching a PoC that can be easily built and deployed.



 Comments   
Comment by fmachado [ 20/Jan/16 ]

I uploaded the PoC and complete server log files ( from both 4.1 and 4.1.1 versions) to my Dropbox account:
https://www.dropbox.com/sh/abpmiiriqmc50sp/AAAMvvbeM__xV5yOrl85WSOja

Deploy, open http://localhost:8080/jeetest-web/MyServlet?payload=somepayload and check your server.log file.

Thanks for your help guys!

Comment by gimlet [ 01/Feb/16 ]

Hi! I had explored that issue. Updating of Weld to version 2.2.16-Final solves it.





[GLASSFISH-21507] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.enterprise.iiop.security.GSSUtils Created: 01/Feb/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: security
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open
Tags: jdk9-int

 Description   

There is a reference to jdk internal api in com.sun.enterprise.iiop.security.GSSUtils , We are getting the following exception when we are trying to launch the Application Client Container,
com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref MsgBeanQueue@java.lang.String@null into class com.sun.mdb.client.Client: class com.sun.enterprise.iiop.security.GSSUtils (in unnamed module @0x68c4039c) cannot access class sun.security.util.ObjectIdentifier (in module java.base) because module java.base does not export sun.security.util to unnamed module @0x68c4039c
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:740)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:507)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:235)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:227)
at org.glassfish.appclient.client.acc.AppClientContainer$ClientMainClassSetting.getClientMainClass(AppClientContainer.java:636)
at org.glassfish.appclient.client.acc.AppClientContainer.getMainMethod(AppClientContainer.java:525)
at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:419)
at org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:320)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:283)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(java.instrument@9-ea/InstrumentationImpl.java:388)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(java.instrument@9-ea/InstrumentationImpl.java:400)
Caused by: java.lang.IllegalAccessError: class com.sun.enterprise.iiop.security.GSSUtils (in unnamed module @0x68c4039c) cannot access class sun.security.util.ObjectIdentifier (in module java.base) because module java.base does not export sun.security.util to unnamed module @0x68c4039c
at com.sun.enterprise.iiop.security.GSSUtils.<clinit>(GSSUtils.java:89)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.isMechanismSupported(SecurityMechanismSelector.java:549)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.useMechanism(SecurityMechanismSelector.java:1024)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.selectSecurityMechanism(SecurityMechanismSelector.java:1010)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.selectSecurityMechanism(SecurityMechanismSelector.java:991)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.getSSLPorts(SecurityMechanismSelector.java:348)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.getSSLSocketInfo(SecurityMechanismSelector.java:542)
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getSSLPortsAsSocketInfo(IIOPSSLUtilImpl.java:143)
at org.glassfish.enterprise.iiop.impl.CSIv2SSLTaggedComponentHandlerImpl.extract(CSIv2SSLTaggedComponentHandlerImpl.java:152)
at com.sun.corba.ee.impl.folb.ClientGroupManager.getSocketInfo(ClientGroupManager.java:205)
at com.sun.corba.ee.impl.transport.ContactInfoListImpl.addRemoteContactInfos(ContactInfoListImpl.java:401)
at com.sun.corba.ee.impl.transport.ContactInfoListImpl.createContactInfoList(ContactInfoListImpl.java:376)
at com.sun.corba.ee.impl.transport.ContactInfoListImpl.iterator(ContactInfoListImpl.java:188)
at com.sun.corba.ee.impl.protocol.ClientDelegateImpl.request(ClientDelegateImpl.java:193)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:226)
at com.sun.enterprise.naming.impl._SerialContextProvider_DynamicStub.lookup(com/sun/enterprise/naming/impl/_SerialContextProvider_DynamicStub.java)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(java.naming@9-ea/InitialContext.java:409)
at com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:82)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:745)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:715)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:159)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:471)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(java.naming@9-ea/InitialContext.java:409)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:638)
... 15 more
---------------------------------------------------------------
In com.sun.enterprise.iiop.security.GSSUtils line #89 have the following reference .
x = new ObjectIdentifier( GSSUPMechOID.value.substring(i+1));
sun.security.util.ObjectIdentifier is a JDK internal api . So we are getting the exception.



 Comments   
Comment by Arindam Bandyopadhyay [ 01/Feb/16 ]

As a work around please add the following line glassfish4/glassfish/bin/appclient file
export VMARGS="-XaddExports:java.base/sun.security.util=ALL-UNNAMED"





[GLASSFISH-21441] Umbrella Issue for Glassfish testing with JDK 9 Created: 13/Oct/15  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified
Environment:

JDK 9 jake build


Issue Links:
Blocks
is blocked by GLASSFISH-21490 JDK9 - REFERENCES TO JDK INTERNAL API... Open
is blocked by GLASSFISH-21491 JDK9 - REFERENCES TO JDK INTERNAL API... Open
is blocked by GLASSFISH-21492 JDK9 - REFERENCES TO JDK INTERNAL API... Open
is blocked by GLASSFISH-21493 JDK9 - REFERENCES TO JDK INTERNAL API... Open
is blocked by GLASSFISH-21497 JDK9-Unknown protocol: https exceptio... Open
is blocked by GLASSFISH-21498 JDK9 - Cluster deployment is failing ... Open
is blocked by GLASSFISH-21500 JDK9 - Quick Look Tests - -Need to re... Open
is blocked by GLASSFISH-21501 JDK9 - Quick Look Tests - -Need to re... Open
is blocked by GLASSFISH-21502 JDK9 - Quick Look Tests - - Quicklook... Open
is blocked by GLASSFISH-21503 JDK9 - JMS application deployment fails Open
is blocked by GLASSFISH-21505 JDK9 - Unable to launch the Applicati... Open
is blocked by GLASSFISH-21506 JDK9 - REFERENCES TO JDK INTERNAL API... Open
is blocked by GLASSFISH-21507 JDK9 - REFERENCES TO JDK INTERNAL API... Open
Dependency
depends on GLASSFISH-21334 JDK 9 - quicklook tests are broken Open
depends on GLASSFISH-21428 JDK9 - REFERENCES TO JDK INTERNAL API... Open
depends on GLASSFISH-21429 JDK9 - REFERENCES TO JDK INTERNAL API... Open
depends on GLASSFISH-21430 JDK9 - Unknown protocol: jar exceptio... Open
depends on GLASSFISH-21431 JDK9-Unknown protocol: http exception... Open
depends on GLASSFISH-21432 JDK9 - REFERENCES TO JDK INTERNAL API... Open
depends on GLASSFISH-21433 JDK9 - REFERENCES TO JDK INTERNAL API... Open
depends on GLASSFISH-21435 JDK9 - We are getting exception when ... Open
depends on GLASSFISH-21479 Glassfish 4.1 won't start with JDK 9 ... Open
depends on GLASSFISH-21236 Glassfish 4.1 won't start with JDK 9 ... Resolved
depends on GLASSFISH-21317 Glassfish 4.1 is giving NullPointerEx... Resolved
depends on GLASSFISH-19812 Prevent usage of proprietary API" war... Open
depends on GLASSFISH-21318 JDK 9 - Removal of ext dir and endors... In Progress
Sub-Tasks:
Key
Summary
Type
Status
Assignee
GLASSFISH-21480 JDK9 - exception when trying to load ... Sub-task Open russgold  
GLASSFISH-21481 JDK 9 - JDO83008: CMP Compilation failed Sub-task Open Arindam Bandyopadhyay  
GLASSFISH-21487 JDK9 - sun.mic.BASE* has been removed... Sub-task Open Arindam Bandyopadhyay  
GLASSFISH-21489 JDK 9 - EclipseLink Code is broken Sub-task Open Arindam Bandyopadhyay  
Tags: jdk9-int

 Description   

This is the umbrella Issue for Glassfish testing with JDK 9






[GLASSFISH-21506] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.corba.ee.impl.io.FVDCodeBaseImpl - Unable to launch the Application Client Container Created: 01/Feb/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open
Tags: jdk9-int

 Description   

In JDK9 we are unable to launch the Application Client Container due to REFERENCES TO JDK INTERNAL API IN com.sun.corba.ee.impl.io.FVDCodeBaseImpl . We are getting the following exception.
com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref MsgBeanQueue@java.lang.String@null into class com.sun.mdb.client.Client: superclass access check failed: class com.sun.corba.ee.impl.io.FVDCodeBaseImpl (in unnamed module @0x3532ec19) cannot access class com.sun.org.omg.SendingContext._CodeBaseImplBase (in module java.corba) because module java.corba does not export com.sun.org.omg.SendingContext to unnamed module @0x3532ec19
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:740)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:507)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:235)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:227)
at org.glassfish.appclient.client.acc.AppClientContainer$ClientMainClassSetting.getClientMainClass(AppClientContainer.java:636)
at org.glassfish.appclient.client.acc.AppClientContainer.getMainMethod(AppClientContainer.java:525)
at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:419)
at org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:320)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:283)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(java.instrument@9-ea/InstrumentationImpl.java:388)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(java.instrument@9-ea/InstrumentationImpl.java:400)
Caused by: java.lang.IllegalAccessError: superclass access check failed: class com.sun.corba.ee.impl.io.FVDCodeBaseImpl (in unnamed module @0x3532ec19) cannot access class com.sun.org.omg.SendingContext._CodeBaseImplBase (in module java.corba) because module java.corba does not export com.sun.org.omg.SendingContext to unnamed module @0x3532ec19
at java.lang.ClassLoader.defineClass1(java.base@9-ea/Native Method)
at java.lang.ClassLoader.defineClass(java.base@9-ea/ClassLoader.java:930)
at java.security.SecureClassLoader.defineClass(java.base@9-ea/SecureClassLoader.java:152)
at java.net.URLClassLoader.defineClass(java.base@9-ea/URLClassLoader.java:462)
at java.net.URLClassLoader.access$100(java.base@9-ea/URLClassLoader.java:75)
at java.net.URLClassLoader$1.run(java.base@9-ea/URLClassLoader.java:370)
at java.net.URLClassLoader$1.run(java.base@9-ea/URLClassLoader.java:364)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at java.net.URLClassLoader.findClass(java.base@9-ea/URLClassLoader.java:363)
at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:440)
at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:373)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.getRunTimeCodeBase(ValueHandlerImpl.java:342)
at com.sun.corba.ee.impl.orb.ORBImpl.getFVDCodeBaseIOR(ORBImpl.java:980)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:256)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:347)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:354)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:384)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:329)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:477)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(java.naming@9-ea/InitialContext.java:409)
at com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:82)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:745)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:715)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:159)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:471)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(java.naming@9-ea/InitialContext.java:409)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:638)
... 15 more
------------------------------------------------------------------------------------------------------------------------------
com.sun.corba.ee.impl.io.FVDCodeBaseImpl is a maven dependency
<groupId>org.glassfish.corba</groupId>

<artifactId>glassfish-corba-orb</artifactId>
So we need the org.glassfish.corba team to fix it .



 Comments   
Comment by Arindam Bandyopadhyay [ 01/Feb/16 ]

As a work around please add the following line glassfish4/glassfish/bin/appclient file
export VMARGS="-XaddExports:java.corba/com.sun.org.omg.SendingContext=ALL-UNNAMED"





[GLASSFISH-21491] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.corba.ee.impl.io.ObjectStreamClass Created: 25/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: orb
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

There is a reference to jdk internal api in com.sun.corba.ee.impl.io.ObjectStreamClass , We are getting the following exception,
--------------
java.lang.IllegalAccessError: class com.sun.corba.ee.impl.io.ObjectStreamClass$1 (in module: Unnamed Module) cannot access class sun.corba.Bridge (in module: java.corba), sun.corba is not exported to Unnamed Module
at com.sun.corba.ee.impl.io.ObjectStreamClass$1.run(ObjectStreamClass.java:112)
at com.sun.corba.ee.impl.io.ObjectStreamClass$1.run(ObjectStreamClass.java:110)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at com.sun.corba.ee.impl.io.ObjectStreamClass.<clinit>(ObjectStreamClass.java:108)
at com.sun.corba.ee.impl.util.RepositoryId.<clinit>(RepositoryId.java:189)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$NodeImpl.getTypeId(PresentationManagerImpl.java:358)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.addNodes(PresentationManagerImpl.java:337)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.makeTypeIds(PresentationManagerImpl.java:328)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.access$200(PresentationManagerImpl.java:80)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$ClassDataImpl.<init>(PresentationManagerImpl.java:151)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$1.lookup(PresentationManagerImpl.java:100)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$1.lookup(PresentationManagerImpl.java:97)
at org.glassfish.pfl.basic.concurrent.WeakCache.get(WeakCache.java:114)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.getClassData(PresentationManagerImpl.java:128)
at com.sun.corba.ee.impl.p]]

------------------------------------------------------------------
In com.sun.corba.ee.impl.io.ObjectStreamClass line #112 have the following reference .
return Bridge.get() ;
sun.corba.Bridge is a JDK internal api . So we are getting the exception . com.sun.corba.ee.impl.io.ObjectStreamClass is a maven dependency
<groupId>org.glassfish.corba</groupId>

<artifactId>glassfish-corba-orb</artifactId>
So we need the org.glassfish.corba team to fix it .



 Comments   
Comment by Arindam Bandyopadhyay [ 25/Jan/16 ]

As a work around please add -XaddExports:java.corba/sun.corba=ALL-UNNAMED java option

Comment by Arindam Bandyopadhyay [ 01/Feb/16 ]

We are getting the similar exception when we are trying to launch Application Client Container. So as a work around please add the following line glassfish4/glassfish/bin/appclient file
export VMARGS="-XaddExports:java.corba/sun.corba=ALL-UNNAMED"





Umbrella Issue for Glassfish testing with JDK 9 (GLASSFISH-21441)

[GLASSFISH-21489] JDK 9 - EclipseLink Code is broken Created: 25/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 5.0
Fix Version/s: None

Type: Sub-task Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

EclipseLink is broken with JDK9 build jdk9-b95 (and later) because of version string change (project verona) . Please refer http://openjdk.java.net/jeps/223.
We are getting the following exception from EclipseLink code –

java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.persistence.internal.helper.ClassConstants
at org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.getDefaultIdentityMapClass(AbstractIdentityMap.java:339)
at org.eclipse.persistence.sessions.Project.<init>(Project.java:109)
at org.eclipse.persistence.sessions.Project.<init>(Project.java:208)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1709)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactoryImpl(PersistenceProvider.java:347)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:313)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:199)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at javax.security.auth.Subject.doAs(java.base@9-ea/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at javax.security.auth.Subject.doAs(java.base@9-ea/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(java.base@9-ea/Thread.java:804)
----------------------------------------------------------------------------------------
The root cause of the exception is –
java.lang.NullPointerException
at org.eclipse.persistence.indirection.IndirectCollectionsFactory.getProvider(IndirectCollectionsFactory.java:190)
at org.eclipse.persistence.indirection.IndirectCollectionsFactory.<clinit>(IndirectCollectionsFactory.java:43)
------------------------------------------------------------------------------------
The rootcause is after project verona integration with JDK 9 , in EclipseLink org.eclipse.persistence.internal.helper.JavaSEPlatform.CURRENT is coming as null as EclipseLink code is expecting java version would come as 1.9 , but it's actually coming as 9.0.



 Comments   
Comment by Lukas Jungmann [ 25/Jan/16 ]

filed as https://bugs.eclipse.org/bugs/show_bug.cgi?id=486473





Umbrella Issue for Glassfish testing with JDK 9 (GLASSFISH-21441)

[GLASSFISH-21487] JDK9 - sun.mic.BASE* has been removed in jake build 101 - GF is not starting up Created: 22/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Sub-task Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Today I tried to use jigsaw build 101 . Earlier I was using jigsaw build 96 . In build 101 GF stops starting up . It was starting up fine with build 96 . When I am trying to start the server using build 101 , I am getting the following exception

Exception in thread "main" java.lang.NoClassDefFoundError: sun/misc/BASE64Decoder
at java.lang.ClassLoader.defineClass1(java.base@9-ea/Native Method)
at java.lang.ClassLoader.defineClass(java.base@9-ea/ClassLoader.java:928)
at java.security.SecureClassLoader.defineClass(java.base@9-ea/SecureClassLoader.java:152)
at jdk.internal.misc.BuiltinClassLoader.defineClass(java.base@9-ea/BuiltinClassLoader.java:582)
at jdk.internal.misc.BuiltinClassLoader.access$300(java.base@9-ea/BuiltinClassLoader.java:94)
at jdk.internal.misc.BuiltinClassLoader$3.run(java.base@9-ea/BuiltinClassLoader.java:490)
at jdk.internal.misc.BuiltinClassLoader$3.run(java.base@9-ea/BuiltinClassLoader.java:484)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at jdk.internal.misc.BuiltinClassLoader.findClassOnClassPathOrNull(java.base@9-ea/BuiltinClassLoader.java:483)
at jdk.internal.misc.BuiltinClassLoader.loadClassOrNull(java.base@9-ea/BuiltinClassLoader.java:430)
at jdk.internal.misc.BuiltinClassLoader.loadClass(java.base@9-ea/BuiltinClassLoader.java:388)
at jdk.internal.misc.ClassLoaders$AppClassLoader.loadClass(java.base@9-ea/ClassLoaders.java:177)
at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:373)
at org.glassfish.security.common.SSHA.decode(SSHA.java:319)
at org.glassfish.security.common.FileRealmHelper.decodeUser(FileRealmHelper.java:741)
at org.glassfish.security.common.FileRealmHelper.loadKeyFile(FileRealmHelper.java:638)
at org.glassfish.security.common.FileRealmHelper.<init>(FileRealmHelper.java:149)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.doAdminPasswordCheck(StartDomainCommand.java:326)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:156)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:322)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:368)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:302)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)
Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Decoder
at jdk.internal.misc.BuiltinClassLoader.loadClass(java.base@9-ea/BuiltinClassLoader.java:390)
at jdk.internal.misc.ClassLoaders$AppClassLoader.loadClass(java.base@9-ea/ClassLoaders.java:177)
at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:373)
... 23 more

As per Alan from JDK team the issue is
There is effort underway to move or remove all non-critical APIs from sun.misc, see JEP 260 [1]. We hope to be at the point soon where the only critical APIs in sun.misc are those listed in the JEP.

So sun.mic.BASE* has been removed as it's not a critical API. I wonder if the maintainers of org.glassfish.security.common.SSHA have looked at java.util.Base64? This was added in Java SE 8 in preparation for the removable of sun.misc.BASE64*.

-Alan

[1] http://openjdk.java.net/jeps/260






Umbrella Issue for Glassfish testing with JDK 9 (GLASSFISH-21441)

[GLASSFISH-21481] JDK 9 - JDO83008: CMP Compilation failed Created: 12/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Sub-task Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JDK 9



 Description   

When deploying a CMP (Container-Managed Persistence) EJB in GF running on jdk 9 jake (build 9-ea+96-jigsaw-nightly-h4128-20151221) we are getting the following exception.
[2016-01-12T13:05:04.103+0530] [glassfish 5.0] [WARNING] [] [com.sun.jdo.codegen.ejb.cmp] [tid: _ThreadID=108 _ThreadName=admin-listener(6)] [timeMillis: 1452584104103] [levelValue: 900] [[
JDO83008: CMP Compilation failed:
Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.9'
cannot find symbol
symbol: class Synchronization
location: package javax.transaction
cannot find symbol
symbol: class Synchronization
location: package javax.transaction
cannot find symbol
symbol: class Synchronization
location: package javax.transaction
cannot access javax.transaction.Transaction
class file for javax.transaction.Transaction not found
cannot access javax.transaction.Synchronization
class file for javax.transaction.Synchronization not found
incompatible types: team.TeamBean315905950_ConcreteImpl cannot be converted to javax.transaction.Synchronization
incompatible types: team.PlayerBean1120626978_ConcreteImpl cannot be converted to javax.transaction.Synchronization
incompatible types: team.PlayerBean1120626978_ConcreteImpl cannot be converted to javax.transaction.Synchronization
incompatible types: team.LeagueBean1005052912_ConcreteImpl cannot be converted to javax.transaction.Synchronization
incompatible types: team.LeagueBean1005052912_ConcreteImpl cannot be converted to javax.transaction.Synchronization]]

[2016-01-12T13:05:04.105+0530] [glassfish 5.0] [WARNING] [] [com.sun.jdo.codegen.ejb.cmp] [tid: _ThreadID=108 _ThreadName=admin-listener(6)] [timeMillis: 1452584104105] [levelValue: 900] [[
JDO83004: CMP Compilation failed. See log for details.]]

[2016-01-12T13:05:04.106+0530] [glassfish 5.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=108 _ThreadName=admin-listener(6)] [timeMillis: 1452584104106] [levelValue: 1000] [[
Exception while invoking class org.glassfish.ejb.startup.EjbDeployer prepare method]]

[2016-01-12T13:05:04.107+0530] [glassfish 5.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=108 _ThreadName=admin-listener(6)] [timeMillis: 1452584104107] [levelValue: 1000] [[
Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method]]

[2016-01-12T13:05:04.111+0530] [glassfish 5.0] [SEVERE] [] [] [tid: _ThreadID=108 _ThreadName=Thread-9] [timeMillis: 1452584104111] [levelValue: 1000] [[
org.glassfish.deployment.common.DeploymentException: JDO83004: CMP Compilation failed. See log for details.
at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:182)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at javax.security.auth.Subject.doAs(java.base@9-ea/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at javax.security.auth.Subject.doAs(java.base@9-ea/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(java.base@9-ea/Thread.java:747)
Caused by: java.lang.RuntimeException: JDO83004: CMP Compilation failed. See log for details.
at org.glassfish.javaee.core.deployment.JavaEEDeployer.prepare(JavaEEDeployer.java:229)
at org.glassfish.ejb.startup.EjbDeployer.prepare(EjbDeployer.java:235)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:309)
at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:88)
at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:155)
at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:152)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:232)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:241)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:267)
at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:152)
... 65 more
Caused by: org.glassfish.deployment.common.DeploymentException: JDO83004: CMP Compilation failed. See log for details.
at com.sun.jdo.spi.persistence.support.ejb.codegen.CMPDeployerImpl.compileClasses(CMPDeployerImpl.java:380)
at com.sun.jdo.spi.persistence.support.ejb.codegen.CMPDeployerImpl.deploy(CMPDeployerImpl.java:212)
at org.glassfish.ejb.startup.EjbDeployer.generateArtifacts(EjbDeployer.java:454)
at org.glassfish.javaee.core.deployment.JavaEEDeployer.prepare(JavaEEDeployer.java:224)
... 75 more]]



 Comments   
Comment by Arindam Bandyopadhyay [ 12/Jan/16 ]

This requires an ugly workaround because the classes/interfaces defined in the JDK for Java SE don't match what's in Java EE.

mkdir -p /scratch/loginname/mp

  1. copy attached javax.enterprise.cdi.api.jar javax.interceptor.javax.interceptor.api.jar to mp
    mkdir -p /scratch/loginname/up
  2. copy the attach java.transaction.jar to up
    BASE=/scratch/loginname
    MP=$BASE/mp
    UP=$BASE/up

java -upgrademodulepath $UP -modulepath $MP …

You might also need to use
export _JAVA_OPTIONS="-Djdk.module.path=$MP -Djdk.upgrade.module.path=$UP”

Of course, these are the officially sanctioned jar files yet.





Umbrella Issue for Glassfish testing with JDK 9 (GLASSFISH-21441)

[GLASSFISH-21480] JDK9 - exception when trying to load orb singleton Created: 08/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Sub-task Priority: Major
Reporter: russgold Assignee: russgold
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

from arindam.bandyopadhyay@oracle.com:

I am working on to make Glassfish work with Jake.

I was trying to run GF QuickLook tests with Jake.I was getting the following exception when trying to invoke an EJB (one of the test in QL test suite ) .

Exception in establish_components
org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.sun.corba.ee.impl.orb.ORBSingleton vmcid: 0x0 minor code: 0 completed: No
at org.omg.CORBA.ORB.create_impl_with_systemclassloader(java.corba@9.0/ORB.java:329)
at org.omg.CORBA.ORB.init(java.corba@9.0/ORB.java:314)
at com.sun.enterprise.transaction.jts.iiop.TxIORInterceptor.addOTSComponents(TxIORInterceptor.java:119)
at com.sun.enterprise.transaction.jts.iiop.TxIORInterceptor.establish_components(TxIORInterceptor.java:102)
at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.objectAdapterCreated(InterceptorInvoker.java:148)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.objectAdapterCreated(PIHandlerImpl.java:321)
at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:114)
at com.sun.corba.ee.impl.oa.poa.POAImpl.initialize(POAImpl.java:531)
at com.sun.corba.ee.impl.oa.poa.POAImpl.create_POA(POAImpl.java:931)
at com.sun.corba.ee.impl.oa.rfm.ReferenceFactoryManagerImpl$AdapterActivatorImpl.unknown_adapter(ReferenceFactoryManagerImpl.java:157)
at com.sun.corba.ee.impl.oa.poa.POAImpl.doActivate(POAImpl.java:1062)
at com.sun.corba.ee.impl.oa.poa.POAImpl.find_POA(POAImpl.java:1026)
at com.sun.corba.ee.impl.oa.rfm.ReferenceFactoryManagerImpl.createReference(ReferenceFactoryManagerImpl.java:545)
at com.sun.corba.ee.impl.oa.rfm.ReferenceFactoryImpl.createReference(ReferenceFactoryImpl.java:62)

(etc.)

Caused by: java.lang.ClassNotFoundException: com.sun.corba.ee.impl.orb.ORBSingleton
at jdk.internal.misc.BuiltinClassLoader.loadClass(java.base@9.0/BuiltinClassLoader.java:390)
at jdk.internal.misc.ClassLoaders$AppClassLoader.loadClass(java.base@9.0/ClassLoaders.java:177)
at java.lang.ClassLoader.loadClass(java.base@9.0/ClassLoader.java:373)
at java.lang.Class.forName0(java.base@9.0/Native Method)
at java.lang.Class.forName(java.base@9.0/Class.java:376)
at org.omg.CORBA.ORB.create_impl_with_systemclassloader(java.corba@9.0/ORB.java:325)
... 85 more






[GLASSFISH-21503] JDK9 - JMS application deployment fails Created: 29/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: jms
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

In JDK 9 ,JMS application deployment fails. We found this issue while running QL tests using JDK 9 . In order to reproduce this issue follow the steps
1.asadmin multimode --file main/appserver/tests/quicklook/ejb/mdb/create_resources.asadmin
2.asadmin deploy --retrieve= main/appserver/tests/quicklook/./dist/mdb/ /Users/aribandy/glassfish/patch/main/appserver/tests/quicklook/./dist/mdb/ejb-ejb30-hello-mdbApp.ear

The deployment will fail and we get the following exception in server.log
java.lang.NullPointerException
at java.util.StringTokenizer.<init>(java.base@9-ea/StringTokenizer.java:199)
at java.util.StringTokenizer.<init>(java.base@9-ea/StringTokenizer.java:221)
at org.glassfish.appclient.server.core.jws.ExtensionFileManager.buildExtensionFileDirs(ExtensionFileManager.java:144)
at org.glassfish.appclient.server.core.jws.ExtensionFileManager.prepareExtensionInfo(ExtensionFileManager.java:121)
at org.glassfish.appclient.server.core.jws.ExtensionFileManager.postConstruct(ExtensionFileManager.java:114)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2022)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:680)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:70)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2022)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:766)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:705)
at org.glassfish.appclient.server.core.AppClientServerApplication.newJavaWebStartInfo(AppClientServerApplication.java:156)
at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:148)
at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at javax.security.auth.Subject.doAs(java.base@9-ea/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at javax.security.auth.Subject.doAs(java.base@9-ea/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:407)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(java.base@9-ea/Thread.java:747)
]]



 Comments   
Comment by Arindam Bandyopadhyay [ 29/Jan/16 ]

Root cause For this exception is
In JDK 9 system property java.ext.dirs is deleted.In glassfish code we used system property java.ext.dirs . As a result we are getting null pointer exception.A possible fix would be

appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/jws/ExtensionFileManager.java
Index: appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/jws/ExtensionFileManager.java
===================================================================
--- appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/jws/ExtensionFileManager.java	(revision 64243)
+++ appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/jws/ExtensionFileManager.java	(working copy)
@@ -141,20 +141,22 @@
         Vector<File> result = new Vector<File>();
 
         String extDirs = System.getProperty(EXT_DIRS_PROPERTY_NAME);
-        StringTokenizer stkn = new StringTokenizer(extDirs, File.pathSeparator);
+        if(extDirs!=null) {
+            StringTokenizer stkn = new StringTokenizer(extDirs, File.pathSeparator);
 
-        while (stkn.hasMoreTokens()) {
-            String extensionDirPath = stkn.nextToken();
-            final File extDir = new File(extensionDirPath);
+            while (stkn.hasMoreTokens()) {
+                String extensionDirPath = stkn.nextToken();
+                final File extDir = new File(extensionDirPath);
             /*
              * Add the extensions directory only if it falls within the app
              * server directory.  Otherwise we might add
              * Java-provided extensions and serve them to Java Web Start-launched
              * clients, which we do not want.
              */
-            final URI extDirURI = extDir.toURI();
-            if ( ! installRootURI.relativize(extDirURI).equals(extDirURI)) {
-                result.add(extDir);
+                final URI extDirURI = extDir.toURI();
+                if (!installRootURI.relativize(extDirURI).equals(extDirURI)) {
+                    result.add(extDir);
+                }
             }
         }
         return result;




[GLASSFISH-21502] JDK9 - Quick Look Tests - - Quicklook tests are failing as GF code is trying to access JDK internal api Created: 29/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: test
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21334 JDK 9 - quicklook tests are broken Open
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

JDK9 - Quick Look Tests - - Quicklook tests are failing as GF code is trying to access JDK internal api. For example when we run QL we are getting the following exceptions as GF code tries to access JDK internal api
----------------------------------
Got ex, class is not loaded.
[testng] FAILED CONFIGURATION: @BeforeTest loadClass
[testng] java.lang.Exception: java.lang.reflect.InvocationTargetException
[testng] at fromjava.client.CheckTesterUITestNG.loadClass(Unknown Source)
[testng] ... 20 more
[testng] Caused by: java.lang.IllegalAccessError: superclass access check failed: class com.sun.xml.ws.util.xml.XmlUtil$3 (in unnamed module @0x6a472554) cannot access class com.sun.org.apache.xml.internal.resolver.CatalogManager (in module java.xml) because module java.xml does not export com.sun.org.apache.xml.internal.resolver to unnamed module @0x6a472554
[testng] at java.lang.ClassLoader.defineClass1(java.base@9-ea/Native Method)
[testng] at java.lang.ClassLoader.defineClass(java.base@9-ea/ClassLoader.java:930)
[testng] at java.security.SecureClassLoader.defineClass(java.base@9-ea/SecureClassLoader.java:152)
[testng] at jdk.internal.misc.BuiltinClassLoader.defineClass(java.base@9-ea/BuiltinClassLoader.java:582)
[testng] at jdk.internal.misc.BuiltinClassLoader.access$300(java.base@9-ea/BuiltinClassLoader.java:94)
[testng] at jdk.internal.misc.BuiltinClassLoader$3.run(java.base@9-ea/BuiltinClassLoader.java:490)
[testng] at jdk.internal.misc.BuiltinClassLoader$3.run(java.base@9-ea/BuiltinClassLoader.java:484)
[testng] at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
[testng] at jdk.internal.misc.BuiltinClassLoader.findClassOnClassPathOrNull(java.base@9-ea/BuiltinClassLoader.java:483)
[testng] at jdk.internal.misc.BuiltinClassLoader.loadClassOrNull(java.base@9-ea/BuiltinClassLoader.java:430)
[testng] at jdk.internal.misc.BuiltinClassLoader.loadClass(java.base@9-ea/BuiltinClassLoader.java:388)
[testng] at jdk.internal.misc.ClassLoaders$AppClassLoader.loadClass(java.base@9-ea/ClassLoaders.java:177)
[testng] at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:373)
[testng] at com.sun.xml.ws.client.WSServiceDelegate.createCatalogResolver(WSServiceDelegate.java:378)
[testng] at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:364)
[testng] at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:322)
[testng] at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:231)
[testng] at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:212)
[testng] at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:208)
[testng] at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:119)
[testng] at javax.xml.ws.Service.<init>(java.xml.ws@9-ea/Service.java:77)
[testng] at fromjava.client.AddNumbersService.<init>(AddNumbersService.java:42)
[testng] ... 24 more
-------------------------------------------------------------



 Comments   
Comment by Arindam Bandyopadhyay [ 29/Jan/16 ]

As a work around please add the following to appserver/tests/quicklook/build.xml .
— build.xml (revision 64243)
+++ build.xml (working copy)
@@ -340,11 +340,13 @@
<testng outputdir="$

{test.report}

"
classpathref="run.testng.classpath">
<jvmarg value="-Djava.compiler=NONE"/>
+ <jvmarg value="-XaddExports:java.xml/com.sun.org.apache.xml.internal.resolver=ALL-UNNAMED,java.xml/com.sun.org.apache.xml.internal.resolver.tools=ALL-UNNAMED"/>
<jvmarg value="-Dhttp.host=$

{glassfish.http.host}

"/>
<jvmarg value="-Dhttp.port=$

{glassfish.http.port}

"/>





[GLASSFISH-21501] JDK9 - Quick Look Tests - -Need to remove ext and endorsed directory from Quicklook tests Created: 29/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: test
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21334 JDK 9 - quicklook tests are broken Open
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

JDK9 removes the support for ext and endorsed directory . in Quicklook tests we have reference for ext and endorsed directory in the following files .
appserver/tests/quicklook/build.xml
appserver/tests/quicklook/build-impl.xml

We need to remove them.






[GLASSFISH-21500] JDK9 - Quick Look Tests - -Need to remove source 1.5 -target 1.5 from quicklook tests Created: 29/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: test
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21334 JDK 9 - quicklook tests are broken Open
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

The changes to drop support for -source 1.5 -target 1.5 has been in JDK 9 since jdk9-b23 so more than 1 year. Background on the policy for retiring support for old -source/-target options is in JEP 182.
In Quicklook tests following files have reference of -source 1.5 -target 1.5 .
appserver/tests/quicklook/gfproject/build-impl.xml
appserver/tests/quicklook/weld/extensions/build.xml
appserver/tests/quicklook/wsit/jaxbosgi/build.xml






[GLASSFISH-21498] JDK9 - Cluster deployment is failing due to use of internal api Created: 28/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

Cluster deployment is failing due to use of internal api . We are getting the following exceptiobn.
javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
at sun.security.ssl.SSLSocketImpl.readRecord(java.base@9-ea/SSLSocketImpl.java:1030)
at sun.security.ssl.SSLSocketImpl.readRecord(java.base@9-ea/SSLSocketImpl.java:957)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(java.base@9-ea/SSLSocketImpl.java:1369)
at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1396)
at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1380)
at sun.net.www.protocol.https.HttpsClient.afterConnect(java.base@9-ea/HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(java.base@9-ea/AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(java.base@9-ea/HttpURLConnection.java:1286)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(java.base@9-ea/HttpURLConnection.java:1261)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(java.base@9-ea/HttpsURLConnectionImpl.java:231)
at com.sun.enterprise.admin.remote.writer.MultipartProprietaryWriter$1.getDelegate(MultipartProprietaryWriter.java:105)
at com.sun.enterprise.admin.remote.writer.MultipartProprietaryWriter$1.write(MultipartProprietaryWriter.java:119)
at sun.nio.cs.StreamEncoder.writeBytes(java.base@9-ea/StreamEncoder.java:233)
at sun.nio.cs.StreamEncoder.implFlushBuffer(java.base@9-ea/StreamEncoder.java:312)
at sun.nio.cs.StreamEncoder.implFlush(java.base@9-ea/StreamEncoder.java:316)
at sun.nio.cs.StreamEncoder.flush(java.base@9-ea/StreamEncoder.java:153)
at java.io.OutputStreamWriter.flush(java.base@9-ea/OutputStreamWriter.java:252)
at java.io.BufferedWriter.flush(java.base@9-ea/BufferedWriter.java:245)
at com.sun.enterprise.admin.remote.writer.MultipartProprietaryWriter.writeParam(MultipartProprietaryWriter.java:161)
at com.sun.enterprise.admin.remote.writer.MultipartProprietaryWriter.writeTo(MultipartProprietaryWriter.java:225)
at com.sun.enterprise.admin.remote.writer.MultipartProprietaryWriter.writeTo(MultipartProprietaryWriter.java:100)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand$1.prepareConnection(RemoteRestAdminCommand.java:774)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.doHttpCommand(RemoteRestAdminCommand.java:1090)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.doHttpCommand(RemoteRestAdminCommand.java:990)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.executeRemoteCommand(RemoteRestAdminCommand.java:744)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.executeCommand(RemoteRestAdminCommand.java:559)
at com.sun.enterprise.admin.util.InstanceRestCommandExecutor.run(InstanceRestCommandExecutor.java:133)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-ea/Executors.java:514)
at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-ea/Executors.java:514)
at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-ea/ThreadPoolExecutor.java:1158)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-ea/ThreadPoolExecutor.java:632)
at java.lang.Thread.run(java.base@9-ea/Thread.java:747)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.SSLSocketInputRecord.decode(java.base@9-ea/SSLSocketInputRecord.java:156)
at sun.security.ssl.SSLSocketImpl.readRecord(java.base@9-ea/SSLSocketImpl.java:1003)
... 33 more
If we go to the server.log of individual instance we found the exception is related to use of private api of JDK. We have already encountered them in glassfish non cluster mode.



 Comments   
Comment by Arindam Bandyopadhyay [ 28/Jan/16 ]

As a work around please add the following java options in the -server jvm (i.e. java option of concerned instance of the cluster) <jvm-options>-XaddExports:java.base/sun.security.provider=ALL-UNNAMED,java.base/sun.security.util=ALL-UNNAMED,java.base/sun.net.www=ALL-UNNAMED,java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.base/sun.net.www.protocol.http=ALL-UNNAMED,jdk.management/com.sun.management.internal=ALL-UNNAMED,java.rmi/sun.rmi.transport=ALL-UNNAMED,java.base/sun.security.action=ALL-UNNAMED,java.corba/sun.corba=ALL-UNNAMED,java.corba/com.sun.jndi.cosnaming=ALL-UNNAMED,java.xml/com.sun.org.apache.xml.internal.resolver=ALL-UNNAMED,java.xml/com.sun.org.apache.xml.internal.resolver.tools=ALL-UNNAMED,java.base/sun.net.www.protocol.https=ALL-UNNAMED</jvm-options>





[GLASSFISH-21497] JDK9-Unknown protocol: https exception is coming when we try to deploy in cluster Created: 28/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

In case of jdk9-jigsaw , When we try to deploy in cluster environment we are getting the following exception(you need to set log level to FINE )

org.glassfish.api.admin.CommandException: java.lang.IllegalStateException: Unknown protocol: https
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.doHttpCommand(RemoteRestAdminCommand.java:1225)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.doHttpCommand(RemoteRestAdminCommand.java:990)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.executeRemoteCommand(RemoteRestAdminCommand.java:744)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.executeCommand(RemoteRestAdminCommand.java:559)
at com.sun.enterprise.admin.util.InstanceRestCommandExecutor.run(InstanceRestCommandExecutor.java:133)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-ea/Executors.java:514)
at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-ea/Executors.java:514)
at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-ea/ThreadPoolExecutor.java:1158)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-ea/ThreadPoolExecutor.java:632)
at java.lang.Thread.run(java.base@9-ea/Thread.java:747)
Caused by: java.lang.IllegalStateException: Unknown protocol: https
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:481)
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)
at java.net.URL.toExternalForm(java.base@9-ea/URL.java:943)
at java.net.URL.toString(java.base@9-ea/URL.java:929)
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.openConnection(URLHandlersStreamHandlerProxy.java:267)
at java.net.URL.openConnection(java.base@9-ea/URL.java:993)
at com.sun.enterprise.admin.util.HttpConnectorAddress.makeConnection(HttpConnectorAddress.java:268)
at com.sun.enterprise.admin.util.HttpConnectorAddress.openConnection(HttpConnectorAddress.java:264)
at com.sun.enterprise.admin.util.HttpConnectorAddress.openConnection(HttpConnectorAddress.java:129)
at com.sun.enterprise.admin.remote.RemoteRestAdminCommand.doHttpCommand(RemoteRestAdminCommand.java:1060)
... 11 more



 Comments   
Comment by Arindam Bandyopadhyay [ 28/Jan/16 ]

As a work around please add -XaddExports:java.base/sun.net.www.protocol.https=ALL-UNNAMED java option for -client jvm





[GLASSFISH-21493] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.xml.ws.util.xml.XmlUtil Created: 25/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: web_services
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

There is a reference to jdk internal api in com.sun.xml.ws.util.xml.XmlUtil. We are getting the following two exception.
----------------------------------------------
WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalAccessError: superclass access check failed: class com.sun.xml.ws.util.xml.XmlUtil$3 (in module: Unnamed Module) cannot access class com.sun.org.apache.xml.internal.resolver.CatalogManager (in module: java.xml), com.sun.org.apache.xml.internal.resolver is not exported to Unnamed Module
java.lang.IllegalAccessError: superclass access check failed: class com.sun.xml.ws.util.xml.XmlUtil$3 (in module: Unnamed Module) cannot access class com.sun.org.apache.xml.internal.resolver.CatalogManager (in module: java.xml), com.sun.org.apache.xml.internal.resolver is not exported to Unnamed Module
at java.lang.ClassLoader.defineClass1(java.base@9.0/Native Method)
at java.lang.ClassLoader.defineClass(java.base@9.0/ClassLoader.java:925)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2279)
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1501)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(java.base@9.0/ClassLoader.java:373)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.getXMLInputFactory(XMLStreamReaderFactory.java:131)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.access$000(XMLStreamReaderFactory.java:77)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$1.initialValue(XMLStreamReaderFactory.java:92)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$1.initialValue(XMLStreamReaderFactory.java:87)
at com.sun.xml.ws.api.streaming.ContextClassloaderLocal.createNewInstance(ContextClassloaderLocal.java:76)
at com.sun.xml.ws.api.streaming.ContextClassloaderLocal.get(ContextClassloaderLocal.java:62)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.get(XMLStreamReaderFactory.java:152)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.create(XMLStreamReaderFactory.java:175)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:176)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.onStartup(WSServletContainerInitializer.java:65)
at org.apache.catalina.core.StandardContext.callServletContainerInitializers(StandardContext.java:6062)
at com.sun.enterprise.web.WebModule.callServletContainerInitializers(WebModule.java:774)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5960)
at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at javax.security.auth.Subject.doAs(java.base@9.0/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:407)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9.0/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9.0/Method.java:531)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(java.base@9.0/Thread.java:747)

------------------------------------------------
WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalAccessError: class com.sun.xml.ws.util.xml.XmlUtil (in module: Unnamed Module) cannot access class com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver (in module: java.xml), com.sun.org.apache.xml.internal.resolver.tools is not exported to Unnamed Module
java.lang.IllegalAccessError: class com.sun.xml.ws.util.xml.XmlUtil (in module: Unnamed Module) cannot access class com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver (in module: java.xml), com.sun.org.apache.xml.internal.resolver.tools is not exported to Unnamed Module
at com.sun.xml.ws.util.xml.XmlUtil.workaroundCatalogResolver(XmlUtil.java:361)
at com.sun.xml.ws.util.xml.XmlUtil.createEntityResolver(XmlUtil.java:307)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createEntityResolver(DeploymentDescriptorParser.java:450)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:303)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:179)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.onStartup(WSServletContainerInitializer.java:65)
at org.apache.catalina.core.StandardContext.callServletContainerInitializers(StandardContext.java:6062)
at com.sun.enterprise.web.WebModule.callServletContainerInitializers(WebModule.java:774)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5960)
at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at javax.security.auth.Subject.doAs(java.base@9.0/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at javax.security.auth.Subject.doAs(java.base@9.0/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:407)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9.0/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9.0/Method.java:531)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)

at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(java.base@9.0/Thread.java:747)
---------------------------------------------------------------------------------
In com.sun.xml.ws.util.xml.XmlUtil we have the reference of com.sun.org.apache.xml.internal.resolver.CatalogManager and com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver which are JDK internal api . So we are getting the exception .

com.sun.xml.ws.util.xml.XmlUtil is a maven dependency
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-osgi</artifactId>
So we need the org.glassfish.metro team to fix it .



 Comments   
Comment by Arindam Bandyopadhyay [ 25/Jan/16 ]

As a work around please add the following java option -XaddExports:java.xml/com.sun.org.apache.xml.internal.resolver=ALLUNNAMED,java.xml/com.sun.org.apache.xml.internal.resolver.tools=ALL-UNNAMED





[GLASSFISH-21492] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl Created: 25/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: orb
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

There is a reference to jdk internal api in com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl. We are getting the following exception,
------------------------------------------
java.lang.IllegalAccessException: class com.sun.enterprise.naming.GlassFishNamingBuilder cannot access class com.sun.jndi.cosnaming.CNCtxFactory (in module java.corba) because module java.corba does not export com.sun.jndi.cosnaming to unnamed module @1f6976c1
 at sun.reflect.Reflection.throwIllegalAccessException(java.base@9.0/Reflection.java:448)
 at sun.reflect.Reflection.ensureMemberAccess(java.base@9.0/Reflection.java:130)
 at java.lang.Class.newInstance(java.base@9.0/Class.java:535)
 at com.sun.enterprise.naming.GlassFishNamingBuilder.createInitialContextFactory(GlassFishNamingBuilder.java:120)
-------------------------
In com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl line #164 have the following reference .
cosNamingEnv.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");



 Comments   
Comment by Arindam Bandyopadhyay [ 25/Jan/16 ]

As a work around please add -XaddExports:java.corba/com.sun.jndi.cosnaming=ALL-UNNAMED java option





[GLASSFISH-21490] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.messaging.jmq.util.log.UniformLogFormatter Created: 25/Jan/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

There is a reference to jdk internal api in com.sun.messaging.jmq.util.log.UniformLogFormatter. We are getting the following exception,
--------------
java.lang.IllegalAccessError: class com.sun.messaging.jmq.util.log.UniformLogFormatter (in module: Unnamed Module) cannot access class sun.security.action.GetPropertyAction (in module: java.base), sun.security.action is not exported to Unnamed Module
at com.sun.messaging.jmq.util.log.UniformLogFormatter.<clinit>(UniformLogFormatter.java:118)
at com.sun.messaging.jmq.util.log.Logger.manuallyConfigureLogging(Logger.java:625)
at com.sun.messaging.jmq.util.log.Logger.loadPropsToNucleusLogging(Logger.java:579)
at com.sun.messaging.jmq.util.log.Logger.configure(Logger.java:349)
at com.sun.messaging.jmq.jmsserver.comm.CommGlobals.getConfig(CommGlobals.java:350)
at com.sun.messaging.jmq.jmsserver.BrokerStateHandler.<clinit>(BrokerStateHandler.java:111)
at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:488)
at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:448)
at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:164)
at com.sun.messaging.jmq.jmsserver.DirectBrokerProcess.start(DirectBrokerProcess.java:95)
at com.sun.messaging.jmq.jmsclient.runtime.impl.BrokerInstanceImpl.start(BrokerInstanceImpl.java:208)
at com.sun.messaging.jms.blc.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:331)
at com.sun.messaging.jms.blc.LifecycleManagedBroker.start(LifecycleManagedBroker.java:457)
at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:365)
at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter$1.run(ActiveJmsResourceAdapter.java:501)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.startResourceAdapter(ActiveJmsResourceAdapter.java:495)
at com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.init(ActiveOutboundResourceAdapter.java:130)
at com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl.init(ActiveInboundResourceAdapterImpl.java:90)
at com.sun.enterprise.connectors.ActiveRAFactory.instantiateActiveResourceAdapter(ActiveRAFactory.java:141)
at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:108)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:212)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:346)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:405)
at org.glassfish.jms.admin.cli.JMSDestination$2.run(JMSDestination.java:494)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at org.glassfish.jms.admin.cli.JMSDestination.getMQAdapter(JMSDestination.java:490)
at org.glassfish.jms.admin.cli.JMSDestination.getMQJMXConnectorInfos(JMSDestination.java:145)
at org.glassfish.jms.admin.cli.JMSDestination.getMQJMXConnectorInfo(JMSDestination.java:127)
at org.glassfish.jms.admin.cli.CreateJMSDestination.createJMSDestination(CreateJMSDestination.java:165)
at org.glassfish.jms.admin.cli.CreateJMSDestination.execute(CreateJMSDestination.java:153)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at javax.security.auth.Subject.doAs(java.base@9.0/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at javax.security.auth.Subject.doAs(java.base@9.0/Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:407)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9.0/Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9.0/NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9.0/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9.0/Method.java:531)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(java.base@9.0/Thread.java:747)
]]
--------------------------------------------
In com.sun.messaging.jmq.util.log.UniformLogFormatter line #118 have the following reference .
private long recordNumber = 0;
private static final String LINE_SEPARATOR =(String) java.security.AccessController.doPrivileged(new sun.security.action.GetPropertyAction("line.separator"));

sun.security.action.GetPropertyAction is a JDK internal api . So we are getting the exception . com.sun.messaging.jmq.util.log.UniformLogFormatter is a maven dependency
<groupId>org.glassfish.mq</groupId>

<artifactId>mq-distribution</artifactId>
So we need the org.glassfish.mq team to fix it .



 Comments   
Comment by Arindam Bandyopadhyay [ 25/Jan/16 ]

As a work around please add -XaddExports:java.base/sun.security.action=ALL-UNNAMED java option





[GLASSFISH-21318] JDK 9 - Removal of ext dir and endorsed dir jvm option from domain.xml Created: 26/Feb/15  Updated: 01/Feb/16

Status: In Progress
Project: glassfish
Component/s: configuration
Affects Version/s: 4.1
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open
Related
is related to GLASSFISH-21236 Glassfish 4.1 won't start with JDK 9 ... Resolved
Tags: javaee_ri_fix, jdk9-int

 Description   

I was fixing GLASSFISH-21236 - Glassfish startup issue with JDK 9. In order to start glassfish in JDK 9 we need to remove the -XX:MaxPermSize,-Djava.endorsed.dirs and -Djava.ext.dirs jvm options from the domain.xml.
I observed that even if we remove the above 3 jvm options from domain.xml , glassfish successfully starts up.I tested this for JVM 7, JVM 8 and JVM 9. In all the jvm glassfish successfully starts up without the above 3 jvm options .
Now my question is whether those 3 JVM options are currently required or we can safely remove them from domain.xml in future releases . Does any modules other than start up depends on them.



 Comments   
Comment by Arindam Bandyopadhyay [ 27/Mar/15 ]

Run the static analysis tool JDEPS on GF 4.1 .Found no static dependency on JDK/jre/lib/ext directory . However found a lot of instances where GF is using JDK internal api which will be non accessible(private module) in JDK 9.





[GLASSFISH-19812] Prevent usage of proprietary API" warnings issued by java compiler during maven build, using compiler option Created: 08/Mar/13  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: build_system
Affects Version/s: 4.0_b79
Fix Version/s: future release

Type: Improvement Priority: Major
Reporter: Romain Grécourt Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on GLASSFISH-20980 Convert private JDK API usage to new ... Resolved
depends on GLASSFISH-19798 usage of internal proprietary API in ... Open
depends on GLASSFISH-19799 usage of internal proprietary API in... Open
depends on GLASSFISH-19801 usage of internal proprietary API in... Open
depends on GLASSFISH-19802 usage of internal proprietary API in... Open
depends on GLASSFISH-19803 usage of internal proprietary API in... Open
depends on GLASSFISH-19804 usage of internal proprietary API in... Open
depends on GLASSFISH-19805 usage of internal proprietary API in... Open
depends on GLASSFISH-19806 usage of internal proprietary API in... Open
depends on GLASSFISH-19809 usage of internal proprietary API in... Open
depends on GLASSFISH-19811 usage of internal proprietary API in... Open
depends on GLASSFISH-19808 usage of internal proprietary API in... Resolved
depends on GLASSFISH-19810 usage of internal proprietary API in... Resolved
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open
Related
is related to GLASSFISH-2888 Try to use standard JDK classes only Resolved
Tags: build, jdk9-int, maven, proprietary-api, warning

 Description   

Get rid of all the warning "is internal proprietary API and may be removed in a future release" echoed by the java compiler during the maven build.

Then we can enforce a compiler flag to prevent the introduction of any new warning.



 Comments   
Comment by Romain Grécourt [ 08/Mar/13 ]

linking separate issues

Comment by Tim Quinn [ 13/Feb/14 ]

Adding link to another issue for a private API usage





[GLASSFISH-21505] JDK9 - Unable to launch the Application Client Container Created: 01/Feb/16  Updated: 01/Feb/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

In JDK9 we are unable to launch the Application Client Container and invoke the client application. We we issue the following commend -->
glassfish4/glassfish/bin/appclient -client main/appserver/tests/quicklook/./dist/mdb/ejb-ejb30-hello-mdbAppClient.jar
We are getting the following exception in appclient jvm.
-Djava.ext.dirs=main/appserver/distributions/glassfish/target/stage/glassfish4/glassfish/bin/../lib/ext:/Users/aribandy/jdk_ea/new-jigsaw/build1/osx-x64/jdk/lib/ext is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
----------------------------------------------------------



 Comments   
Comment by Arindam Bandyopadhyay [ 01/Feb/16 ]

The root cause of the issue is in JDK 9 the support for ext and endorsed directory is removed . In appserver/appclient/client/acc/src/main/java/org/glassfish/appclient/client/CLIBootstrap.java we are using ext and endorsed directory to start up the JVM. So we are getting the exception.





[GLASSFISH-21504] com.sun.messaging.jmq.jmsclient.ProtocolHandler.throwServerErrorException Created: 29/Jan/16  Updated: 29/Jan/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: mcheveste Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

VM, Redhat



 Description   

sorry the inconvenience.
I have an application which I have no vendor support some packages which generate the following error:
##################################################
Jan 29, 2016 10:52:33 AM com.sun.messaging.jmq.jmsclient.ExceptionHandler logCaughtException
WARNING: [I500]: Caught JVM Exception: com.sun.messaging.jms.JMSException: [ACKNOWLEDGE_REPLY(25)] [C4036]: A broker error occurred. :[412] Unexpected Broker Exception: [Transaction 25142028128331776 has state [FAILED(2)], not in [STARTED(1)] state] user=guest, broker=192.168.168.131:7676(60835)
2016-01-29 10:52:33 jms [WARN] [I500]: Caught JVM Exception: com.sun.messaging.jms.JMSException: [ACKNOWLEDGE_REPLY(25)] [C4036]: A broker error occurred. :[412] Unexpected Broker Exception: [Transaction 25142028128331776 has state [FAILED(2)], not in [STARTED(1)] state] user=guest, broker=192.168.168.131:7676(60835)
2016-01-29 10:52:33 CobraClient [ERROR] Error while getting message
com.sun.messaging.jms.JMSException: [ACKNOWLEDGE_REPLY(25)] [C4036]: A broker error occurred. :[412] Unexpected Broker Exception: [Transaction 25142028128331776 has state [FAILED(2)], not in [STARTED(1)] state] user=guest, broker=192.168.168.131:7676(60835)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.throwServerErrorException(ProtocolHandler.java:4019)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.acknowledge(ProtocolHandler.java:2607)
at com.sun.messaging.jmq.jmsclient.SessionImpl.doAcknowledge(SessionImpl.java:1442)
at com.sun.messaging.jmq.jmsclient.SessionImpl.transactedAcknowledge(SessionImpl.java:1325)
at com.sun.messaging.jmq.jmsclient.SessionImpl.receiveCommit(SessionImpl.java:2832)
at com.sun.messaging.jmq.jmsclient.SessionImpl.commit(SessionImpl.java:2144)
at com.sun.messaging.jmq.jmsclient.XASessionImpl.commit(XASessionImpl.java:146)
at com.sun.messaging.jms.ra.SessionAdapter.commit(SessionAdapter.java:453)
at lojack.cobra.client.CobraConsumer.onMessage(CobraConsumer.java:316)
at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.deliverAndAcknowledge(MessageConsumerImpl.java:338)
at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.onMessage(MessageConsumerImpl.java:273)
at com.sun.messaging.jmq.jmsclient.SessionReader.deliver(SessionReader.java:113)
at com.sun.messaging.jmq.jmsclient.ConsumerReader.run(ConsumerReader.java:186)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.sun.messaging.jms.JMSException: [ACKNOWLEDGE_REPLY(25)] [C4036]: A broker error occurred. :[412] Unexpected Broker Exception: [Transaction 25142028128331776 has state [FAILED(2)], not in [STARTED(1)] state] user=guest, broker=192.168.168.131:7676(60835)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.throwServerErrorException(ProtocolHandler.java:4003)
... 13 more
###################################
I do not have much knowledge of java and glassfish, for that reason consultation with you. From already thank you very much!!






[GLASSFISH-21334] JDK 9 - quicklook tests are broken Created: 19/Mar/15  Updated: 29/Jan/16

Status: Open
Project: glassfish
Component/s: test
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ALL


Issue Links:
Blocks
is blocked by GLASSFISH-21500 JDK9 - Quick Look Tests - -Need to re... Open
is blocked by GLASSFISH-21501 JDK9 - Quick Look Tests - -Need to re... Open
is blocked by GLASSFISH-21502 JDK9 - Quick Look Tests - - Quicklook... Open
Dependency
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open
Tags: javaee_ri_fix, jdk9-int

 Description   

I am getting the following exception when I am running the quicklook test in JDK9

Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default-test) on project quicklook: Execution default-test of goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.7 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools-jar:jar:1 at specified path /usr/lib/jvm/jdk1.9.0/../lib/tools.jar

In the pom.xml of quicklook project we have the following plugin

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>

maven-antrun-plugin internally uses tools.jar which is removed in JDK 9 as part of JEPS220.



 Comments   
Comment by Arindam Bandyopadhyay [ 19/Mar/15 ]

The related maven issue is https://jira.codehaus.org/browse/MNG-5732

Comment by Arindam Bandyopadhyay [ 29/Jan/16 ]

In order to fix this issue we need to remove the following dependency .
— appserver/tests/quicklook/pom.xml (revision 64243)
+++ appserver/tests/quicklook/pom.xml (working copy)
@@ -245,13 +245,13 @@
<version>1.8.1</version>
<scope>runtime</scope>
</dependency>

  • <dependency>
    + <!-- <dependency>
    <groupId>com.sun</groupId>
    <artifactId>tools-jar</artifactId>
    <version>1</version>
    <scope>system</scope>
    <systemPath>$ {java.home}

    /../lib/tools.jar</systemPath>

  • </dependency>
    + </dependency> -->
    </dependencies>
    </plugin>
    </plugins>
    ----------------------------------------------------
    Also in case of jake , maven is using some internal api of JDK .So jake is complaining . So as a workaround ,we need to add the following MAVEN_OPTS
    export MAVEN_OPTS="-XaddExports:java.xml/com.sun.org.apache.xml.internal.resolver=ALL-UNNAMED"




[GLASSFISH-21499] Invocation of Webservice deployed from directory fails on Windows Created: 28/Jan/16  Updated: 28/Jan/16

Status: Open
Project: glassfish
Component/s: deployment
Affects Version/s: 4.0, 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: pdudits Assignee: Hong Zhang
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Fix for GLASSFISH-17039 contained a change in ModuleContextValidator where a slash in fullFileUri was replaced with File.separator. However URIs are not platform dependant and cannot contain backslashes. Therefore invocation of webservice on Windows fails with

java.lang.IllegalArgumentException: Illegal character in path at index 13: META-INF/wsdl\ChargePointEvent.wsdl
    at java.net.URI.create(URI.java:852)
    at java.net.URI.resolve(URI.java:1036)
    at org.glassfish.webservices.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:208)
    at org.glassfish.webservices.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:107)
    at org.glassfish.webservices.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:80)
    at org.glassfish.webservices.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:210)
    at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:153)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:226)
    at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:178)
    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:206)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    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:283)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
    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:591)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.URISyntaxException: Illegal character in path at index 13: META-INF/wsdl\ChargePointEvent.wsdl
    at java.net.URI$Parser.fail(URI.java:2848)
    at java.net.URI$Parser.checkChars(URI.java:3021)
    at java.net.URI$Parser.parseHierarchical(URI.java:3105)
    at java.net.URI$Parser.parse(URI.java:3063)
    at java.net.URI.<init>(URI.java:588)
    at java.net.URI.create(URI.java:850)
    ... 28 more

Also reported as PAYARA-627 where I will also submit a PR with a fix.






[GLASSFISH-21495] Transaction Rolled back due to timeout Created: 26/Jan/16  Updated: 26/Jan/16

Status: Open
Project: glassfish
Component/s: ejb_container
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: cghislai Assignee: Srini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

After upgrade from GF 4.1 to Glassfish 4.1.1, I get timed out transactions, with a warning in the log:
Warning: EJB5123:Rolling back timed out transaction [JavaEETransactionImpl: txId=51 nonXAResource=9 jtsTx=null localTxStatus=1 syncs=[com.sun.ejb.containers.SimpleEjbResourceHandlerImpl@2df56bef, com.sun.ejb.containers.ContainerSynchronization@3f02d7bb, org.eclipse.persistence.internal.jpa.transaction.JTATransactionWrapper$1@5fd05f0e, org.eclipse.persistence.transaction.JTASynchronizationListener@6a5a3c2b, com.sun.enterprise.resource.pool.PoolManagerImpl$SynchronizationListener@6cf6889c, org.eclipse.persistence.transaction.JTASynchronizationListener@456035b6]] for [PlaineService]

The method triggering this rollback imports a fair amount of data and regularly flushes the persistence context. Yet, once completed after several minutes, the warning and rollback occur.

The presence of @Asynchronous or @TransactionAttribute annotations to the method does not seem to have any impact on this issue.

Using GF 4.1, the method worked correctly.






[GLASSFISH-21494] Double checked locking problem Created: 26/Jan/16  Updated: 26/Jan/16

Status: Open
Project: glassfish
Component/s: cmp
Affects Version/s: 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: AppChecker Assignee: Mitesh Meswani
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 30 minutes
Time Spent: Not Specified
Original Estimate: 30 minutes


 Description   

It seems that there are two identical double checked locking problems:

1) https://java.net/projects/glassfish/sources/svn/content/trunk/main/appserver/persistence/cmp/model/src/main/java/com/sun/jdo/api/persistence/model/jdo/impl/PersistenceElementImpl.java?rev=64243

private PropertyChangeSupport _support;
....
....
if (_support == null)
{
synchronized(this)

{ // new test under synchronized block if (_support == null) _support = new PropertyChangeSupport(_element); }

}

2) https://java.net/projects/glassfish/sources/svn/content/trunk/main/appserver/persistence/cmp/model/src/main/java/com/sun/jdo/api/persistence/model/mapping/impl/MappingElementImpl.java?rev=64243

private PropertyChangeSupport _support;
....
....
if (_support == null)
{
synchronized(this)

{ // new test under synchronized block if (_support == null) _support = new PropertyChangeSupport(this); }

}

Actually it is not very hard to fix. It is needed just to add violate modifier into _support field declaration like it's done here: https://java.net/projects/glassfish/sources/svn/content/trunk/main/appserver/web/web-naming/src/main/java/org/apache/naming/java/javaURLContextFactory.java?rev=64243 (line 109)

Possible defect was found by AppChecker static analyzer (http://cnpo.ru/en/solutions/appchecker.php)






[GLASSFISH-21486] Invoking a query in extended persistence context outside transaction clears it Created: 22/Jan/16  Updated: 25/Jan/16

Status: Open
Project: glassfish
Component/s: entity-persistence
Affects Version/s: 4.0, 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: pdudits Assignee: Srini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JDK 7 and JDK 8



 Description   

Entity gets detached after invocation of Query.getResultList within extended persistence context and @TransactionAttribute(NOT_SUPPORTED).

This violates JPA 2.1 spec basically in every section that refers to extended persistence context and managed state of entities: §3.1.1, §3.3, §3.3.1, §3.3.2, §3.10. and so on.

Example projects demonstrating this on embedded glassfish will be attached as soon as an issue number is assigned to this.



 Comments   
Comment by pdudits [ 22/Jan/16 ]

Test case is available at https://github.com/pdudits/GLASSFISH-21486.

Fails on Glassfish since v4, also on all Payara. Works with glassfish 3.1.2.2.

Comment by pdudits [ 25/Jan/16 ]

This bug is caused by GLASSFISH-19544:

There is explicit entityManagerDelegate.clear(); in QueryWrapper.getResultList, which is instantiated in EntityManagerWrapper, that disregards whether the current persistence context is an extended one.

Comment by pdudits [ 25/Jan/16 ]

GLASSFISH-20968 was similar issue with likely the same fix - wrapper cannot only decide on the fact if transaction is present, but also that context type is transactional.

Comment by pdudits [ 25/Jan/16 ]

Fix submitted to Payara under https://github.com/payara/Payara/pull/617. I've got CLA for glassfish signed as well, feel free to apply the patch.





[GLASSFISH-21440] Webservices don't work properly in 4.1.1 Created: 12/Oct/15  Updated: 23/Jan/16

Status: Open
Project: glassfish
Component/s: jax-rs
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: setup Assignee: Unassigned
Resolution: Unresolved Votes: 10
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux Ubuntu 15.04



 Description   

After switching from 4.1 to 4.1.1 webservices fail with error 500
server-log

[2015-10-11T07:32:14.904+1000] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=34 _ThreadName=http-listener-1(5)] [timeMillis: 1444512734904] [levelValue: 900] [[
  StandardWrapperValve[javax.ws.rs.core.Application]: Servlet.service() for servlet javax.ws.rs.core.Application threw exception
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.persistence.jaxb.BeanValidationHelper
	at org.eclipse.persistence.jaxb.JAXBBeanValidator.isConstrainedObject(JAXBBeanValidator.java:257)
	at org.eclipse.persistence.jaxb.JAXBBeanValidator.shouldValidate(JAXBBeanValidator.java:208)
	at org.eclipse.persistence.jaxb.JAXBMarshaller.validateAndTransformIfNeeded(JAXBMarshaller.java:587)
	at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:481)
	at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:949)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
	at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:683)
	at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:424)
	at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:414)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:312)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:460)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.setupit.experiment.controller.util.URLFilter.doFilter(URLFilter.java:122)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	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:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	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:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	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:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)

------------------------------------------------------------

@Entity
@Table(name = "TITLE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Title.findAll", query = "SELECT t FROM Title t"),
    @NamedQuery(name = "Title.findById", query = "SELECT t FROM Title t WHERE t.id = :id"),
    @NamedQuery(name = "Title.findByTitle", query = "SELECT t FROM Title t WHERE t.title = :title"),
    @NamedQuery(name = "Title.findByFullTitle", query = "SELECT t FROM Title t WHERE t.fullTitle = :fullTitle")})
public class Title implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "title")
    private String title;
    @Size(max = 1024)
    @Column(name = "full_title")
    private String fullTitle;
    @OneToMany(mappedBy = "title")
    private List<User> userList;

    public Title() {
    }

    public Title(Integer id) {
        this.id = id;
    }

    public Title(Integer id, String title) {
        this.id = id;
        this.title = title;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getFullTitle() {
        return fullTitle;
    }

    public void setFullTitle(String fullTitle) {
        this.fullTitle = fullTitle;
    }

    @XmlTransient
    public List<User> getUserList() {
        return userList;
    }

    public void setUserList(List<User> userList) {
        this.userList = userList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Title)) {
            return false;
        }
        Title other = (Title) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return title + " (id=" + id + " )";
    }
    
}

-----------------------------------

@Stateless
@Path("title")
public class TitleService extends AbstractFacade<Title> {
    @PersistenceContext(unitName = "org.setupit_experiment_war_1.0PU")
    private EntityManager em;

    public TitleService() {
        super(Title.class);
    }

    @GET
    @Path("{id}")
    @Produces({MediaType.APPLICATION_JSON})
    public Title find(@PathParam("id") Integer id) {
        return super.find(id);
    }

    @GET
    @Override
    @Produces({MediaType.APPLICATION_JSON})
    public List<Title> findAll() {
        List<Title> lt = super.findAll();
        return lt;
    }

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }
    
}

---------------------------

    <servlet>
        <servlet-name>javax.ws.rs.core.Application</servlet-name>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>javax.ws.rs.core.Application</servlet-name>
        <url-pattern>/services/*</url-pattern>
    </servlet-mapping>


 Comments   
Comment by reza_rahman [ 12/Oct/15 ]

I can confirm this happens with Cargo Tracker as well. It's a fairly serious usability problem.

Comment by Vinay Vishal [ 14/Oct/15 ]

Bean validation was introduced in Eclipselink 2.6.0 and that is where the NoClassDefFoundError is thrown.

This could be a case of missing entries in MANIFEST.MF in org.eclipse.persistence.moxy osgi bundle. Following link suggests so.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=463169
https://java.net/jira/browse/JERSEY-2888

Comment by Lukas Jungmann [ 14/Oct/15 ]

this seems to be fixed with eclipselink-2.6.1-RC2

Comment by Vinay Vishal [ 14/Oct/15 ]

Thanks Lukas, it worked when I tried locally with eclipselink-2.6.1-RC2.

Comment by setup [ 14/Oct/15 ]

I just tried to replace eclipselink-2.6.1-RC1 with eclipselink-2.6.1-RC2. it didn't resolve the problem. Any other suggestions?

Comment by Vinay Vishal [ 15/Oct/15 ]

In my case, I rebuilt Glassfish locally after bumping up eclipselink version. Its working fine for me. May be you can try stopping the domain, cleaning up your osgi-cache inside domains/<domain> directory, restart the domain and see if it works?

Comment by nicof6786 [ 15/Oct/15 ]

Hi,
I tried to get around this issue using Jackson as a media provider.
I ran into a similar issue even though it was not blocking.
On the first call and only on the first call to a Jax-Rs resource I get the following error :

java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector
        at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospector(JsonMapperConfigurator.java:109)
        at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospectors(JsonMapperConfigurator.java:84)
        at com.fasterxml.jackson.jaxrs.cfg.MapperConfiguratorBase._setAnnotations(MapperConfiguratorBase.java:120)
        at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator.getDefaultMapper(JsonMapperConfigurator.java:45)
        at com.fasterxml.jackson.jaxrs.base.ProviderBase.locateMapper(ProviderBase.java:864)
        at com.fasterxml.jackson.jaxrs.base.ProviderBase.writeTo(ProviderBase.java:588)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
        at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
        at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
        at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
        at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:683)
        at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:424)
        at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:414)
        at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:312)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
        at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:460)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
        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:206)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
        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:283)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
        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:591)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
        at java.lang.Thread.run(Thread.java:745)

The subsequent calls work fine.
Should I declare another issue ?

Comment by xwibao [ 19/Oct/15 ]

That nasty JERSEY-2888 definitely crept into GlassFish 4.1.1 :-\

As a quick & dirty fix, one can find glassfish/modules/org.eclipse.persistence.moxy.jar and fix META-INF/MANIFEST.MF inside it. Simply append the following to Import-Package:

,org.xml.sax.helpers,javax.xml.parsers;resolution:=optional,javax.naming;resolution:=optional

and restart. That worked for me.

Comment by setup [ 26/Oct/15 ]

Thank you!

Editing glassfish/modules/org.eclipse.persistence.moxy.jar helps

Comment by sebastian2 [ 30/Nov/15 ]

Hi there,
this bug is also blocking us from updating to the new Glassfish version.

Comment by pdurbin [ 04/Dec/15 ]

This issue is blocking us from upgrading from Glassfish 4.1 to Glassfish 4.1.1 because bean validation isn't working in the latter. Please see the following comment for details and a stacktrace: https://github.com/IQSS/dataverse/issues/2628#issuecomment-158197478

At https://javabot.evanchooly.com/logs/%23glassfish/2015-12-04 Ed Burns mentioned that this issue (GLASSFISH-21440) is the one I should be tracking so if "bean validation" could be added to the title, I would really appreciate it. We're looking forward to a release that has the bug fix (Glassfish 4.1.2 or whatever). We'll pass on Glassfish 4.1.1. (We already do enough patching of Glassfish 4.1 per the GitHub issue above and our goal is to avoid making our users patch Glassfish.)

Thanks for Glassfish. It's great. We're looking forward to upgrading. (I kind of want to play with Ozark.

Comment by Pavel Bucek [ 04/Dec/15 ]

If you just wan't to "play", you can checkout and build glassfish trunk, I believe the issue is resolved there.

Comment by basler [ 22/Dec/15 ]

This bug is blocking my upgrade, but the moxy patch listed above worked.

Comment by nabizamani [ 23/Jan/16 ]

Hello Oracle!!!! I can confirm this bug also exists also on Mac OS.

It's such a pity that you don't care about this serious issue! I'm writing tutorials based on Glassfish and I just decided to drop Glassfish for all my future tutorials because the quality of GF is disgusting compared to the times it was managed by Sun! I will use Tomcat instead, congrats!! I'm so disappointed. It's such a shame that this obvious issue is not even assigned yet!





[GLASSFISH-21443] Impossible to create a mail session Created: 16/Oct/15  Updated: 22/Jan/16

Status: Open
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mbutton Assignee: Anissa Lam
Resolution: Unresolved Votes: 3
Labels: mail
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Red Hat Enterprise Linux Server release 6.6 (Santiago)



 Description   

Context :
JVM invocation command line:
/logiciels/jdk1.8.0_60/bin/java [ ... ]
Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1)]]

Hi, I've freshly installed the GlassFish 4.1.1.
I then ran those commands :

asadmin create-domain myDomain
asadmin start-domain myDomain
asadmin --host localhost --port 4848 enable-secure-admin

When I log in to the admin console, I'm trying to create a mail session, and I get a "class java.lang.RuntimeException" message.
In the log file, I can see :

[2015-10-16T11:41:27.535+0200] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=96 _ThreadName=admin-listener(8)] [timeMillis: 1444988487535] [levelValue: 800] [[
Exception Occurred :null]]

[2015-10-16T11:41:27.541+0200] [glassfish 4.1] [SEVERE] [] [javax.enterprise.resource.webcontainer.jsf.context] [tid: _ThreadID=96 _ThreadName=admin-listener(8)] [timeMillis: 1444988487541] [levelValue: 1000] [[
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event143'.
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:422)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:556)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:551)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:256)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
... 60 more
Caused by: java.lang.NullPointerException
at com.sun.jsftemplating.handlers.UtilHandlers.mapPut(UtilHandlers.java:314)
... 65 more
]]



 Comments   
Comment by mbutton [ 16/Oct/15 ]

I also tried with a 5.0 beta, and it's the same result.

However, I just confirmed that it is correctly working with 3.1.2.2 (build 5).

Comment by Romain Grécourt [ 16/Oct/15 ]

Looking at the stack trace you tried to create a mail session using the admin console.

Can you try against GF 4.0 and 4.1 ?
Can you also try using jdk7 ?

Thanks.

Comment by mbutton [ 20/Oct/15 ]

Bonjour Romain,

you're right : I tried to create a mail session through the admin console.

I first tried with a JDK 7, and then when I encountered the problem, I read about the recommandations, which were :
Java EE 7 requires JDK 7 or above, JDK 8 u60 or above is recommended for GlassFish 4.1.1

I then decided to try with a JDK 8u60, and since it didn't fix my problem, I opened that case.
Now, everything is working fine with a GF 3.1.2.2, but I unfortunately have no more time to spend on the subject (thus, I won't be able to test against GF 4.0 & 4.1)
I just thought it would be useful for the community to know about that regression.

Thanks.

Comment by ekremkucuk [ 25/Dec/15 ]

I had similar problem.

I have started glassfish 4.1.1 instance as usual running with JDK 1.8.0_65

I have clicked Resources -> Java Mail Sessions

On right frame "class java.lang.RuntimeException" is written on blank page.

On Console:

2015-12-25T18:32:04.324+0200|Info: Exception Occurred :null
2015-12-25T18:32:04.328+0200|Severe: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event144'.
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:422)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:556)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:551)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:256)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
... 46 more
Caused by: java.lang.NullPointerException
at com.sun.jsftemplating.handlers.UtilHandlers.mapPut(UtilHandlers.java:314)
... 51 more

Comment by fmateo [ 22/Jan/16 ]

This problem is not just for mail session. There is a similar exception for every "New" operation using the web console.
I have confirmed that this was working ok on Glassfish 4.0 and 4.1.





[GLASSFISH-21488] HTTP status 404 - Not Found on instance the cluster Created: 22/Jan/16  Updated: 22/Jan/16

Status: Open
Project: glassfish
Component/s: admin, jms
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: nickyfulls Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: exceptions
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 14.04.3 LTS trusty, java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode), NetBeans IDE 8.1, GlassFish Server Open Source Edition 4.1.1 (build 1)


Tags: Container, EJB, clustered, error, initialization, jms, local-instance, localhost

 Description   

I have create the cluster "mycluster", two local instance and the resources jms/Queue1, jms/Queue2 and jms/Topic with target server and cluster.

So in this way I created the cluster:

  • create-cluster mycluster
  • create-instance --node localhost-domain1 --cluster mycluster instance01
  • create-instance --node localhost-domain1 --cluster mycluster instance02
  • start-cluster mycluster
  • deploy --target mycluster CoordinatorEA.ear
    Application deployed with name CoordinatorEA.
    Warning: Command _deploy did not complete successfully on server instance instance01: remote failure: Failed to load the application on instance instance01. The application will not run properly. Please fix your application and redeploy.
    Exception while loading the app : EJB Container initialization error. Please see server.log for more details.
    Warning: Command _deploy did not complete successfully on server instance instance02: remote failure: Failed to load the application on instance instance02. The application will not run properly. Please fix your application and redeploy.
    Exception while loading the app : EJB Container initialization error. Please see server.log for more details.
    Command deploy completed with warnings.

On [server]: http://hostname:8080/WebPresentation-war/ all right.

On [instance01 the cluster] http://hostname:28080/WebPresentation-war
and
On [instance02 the cluster] http://hostname:28081/WebPresentation-war
I get this desperate HTTP status 404 - Not Found ((((

I tried to test the following file:
https://glassfish.java.net/downloads/quickstart/hello.war on instance all right :-O

Complete logs file server, instance01 and instance02:

https://drive.google.com/folderview?id=0B7CqU8774DG8RGx0VkRVeEZXclE&usp=sharing

Past the log server after deployment:

[2016-01-22T10:37:02.233+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455422233] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:02.294+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455422294] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:02.646+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455422646] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:02.654+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455422654] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:02.798+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455422798] [levelValue: 800] [[
Loading EJBTimerService. Please wait.]]

[2016-01-22T10:37:02.807+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455422807] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:03.028+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455423028] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:03.066+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455423066] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:03.115+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455423115] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:03.428+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455423428] [levelValue: 800] [[
visiting unvisited references]]

[2016-01-22T10:37:05.752+0100] [glassfish 4.1] [INFO] [AS-EJB-00054] [javax.enterprise.ejb.container] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455425752] [levelValue: 800] [[
Portable JNDI names for EJB TimerBean: [java:global/ejb-timer-service-app/TimerBean, java:global/ejb-timer-service-app/TimerBean!org.glassfish.ejb.persistent.timer.TimerLocal]]]

[2016-01-22T10:37:05.837+0100] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00172] [javax.enterprise.web] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455425837] [levelValue: 800] [[
Loading application [ejb-timer-service-app] at [/ejb-timer-service-app]]]

[2016-01-22T10:37:05.851+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455425851] [levelValue: 800] [[
ejb.timer_service_started]]

[2016-01-22T10:37:05.895+0100] [glassfish 4.1] [WARNING] [] [org.eclipse.persistence.default] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455425895] [levelValue: 900] [[

java.lang.NullPointerException
at org.eclipse.persistence.platform.server.ServerPlatformUtils.createServerPlatform(ServerPlatformUtils.java:99)
at org.eclipse.persistence.sessions.factories.SessionManager.init(SessionManager.java:77)
at org.eclipse.persistence.sessions.factories.SessionManager.<clinit>(SessionManager.java:71)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.addSessionToGlobalSessionManager(EntityManagerSetupImpl.java:907)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.initSession(EntityManagerSetupImpl.java:2671)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:675)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:318)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:521)
at org.glassfish.ejb.persistent.timer.TimerBean.countTimersByContainer(TimerBean.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy257.countTimersByContainer(Unknown Source)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.createSchedules(PersistentEJBTimerService.java:826)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.createSchedulesOnServer(PersistentEJBTimerService.java:805)
at org.glassfish.ejb.startup.EjbDeployer.createAutomaticPersistentTimersForEJB(EjbDeployer.java:560)
at org.glassfish.ejb.startup.EjbDeployer.checkEjbBundleForTimers(EjbDeployer.java:535)
at org.glassfish.ejb.startup.EjbDeployer.event(EjbDeployer.java:508)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:487)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:404)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:375)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)
]]

[2016-01-22T10:37:05.928+0100] [glassfish 4.1] [INFO] [] [org.eclipse.persistence.session./file:/home/nicky/glassfish4/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455425928] [levelValue: 800] [[
EclipseLink, version: Eclipse Persistence Services - 2.6.1.v20150605-31e8258]]

[2016-01-22T10:37:07.998+0100] [glassfish 4.1] [INFO] [] [org.eclipse.persistence.session./file:/home/nicky/glassfish4/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455427998] [levelValue: 800] [[
/file:/home/nicky/glassfish4/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful]]

[2016-01-22T10:37:08.432+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=156 _ThreadName=admin-listener(6)] [timeMillis: 1453455428432] [levelValue: 800] [[
CoordinatorEA was successfully deployed in 6.277 milliseconds.]]






[GLASSFISH-21485] Web service test page fails when ejb and war have same namespace Created: 20/Jan/16  Updated: 20/Jan/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Meatwad Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All



 Description   

There seems to be a problem when glassfish attempts to create its test page for a web service if the web service class contains the same package and namespace as an ejb jar file packaged within the same enterprise application (ear).

The steps to reproduce the issue are:

1. Create an ear with an included war and jar file.
2. Use the same package name in the war and jar.
3. Create a web service in the war.
4. Create an ejb in the jar.
5. Set the namespaces in the war to that of the package path.

I've included a test case that demonstrates this. Note that this code works when not called from the glassfish tester page. The key to reproducing the issue is for the web service class, its namespaces (http://local/), and the ejb class to all be in the same package (local).



 Comments   
Comment by Meatwad [ 20/Jan/16 ]

Well I have a test case but I don't see an upload spot so just let me know where I can send it when you're ready to look at it.





[GLASSFISH-21141] Missing jackson-module-jaxb-annotations JAR causes error on first Jersey/Jackson JSON response Created: 23/Jul/14  Updated: 15/Jan/16

Status: Open
Project: glassfish
Component/s: jax-rs
Affects Version/s: 4.1_b08, 4.1_b09
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mreichman Assignee: Jakub Podlesak
Resolution: Unresolved Votes: 17
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows x86-64, Linux x86-64, JDK 7u45


Tags: json-jackson

 Description   

Deployment of a basic webapp, 3 classes, fails to respond with a proper serialized JSON response on the first attempt after deployment.

In the example classes (below), the first call after deployment to GET /myTestApp/rest/myobject yields a 500 in the browser window and this in the server.log:

[2014-07-23T09:17:30.348-0500] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=30 _ThreadName=http-listener-1(3)] [timeMillis: 1406125050348] [levelValue: 900] [[
  StandardWrapperValve[MyApplication]: Servlet.service() for servlet MyApplication threw exception
java.lang.ClassNotFoundException: com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector not found by com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider [188]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospector(JsonMapperConfigurator.java:109)
	at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospectors(JsonMapperConfigurator.java:84)
	at com.fasterxml.jackson.jaxrs.cfg.MapperConfiguratorBase._setAnnotations(MapperConfiguratorBase.java:120)
	at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator.getDefaultMapper(JsonMapperConfigurator.java:45)
	at com.fasterxml.jackson.jaxrs.base.ProviderBase.locateMapper(ProviderBase.java:833)
	at com.fasterxml.jackson.jaxrs.base.ProviderBase.writeTo(ProviderBase.java:576)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:263)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:89)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154)
	at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:621)
	at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:377)
	at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:367)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:274)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
	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:744)
]]

Second and subsequent calls yield no log message and this (expected) in the browser window:

{"myString":"test","myLong":123}

Putting a version-appropriate jackson-module-jaxb-annotations JAR file in the glassfish4/glassfish/modules directory makes this work on the first try as it should.

Example application (3 classes):

MyApplication.java
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.ResourceConfig;

import javax.ws.rs.ApplicationPath;

@ApplicationPath("rest")
public class MyApplication extends ResourceConfig {
    public MyApplication() {
        register(JacksonFeature.class);
        register(MyResource.class);
    }

}
MyResource.java
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/myobject")
public class MyResource {
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response getMyObject() {
        return Response.ok(new MyObject("test", 123L)).build();
    }
}
MyObject.java
public class MyObject {
    private String myString;
    private Long myLong;

    public MyObject() {
    }

    public MyObject(String myString, Long myLong) {
        this.myString = myString;
        this.myLong = myLong;
    }

    public String getMyString() {
        return myString;
    }

    public void setMyString(String myString) {
        this.myString = myString;
    }

    public Long getMyLong() {
        return myLong;
    }

    public void setMyLong(Long myLong) {
        this.myLong = myLong;
    }
}


 Comments   
Comment by mreichman [ 01/Aug/14 ]

This is still happening under 4.0.1b10. I don't seem to be able to edit the ticket to reflect that.

Comment by mreichman [ 12/Aug/14 ]

Confirmed still happening under 4.1b12

Comment by Sanjeeb Sahoo [ 12/Aug/14 ]

There is no module containing the missing com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.class, so that's causing the CNFE. The bug submitter has already confirmed the following:

> Putting a version-appropriate jackson-module-jaxb-annotations JAR file in the glassfish4/glassfish/modules directory makes this work on the first try as it should.

The reason it has gone unnoticed so far is that the OSGi metadata of jackson-jaxrs-json-provider.jar says that com.fasterxml.jackson.module.jaxb package is an optional requirement. Instead of deploying the missing module to modules/ dir, please deploy it to domains/domain1/autodeploy/bundles/ dir as a work around. That way you are not changing glassfish installation; you are only changing domain configuration.

Thanks,
Sahoo

Comment by mreichman [ 12/Aug/14 ]

Thanks Sahoo.

What needs to happen for this to be fixed for real? It seems that it's being handled, in the sense that subsequent calls work fine, so whatever is throwing this exception is also handling something for later calls.

Does the exception need to be caught higher up and logged as a warning? Or is that outside the scope of this ticket?

It's not clear to me exactly where in the chain this exception is making it out, following to which project has the responsibility to fix.

Thanks,
Marc

Comment by Sanjeeb Sahoo [ 13/Aug/14 ]

Someone familiar with jax-rs/jackson should tell how this works second time. I suspect on subsequent requests, a different code path is exercised possible due to the exception raised during the first invocation. But, someone needs to debug and confirm this theory.

Comment by svenvarkel [ 27/Aug/14 ]

After I copy jackson-module-jaxb-annotations-2.4.2.jar to domain1/autodeploy/bundles I get the following error upon Glassfish start. GF version is 4.1b13

[2014-08-27T12:41:04.287+0300] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=122 _ThreadName=Thread-9] [timeMillis: 1409132464287] [levelValue: 800] [[
  org.osgi.framework.BundleException: Unresolved constraint in bundle com.fasterxml.jackson.module.jackson-module-jaxb-annotations [303]: Unable to resolve 303.0: missing requirement [303.0] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.annotation)(version>=2.4.0)(!(version>=2.5.0)))

If I copy this file to glassfish/modules then GF starts up fine.

However then I still get the original error:

Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector
	at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospector(JsonMapperConfigurator.java:109)
	at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospectors(JsonMapperConfigurator.java:84)
	at com.fasterxml.jackson.jaxrs.cfg.MapperConfiguratorBase._setAnnotations(MapperConfiguratorBase.java:120)
	at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator.getDefaultMapper(JsonMapperConfigurator.java:45)
	at com.fasterxml.jackson.jaxrs.base.ProviderBase.locateMapper(ProviderBase.java:833)
	at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:752)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:257)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:229)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:810)
	at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:368)
	at org.glassfish.jersey.client.InboundJaxrsResponse$2.call(InboundJaxrsResponse.java:122)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:399)
	at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:119)
	at com.mageflow.rest.resources.magento.PingResource.GET(PingResource.java:53)
	at com.mageflow.rest.MagentoRestClient.ping(MagentoRestClient.java:342)
	at com.mageflow.worker.updaters.InstancePinger.pingInstance(InstancePinger.java:119)
	at com.mageflow.worker.updaters.InstancePinger.pingAllInstances(InstancePinger.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
	at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
	at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
	at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
	at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:145)
	at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
	at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
	at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4051)
	... 8 more
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector not found by com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider [129]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 60 more

Any help would be appreciated.

Comment by svenvarkel [ 27/Aug/14 ]

One solution was to create a MapperProvider:

@Provider
public class RestObjectMapperProvider implements ContextResolver<ObjectMapper> {
.....

and register it when building new client:

 javax.ws.rs.client.ClientBuilder.newBuilder()
                .sslContext(getSSLContext())
                .register(RestObjectMapperProvider.class)
                .register(JacksonFeature.class);
Comment by mreichman [ 27/Aug/14 ]

svenvarkel,

Could you provide the rest of your provider implementation? I'd like to try it with the service side.

Edit The version of the jackson library inside 4.1b13 is still 2.3.2, which you can see looking at the manifest files in the other jars. That's probably causing your startup issue. You may need to clear osgi cache after this change.

Thanks,
Marc

Comment by svenvarkel [ 27/Aug/14 ]

Hi,

it's very basic:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mageflow.mapper;

import com.fasterxml.jackson.databind.AnnotationIntrospector;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair;
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
import com.mageflow.rest.entities.github.Repository;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;

/**
 *
 * @author Sven Varkel <sven.varkel@gmail.com>
 */
@Provider
public class RestObjectMapperProvider implements ContextResolver<ObjectMapper> {

    final ObjectMapper defaultObjectMapper;
    final ObjectMapper combinedObjectMapper;

    public RestObjectMapperProvider() {
        defaultObjectMapper = createDefaultMapper();
        combinedObjectMapper = createCombinedObjectMapper();
    }

    @Override
    public ObjectMapper getContext(Class<?> type) {

        if (type == Repository.class) {
            return combinedObjectMapper;
        } else {
            return defaultObjectMapper;
        }
    }

    private static ObjectMapper createCombinedObjectMapper() {

        AnnotationIntrospector ai = new AnnotationIntrospectorPair(
                new JaxbAnnotationIntrospector(),
                new JacksonAnnotationIntrospector()
        );
        ObjectMapper mapper = new ObjectMapper();
        mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
        mapper.configure(DeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY, true);
        mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
        mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
        mapper.setAnnotationIntrospector(ai);

        return mapper;
    }

    private static ObjectMapper createDefaultMapper() {

        ObjectMapper result = new ObjectMapper();

        return result;
    }
}

Its logic is not used by us any more but I just found that it would load the necessary JaxbAnnotationIntrospector class So it's a hack.

Comment by sunpswd [ 30/Sep/14 ]

A quick hack how I managed to overcome this on GlassFish Server Open Source Edition 4.1 (build 13):

0) stopped the server
1) downloaded and copied the jars below into glassfish4\glassfish\modules (version: 2.4.2 for all)
jackson-annotations.jar
jackson-core.jar
jackson-databind.jar
jackson-jaxrs-base.jar
jackson-jaxrs-json-provider.jar
jackson-module-jaxb-annotations.jar
2) deleted the osgi-cache: removed glassfish4\glassfish\domains\domain1\osgi-cache\felix
3) re-started the server

Comment by atrajano [ 10/Oct/14 ]

This is how I did mine without making any changes to the domain directory libraries.

@Override
public Set<Object> getSingletons() {
  ObjectMapper mapper = new ObjectMapper();
  mapper.registerModule(new JaxbAnnotationModule());
  return ImmutableSet
    .<Object> builder()
    .add(new JacksonJaxbJsonProvider(mapper,
             JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS)).build();
}

The disadvantage is you lose the automatic lookup of your classes, but it turned out to be a good thing for me as I can have different API version srunning concurrently from the same web project as I had noted here http://www.trajano.net/2014/10/predictiability-and-versioning-jax-rs-rest-api/

Comment by dyego [ 02/Jul/15 ]

One more vote... this is very bad

Comment by adfore [ 04/Nov/15 ]

The file's still missing as of 4.1.1 (GlassFish Server Open Source Edition 4.1.1 (build 1)).
Edit: The new Jackson version is 2.5.1 (for workaround).

Comment by unwichtich [ 15/Jan/16 ]

For Glassfish 4.1 it is sufficient to put jackson-module-jaxb-annotations-2.3.2.jar into the modules directory, you don't need to replace all Jackson libs.





[GLASSFISH-21483] "Connection closed" ConnectionHolder.checkValidity Created: 14/Jan/16  Updated: 14/Jan/16

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2, 3.1.2.2, 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: joyli Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We have problem,used the prepareStatement database connection to get the getMetaData,
“Initial and Minimum Pool Size:” 、“Maximum Pool Size:” and “Statement Cache Size:” are 1,
code:
DataSource dn = (DataSource) initContext.lookup("DB");
Connection ccon = dn.getConnection();
PrepareStatement pstam = ccon.prepareStatement(sql);
ResultSet rs = pstam.executeQuery();
pstam.getConnection().getMetaData();

the concurrent situation,appear:
java.sql.SQLException: Connection closed
at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:774)
at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:388)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.getMetaData(ConnectionWrapper40.java:114)
at jdbc1.Servese1.serverdd(Servese1.java:122)
at jdbc1.Servese1.doGet(Servese1.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:286)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:336)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:236)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:619)






[GLASSFISH-21444] error java.lang.RuntimeException Created: 18/Oct/15  Updated: 12/Jan/16

Status: Open
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: taoufik_01 Assignee: Anissa Lam
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hello
path : admin consol /JMS Ressources/JMS Resources/Connections factories
glassfish version 4.1.1
JDK 8
windows 8

When i click on the New factory i get this error : class java.lang.RuntimeException. im blocked with issue . thanks for your help



 Comments   
Comment by Romain Grécourt [ 19/Oct/15 ]

Please provide the exception found in server.log.
I'd advice you to try using JDK7 to see if that makes a difference.

Comment by clux87 [ 12/Jan/16 ]

I have the same error, my server log:

Información: Exception Occurred :null
Información: Exception Occurred :null
Información: Exception Occurred :null
Grave: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event166'.
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:422)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:556)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:551)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:256)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
... 46 more
Caused by: java.lang.NullPointerException
at com.sun.jsftemplating.handlers.UtilHandlers.mapPut(UtilHandlers.java:314)
... 51 more





[GLASSFISH-21479] Glassfish 4.1 won't start with JDK 9 build jdk9-b95 (and later) Created: 06/Jan/16  Updated: 06/Jan/16

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: 4.1.1

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open
Tags: jdk9-int

 Description   

Glassfish 4.1 won't start with JDK 9 build jdk9-b95 (and later) because of version string change (project verona) .Please refer http://openjdk.java.net/jeps/223.We are getting error in console as
GlassFish requires Java SE version 6. Your JDK is version 0






[GLASSFISH-19475] "Connection closed" despite connection validation Created: 21/Dec/12  Updated: 04/Jan/16

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2_b23
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Heikki Salokanto Assignee: sfelts
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 3.1.2 b23 on CentOS 6.2 x86_64
Oracle 10.2.0.5 RAC ia64, 2 nodes


Tags: closed, connection, validation

 Description   

We were having occasional connection problems and therefore switched on connection validation, with a dummy query to DUAL. It validates at most every 60 seconds and will not close all connections on failure.

However, it seems that ConnectionHolder.checkValidity() throws a 'connection closed' which then goes all the way to the application. I was in belief that connection validation was the thing exactly designed to prevent this, is it not? If validation failed, it would automatically reconnect before handing out the connection?

The connection is indeed validated, but there's no effort to fix the connection when the validation fails:

[#|2012-12-21T04:56:03.707+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=45;_ThreadName=Thread-2;|
        at fi.foo.bar.AvepsiKuittausDAO.hae(AvepsiKuittausDAO.java:67)
        at fi.foo.bar.AvepsiSanomaKasittelija.hae(AvepsiSanomaKasittelija.java:56)
        at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
        at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
        at $Proxy244.hae(Unknown Source)
        at fi.foo.bar.__EJB31_Generated__AvepsiSanomaKasittelija__Intf____Bean__.hae(Unknown Source)
        at fi.foo.bar.baz.JmsToXml.<init>(JmsToXml.java:70)
        at fi.foo.bar.baz.PerusvalvontadataKasittelijaMDB.onMessage(PerusvalvontadataKasittelijaMDB.java:87)
        at sun.reflect.GeneratedMethodAccessor676.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
        at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099)
        at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
        at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
        at $Proxy333.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: org.hibernate.exception.GenericJDBCException: could not load an entity:
[fi.foo.bar.AvepsiKuittaus#component[sanomaId,kasittelija]{kasittelija=Perusvalvonta, sanomaId=69618960}]
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        at org.hibernate.loader.Loader.loadEntity(Loader.java:2041)
        at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
        at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
        at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3293)
        at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
        at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
        at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
        at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
        at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
        at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
        at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1005)
        at org.hibernate.impl.SessionImpl.get(SessionImpl.java:998)
        at fi.foo.bar.AvepsiKuittausDAO.hae(AvepsiKuittausDAO.java:59)
        ... 42 more
Caused by: java.sql.SQLException: Connection closed
        at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:730)
        at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:560)
        at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:255)
        at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:52)
        at com.sun.gjc.spi.ManagedConnection.prepareCachedStatement(ManagedConnection.java:993)
        at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareStatement(ConnectionWrapper40.java:173)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
        at org.hibernate.loader.Loader.doQuery(Loader.java:801)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
        at org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
        ... 54 more
|#]


 Comments   
Comment by jifeng [ 01/Mar/13 ]

if you execute the following logic in you application :
step1: connection.close();

step2: connection.prepareStatement();

there will be throw this exception :

Caused by: java.sql.SQLException: Connection closed
at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:730)

because the logic connectin(connectionHolder) is closed
ConnectionHolder.checkValidity() is used to check the connection is closed or not

Comment by Heikki Salokanto [ 01/Mar/13 ]

Quite obviously, yes, but we are never doing a connection.close() in the application. Connections are pooled and the JDBC Connection Pools are managed by GlassFish. It opens new connections as required and closes those that have been idle for some time.

The problem here is that the connections are getting closed suddenly for an unknown reason and GlassFish's connection validator is not capable of handling that. Connections getting closed suddenly also looks like a GlassFish problem since we're not experiencing that with any other (sort of) application.

Comment by sfelts [ 01/Mar/13 ]

This is working as expected. Based on the stack trace, you are not in the process of getting a connection. You are in the process of using a connection that you already reserved to do a prepared statement. Since GF and the driver don't know what other operations have been executed on the connection before this, we can't just give out a new connection and hope that everything is OK.

To do something like that, you would need to run with the Application continuity feature that was announced at Oracle Open World for Oracle 12c. In that case, the driver and database actually do keep track of what has been executed on the connection so it can be replayed on the new connection.

Comment by hrstoyanov [ 09/Mar/13 ]

This is, indeed, a major bug in GlassFish Server Open Source Edition 3.1.2.2 (build 5). The workaround that works for me is to disable statement cache (Statement Cache Size: 0, Advanced Tab) - the behaviour of this mug made me believe that this is some statements cache mess. Note, that I have not configured connection validation as described in the initial bug report, neverthless, the issue is still present.

Here is another manifestation of the same issue as seen in the SmartGWT product:

http://forums.smartclient.com/showthread.php?t=25771

"...Best guess, this is an application server or JDBC driver bug or misconfiguration at the JDBC driver or application server level, hence out of our control.

What's happening is: we successfully execute your SQL ("INSERT INTO batch_job_share...") using PreparedStatement.executeUpdate(). Then, a few lines later, using the same preparedStatement object, we are calling preparedStatement.getConnection().getMetaData().

At this point, your JDBC driver - well actually, some wrapper around it, looks like a manager class from Glassfish? - throws an Exception indicating the connection we just successfully used for an update is now closed. So it seems like it's either configured to auto-close connections right after certain SQL operations are executed, or your JDBC driver has some kind of bug where it get mixed up about which Connection belongs with which Statement, or the wrapper classes in use are not correctly tracking the open/closed state of the wrapped connections."

Comment by sfelts [ 09/Mar/13 ]

The connection close is not caused by the connection validation feature. My point was that turning on the connection validation feature doesn't prevent this from happening.

Here's an example that I ran into this week with the Oracle thin driver. The application configured oracle.jdbc.ReadTimeout. When the database was slow and the read timeout was exceeded, the applcation got a mysterious "SQLRecoverableException: Closed Connection".

I have also found that the expected new JDBC auto-close behavior leads to some surprises (IMO) but I don't think that is the case here.

If the driver has a debug feature to log all SQL operations, that would be the way to check if close is explicitly closed.

Comment by Heikki Salokanto [ 12/Mar/13 ]

Thank you for your ideas.

hrstoyanov: Last time I tried, setting up statement caching on the Advanced tab just completely messed up everything. I found out on some forums that it has to be configured on the Additional properties tab with "ImplicitCachingEnabled=true" and "MaxStatements=nnn". At least it didn't fill up all the logs with errors anymore, but I never benchmarked if it was actually in use then.

sfelts: I wasn't saying that 'Connection closed' was caused by the connection validation, but despite it. I now understand that it cannot solve the problem, in the current design at least.

I am running out of ideas, though. I'm getting the occasional 'Connection closed' on different application servers (physical servers, virtual servers), different Oracle RACs (10.2.0.5 and 11.2.0.3), different Oracle JDBC drivers (10.2.0.5 and 11.2.0.3) as well as with and without statement caching. The only thing common to all the setups is now GlassFish 3.1.2.2 (build 5).

Furthermore, I am not getting my connections closed in a Tomcat webapp using the same databases and drivers.

Comment by hrstoyanov [ 14/Mar/13 ]

sfelts:
1. I am using MS SQL JDBC Type 4 driver
2. It can not be a timing issue (look at the URL I provided and description of events). The SmartGWT comments indicated error in the Wrpper/Caching , which lead me to teh workaround.

Comment by samyomar82 [ 27/Jul/14 ]

Currently I am facing the same issue , (using GF 3.1.2.2 and Oracle 10G)
I am getting my Connection object from GlassFish connection Pool and I get this issue when the result set expected to return around 1/2 million records, but I did not get this exception when the result set contains lower set of records.

My poor workaround is to use a traditional JDBC connection instead of getting the connection object from Data Source It worked fine.

Has anybody a solution or workaround ?
Also we dont know if this bug is going to be fixed or not

Comment by joyli [ 30/Dec/15 ]

We have the same problem,used the prepareStatement database connection to get the getMetaData,
“Initial and Minimum Pool Size:” 、“Maximum Pool Size:” and “Statement Cache Size:” are 1,
code:
DataSource dn = (DataSource) initContext.lookup("DB");
Connection ccon = dn.getConnection();
PrepareStatement pstam = ccon.prepareStatement(sql);
ResultSet rs = pstam.executeQuery();
pstam.getConnection().getMetaData();

the concurrent situation,appear:
java.sql.SQLException: Connection closed
at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:774)
at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:388)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.getMetaData(ConnectionWrapper40.java:114)
at jdbc1.Servese1.serverdd(Servese1.java:122)
at jdbc1.Servese1.doGet(Servese1.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:286)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:336)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:236)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:619)

Comment by joyli [ 04/Jan/16 ]

Glassfish 4.1 has the same problem.





[GLASSFISH-21478] Output written in the servlet response writer after dispatch.include() get lost Created: 03/Jan/16  Updated: 03/Jan/16

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: stoyants Assignee: Shing Wai Chan
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10, Java jdk1.8.0_66, MS Edge & Chrome


Tags: dispatch, servlet

 Description   

Servlet is supposed to be able to continue to write in the output stream after dispatcher.include(request, response); (as opposite to dispatcher.forward(request, response))
While not throwing any exception or showing that anything went wrong, glassfish just does not deliver what is written to the client.
The same was tested under other Application servers and works as expected.
Issue is very easy to reproduce and test code, that shows the problem can be provided.






[GLASSFISH-21477]  @PersistenceContext cannot inject into a CDI bean if this bean is inside EAR's lib Created: 03/Jan/16  Updated: 03/Jan/16

Status: Open
Project: glassfish
Component/s: cdi
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: drupalspring Assignee: jjsnyder83
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

This is the issue of GLASSFISH-19317 but it seems that it still happen.

Also create the same issue at https://github.com/payara/Payara/issues/587.






[GLASSFISH-21447] java:app & java:module namespaces temporarily disappear when SAM invoked Created: 22/Oct/15  Updated: 23/Dec/15

Status: Open
Project: glassfish
Component/s: security
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: arjan tijms Assignee: JeffTancill
Resolution: Unresolved Votes: 0
Labels: security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: ejb, jaspic, jndi, namespace

 Description   

When trying to obtain something from the JNDI namespace java:app or java:module during invocation of a SAM's validateRequest method an exception is thrown.

However, right before the SAM is invoked, namely in a ServletRequestListener as well as right after the SAM is invoked, namely in a Filter or Servlet this operation succeeds.

The exception thrown is the following:

javax.naming.NamingException: Lookup failed for 'java:module/EJBBean' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Invocation exception: Got null ComponentInvocation ]
	at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
	at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at test.TestServerAuthModule.validateRequest(TestServerAuthModule.java:40)
	at javax.security.authenticationmechanism.DefaultServerAuthContext.validateRequest(DefaultServerAuthContext.java:36)
	at com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1654)
	at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1521)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:606)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:702)
	at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	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:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	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:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	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:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NamingException: Invocation exception: Got null ComponentInvocation 
	at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.getComponentId(GlassfishNamingManagerImpl.java:842)
	at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:714)
	at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:167)
	at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:471)

The lookup code is as follows:

try {
	// java:global/glassfish-sam-ee-namespaces/EJBBean does work
	EJBBean ejbBean = (EJBBean) new InitialContext().lookup("java:module/EJBBean");
	System.out.println("SAM: " + ejbBean.hello());
} catch (NamingException e) {
	System.out.println("SAM: Exception");
	e.printStackTrace();
}

A full reproducer is provided as Maven project at: https://github.com/arjantijms/glassfish-sam-ee-namespaces

Building and deploying this project to a stock GlassFish, then requesting http://localhost:8080/glassfish-sam-ee-namespaces/servlet prints the following in the log:

RequestListener: Hello from EJB
SAM: Exception
javax.naming.NamingException: Lookup failed for 'java:module/EJBBean' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} (rest of exception as above)
Servlet: Hello from EJB

Expected is:

RequestListener: Hello from EJB
SAM: Hello from EJB
Servlet: Hello from EJB

Deploying the same application to JBoss WildFly 9.0.1 or 10.0rc3 (with a modified standalone.xml to activate jaspic) indeed prints the above.



 Comments   
Comment by monzillo [ 23/Oct/15 ]

Glassfish should be modiefied such that such JNDI lookups may be made from within the SAM.
Also The JASPIC spec is silent on this, and should be amended to ensure that such lookups are required to supported.

Comment by arjan tijms [ 02/Nov/15 ]

After some research in the code it appears GlassFish sets and unsets the required context every time a web listener or component is called via a call to an InvocationManager. E.g. setting up the context:

private void preInvoke(WebModule ctx) {
    WebModule wm = (WebModule)ctx;
    ComponentInvocation inv = new WebComponentInvocation(wm);
    invocationMgr.preInvoke(inv);
}

And unsetting it:

private void postInvoke(WebModule ctx) {
    WebModule wm = (WebModule)ctx;
    ComponentInvocation inv = new WebComponentInvocation(wm);
    invocationMgr.postInvoke(inv);
}

Calls like these should be done prior to a SAM being called. The exact calls can't be done directly, because there would be a circulair dependency between web-glue.jar (where WebComponentInvocation lives) and websecurity.jar (where the RealmAdapter that calls the SAM lives).

However, firing an event for one of the existing listeners seems to work, as this will effectively invoke code such as shown above.

E.g. in com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate, add a try/catch with the context.fireContainerEvent calls as shown below for validateRequest

   if (serverAuthConfig != null) {
            //JSR 196 is enabled for this application
        	try {
        		context.fireContainerEvent(BEFORE_CONTEXT_ATTRIBUTE_ADDED, null);
        		result = validate(request, response, config, authenticator, calledFromAuthenticate);
        	} finally {
        		context.fireContainerEvent(AFTER_CONTEXT_ATTRIBUTE_ADDED, null);
        	}
        } 

And for secureResponse in com.sun.web.security.RealmAdapter.invokePostAuthenticateDelegate:

 if (messageInfo != null) {
                    //JSR 196 is enabled for this application
                    sAC = (ServerAuthContext) messageInfo.getMap().get(SERVER_AUTH_CONTEXT);
                    if (sAC != null) {
                    	try {
                    		context.fireContainerEvent(BEFORE_CONTEXT_ATTRIBUTE_ADDED, null);
                    		AuthStatus authStatus =  sAC.secureResponse(messageInfo, null); // null serviceSubject
                    		result = AuthStatus.SUCCESS.equals(authStatus);
                    	} finally {
                    		context.fireContainerEvent(AFTER_CONTEXT_ATTRIBUTE_ADDED, null);
                    	}
                    }
                }

Simular code should be added to com.sun.web.security.RealmAdapter.logout to support cleanSubject, but this requires a few more changes since context is not directly available in that method. Furthermore, for validateRequest firing the events should probably be moved into the validate() method, which should have context as extra parameter.

Finally, there should probably a new event be added and used instead of "AFTER_CONTEXT_ATTRIBUTE_ADDED".

I tested a GlassFish 4.1.1 build patched with the above changes at it fixes the problem. I also executed all JASPIC tests from the Java EE 7 samples project and no new failures occurred.

As for the reproducer linked from the issue descriptor, it now logs this on the patched GlassFish:

RequestListener initialized: Hello from EJB
SAM: Hello from EJB
Servlet: Hello from EJB
SAM SR: Hello from EJB
RequestListener destroyed: Hello from EJB
Comment by arjan tijms [ 23/Dec/15 ]

Note that Payara fixed this downstream. See https://github.com/payara/Payara/pull/581





[GLASSFISH-21476] Resource not available in @Singleton @Predestroy method Created: 22/Dec/15  Updated: 22/Dec/15

Status: Open
Project: glassfish
Component/s: ejb_container
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: kiranmohane Assignee: Srini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

openjdk version "1.8.0_66
Ubuntu 15.10



 Description   

It seems like resources are not available to a Singleton's @Predestroy method.

@PreDestroy
public void cleanup() {
logger.info("*** Application shutting down. Dropping temporary tables ***");
try

{ connection = dataSource.getConnection(); Statement statement = connection.createStatement(); statement.execute("drop table TABLE1"); statement.execute("drop table TABLE2"); connection.close(); connection = null; }

catch (SQLException sqle)

{ sqle.printStackTrace(); }

}
The call to getConnection() fails with the error "No Pool Meta Data object associated with the pool". Note that the getConnection() call is successful in the @PostConstruct methods.

Is it a Bug in the application server implementation? If not, what is the most elegant way to drop temporary tables?

(Using Glassfish 4.1.1 + Derby DB. The datasource is created using glassfish-resources.xml deployed with the EAR

<resources>
<jdbc-resource pool-name="EmbeddedDerbyPool"
jndi-name="java:app/jdbc/ActionBazaarDS" />
<jdbc-connection-pool name="EmbeddedDerbyPool"
res-type="javax.sql.DataSource"
datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource"
is-isolation-level-guaranteed="false">
<property name="databaseName" value="memory:action-bazaar-db"/>
<property name="createDatabase" value="create"/>
</jdbc-connection-pool>
</resources>






[GLASSFISH-20655] 500 error in browser - nothing in server logs Created: 21/Jun/13  Updated: 21/Dec/15

Status: Open
Project: glassfish
Component/s: jax-rs
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1.1

Type: Bug Priority: Major
Reporter: walec51 Assignee: Marek Potociar
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have no idea whats wrong because there is no error message anywhere.

Try to run the attached project from the latest Netbeans with GF 4 and entering:
http://localhost:8080/PcRepairLocations/



 Comments   
Comment by walec51 [ 21/Jun/13 ]

Project: http://walczak.it/files/PcRepairLocations2.zip

Comment by walec51 [ 21/Jun/13 ]

In the browser I get:

HTTP Status 500 - Internal Server Error

type Status report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

GlassFish Server Open Source Edition 4.0

Comment by walec51 [ 21/Jun/13 ]

adding the produced annotation to:

@GET
    @Produces(MediaType.TEXT_HTML)
    public Viewable getIndex() {
        Map<String, Object> model = new HashMap<>();
        model.put("repairLocations", repairLocationRepository.getAll());
        return new Viewable("WEB-INF/index.jsp", model);
    }

stooped the strange 500 but still something should appear in the lost even without it

Comment by michael.y.chen [ 24/Jun/13 ]

please reassign if needed.

Comment by Shing Wai Chan [ 24/Jun/13 ]

The given application has JAX-RS, EJB and persistent. Assign to JAX-RS team for evaluation.





[GLASSFISH-20576] Internal Server Error on JSON REST web service returning array Created: 23/May/13  Updated: 21/Dec/15

Status: Open
Project: glassfish
Component/s: jax-rs
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1.1

Type: Bug Priority: Major
Reporter: Peter Salomonsen Assignee: Marek Potociar
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

glassfish-4.0-b90-05_22_2013, jdk1.7


Tags: glassfish4, jersey, json, rest

 Description   

The following REST web service causes internal server error (and no stack trace in server.log). Returning an empty array works, but as soon as there are elements in the array - it does not.

@GET
@Produces("application/json")
public Object[] getArray() {
return new Object[]

{"Test"}

;
}



 Comments   
Comment by Marek Potociar [ 28/May/13 ]

Targeting for GF 4.0.1, Re-assigning to dev eng. for evaluation.

Comment by Michal Gajdos [ 11/Jun/13 ]

Which Json provider from Jersey are you using? Have you configured one? Thanks.

Comment by Peter Salomonsen [ 11/Jun/13 ]

I haven't configured anything - no web.xml at all. Just application config class like this:

@javax.ws.rs.ApplicationPath("webresources")
public class ApplicationConfig extends Application {

}

And the REST service class:

@Path("generic")
public class GenericResource {

@Context
private UriInfo context;

public GenericResource() {
}

@GET
@Produces("application/json")
public Object[] getArray() {
return new Object[]

{"Test"}

;
}
}

That's all.

Comment by Michal Gajdos [ 13/Jun/13 ]

The easiest way would be registering JacksonFeature (make sure you have jersey-media-json-jackson on your classpath) in your ApplicationConfig. Something like:

public Set<Class<?>> getClasses() {
    return new HashSet<Class<?>>() {{ add(GenericResource.class); add(JacksonFeature.class); }};
}
Comment by Peter Salomonsen [ 13/Jun/13 ]

org.glassfish.jersey.jackson.JacksonFeature works as you propose. MoxyJsonFeature gives the server error, and JettisonFeature says it cannot find a MessageBodyWriter. Is MoxyJsonFeature the default? Shouldn't this also be able to handle arrays?





[GLASSFISH-21437] Can't create new JDBC Resource from admin web interface Created: 08/Oct/15  Updated: 14/Dec/15

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ionut_ursuleanu Assignee: Joe Di Pol
Resolution: Unresolved Votes: 9
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64, Java 8 update 51



 Description   

After pressing the "New" button from JDBC Resources page the following exception is thrown:

2015-10-08T16:58:53.729+0300|Severe: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event215'.
	at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:422)
	at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
	at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348)
	at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288)
	at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:556)
	at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:551)
	at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
	at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
	at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255)
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:256)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	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:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	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:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	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:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
	at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
	... 46 more
Caused by: java.lang.NullPointerException
	at com.sun.jsftemplating.handlers.UtilHandlers.mapPut(UtilHandlers.java:314)
	... 51 more


 Comments   
Comment by hink084 [ 09/Oct/15 ]

This happened to me as well. However it occurred every time I hit the "New" button anywhere within Glassfish - JDBC Resources, HTTP Listeners, Virtual Servers, etc. I ended up reverting to Glassfish 4.1.

My default settings are: Windows 7, Java 1.8.0_60 x64.
I also tried running v4.1.1 with Java 1.7.0_79 x64 by setting the AS_JAVA variable, but I still received the RuntimeException.

Comment by mzsolt [ 20/Oct/15 ]

The same problem occurs on Linux either trying to create a virtual server or a new HTTP listener, or anywhere! IMHO it's a blocker problem. GLASSFISH-21444 and GLASSFISH-21436 may be caused by this exact same NullPointerException in UtilHandlers.java:314!

Comment by LeoLux [ 04/Nov/15 ]

This is a showstopper and it occurs on my Linux machine running Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Comment by LeoLux [ 05/Nov/15 ]

This is a major bug and it has been created almost a month ago. Not a single progress since then. This seems to be a political issue at Oracle.

Comment by aquaglia [ 06/Nov/15 ]

I also had to downgrade to version 4.1.
I wonder why this issue has been assigned but never got updated. This is not very professional.

Comment by symbicator [ 13/Dec/15 ]

The same issue here.
Kubuntu 15.10
java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
It's already two months, there is no updates on the issue.
Looks like downgrading to the version 4.1 is the only solution for now =(

Comment by aquaglia [ 14/Dec/15 ]

It seems Oracle wants people to move to WebLogic or to JBoss Community Edition.

Comment by mscpetejohanson [ 14/Dec/15 ]

Further fuel for bumping the move to WildFly in our list of priorities.





[GLASSFISH-21066] Glassfish won't save new parameter values when setting Maximum Message Size: -1 in JMS Physical Destination Created: 14/May/14  Updated: 14/Dec/15

Status: Open
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: hegullak Assignee: Anissa Lam
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7


Tags: jms_maximum_message_size

 Description   

This first happened when my jms-client-application tried to send a large Message. I got an exception saying: com.sun.messaging.jms.JMSException: [C4095]: Message exceeds the single message size limit for the broker or destination.
I tried to correct it by logging in to GF admin-gui --> server(Admin Server) --> JMS Physical Destinations --> "MyJmsDestination" --> Maximum Message Size: -1.
After restart this value was reset to default.

This works: Set Maximum Message Size: -1 , do not restart GF.
This doesn't work: Set Maximum Message Size: -1 , restart GF, the property value will be reset to default.



 Comments   
Comment by kozakzs [ 22/Jul/14 ]

Experienced the same issue in one of our projects. Any solution or workaround?

Comment by hegullak [ 22/Jul/14 ]

Unfortunately not. Every time I restart GF I have to set the parameters.

Comment by x3rberus [ 14/Dec/15 ]

Don't know if a workaround is still needed but here is mine anyway:

Write a script to restart glassfish which does the following things:

  • disable all Applications which need the JMS-Destination
    asadmin disable ApplicationName
  • undeploy all Applications which need the JMS-Destination
    asadmin undeploy ApplicationName
  • stop the domain
    asadmin stop-domain mydomain
  • start the domain
    asadmin start-domain mydomain
  • delete the Physical Destinations where u need the MaxMessageSize set to -1
    asadmin delete-jmsdest --desttype topic myTopic
  • create the Physical Destinations where u need the MaxMessageSize set to -1 via asadmin
    asadmin create-jmsdest --desttype topic --property maxNumMsgs=-1:maxBytesPerMSG=-1 myTopic
  • deploy your applications
    asadmin deploy ApplicationPath

This will only work if u don't need messages being saved between restarts.





[GLASSFISH-21475] provide additional info on HTTP 400 Bad Request response Created: 10/Dec/15  Updated: 10/Dec/15

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: eriknijs Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

while trying to implement a windows SSO solution, glassfish kept on responding with a HTTP 400 Bad request.

Normally, every response from glassfish contains a response header like

Server: GlassFish Server Open Source Edition  4.1.1 

Indicating it is indeed glassfish which handling the request.

The 400 response looked like

HTTP/1.1 400 Bad Request
Date: Tue, 08 Dec 2015 15:57:41 GMT
Connection: close
Content-Length: 0

without any further details.

Only after inspecting the glassfish access logs i could determine that glassfish was indeed handling the request, but it is not clear why the request was invalid.
It turned out that the SSO header from the browser was longer than the default header buffer (8192), and after modifying this setting everything worked just fine.

My improvement request is:

  • add extra info to the Bad request response, to indicate exactly why this request is invalid. If this is not desirable because of security issues, provide this info in the server log file
  • add the 'Server' header to every response





[GLASSFISH-21379] Calling @Asyncronous remote EJB from MDB fails under heavy load Created: 24/Jun/15  Updated: 09/Dec/15

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: lprimak Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Nightly build as of June 14, 2015



 Description   

I have an MDB calling asynchrous remote EJB method
Under heavy message load, sporradically, I get rollback exception.

It looks like a race condition because JavaEETransactionImpl.checkTransaction() returns Active, and then when the call is made right away to TransactionImpl.registerSynchronizatio(), it fails with a rollback error. This seems to point to JavaEETransactionImpl's instane of the jta to be shared between threads somewhere it shouldn't

Please take a look:

Client code (simplified):

InitialContext ctxt = new InitialContext();
BeanRemote bean = ctxt.lookup("java:modue/MyBean");
bean.audit(); // method is @Asyncronous returning a Future<Void>

Exception:

[2015-06-23T14:06:50.967-0400] [glassfish 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=4359 _ThreadName=p: thread-pool-1; w: 21] [timeMillis: 1435082810967] [levelValue: 900] [[
  Exception during Singleton ResourceHandler processing
javax.transaction.RollbackException
	at com.sun.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:305)
	at com.sun.enterprise.transaction.JavaEETransactionImpl.registerSynchronization(JavaEETransactionImpl.java:694)
	at com.sun.ejb.containers.SimpleEjbResourceHandlerImpl.checkTransaction(SimpleEjbResourceHandlerImpl.java:120)
	at com.sun.ejb.containers.SimpleEjbResourceHandlerImpl.<init>(SimpleEjbResourceHandlerImpl.java:69)
	at com.sun.ejb.containers.SimpleEjbResourceHandlerImpl.createResourceHandler(SimpleEjbResourceHandlerImpl.java:73)
	at com.sun.ejb.EjbInvocation.clone(EjbInvocation.java:348)
	at com.sun.ejb.containers.EjbAsyncInvocationManager.submit(EjbAsyncInvocationManager.java:119)
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2059)
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
	at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:212)
	at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79)
	at com.sun.proxy.$Proxy1109.audit(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor1462.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:143)
	at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:173)
	at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatchToServant(ServerRequestDispatcherImpl.java:528)
	at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatch(ServerRequestDispatcherImpl.java:199)
	at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequestRequest(MessageMediatorImpl.java:1549)
	at com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:119)
	at com.sun.corba.ee.impl.protocol.ClientDelegateImpl.invoke(ClientDelegateImpl.java:258)
	at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:198)
	at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150)
	at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:226)
	at com.baw.emailsrvr.beans.__EmailAuditAppenderRemote_Remote_DynamicStub.audit(com/baw/emailsrvr/beans/__EmailAuditAppenderRemote_Remote_DynamicStub.java)
	at com.baw.emailsrvr.beans._EmailAuditAppenderRemote_Wrapper.audit(com/baw/emailsrvr/beans/_EmailAuditAppenderRemote_Wrapper.java)
	at com.baw.emailsrvr.beans.impl.EmailMessageQueueProcessor.onMessage(EmailMessageQueueProcessor.java:67)
	at com.baw.emailsrvr.beans.impl.EmailMessageEventQueueProcessorMDB.onMessage(EmailMessageEventQueueProcessorMDB.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
	at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
	at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
	at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
	at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
	at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
	at org.glassfish.ejb.mdb.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1219)
	at org.glassfish.ejb.mdb.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
	at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
	at com.sun.proxy.$Proxy617.onMessage(Unknown Source)
	at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:283)
	at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:107)
	at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
	at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
]]

This works fine under GF 4.1 release.



 Comments   
Comment by lprimak [ 07/Sep/15 ]

This is a regression from 4.1 release

Comment by lprimak [ 09/Dec/15 ]

Looks like this was caused by a transaction timeout in a different place.
GF in general isn't very good about reporting transaction timeouts

Comment by lprimak [ 09/Dec/15 ]

Please close this ticket





[GLASSFISH-21474] "asadmin help create-auth-realm" shows incorrect information Created: 09/Dec/15  Updated: 09/Dec/15

Status: Open
Project: glassfish
Component/s: command_line_interface
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: fr13d Assignee: martin.mares
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 30 minutes
Time Spent: Not Specified
Original Estimate: 30 minutes
Environment:

Generic (JRE)



 Description   

When reading the text produced by `asadmin help create-auth-realm`, under "--property", subsection "You can specify the following properties for JDBCRealm:", the property "group-table" has 3 entries (2 should be removed). Property "group-table-user-name-column" was not mentioned (and should be added).

(This corresponds to the web admin console's "Group Table User Name Column" field when creating a new JDBC authentication realm.)

The datestamp at the end of the file shows "Java EE 7 20 Sep 2010 create-auth-realm(1)".






[GLASSFISH-912] asadmin users should be able to use properties with empty value Created: 09/Aug/06  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 9.1pe
Fix Version/s: future release

Type: Bug Priority: Minor
Reporter: Cheng Fang Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 912

 Description   

This issue was discussed on dev@glassfish.dev.java.net on Aug 9, 2006. In a
nutshell, asadmin treats properties with empty value as removing these
properties, so there is no way to add such properties thru public asadmin GUI
or CLI. There were at least 2 bug reports related to this issue: BT6363330 and
BT6378808. However, users should be able to add such properties without jumping
through the hoops, hence this RFE.

Since I explicitly check the checkbox in front of password property field, so
asadmin GUI knows I do want this property with empty value. Why can't asadmin
gui do some substitution like:
if(propertyXChecked && (propertyXValue == null || propertyXValue.length() == 0))
propertyXValue=SPECIAL_EMPTY_VALUE;

then pass to the asadmin backend for processing?
The following is from email discussion:
I want to create a jdbc connection pool with a username, but empty password. In
admin GUI, I filled in username field and left password field blank. I also
checked (the checkbox) fields including username, password, databaseName, etc.
The pool was successfully created. But in domain.xml, the
<jdbc-connection-pool> element doesn't have a password property. I would expect
a password property with an empty value to be added.

When I ping the pool, it failed: "password credential is required." But in
fact, the database doesn't need any password to connect to.

After I add a empty password property to domain.xml, I was able to use the
datasource.

Then I decided to try 'asadmin add-resource'. I created a resource xml file
(see attached) containing an empty-password property:
<property name="password" value=""/>

I got this error:
=========================
Could not add Resource Type: jdbc-connection-pool. Error Message: Operation
'setProperty' failed in 'jdbc-conn
ection-pool' Config Mbean.
Target exception message: Property password can not be removed.
=========================
Added Resource Type: jdbc-resource
Command add-resources executed successfully.

server.log error:
[#|2006-08-08T15:11:56.480-0400|WARNING|sun-appserver-pe9.1|javax.enterprise.system.stream.err|_ThreadID=12;_ThreadName=httpWorkerThread-4848-1;_RequestID=ba754501-ec34-40e2-a7ee-35872f528a37;|
javax.management.MBeanException: Operation 'setProperty' failed in
'jdbc-connection-pool' Config Mbean.
Target exception message: Property password can not be removed.
at
com.sun.enterprise.admin.MBeanHelper.extractAndWrapTargetException(MBeanHelper.java:419)
at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:470)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
at $Proxy1.invoke(Unknown Source)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
at
com.sun.enterprise.admin.mbeans.ResourcesMBean.setProperties(ResourcesMBean.java:830)
at
com.sun.enterprise.admin.mbeans.ResourcesMBean.createResource(ResourcesMBean.java:653)
at
com.sun.enterprise.admin.mbeans.ResourcesMBean.createAResource(ResourcesMBean.java:2016)
at
com.sun.enterprise.admin.mbeans.ResourcesMBean.createResource(ResourcesMBean.java:1886)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:448)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
at $Proxy1.invoke(Unknown Source)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
at
com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:56)
at
com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:142)
at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:109)
at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:246)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:619)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:550)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:780)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:251)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:205)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)
Caused by: com.sun.enterprise.admin.config.MBeanConfigException: Property
password can not be removed.
at
com.sun.enterprise.admin.config.ManagedConfigBean.wrapAndThrowMBeanException(ManagedConfigBean.java:1599)
at
com.sun.enterprise.admin.config.ManagedConfigBean.setElementProperty(ManagedConfigBean.java:749)
at
com.sun.enterprise.admin.config.ManagedConfigBean.setProperty(ManagedConfigBean.java:698)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
at
com.sun.enterprise.admin.config.ManagedConfigBean.invokeOperation(ManagedConfigBean.java:1507)
at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:454)
... 62 more

======================================
[Kedar Mhaswade]
Hmm. It's tricky, isn't it?
I agree that this is rather ugly, and could be handled better.
You can file an RFE against configuration if the following does
not satisfy you.

First problem: Connector backend (the piece of code that pings
the database) does not default the null value for the password
to mean that there is no password.

Second problem: admin interfaces don't have any way to "explicitly"
remove a "property". This is especially true for admin GUI. It is
a rather hard problem to solve on today's admin GUI.
On the GUI, traditionally when a particular text field is not provided
(i.e. you leave it blank), it is taken to mean that that attribute
and/or property is removed from the configuration, if it is allowed.

Thus, if:

  • an attribute "a1" on an element "e1" is allowed to be empty
  • a property "foo" anywhere in domain.xml is allowed to be empty,

a screen with such values left bank will result in removing the
attribute/property on clicking "Save".

If the value is NOT "allowed" to be empty, it is an error.

Now, properties by design, are never allowed to have empty values.
Thus, an empty value for property always -> removal of the property
from the configuration.

I know, this is rather bad, but the GUI unfortunately does not have
an explicit way to "remove" a property and distinguish it from empty
values.

Should we decide to change the semantics, the GUI (several screens)
will need to be redesigned. (At least that's what I am told).

CLI also falls short here because it treats it the same –
asadmin set "a.b.c.property.xyz=" will make the
<property name="xyx" value="anything"/> disappear from domain.xml

Now comes the work around part of it. Obviously we knew this will
happen. So, there is a special value of a property (I wouldn't tell
which one – for it is an undocumented interface) which when used
will do the "right" thing as you'd expect. As always, there are issues
with this, but I feel they are manageable.

I'd want your RFE to actually make that "special empty value" an
interface.

====================================
[Ludo Champenois]
Please tell us what is this value. If not, I will grep the source code
(published) to find it (waste of my time).
For me, such a behavior is not an RFE, but a bug. UI should when needed make the
distinction between a null value and an empty value.
Null -> delete the property
Empty: treat it as ""
=====================================
[Siraj Ghaffar]
I dont see the need to redesign any GUI screens to handle empty valued
properties. Every GUI screen with additional properties has a "Delete
Properties" button that can be used to actually remove the property. If the
property value is empty then the user should be able to enter a value for the
property name and leave the value empty. If this is not happening then that's a
bug that needs to be fixed. Regardless, there shouldnt be any need to change the
actual UI that the user sees, to resolve this particular case. From what I
remember, this part of the code is reused almost everywhere, so there shouldnt
be a need to make massive changes either. CCing gui team..
============================================
[Anissa Lam]
It is not GUI that prevents empty property value to be saved. Please refer to
http://bt2ws.central.sun.com/CrPrint?id=6378808
Here is from the evaluation of the bug. The solution provied by the backend is
to add the 'unofficial' special string that will be translated to "" by the
backend and write out "" as property value to domain.xml.

Evaluation

Backend treats "" empty String as removal of the property itself. This mean,
unless backend changed the behaviour or have a way for setting property value to
"" empty string, there is not much GUI can do.
I am transferring this bug to 'admin'. Once they design and implemented a way to
set empty string value to Property, then GUI can implement that.
Here is comment from bug# 6363330

> Set empty valued property is treated by backend as request to remove property.
> This is only way to remove property from CLI, as far as it has only 'get' and
'set' command to handle dotted named attributes and properties.
> We can not re-consider this behaviour now because of backward compartibility.
> Kedar and Abhijit proposed to have the special value for property to set it to
"empty" string.
================================
[Kedar Mhaswade]
The point that I was trying to make was it is hard to represent on any
interface. Definitely not on the lines of "It is someone else's problem" or
"something is not done right".

What is true for properties is however not true for attributes, that's
all. For example, if I am modifying an attribute (let's say per the schema,
this is an IMPLIED attribute) of an element on the GUI, then when I
specify an empty value in the text field, that attribute is removed from
domain.xml.

How would we (easily) make this to be distinct from having the attribute with
a value "" in the domain.xml because

<foo a1="" a2="xyz" .../>

could be a configuration different from:

<foo a2="xyz" .../>
==============================
[Siraj Ghaffar]
This particular problem isnt hard for gui. The current gui design does allows
both deleting properties and setting empty values.

> Definitely not on the lines of "It is someone else's problem" or
> "something is not done right".
>
> What is true for properties is however not true for attributes, that's
> all. For example, if I am modifying an attribute (let's say per the schema,
> this is an IMPLIED attribute) of an element on the GUI, then when I
> specify an empty value in the text field, that attribute is removed from
> domain.xml.

I am not sure if we even want to present an interface to the user where the user
can either delete an attribute or set an empty value. Shouldnt the system be
deciding what to do, given that attributes are more 'well known/well understood'
by the appserver itself ?
===============================
[Jagadish Ramu]
AFAIK,in connectors, if "" is sent as password that will be used.
If the 'user' property is null, mcf properties will be looked at.
If they are also null, value for user, password will be "".



 Comments   
Comment by Anissa Lam [ 09/Aug/06 ]

Add 'cc'.

Comment by kenpaulsen [ 09/Aug/06 ]

Adding myself to the cc list.

Comment by km105526 [ 09/Aug/06 ]

.

Comment by km105526 [ 09/Aug/06 ]

Like I said, we will use this issue to formalize the support for the properties
that should appear as

<property name="shouldBeEmpty" value=""/>.

It is rather tricky if it has to work with both GUI and CLI.

Comment by km105526 [ 09/Aug/06 ]

.

Comment by marina vatkina [ 11/Dec/08 ]

Default password for the out-of-the-box MySQL is "". The only work around is
editing domain.xml

Comment by sanandal [ 11/Jan/09 ]

"Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
release whose primary release driver is SailFin.
This issue will be scrubbed after this release and will be given the right
priority for the next release."

Comment by Tom Mueller [ 03/Mar/11 ]

The consensus of the Admin Iteam on March 1, 2011 is to implement the following proposal to address this issue:

Create a remote unset command that is used to remove properties, other possible names: delete, clear. Modify the local unset to do the right thing based on what is passed in. Change the behavior of:

asadmin set some.propname=

to mean set the property name to the empty string rather than removing the property.

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-5634] notify the user of a config write failure Created: 25/Aug/08  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: V3
Fix Version/s: 4.1.1

Type: Bug Priority: Major
Reporter: sankarpn Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 5,634
Status Whiteboard:

gfv3-prelude-included

Tags: 3_1-exclude, 3_1-next, 3_1_1-scrubbed

 Description   

V3-Prelude 8/25

When the user runs out of disk space the config write operation fails to add the
config changes in domain.xml. But the cli interface doesn't let user know
anything about the failure and prints it as a success.

But we should fail the config operation in such situations and let the user know
about this.

-Sankar



 Comments   
Comment by km [ 25/Aug/08 ]

Thanks for filing the bug.

Comment by kumara [ 28/Aug/08 ]

Change to status whiteboard for v3 bug tracking

Comment by km [ 27/May/09 ]

...

Comment by Tom Mueller [ 23/Jun/10 ]

Nandini no longer on project.

Comment by Tom Mueller [ 12/Feb/11 ]

This problem still exists in GlassFish 3.1.

To simulate this problem, I changed the permissions of the config directory to make it not writable and then ran the "asadmin create-cluster" command. The command completed successfully with no warning message. However, the following exception was printed to the server.log file:

[#|2011-02-12T15:20:13.131-0800|SEVERE|glassfish3.2|null|_ThreadID=19;_ThreadName=Thread-1;|IOException while saving the configuration, changes not persisted
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)

If the disk was actually full, this message couldn't have been recorded in the log file either.

Upping the priority. We should look at this for 3.2.

Comment by Tom Mueller [ 03/Mar/11 ]

The admin iteam meeting on March 1, 2011 confirmed that we should indeed fix this.

Comment by Tom Mueller [ 05/Jul/11 ]

Excluding for 3.1.1 as this is too late in the release cycle. This will require a change to hk2 to fix.

Comment by Tom Mueller [ 20/Dec/11 ]

Design idea:

Make DomainXmlPersistence be a Transactor rather than a ConfigurationPersistence.

This way DomainXmlPersistence could create the new domain.xml file as part of the canCommit method, and if rollback is called, it would delete the domain.xml just written and rename domain.xml.bak back to domain.xml.

I don't see how the DomainXMLPersistence object would be joined to the Transaction. Transaction.addParticipant is package private, so something within HK2 would need to add it. Maybe Transactions could have an alternative to addTransactionListener, i.e., addTransactionParticipant, which would allow an object to add itself to a list of objects that are made participants in every transaction?

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-16304] domain.xml should be in UTF-8 Created: 01/Apr/11  Updated: 07/Dec/15

Status: Reopened
Project: glassfish
Component/s: configuration
Affects Version/s: 3.1
Fix Version/s: future release

Type: Bug Priority: Major
Reporter: gmurr Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-16700 Could not upgrade from ogs-3.1-window... Closed
Tags: 3_1_1-scrubbed, 3_1_2-release-note-added, 3_1_2-release-notes, 3_1_x-exclude

 Description   

currently domain.xml is in native encoding. This could lead to invalid byte sequence and the server will fail to start.
domain.xml should be in UTF-8 to avoid this issue. It is also recommended to have the prolog in the file:
<?xml version="1.0" encoding="UTF-8"?> this way the users are aware of it.



 Comments   
Comment by Tom Mueller [ 04/Apr/11 ]

There have been two issues recently related to this issue:

GLASSFISH-15150 modified the writing of the domain.xml so that it always uses UTF-8. It did not add the header that is suggested in this bug report.

GLASSFISH-15319 requested that UTF-8 encoding for the domain.xml be removed. With this change, the file is written using the default encoding that is in effect for the server.

There was a discussion at the admin iteam meeting on Dec 22, 2010 about these where the consensus was to remove the hard-coding. See:
http://wikis.sun.com/pages/viewpage.action?pageId=235180885

I'm marking this issue as incomplete because the description does not provide any details about the circumstances that "could lead to invalid byte sequence". Clearly one circumstance is that if the user has an incorrect default encoding set for the server. However, that is considered a user error rather than a bug. Are there other circumstances that trigger this problem? If so, please document them and reopen the bug.

Comment by gmurr [ 04/Apr/11 ]

Here are some scenarios that will lead to issues:

1- The server is sunning in EN locale. The user inputs JA data from the admin console. A description field for instance. Since the server is running in EN locale, the default encoding can not handle JA data. domain.xml will contain invlaid byte sequence and the server will fail to restart.

2- The user can always change the system locale. If the new system locale can not handle the domain.xml previous encoding. The server will also fail to start.

3- If we have a cluster with nodes running in different locales. Let's suppose domain.xml contain Chinese data and one of the cluster nodes is running in a non Chinese locale. This node will not be able to handle the Chinese data correctly.

If domain.xml is in UTF-8, we will not face any portability issues with its content. Since UTF-8 supports all languages, we do not need to worry about the system locale as long as we read and write the data in UTF-8.

Comment by Tom Mueller [ 04/Apr/11 ]

Scenario #1 is the scenario that was mentioned in the previous comment. The user has an incorrect default encoding set for the server. This is considered a user error.

Scenario #2 is a difficult one to deal with. When this happens, it is currently necessary for the user to manually convert the encoding of the domain.xml file.

Scenario #3 is not a supported configuration.

I agree that storing the file in UTF-8 with the proper header would be a better solution. Some of the issues raised with this during the admin iteam meeting are:

1. How to deal with users that edit the domain.xml file with an editor that doesn't pay attention to the header? Or, if the header isn't there, it is likely that the editor is going to use some native encoding rather than UTF-8.

2. How to upgrade from previous releases that did not save the file in UTF-8? One solution for this is to assume that the file is using the default encoding if there is no header, and UTF-8 (or whatever encoding is specified) if there is a header.

Comment by scatari [ 17/May/11 ]

Approved for 3.1.1.

Comment by apcuk [ 17/Aug/11 ]

This is still a valid and very serious issue. I just registered to explain my problem. I spent weeks trying to find the solution with no luck, so I'm glad that finally I've found this page.

I am using Windows 7 with Hungarian locale. If I download glassfish and start it, it works fine. After a while, it won't restart/start even if I don't edit domain.xml manually (I don't even open it with a text editor). After this if I add something like <?xml version="1.0"?> as the first line, glassfish will be able to start up again, but this header gets deleted immediately. Also, after editing it can't find my app anymore (when undeploying for example), since I have accents in my name which is in the path of NetBeansProjects.

Comment by Tom Mueller [ 17/Aug/11 ]

Do you have any information about what happened between when it was working and when it stopped working? Was the console used to modify the configuration? Were asadmin commands used? Was an application deployed? Are there configuration changes that involve non-ASCII characters?

Presumably you are using an editor to add the <?xml version="1.0"?>. Is this editor changing the encoding? (Maybe it is the use of the editor rather than the header that is making it work.)

Comment by apcuk [ 18/Aug/11 ]

I used the admin console at localhost:4848 to modify some settings, adding a JAAS context for example. I did not use asadmin commands. Yes, I deployed a web application. The configuration changes did not involve non-ASCII characters. The only non-ASCII characters are in the path of NetBeansProjects (in my name), but I'm not sure if it has anything to do with domain.xml, NetBeans is able to deploy the app (at least for the first time).

I don't think the editor changes the encoding. If I want to save it notepad says the encoding is ANSI. Is there a way to check how the file has been encoded?

I will try to test what happens when in the next few days for more information.

Comment by Tom Mueller [ 18/Aug/11 ]

It would be helpful to see the error message that you get when starting the server (when it fails to start). If this is an encoding problem, you should be receiving some sort of encoding failure message or a parsing error messages for the domain.xml.

When the server fails to start, it would be helpful to see the domain.xml file, if that is something that you can share. By looking at the file, it is possible to tell what encoding is being used (if there are non-ascii characters). If the file is entire ascii characters, then the encoding doesn't matter. Generally, to do this you need an editor which can look at the binary values in the file.

Comment by apcuk [ 18/Aug/11 ]

There are indeed non-ASCII characters in the domain.xml, I didn't realize that before.

<applications>
<application context-root="/" location="file:/C:/Users/Szabó%20András/Documents/NetBeansProjects/.../build/web/" name="..." directory-deployed="true" object-type="user">
<property name="appLocation" value="file:/C:/Users/Szabó%20András/Documents/NetBeansProjects/.../build/web/"></property>
<property ... ></property>
...
</application>
</applications>

When the server fails to start, there is nothing in the log (simply nothing happens when I click "start" in NetBeans). Eclipse says port is out of range, but I guess it is some side effect because of the invalid domain.xml. If I want to open it in Google Chrome, it says "This page contains the following errors: error on line 11 at column 5: Encoding error / Below is a rendering of the page up to the first error." Then it shows nothing. Firefox, however, opens it perfectly.

I found a way to determine the encoding: Visual Studio says it's Central European (Windows) (which is normal if Glassfish uses native encoding, I guess). If I want to save it however, it switches to UTF-8. Weird.

I currently cannot share the xml with you, but I will create one from scratch without my personal data with a new glassfish installation.

Comment by Tom Mueller [ 18/Aug/11 ]

To see the error from GlassFish, use the Command Prompt window to start the domain with the -v option:

...\glassfish\bin\asadmin start-domain -v

You will see the output from the server in the command prompt window. This will probably include a message about finding an invalid character in the domain.xml file.

To work-around this issue, GlassFish must be started with a locale setting that has a default encoding that matches the encoding that is being used to specify the filename.

Comment by apcuk [ 18/Aug/11 ]

"asadmin start-domain -v" says:
... Parse error at [row,col]:[11,64]
Message: invalid byte 2 of 4 byte UTF-8 sequence. ...

So it seems that GlassFish writes the files using Central European encoding but then tries to read it with UTF-8.

The global "locale" textbox in the admin console is blank, since then (if I'm correct) GlassFish will be started using the default OS locale. So it will use the default encoding. I don't see where is the problem, to be honest.

What settings should I change?

Comment by Tom Mueller [ 19/Aug/11 ]

More investigation will be required to understand this fully, specifically to determine how a non-UTF-8 sequence is being written to the file when it is being read with UTF-8. GlassFish uses the same encoding to read and write the file, i.e., the default encoding for the JVM. If the JVM is being started in different ways with different default encodings, that might explain what is happening here.

Comment by apcuk [ 25/Sep/11 ]

Do you have any update on this issue? It seems that it's only me who is facing this problem, which is quite wierd, since I have default settings in Neatbeans, Glassfish, JVM etc.

I set both en_GB and hu_HU to override the default locale in Glassfish, but neither had any effect. Adding <?xml version="1.0" encoding="UTF-8"?> to domain.xml doesn't help either since it gets deleted during startup. So now I have to resave the xml with UTF-8 before every startup.

Thank you for your previous responses.

Comment by Tom Mueller [ 26/Sep/11 ]

I found an easy way to corrupt the GlassFish domain.xml file that produces a failure similar to yours. Just deploy an application, for example named helloworld, and then do the following:

asadmin set applications.application.helloworld.description=hióhi

If GlassFish is configured to use the default encoding on Windows, Cp1252, this command will succeed and the domain.xml file will be written, but the ó will be encoded in Central European Encoding rather than in Cp1252. The next time GlassFish is restarted, it will be unable to read the domain.xml file and the startup will fail.

This is actually a different bug than the one that is recorded here. I created GLASSFISH-17352 to track that bug. See the description of that bug for details about a workaround to the issue reported in the comments of this bug.

Comment by Tom Mueller [ 19/Oct/11 ]

Excluding this from 3.1.x releases. Will consider for 4.0.

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-20630] Two "url" properties in JDBC Connections pools (admin gui) with mysql connector jdbc 5.1.25 Created: 13/Jun/13  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: majulvez Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04.2 LTS
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)



 Description   

When you add a new JDBC Connection pools with connecto mysql 5.1.25 with resource Type: javax.sql.DataSource and datasource Classname: com.mysql.jdbc.jdbc2.optional.MysqlDataSource, there are two "url" properities: "Url" and "URL" for same "jdbc:mysql://" and it's confusing



 Comments   
Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-20687] Config: implement listing defaults from unloaded extensions. Created: 08/Jul/13  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Chris Kasso Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

According to Masoud: Listing the unloaded extensions (not merged with the dom document) is not implemented yet.



 Comments   
Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-20873] Password alias are not working done in application scope Created: 25/Oct/13  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Mephysto Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7, 64bit



 Description   

Recently I migrate from Glassfish 3.1 to Glassfish 4, but I have an issue with password alias in a jdbc Connection Pool configuration. I defined pool in an application scope and I create password alias as I did in glassfish 3.

In password attribute of pool I set $

{ALIAS=my_pwd_alias}

as I did in glassfish 3.

When I try to ping JDBC connection pool, I receive an authentication error, so I tried to set clear password (the same encrypted in password alias) in pool and in this manner ping work done.

I deduce that password alias is not resolved in connection pool, defined in application scope.

Obviously, in glassfish 3 this configuration did work correctly.



 Comments   
Comment by Mephysto [ 25/Oct/13 ]

In server.log i found this error:

[2013-10-25T22:55:25.563+0200] [glassfish 4.0] [WARNING] [unable_to_get_password_from_alias] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=202 _ThreadName=admin-listener(16)] [timeMillis: 1382734525563] [levelValue: 900] [[
RAR7107: Unable to retrieve password from alias
java.lang.IllegalArgumentException: There is no such alias [aptredevo_pwd] from token [$

{ALIAS=aptredevo_pwd}

] defined in the default store for this domain. An admin interface like "asadmin create-password-alias" should be used to create the alias first.
at org.glassfish.internal.api.RelativePathResolver.getRealPasswordFromAlias(RelativePathResolver.java:373)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getDefaultResourcePrincipal(ConnectorConnectionPoolAdminServiceImpl.java:793)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getDefaultResourcePrincipal(ConnectorConnectionPoolAdminServiceImpl.java:763)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:677)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:425)
at com.sun.enterprise.connectors.ConnectorRuntime.pingConnectionPool(ConnectorRuntime.java:1162)
at org.glassfish.connectors.admin.cli.PingConnectionPool.execute(PingConnectionPool.java:143)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:235)
at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:161)
at org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGetLegacyFormat(TemplateCommandGetResource.java:75)

So I tried to list my password aliases:

root@ks368619:/opt/glassfish/glassfish/domains/redevoserver_test/logs# asadmin list-password-aliases -p 9048
Enter admin user name> admin
Enter admin password for user "admin">
postgres_pwd
aptredevo_pwd
Command list-password-aliases executed successfully.

aptredevo_pwd seems to be defined correctly, but is not recognized for value resolution.

Best regards.

Alessio

Comment by Mephysto [ 06/Nov/13 ]

Hello,
is there update about this Issue?

Thanks in advance.

Alessio

Comment by the_lak [ 12/Dec/13 ]

I am facing the same issue. Can someone help with this?

Comment by Kevin Dean [ 19/Dec/13 ]

See https://java.net/jira/browse/GLASSFISH-20938 for an explanation of the problem.

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21107] When uploading a large file using an async servlet, after 30 seconds it throws an InterruptedByTimeoutException Created: 26/Jun/14  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration, grizzly-kernel, web_container
Affects Version/s: 4.1_b07
Fix Version/s: None

Type: Bug Priority: Major
Reporter: raulgd Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64 bit, Java JDK 1.7.0u60 64 bit Glassfish 4.0.1b7 nightly build downloaded on 2014-06-25



 Description   

I created an async servlet for users to upload files, that way the inputstream is buffered without having to load the whole file in memory, as there can be very big files uploaded.

When trying out to upload a 4.6GB file, after 30 seconds, the servlet enters the onError(Throwable t) method with the exception:

Severe:   java.nio.channels.InterruptedByTimeoutException
	at org.apache.catalina.connector.InputBuffer.disableReadHandler(InputBuffer.java:324)
	at org.apache.catalina.connector.Request.asyncTimeout(Request.java:4418)
	at org.apache.catalina.connector.Request.processTimeout(Request.java:4469)
	at org.apache.catalina.connector.Request.access$000(Request.java:156)
	at org.apache.catalina.connector.Request$6.onTimeout(Request.java:4300)
	at org.glassfish.grizzly.http.server.Response$SuspendTimeout.onTimeout(Response.java:2131)
	at org.glassfish.grizzly.http.server.Response$DelayQueueWorker.doWork(Response.java:2180)
	at org.glassfish.grizzly.http.server.Response$DelayQueueWorker.doWork(Response.java:2175)
	at org.glassfish.grizzly.utils.DelayedExecutor$DelayedRunnable.run(DelayedExecutor.java:158)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

Warning:   Context path from ServletContext:  differs from path from bundle: /
WARN:   WELD-000715: HttpContextLifecycle guard not set. The Servlet container is not fully compliant.

Now, I already configured Glassfish for longer timeouts on both Configurations-> server-config -> Network Config -> Network Listeners -> http-listener-1 -> HTTP So that timeout: -1, Connection upload timeout: 3600000 (1 hour), Request Timeout: -1, Max Post Size: -1

And on Configurations-> server-config -> Network Config -> Transports -> tcp so that Read Timeout: 3600000 (1 hour), Write Timeout: 3600000 (1 hour)

Now, AFAIK, because it's an NIO timeout exception, just by changing the tcp read and write timeout to 1 hour should avoid the issue, but still, the exception happens exactly 30 seconds later, as if the timeout configurations are being ignored.

I saw previous issues on grizzly ignoring the read and write timeouts, but they where closed as fixed in mid. 2013 so it shouldn't be an issue now.

For reference, here's my domain.xml:

<domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" version="7">
  <security-configurations>
    <authentication-service default="true" name="adminAuth" use-password-credential="true">
      <security-provider name="spcrealm" type="LoginModule" provider-name="adminSpc">
        <login-module-config name="adminSpecialLM" control-flag="sufficient" module-class="com.sun.enterprise.admin.util.AdminLoginModule">
          <property name="config" value="server-config"></property>
          <property name="auth-realm" value="admin-realm"></property>
        </login-module-config>
      </security-provider>
      <security-provider name="filerealm" type="LoginModule" provider-name="adminFile">
        <login-module-config name="adminFileLM" control-flag="sufficient" module-class="com.sun.enterprise.security.auth.login.FileLoginModule">
          <property name="config" value="server-config"></property>
          <property name="auth-realm" value="admin-realm"></property>
        </login-module-config>
      </security-provider>
    </authentication-service>
    <authorization-service default="true" name="authorizationService">
      <security-provider name="simpleAuthorization" type="Simple" provider-name="simpleAuthorizationProvider">
        <authorization-provider-config support-policy-deploy="false" name="simpleAuthorizationProviderConfig"></authorization-provider-config>
      </security-provider>
    </authorization-service>
  </security-configurations>
  <managed-job-config></managed-job-config>
  <system-applications>
    <application context-root="" location="${com.sun.aas.installRootURI}/lib/install/applications/__admingui" directory-deployed="true" name="__admingui" object-type="system-admin">
      <module name="__admingui">
        <engine sniffer="web"></engine>
        <engine sniffer="security"></engine>
      </module>
    </application>
  </system-applications>
  <resources>
    <jdbc-resource pool-name="SamplePool" jndi-name="jdbc/sample"></jdbc-resource>
    <jdbc-resource pool-name="__TimerPool" jndi-name="jdbc/__TimerPool" object-type="system-admin"></jdbc-resource>
    <jdbc-resource pool-name="DerbyPool" jndi-name="jdbc/__default" object-type="system-all"></jdbc-resource>
    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="__TimerPool">
      <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property>
      <property name="connectionAttributes" value=";create=true"></property>
    </jdbc-connection-pool>
    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.ClientDataSource" is-isolation-level-guaranteed="false" res-type="javax.sql.DataSource" name="DerbyPool">
      <property name="PortNumber" value="1527"></property>
      <property name="Password" value="APP"></property>
      <property name="User" value="APP"></property>
      <property name="serverName" value="localhost"></property>
      <property name="DatabaseName" value="sun-appserv-samples"></property>
      <property name="connectionAttributes" value=";create=true"></property>
    </jdbc-connection-pool>
    <connector-connection-pool max-pool-size="250" steady-pool-size="1" name="jms/__defaultConnectionFactory-Connection-Pool" resource-adapter-name="jmsra" connection-definition-name="javax.jms.ConnectionFactory"></connector-connection-pool>
    <connector-resource pool-name="jms/__defaultConnectionFactory-Connection-Pool" jndi-name="jms/__defaultConnectionFactory" object-type="system-all-req"></connector-resource>
    <context-service jndi-name="concurrent/__defaultContextService" object-type="system-all"></context-service>
    <managed-executor-service jndi-name="concurrent/__defaultManagedExecutorService" object-type="system-all"></managed-executor-service>
    <managed-scheduled-executor-service jndi-name="concurrent/__defaultManagedScheduledExecutorService" object-type="system-all"></managed-scheduled-executor-service>
    <managed-thread-factory jndi-name="concurrent/__defaultManagedThreadFactory" object-type="system-all"></managed-thread-factory>
    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.ClientDataSource" res-type="javax.sql.DataSource" name="SamplePool">
      <property name="DatabaseName" value="sample"></property>
      <property name="User" value="app"></property>
      <property name="Password" value="app"></property>
      <property name="URL" value="jdbc:derby://localhost:1527/sample"></property>
      <property name="PortNumber" value="1527"></property>
      <property name="serverName" value="localhost"></property>
    </jdbc-connection-pool>
  </resources>
  <servers>
    <server name="server" config-ref="server-config">
      <application-ref ref="__admingui" virtual-servers="__asadmin"></application-ref>
      <application-ref ref="VegosPortal" virtual-servers="server"></application-ref>
      <resource-ref ref="jdbc/__TimerPool"></resource-ref>
      <resource-ref ref="jdbc/__default"></resource-ref>
      <resource-ref ref="jms/__defaultConnectionFactory"></resource-ref>
      <resource-ref ref="concurrent/__defaultContextService"></resource-ref>
      <resource-ref ref="concurrent/__defaultManagedExecutorService"></resource-ref>
      <resource-ref ref="concurrent/__defaultManagedScheduledExecutorService"></resource-ref>
      <resource-ref ref="concurrent/__defaultManagedThreadFactory"></resource-ref>
      <resource-ref ref="jdbc/sample"></resource-ref>
    </server>
  </servers>
  <nodes>
    <node node-host="localhost" name="localhost-domain1" type="CONFIG" install-dir="${com.sun.aas.productRoot}"></node>
  </nodes>
  <configs>
    <config name="server-config">
      <system-property description="Port Number that JMS Service will listen for remote clients connection." name="JMS_PROVIDER_PORT" value="7676"></system-property>
      <http-service>
        <access-log></access-log>
        <virtual-server id="server" network-listeners="http-listener-1,http-listener-2"></virtual-server>
        <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
      </http-service>
      <iiop-service>
        <orb use-thread-pool-ids="thread-pool-1"></orb>
        <iiop-listener id="orb-listener-1" port="3700" address="0.0.0.0" lazy-init="true"></iiop-listener>
        <iiop-listener id="SSL" port="3820" address="0.0.0.0" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
        </iiop-listener>
        <iiop-listener id="SSL_MUTUALAUTH" port="3920" address="0.0.0.0" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
        </iiop-listener>
      </iiop-service>
      <admin-service system-jmx-connector-name="system" type="das-and-server">
        <jmx-connector port="8686" address="0.0.0.0" auth-realm-name="admin-realm" name="system">
          <ssl client-auth="want" classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
        </jmx-connector>
        <property name="adminConsoleContextRoot" value="/admin"></property>
        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
        <property name="ipsRoot" value="${com.sun.aas.installRoot}/.."></property>
        <das-config></das-config>
      </admin-service>
      <connector-service></connector-service>
      <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs"></transaction-service>
      <batch-runtime-configuration></batch-runtime-configuration>
      <jms-service default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host>
      </jms-service>
      <ejb-container>
        <ejb-timer-service></ejb-timer-service>
      </ejb-container>
      <web-container>
        <session-config>
          <session-manager>
            <manager-properties></manager-properties>
            <store-properties></store-properties>
          </session-manager>
          <session-properties></session-properties>
        </session-config>
      </web-container>
      <rest-config></rest-config>
      <cdi-service></cdi-service>
      <diagnostic-service></diagnostic-service>
      <security-service>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
          <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
        </jacc-provider>
        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
        <audit-module classname="com.sun.enterprise.security.ee.Audit" name="default">
          <property name="auditOn" value="false"></property>
        </audit-module>
        <message-security-config auth-layer="SOAP">
          <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
        </message-security-config>
        <message-security-config auth-layer="HttpServlet">
          <provider-config provider-type="server" provider-id="GFConsoleAuthModule" class-name="org.glassfish.admingui.common.security.AdminConsoleAuthModule">
            <request-policy auth-source="sender"></request-policy>
            <response-policy></response-policy>
            <property name="loginPage" value="/login.jsf"></property>
            <property name="loginErrorPage" value="/loginError.jsf"></property>
          </provider-config>
        </message-security-config>
        <property name="default-digest-algorithm" value="SHA-256"></property>
      </security-service>
      <java-config debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix="">
        <jvm-options>-XX:MaxPermSize=256m</jvm-options>
        <jvm-options>-client</jvm-options>
        <jvm-options>-Djava.awt.headless=true</jvm-options>
        <jvm-options>-Djdk.corba.allowOutputStreamSubclass=true</jvm-options>
        <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options>
        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
        <jvm-options>-Xmx1024m</jvm-options>
        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
        <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
        <jvm-options>-Dgosh.args=--nointeractive</jvm-options>
        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
        <jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>
      </java-config>
      <network-config>
        <protocols>
          <protocol name="http-listener-1">
            <http request-timeout-seconds="-1" timeout-seconds="-1" connection-upload-timeout-millis="3600000" default-virtual-server="server" max-connections="1500">
              <file-cache></file-cache>
            </http>
          </protocol>
          <protocol security-enabled="true" name="http-listener-2">
            <http default-virtual-server="server" max-connections="250">
              <file-cache></file-cache>
            </http>
            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl>
          </protocol>
          <protocol name="admin-listener">
            <http default-virtual-server="__asadmin" max-connections="250" encoded-slash-enabled="true">
              <file-cache></file-cache>
            </http>
          </protocol>
          <protocol security-enabled="true" name="sec-admin-listener">
            <http default-virtual-server="__asadmin" encoded-slash-enabled="true">
              <file-cache></file-cache>
            </http>
            <ssl client-auth="want" classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
          </protocol>
          <protocol name="admin-http-redirect">
            <http-redirect secure="true"></http-redirect>
          </protocol>
          <protocol name="pu-protocol">
            <port-unification>
              <protocol-finder protocol="sec-admin-listener" name="http-finder" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder"></protocol-finder>
              <protocol-finder protocol="admin-http-redirect" name="admin-http-redirect" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder"></protocol-finder>
            </port-unification>
          </protocol>
        </protocols>
        <network-listeners>
          <network-listener port="80" 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="pu-protocol" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
        </network-listeners>
        <transports>
          <transport write-timeout-millis="3600000" byte-buffer-type="HEAP" read-timeout-millis="3600000" display-configuration="true" name="tcp"></transport>
        </transports>
      </network-config>
      <thread-pools>
        <thread-pool max-thread-pool-size="50" name="admin-thread-pool" max-queue-size="256"></thread-pool>
        <thread-pool name="http-thread-pool"></thread-pool>
        <thread-pool max-thread-pool-size="200" name="thread-pool-1"></thread-pool>
      </thread-pools>
      <monitoring-service>
        <module-monitoring-levels></module-monitoring-levels>
      </monitoring-service>
      <group-management-service>
        <failure-detection></failure-detection>
      </group-management-service>
      <availability-service></availability-service>
    </config>
    <config name="default-config">
      <http-service>
        <access-log></access-log>
        <virtual-server id="server" network-listeners="http-listener-1, http-listener-2">
          <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"></property>
        </virtual-server>
        <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
      </http-service>
      <iiop-service>
        <orb use-thread-pool-ids="thread-pool-1"></orb>
        <iiop-listener id="orb-listener-1" port="${IIOP_LISTENER_PORT}" address="0.0.0.0"></iiop-listener>
        <iiop-listener id="SSL" port="${IIOP_SSL_LISTENER_PORT}" address="0.0.0.0" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
        </iiop-listener>
        <iiop-listener id="SSL_MUTUALAUTH" port="${IIOP_SSL_MUTUALAUTH_PORT}" address="0.0.0.0" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
        </iiop-listener>
      </iiop-service>
      <admin-service system-jmx-connector-name="system">
        <jmx-connector port="${JMX_SYSTEM_CONNECTOR_PORT}" address="0.0.0.0" auth-realm-name="admin-realm" name="system">
          <ssl client-auth="want" classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="glassfish-instance"></ssl>
        </jmx-connector>
        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
        <das-config></das-config>
      </admin-service>
      <web-container>
        <session-config>
          <session-manager>
            <manager-properties></manager-properties>
            <store-properties></store-properties>
          </session-manager>
          <session-properties></session-properties>
        </session-config>
      </web-container>
      <ejb-container>
        <ejb-timer-service></ejb-timer-service>
      </ejb-container>
      <mdb-container></mdb-container>
      <jms-service addresslist-behavior="priority" default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host>
      </jms-service>
      <log-service log-rotation-limit-in-bytes="2000000" file="${com.sun.aas.instanceRoot}/logs/server.log">
        <module-log-levels></module-log-levels>
      </log-service>
      <security-service>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
          <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
        </jacc-provider>
        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
        <audit-module classname="com.sun.enterprise.security.ee.Audit" name="default">
          <property name="auditOn" value="false"></property>
        </audit-module>
        <message-security-config auth-layer="SOAP">
          <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
        </message-security-config>
      </security-service>
      <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs" automatic-recovery="true"></transaction-service>
      <diagnostic-service></diagnostic-service>
      <java-config debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" system-classpath="" classpath-suffix="">
        <jvm-options>-XX:MaxPermSize=256m</jvm-options>
        <jvm-options>-server</jvm-options>
        <jvm-options>-Djava.awt.headless=true</jvm-options>
        <jvm-options>-Djdk.corba.allowOutputStreamSubclass=true</jvm-options>
        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>
        <jvm-options>-Xmx1024m</jvm-options>
        <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
        <jvm-options>-Dgosh.args=--noshutdown -c noop=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
        <jvm-options>-Dfelix.fileinstall.log.level=3</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
      </java-config>
      <availability-service>
        <web-container-availability></web-container-availability>
        <ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability>
        <jms-availability></jms-availability>
      </availability-service>
      <network-config>
        <protocols>
          <protocol name="http-listener-1">
            <http default-virtual-server="server">
              <file-cache></file-cache>
            </http>
          </protocol>
          <protocol security-enabled="true" name="http-listener-2">
            <http default-virtual-server="server">
              <file-cache></file-cache>
            </http>
            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl>
          </protocol>
          <protocol name="admin-listener">
            <http default-virtual-server="__asadmin" max-connections="250">
              <file-cache></file-cache>
            </http>
          </protocol>
          <protocol security-enabled="true" name="sec-admin-listener">
            <http default-virtual-server="__asadmin" encoded-slash-enabled="true">
              <file-cache></file-cache>
            </http>
            <ssl client-auth="want" classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="glassfish-instance"></ssl>
          </protocol>
          <protocol name="admin-http-redirect">
            <http-redirect secure="true"></http-redirect>
          </protocol>
          <protocol name="pu-protocol">
            <port-unification>
              <protocol-finder protocol="sec-admin-listener" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder" name="http-finder"></protocol-finder>
              <protocol-finder protocol="admin-http-redirect" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder" name="admin-http-redirect"></protocol-finder>
            </port-unification>
          </protocol>
        </protocols>
        <network-listeners>
          <network-listener port="${HTTP_LISTENER_PORT}" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
          <network-listener port="${HTTP_SSL_LISTENER_PORT}" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
          <network-listener port="${ASADMIN_LISTENER_PORT}" protocol="pu-protocol" transport="tcp" name="admin-listener" thread-pool="http-thread-pool"></network-listener>
        </network-listeners>
        <transports>
          <transport name="tcp"></transport>
        </transports>
      </network-config>
      <thread-pools>
        <thread-pool name="http-thread-pool"></thread-pool>
        <thread-pool max-thread-pool-size="200" name="thread-pool-1"></thread-pool>
        <thread-pool max-thread-pool-size="50" name="admin-thread-pool" max-queue-size="256"></thread-pool>
      </thread-pools>
      <group-management-service>
        <failure-detection></failure-detection>
      </group-management-service>
      <system-property description="Port Number that JMS Service will listen for remote clients connection." name="JMS_PROVIDER_PORT" value="27676"></system-property>
      <system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property>
      <system-property name="HTTP_LISTENER_PORT" value="28080"></system-property>
      <system-property name="HTTP_SSL_LISTENER_PORT" value="28181"></system-property>
      <system-property name="IIOP_LISTENER_PORT" value="23700"></system-property>
      <system-property name="IIOP_SSL_LISTENER_PORT" value="23820"></system-property>
      <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="23920"></system-property>
      <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="28686"></system-property>
      <system-property name="OSGI_SHELL_TELNET_PORT" value="26666"></system-property>
      <system-property name="JAVA_DEBUGGER_PORT" value="29009"></system-property>
      <monitoring-service>
        <module-monitoring-levels></module-monitoring-levels>
      </monitoring-service>
    </config>
  </configs>
  <property name="administrative.domain.name" value="domain1"></property>
  <secure-admin enabled="true" special-admin-indicator="8666d952-1f41-4ba9-a0c0-ec7396d974b7">
    <secure-admin-principal dn="CN=localhost,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
    <secure-admin-principal dn="CN=localhost-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
  </secure-admin>
  <clusters></clusters>
  <applications>
    <application context-root="/vegos" location="file:/D:/NetbeansProjects/VegosPortal/target/VegosPortal-1.0/" name="VegosPortal" directory-deployed="true" object-type="user">
      <property name="archiveType" value="war"></property>
      <property name="appLocation" value="file:/D:/NetbeansProjects/VegosPortal/target/VegosPortal-1.0/"></property>
      <property name="org.glassfish.ejb.container.application_unique_id" value="91995825334714368"></property>
      <property name="defaultAppName" value="VegosPortal-1.0"></property>
      <module name="VegosPortal">
        <engine sniffer="ejb"></engine>
        <engine sniffer="security"></engine>
        <engine sniffer="weld"></engine>
        <engine sniffer="web"></engine>
      </module>
    </application>
  </applications>
</domain>

I tried the exact same code in WildFly 8.1.0 and works perfectly, so I know it's grizzly's NIO configuration.



 Comments   
Comment by raulgd [ 10/Dec/14 ]

This problem doesn't happen in Glassfish 4.1b13 with JDK 8u25 anymore.

Only there are 2 things to specify, first, the http-thread-pool timeout also has to be set to the same timeout as the tcp read timeout and connection upload timeout.

The other one, on the async servlet, right after initiating the async context with:

AsyncContext context = request.startAsync(); 

You have to set the timeout for the context with:

context.setTimeout(3600000);

Just replace the 3600000 with whatever timeout you set.

It would be ideal to just have the servlet get the timeout specified from the domain configuration, but at least is working now setting it by hand.

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21140] send-error_n doesn't work if ${com.sun.aas.instanceRoot} contains whitespaces Created: 22/Jul/14  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.0_b89_RC5
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: xuno Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7
Install Dir: C:\Program Files\glassfish4\glassfish\domains\domain1


Tags: javaee_ri_target

 Description   

If the path component in the send-error_n property contains whitespaces it fails. Also if used with $

{com.sun.aas.instanceRoot}.

<property name="send-error_1"
value="code=404 path=${com.sun.aas.instanceRoot}

\docroot\404.html reason=Resource_not_found" />

Results in:
---------------------------------------------------------------------------
Warning: The error-page C:\Users\dev\Documents\workspace-ja\myApplication\build\web\C:\Program does not exist
Warning: org.apache.catalina.core.StandardHostValve@3327d04b: Exception processing ErrorPage[errorCode=404, location=C:\Program]
java.io.FileNotFoundException: C:\Program (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:131)
at java.io.FileInputStream.<init>(FileInputStream.java:87)
at org.apache.catalina.core.StandardHostValve.handleHostErrorPage(StandardHostValve.java:594)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:395)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:234)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:359)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21158] glassfish does not start with jdk9-ea Created: 07/Aug/14  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.0_b89_RC5, 4.0
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: AntonIvanov Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes


 Description   

problem is that osgi.properties has no jre-1.9 value, only jre-1.8=$

{jre-1.7}

such problem occurs every time with new jdk release, as it was with jre-1.8 before..

the simple workaround is to add jre-1.9=$

{jre-1.8}

to osgi.properties

but also I guess it make sense to obtain latest release number from properties if no jre-$

{current-jdk-release}

is found. if it really make sense please file a separate issue for it..



 Comments   
Comment by alan.bateman [ 15/Oct/14 ]

The other thing that is needed to start Glassfish 4.0 on JDK 9 is to drop the MaxPermSize setting from the command line settings in domain.xml.

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21231] 'WARNING: Skipping entry because it is not an absolute URI' Message During Startup Caused By osgi Configuration Error Created: 09/Oct/14  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: jamie_t_macdonald Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows



 Description   

During startup of a fresh install of Glassfish a warning like the following happens:
Oct 09, 2014 19:38:38 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.

This is happening because BundleProvisioner reads a property named 'glassfish.osgi.auto.start' in the file <glassfish_home>/glassfish/config/osgi.properties.

strong glassfish.osgi.auto.start strong is currently defined as:
glassfish.osgi.auto.start=\
$

{core.bundles}

\
$

{autostart.bundles}

 Comments   
Comment by jamie_t_macdonald [ 10/Oct/14 ]

Sorry. Clicked create by mistake. Ignore the description, I'll add the whole thing in this comment.

During startup of a fresh install of Glassfish a warning like the following happens:

Oct 09, 2014 19:38:38 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.

This is happening because BundleProvisioner reads a property named glassfish.osgi.auto.start in the file <glassfish_home>/glassfish/config/osgi.properties.

glassfish.osgi.auto.start is currently defined as:

glassfish.osgi.auto.start=\
${core.bundles} \
${autostart.bundles}

core.bundles is currently defined as:

core.bundles=\
${com.sun.aas.installRootURI}modules/endorsed/ \
${obr.bundles} \
${hk2.bundles} \
${com.sun.aas.installRootURI}modules/glassfish.jar

And the key to this problem obr.bundles is currently defined as:

#obr.bundles=${com.sun.aas.installRootURI}modules/org.apache.felix.bundlerepository.jar

The comment is expanded to a space which BundleProvisioner reads and issues a warning about.
Removing the ${obr.bundles} line from core.bundles gets rid of the warning.

The code in BundleProvisioner should be updated to handle whitespaces better.

If you feel that it's useful to inform the user about unnecessary whitespace then osgi.properties should be updated so people don't get warnings from the default configuration.

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21243] Glassfish ignores variables in asenv.conf that begin with the letter "S" Created: 26/Oct/14  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: camertron Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS 10.9.5
Linux version 2.6.32-431.29.2.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Tue Sep 9 21:36:05 UTC 2014



 Description   

Any variables I set in asenv.conf that begin with a capital letter "S" are ignored and not accessible to web applications. All other variables are set and can be retrieved as expected. The problem may also happen with a lowercase letter "s", but I didn't specifically test that case.



 Comments   
Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21247] How to access admin console http instead of https Created: 04/Nov/14  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.0
Fix Version/s: None

Type: Task Priority: Minor
Reporter: gtulasidhar Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

STAGE



 Description   

Hi Team,
We need access admin console http instead of https.

Could you please give me steps to do this.

Thanks,
Tulasidhar



 Comments   
Comment by smillidge-c2b2 [ 04/Nov/14 ]

Run

asadmin disable-secure-admin
asadmin restart-domain domain1

where domain1 is your domain name

Comment by gtulasidhar [ 05/Nov/14 ]

it is working in same system.i need remote system...could you please help me......

Comment by gtulasidhar [ 05/Nov/14 ]

Just i want use local or remote only with http....please help me on this.......

Comment by Anissa Lam [ 05/Nov/14 ]

For security reason, to access a remote system, it is requried that you enable secure admin and launch the admon console with https.
There is no way to use http for remote access.

Comment by gtulasidhar [ 06/Nov/14 ]

ok thanks for update.In same network computers not working,but working in windows servers.Is there any chance to work all same network systems ?

Thanks,
Tulasidhar

Comment by Anissa Lam [ 06/Nov/14 ]

I am not sure what you mean here. Please clarify.

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21262] Jbatch db2 database creaition script is incorrect Created: 01/Dec/14  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: davidwinters1980 Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The DB2 jbatch table creation script shipped with GF is not correct:

Here is the corrected script:

DROP TABLE JOBSTATUS;

DROP TABLE STEPSTATUS;

DROP TABLE CHECKPOINTDATA;

DROP TABLE JOBINSTANCEDATA;

DROP TABLE EXECUTIONINSTANCEDATA;

DROP TABLE STEPEXECUTIONINSTANCEDATA;

CREATE TABLE JOBINSTANCEDATA(
jobinstanceid BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) CONSTRAINT JOBINSTANCE_PK PRIMARY KEY,
name VARCHAR(512),
apptag VARCHAR(512)
);

CREATE TABLE EXECUTIONINSTANCEDATA(
jobexecid BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) CONSTRAINT JOBEXECUTION_PK PRIMARY KEY,
jobinstanceid BIGINT,
createtime TIMESTAMP,
starttime TIMESTAMP,
endtime TIMESTAMP,
updatetime TIMESTAMP,
parameters BLOB,
batchstatus VARCHAR(512),
exitstatus VARCHAR(512),
CONSTRAINT JOBINST_JOBEXEC_FK FOREIGN KEY (jobinstanceid) REFERENCES JOBINSTANCEDATA (jobinstanceid)
);

CREATE TABLE STEPEXECUTIONINSTANCEDATA(
stepexecid BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) CONSTRAINT STEPEXECUTION_PK PRIMARY KEY,
jobexecid BIGINT,
batchstatus VARCHAR(512),
exitstatus VARCHAR(512),
stepname VARCHAR(512),
readcount INTEGER,
writecount INTEGER,
commitcount INTEGER,
rollbackcount INTEGER,
readskipcount INTEGER,
processskipcount INTEGER,
filtercount INTEGER,
writeskipcount INTEGER,
startTime TIMESTAMP,
endTime TIMESTAMP,
persistentData BLOB,
CONSTRAINT JOBEXEC_STEPEXEC_FK FOREIGN KEY (jobexecid) REFERENCES EXECUTIONINSTANCEDATA (jobexecid)
);

CREATE TABLE JOBSTATUS (
id BIGINT CONSTRAINT JOBSTATUS_PK PRIMARY KEY NOT NULL,
obj BLOB,
CONSTRAINT JOBSTATUS_JOBINST_FK FOREIGN KEY (id) REFERENCES JOBINSTANCEDATA (jobinstanceid) ON DELETE CASCADE
);

CREATE TABLE STEPSTATUS(
id BIGINT CONSTRAINT STEPSTATUS_PK PRIMARY KEY NOT NULL,
obj BLOB,
CONSTRAINT STEPSTATUS_STEPEXEC_FK FOREIGN KEY (id) REFERENCES STEPEXECUTIONINSTANCEDATA (stepexecid) ON DELETE CASCADE
);

CREATE TABLE CHECKPOINTDATA(
id VARCHAR(512),
obj BLOB
);



 Comments   
Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.





[GLASSFISH-21357] Entity Tables are not created during deployment time Created: 10/May/15  Updated: 07/Dec/15

Status: Open
Project: glassfish
Component/s: configuration, deployment
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: nabizamani Assignee: Chris Kasso
Resolution: Unresolved Votes: