[GLASSFISH-21340] CDI scope annotation on @Provider makes @NameBinding ignored Created: 26/Mar/15  Updated: 26/Mar/15

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

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

1.8.0_40



 Description   

Using CDI scope annotation (e.g. @javax.enterprise.context.RequestScoped) makes annotations with @javax.ws.rs.NameBinding ignored in @javax.ws.rs.ext.Provider.

Sample code:

EnableScopedFilter
@Retention(RUNTIME)
@NameBinding
public @interface EnableScopedFilter {	
}
ScopedFilter
@Provider
@EnableScopedFilter
@RequestScoped
public class ScopedFilter implements ContainerRequestFilter {
	@Override
	public void filter(ContainerRequestContext requestContext) throws IOException {
		System.out.println("Scoped filter triggered on path: " + requestContext.getUriInfo().getPath());
	}
}

This filter is executed on every REST method, not only on these annotated with @EnableScopedFilter. If @RequestScoped is removed everything is ok.

CDI scope annotation is needed is bean-discovery-mode in beans.xml is set to "annotation" and filter needs to @Inject some resources.






[GLASSFISH-21339] Upgrade to Weld 2.2.10.SP1 Created: 26/Mar/15  Updated: 26/Mar/15

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

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


 Description   

According to JBoss there is a regression in 2.2.10.Final which causes any integrator configuration expressed using the BootstrapConfiguration API to be ignored by Weld. It's tracked by WELD-1904. GF uses this API to suppress concurrent bootstrap of Weld. This configuration option will be ignored with 2.2.10.Final.






[GLASSFISH-21338] Upgrade to Weld 2.2.10.Final Created: 25/Mar/15  Updated: 25/Mar/15  Resolved: 25/Mar/15

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

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


 Comments   
Comment by jjsnyder83 [ 25/Mar/15 ]

Committed revision 63813.





[GLASSFISH-21337] java.util.ConcurrentModificationException on Multitenant enviroment Created: 25/Mar/15  Updated: 25/Mar/15

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

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

Windows , JDK 8, 4GB of ram, persistence.xml:

<persistence-unit name="My-ejbPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/mybase</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<shared-cache-mode>NONE</shared-cache-mode>
<validation-mode>NONE</validation-mode>
<properties>
<property name="javax.persistence.validation.group.pre-persist" value="javax.validation.groups.Default"/>
<property name="javax.persistence.validation.group.pre-update" value="javax.validation.groups.Default"/>
<property name="hibernate.validator.autoregister_listeners" value="false"/>
<property name="eclipselink.logging.level.sql" value="FINE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.multitenant.tenants-share-cache" value="true"/>
<property name="eclipselink.multitenant.tenants-share-emf" value="true"/>
<property name="eclipselink.target-database" value="MySQL"/>
<property name="eclipselink.cache.shared.default" value="true"/>
</properties>
</persistence-unit>



 Description   

On Multitenant TABLE_SUFIX enviroment, if you create a servlet to read image from database (for example) and your page CALL this servlet many times in one page (a gallary for example) the simultaneos call of jpa from a servlet you will recive :

Advertência: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean
at com.sun.ejb.containers.EJBContainerTransactionManager.checkExceptionClientTx(EJBContainerTransactionManager.java:662)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:507)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy246.getStorages(Unknown Source)
at myservice.service.filestorage._EJB31_GeneratedFileStorageRepositoryIntf__Bean_.getStorages(Unknown Source)
at myservice.service.filestorage.FileStorageService.getFile(FileStorageService.java:175)
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 myservice.service.log.LogInterceptor.classInterceptor(LogInterceptor.java:101)
at sun.reflect.GeneratedMethodAccessor94.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 myservice.service.log.ContextInterceptor.classInterceptor(ContextInterceptor.java:43)
at sun.reflect.GeneratedMethodAccessor93.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 myservice.interceptor.ServiceRegionalizeInterceptor.intercept(ServiceRegionalizeInterceptor.java:60)
at sun.reflect.GeneratedMethodAccessor92.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 org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor91.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.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor90.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.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy351.getFile(Unknown Source)
at myservice.service.filestorage._EJB31_GeneratedFileStorageServiceIntf__Bean_.getFile(Unknown Source)
at myservice.control.imagegallery.ImageGalleryServlet.processRequest(ImageGalleryServlet.java:50)
at myservice.control.imagegallery.ImageGalleryServlet.doGet(ImageGalleryServlet.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
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 myservice.servlet.TenantFilter.doFilter(TenantFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at myservice.servlet.NavigationHistoryFilter.doFilter(NavigationHistoryFilter.java:73)
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.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:412)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
at org.eclipse.persistence.descriptors.ClassDescriptor.notifyReferencingDescriptorsOfIsolation(ClassDescriptor.java:3921)
at org.eclipse.persistence.descriptors.CachePolicy.postInitialize(CachePolicy.java:177)
at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(ClassDescriptor.java:3909)
at org.eclipse.persistence.internal.sessions.AbstractSession.updateTablePerTenantDescriptors(AbstractSession.java:1401)
at org.eclipse.persistence.sessions.server.ClientSession.<init>(ClientSession.java:136)
at org.eclipse.persistence.internal.sessions.IsolatedClientSession.<init>(IsolatedClientSession.java:38)
at org.eclipse.persistence.sessions.server.ServerSession.acquireClientSession(ServerSession.java:386)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getActivePersistenceContext(EntityManagerImpl.java:1933)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getActiveSession(EntityManagerImpl.java:1232)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getActiveSessionIfExists(EntityManagerImpl.java:1247)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:102)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1603)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:456)
at myservice.service.LinkEntityManager.createQuery(LinkEntityManager.java:165)
at myservice.service.base.BaseRepository.getList(BaseRepository.java:73)
at myservice.service.filestorage.FileStorageRepository.getStorages(FileStorageRepository.java:39)
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 myservice.service.log.LogInterceptor.classInterceptor(LogInterceptor.java:101)
at sun.reflect.GeneratedMethodAccessor94.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 myservice.service.log.ContextInterceptor.classInterceptor(ContextInterceptor.java:43)
at sun.reflect.GeneratedMethodAccessor93.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 myservice.interceptor.ServiceRegionalizeInterceptor.intercept(ServiceRegionalizeInterceptor.java:60)
at sun.reflect.GeneratedMethodAccessor92.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 org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor91.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.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor90.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.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 99 more






[GLASSFISH-21336] CDI Interceptor is not called in EJB Schedule Created: 24/Mar/15  Updated: 24/Mar/15  Resolved: 24/Mar/15

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

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


 Description   

I have defined a CDI interceptor as following:

@Interceptor
@MyIntercept
public class MyInterceptor {
@AroundInvoke
public Object intercept(InvocationContext context) throws Exception {
LOG.info("Call {}.{}",
context.getMethod().getDeclaringClass().getName(), context.getMethod().getName());
return context.proceed();
}
}

@InterceptorBinding
@Retention(RetentionPolicy.RUNTIME)
@Target(

{ElementType.METHOD, ElementType.TYPE}

)
public @interface MyIntercept {}

And declared it in MyService
@Singleton
@MyIntercept
public class MyService {
@Schedule(second = "0/10", minute = "", hour = "", persistent = false)
public void schedule()

{ //... do something }

public void manualCall() { //... do something }

}

The interceptor was never called to schedule method but when call the manualCall method the interceptor was invoked.



 Comments   
Comment by jjsnyder83 [ 24/Mar/15 ]

Please provide a reproducible test caes.

Comment by janario [ 24/Mar/15 ]

You may close this as invalid.
After report it I discovered that it should be annotated with @AroundTimeout and not @AroundInvoke





[GLASSFISH-21335] Using activated remote ejb throwing java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; Created: 24/Mar/15  Updated: 24/Mar/15

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

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

Attachments: File 774a67a8-25bc-4597-a426-c72b3f28b741.war     Java Archive File EjbInjectionTest-source.jar    

 Description   

A cdi tck test org.jboss.cdi.tck.tests.implementation.simple.resource.ejb.EjbInjectionTest
uses com.sun.enterprise.container.common.impl.util.JavaEEIOUtilsImpl to passivate and activate a remote ejb. After the ejb is activated when a method on the ejb is executed the following exception is thrown:
Caused by: java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: The delegate has not been set! vmcid: 0x0 minor code: 0 completed: No
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:310)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:134)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:226)
at org.jboss.cdi.tck.tests.implementation.simple.resource.ejb._BeanRemote_Remote_DynamicStub.knockKnock(org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/_BeanRemote_Remote_DynamicStub.java)
... 107 more
Caused by: org.omg.CORBA.BAD_OPERATION: The delegate has not been set! vmcid: 0x0 minor code: 0 completed: No
at org.omg.CORBA.portable.ObjectImpl._get_delegate(ObjectImpl.java:71)
at com.sun.corba.ee.spi.presentation.rmi.StubAdapter.getDelegate(StubAdapter.java:175)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:132)
... 109 more
...

I will upload a test app with source shortly



 Comments   
Comment by jjsnyder83 [ 24/Mar/15 ]

To reproduce the exception follow these directions. The exception gets swallowed and does not get output so you must use a debugger:

Comment by jjsnyder83 [ 24/Mar/15 ]

Note this must be run with Weld 2.2.9.Final or 2.2.10.Final which I will get in very soon.





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

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


Tags: javaee_ri_fix

 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





[GLASSFISH-21333] Error when set jvm-options "-Dcom.sun.appserv.iiop.endpoints=host1:port1,host2:port2" in jvm cluster settings Created: 18/Mar/15  Updated: 18/Mar/15

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

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

Linux Centos 6.5 64bits



 Description   

I have an frontend and backend application communicate whith remote EJB.
When I set jvm-options "-Dcom.sun.appserv.iiop.endpoints=host1:port1,host2:port2" in jvm frontend cluster settings and I start it I obtain this error :

java.lang.IllegalStateException: Service org.glassfish.gms.bootstrap.GMSAdapterService was started at level 1 but it has a run level of 10.

In the class : com.sun.enterprise.naming.impl.SerialInitContextFactory#getInitialContext, the boolean useLB is set to true. Then the com.sun.enterprise.naming.impl.SerialInitContextFactory#getORB method is call.
In the method org.glassfish.enterprise.iiop.impl.GlassFishORBManager#setFOLBProperties it created a new IiopFolbGmsClient( services ). In this class there is a call to gmsAdapterService = services.getService(GMSAdapterService.class);. A this line cannot create the GMSAdapterService because it start with runlevel 10.

Maybe I don't understand how to set the IIOP loadbalancing ?






[GLASSFISH-21332] java.util.logging and different resource bundles Created: 18/Mar/15  Updated: 18/Mar/15

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

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

Oracle JDK8



 Description   

I have a project that has a few JAR files. In one JAR I have a logger defined as
Logger.getLogger("net.trajano.oidc", "META-INF/Messages")

In another JAR which depends on the previous one I have a logger defined as,

Logger.getLogger("net.trajano.oidc.jaspic", "META-INF/JaspicMessages")

The reason I had different names was because if I kept the same only the Messages in the previous one is used rather than the one local to the JAR file. That is a problem on its own.

I had also created a JUnit test to see if I am even allowed to have different resource bundles to see if it is a JDK issue, but it seems to be okay.

Here is the link to the branch of my project that demonstrates the issue

https://github.com/trajano/openid-connect/tree/bad-logger

The error message I get is this.

Caused by: java.lang.IllegalArgumentException: META-INF/Messages != META-INF/JaspicMessages
at java.util.logging.Logger.setupResourceInfo(Logger.java:1928)
at java.util.logging.Logger.getLogger(Logger.java:564)
at net.trajano.openidconnect.jaspic.internal.Log.<clinit>(Log.java:25)






[GLASSFISH-21330] asadmin list-applications --long doesn't include enabled status if --terse is set Created: 17/Mar/15  Updated: 17/Mar/15

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

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


 Description   

$ asadmin list-applications --long
NAME TYPE STATUS
jtest <web> enabled
$ asadmin --terse list-applications --long
jtest <web>

Output should be:
jtest <web> enabled

--long is not the opposite of --terse, it probably should've been named --enabled.



 Comments   
Comment by Bill Shannon [ 17/Mar/15 ]

Here's the fix:

Index: ListComponentsCommand.java
===================================================================
— ListComponentsCommand.java (revision 63694)
+++ ListComponentsCommand.java (working copy)
@@ -180,7 +180,7 @@

for (Application app : apps) {
String[] currentRow;

  • if( !terse && long_opt ){
    + if( long_opt ){
    currentRow = new String[] { app.getName(), getAppSnifferEngines(app, true), getLongStatus(app) }

    ;
    @@ -198,7 +198,7 @@
    int numCols = 2;
    String[] headings = new String[]

    {"NAME", "TYPE", "STATUS"}

    ;
    int longestValue[] = new int[numCols];

  • if ( !terse && long_opt ) {
    + if ( long_opt )
    Unknown macro: { numCols = 3; longestValue = new int[] {headings[0].length(), headings[1].length(), headings[2].length() }; }




[GLASSFISH-21329] JSP using tag library is not correctly compiled Created: 15/Mar/15  Updated: 15/Mar/15

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

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

Windows 8.1



 Description   

The JSP compiler generates the wrong variable names in case of a nesting of the same tag:

PWC6197: An error occurred at line: 79 in the jsp file: /upload/scripts/bankcontent.jsp
PWC6199: Generated servlet error:
cannot find symbol
symbol: variable String_jspx_temp0
location: class org.apache.jsp.upload.scripts.bankcontent_jsp

PWC6199: Generated servlet error:
cannot find symbol
symbol: variable _jspx_temp0
location: class org.apache.jsp.upload.scripts.bankcontent_jsp

The variable name should be (String) _jspx_temp0 instead of String_jspx_temp0. This happen for all variables temp0 through 16 in this case. Other application servers do not exhibit this behavior.






[GLASSFISH-21328] Resource deployments to a standalone instance can't be redirected back to the Admin Server once the SA instance is deleted Created: 12/Mar/15  Updated: 12/Mar/15

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

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

RHEL v6.6 (Santiago)
Java v1.8.0_40



 Description   

Once JDBC resources have been deployed to a standalone instance and that instance is deleted, they apparently don't migrate back to the Admin Server nor is there a way via the Admin console to re-target them back to the Admin Server. One ends up having to delete the domain and then recreate a new one to get the control of the resources back.






[GLASSFISH-21327] EJB Timer application won't deploy to a stand-alone GF server instance using Derby Created: 12/Mar/15  Updated: 12/Mar/15

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

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

RHEL v6.6 (Santiago)
Java v1.8.0_40



 Description   

When trying to move the EJB Timer application to a GF stand-alone instance using the Derby database, a java.sql.SQLException is thrown because of the inability by Derby to create a(n ejbtimer) database in GF_HOME/nodes/localhost-<domainname>/<server_name>/lib/databases/ejbtimer. The top-level exception is thrown while trying to creating a resource for the __TimerPool with the inability to create the appropriate Derby database files seeming to be the culprit.






[GLASSFISH-21326] deployment of a EJB with a CDI injection from a different jar fail Created: 12/Mar/15  Updated: 24/Mar/15

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

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


 Description   

i try to deploy a application with a EJB which make a CDI injection from a different jar. But the deployment fails.

A simple CDI injection in the same jar works

I get these exception:

Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type CDIOutOfEJB with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private com.ducktail.ejb.EJBImpl.outofEJB
at com.ducktail.ejb.EJBImpl.outofEJB(EJBImpl.java:0)

The deployment of the same ear on wildfly works



 Comments   
Comment by jjsnyder83 [ 24/Mar/15 ]

Please provide a reproducible test case.

Comment by tiran1984 [ 24/Mar/15 ]

How can i attach my project?





[GLASSFISH-21325] @Inject HttpSession prevents session (de)serialization Created: 06/Mar/15  Updated: 24/Mar/15

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

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

JDK 1.8.0.40



 Description   

In any managed component like servlet, JAX-RS resource, WebSocket server endpoint, try the following:

@Inject HttpSession private session;

then do something to session, so that injection occurs.

After that, try to reload your application. You will get the following:

Info:   Cannot serialize session attribute WELD_S#9 for session cadd11390cd0f18aa9386925f091
java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
	at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:2196)

Since that moment, your service method will fail (until the session is killed):

Warning:   StandardWrapperValve[test.ApplicationConfig]: Servlet.service() for servlet test.ApplicationConfig threw exception
java.lang.ClassCastException: org.jboss.weld.proxies.HttpSession$1781022004$Proxy$_$$_WeldClientProxy cannot be cast to java.lang.String
	at org.jboss.weld.proxies.HttpSession$1781022004$Proxy$_$$_WeldClientProxy.toString(Unknown Source)

This happens because Weld stores all @SessionScoped instances as HTTP session attributes. When application is unloaded, all session attributes are serialized (session preservation). Since injected HttpSession instance itself is @SessionScoped, it undergoes serialization, too - but it's not serializable.

Probably it gets serialized as some (error) string that can't be deserialized back, which breaks serviceMethod.



 Comments   
Comment by xwibao [ 06/Mar/15 ]

I'm sorry, the correct syntax for injection is @Inject private HttpSession session;

The last line is a bit erroneous too (and unfortunately I can't edit it). I've got java.lang.ClassCastException: org.jboss.weld.proxies.HttpSession$1781022004$Proxy$_$$_WeldClientProxy cannot be cast to java.lang.String when I was simply trying to print out session.toString().

If I try to invoke any HttpSession method on this broken instance, I get the following:

java.lang.IllegalArgumentException: object is not an instance of declaring class
	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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)

However, session.getClass().getInterfaces() shows the following:

[interface javax.servlet.http.HttpSession, interface java.io.Serializable, interface org.jboss.weld.interceptor.proxy.LifecycleMixin, interface org.jboss.weld.interceptor.util.proxy.TargetInstanceProxy, interface org.jboss.weld.bean.proxy.ProxyObject]
Comment by jjsnyder83 [ 24/Mar/15 ]

Do you really want to have your HttpSession variable persisted? Try making the sessoin variable transitive.





[GLASSFISH-21324] Glassfish logger is broken Created: 05/Mar/15  Updated: 05/Mar/15

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

Type: Bug Priority: Critical
Reporter: oleksiys Assignee: rajendra_inamdar
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

IMO the Glassfish logger is completely broken.
When I log a message with parameters.

For example I have an object:

public class Counter {
       private int i;
       public void set(int i) {this.i = i;};
       public void inc() {i++;}
       public int getCount() { return i;}
       public String toString() {return "" + i;}
}

and I try to log the Counter state like:

LOGGER.log(Level.INFO, "counter={0}", new Object[] {counter});

the LOGGER will pass the actual logging task to a separate thread, where counter.toString() will be resolved. But the problem is that by that time the counter could be changed, recycled etc... by the original thread,

for example the output of this code:

counter.set(1);
LOGGER.log(Level.INFO, "counter={0}", new Object[] {counter});
counter.inc();

is undetermined, but I want it to be only "1", I don't want it to be "2" or anything else.






[GLASSFISH-21323] java.util.concurrent.TimeoutException writing to socket output Created: 04/Mar/15  Updated: 06/Mar/15  Resolved: 06/Mar/15

Status: Closed
Project: glassfish
Component/s: grizzly-kernel
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: arie_golos Assignee: oleksiys
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 4.1 Build 13,
Linux setivm-77BE3EDE506A1 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux
Client windows 7, high concurrency level



 Description   

We had similar issues with GF4.0, but we thought, that have been fixed with GLASSFISH-20681 and GLASSFISH-21315. Indeed, the number of occurrences of TimeoutException is much lower than in Glassfish 4.0, but they can still happen under heavy load. Unlike in 4.0, as far as we know, it does not cause problems on the client side. However since there is a potential for causing some transient stoppages of the traffic, we file it as major, but certainly not critical.
Here is a cause exception of the IOException that we are getting:
java.util.concurrent.TimeoutException
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:973)
at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:686)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
at com.epnet.ese.cds.web.legacy.ContentServerCompatible.copyStream(ContentServerCompatible.java:335)
at com.epnet.ese.cds.web.legacy.ContentServerCompatible.doGet(ContentServerCompatible.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
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.epnet.ese.jese.web.filters.PublicUrlSecurityFilter.doFilter(PublicUrlSecurityFilter.java:103)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.epnet.ese.jese.web.filters.StatisticsFilter.doFilter(StatisticsFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.epnet.ese.jese.web.filters.MdcPropertiesFilter.doFilter(MdcPropertiesFilter.java:70)
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.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:412)
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:724)
Caused by: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerGet(SafeFutureImpl.java:357)
at org.glassfish.grizzly.impl.SafeFutureImpl.get(SafeFutureImpl.java:264)
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:962)
... 49 more

#]


 Comments   
Comment by arie_golos [ 04/Mar/15 ]

Instead of GLASSFISH-21315 I intended to write GLASSFISH-20918. My apologies.

Comment by oleksiys [ 04/Mar/15 ]

Can you pls. write a testcase or at least give more details on when it happens?
Usually this exception may occur if a client can't keep up with a server (the client reads data much slower than the server sends it). But in this case it's expected behavior.

Thanks.

Comment by arie_golos [ 04/Mar/15 ]

Basically, if I run a windows 7 based java with 128 threads constantly uploading PDF files of various length (including quite large files), this happens when the client is running over a wireless or a VPN connection. On a 1 gbit hard connection we have not observed this problem. So, maybe, you are right. In such a case please close the jira.

Comment by oleksiys [ 06/Mar/15 ]

Closing for now, I you find more info on this issue, pls reopen the issue.





[GLASSFISH-21322] Threads blocking in ApplicationContext.mergeParameters method Created: 02/Mar/15  Updated: 02/Mar/15

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

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


 Description   

Related to GLASSFISH-20670

During performance tests of our application we discovered that most of http threads were eventually locked on org.apache.catalina.core.ApplicationContext.mergeParameters method.

Part of stack trace of one blocked thread:
Thread "http-thread-pool-8181(2)": at org.apache.catalina.core.ApplicationContext.mergeParameters() at org.apache.catalina.core.ApplicationContext.getInitParameter(java.lang.String) at org.apache.catalina.core.ApplicationContextFacade.getInitParameter(java.lang.String) at com.sun.faces.context.ExternalContextImpl.getInitParameter(java.lang.String) at javax.faces.context.ExternalContextWrapper.getInitParameter(java.lang.String) at javax.faces.component.UIComponent.popComponentFromEL(javax.faces.context.FacesContext)

First call to mergeParameters() will execute and only the few threads trying to access it during that time need to be synchronized. After that all calls just check condition and finish. Since synchronizing a method could in some extreme cases decrease performance by a factor of 100 or higher, the overhead of acquiring and releasing a lock every time this method is called seems unnecessary: once the execution of this method has been completed, acquiring and releasing the locks would appear unnecessary.

The bug hasn't been fixed in "GLASSFISH-20670", the method mergeParameters is still synchronized and blocks all threads.
Solution that is submitted in commets for "GLASSFISH-20670" fixes the problem.
Please, include this in your next release.



 Comments   
Comment by Yury_Morozov [ 02/Mar/15 ]

This bug can be easily fixed by double-checked locking pattern (as suggested for ''GLASSFISH-20670'' by Sergey Rezvan):

ApplicationContext.java
org.apache.catalina.ApplicationContext

public class ApplicationContext implements ServletContext {
....
private volatile Object lockObject = new Object();
....
	private void mergeParameters() {
		if (!this.parametersMerged) {
			synchronized (this.lockObject) {
				if (!this.parametersMerged) {
					for (String name : this.context.findParameters()) { 
						this.parameters.put(name, this.context.findParameter(name)); 
					}
					List<ApplicationParameter> params = this.context.findApplicationParameters();
					Iterator<ApplicationParameter> i = params.iterator();
					while (i.hasNext()) {
						ApplicationParameter param = (ApplicationParameter)i.next();
						if (param.getOverride()) {
							if (this.parameters.get(param.getName()) == null) { 
								this.parameters.put(param.getName(), param.getValue()); 
							}
						} else { 
							this.parameters.put(param.getName(), param.getValue()); 
						}
					}
					this.parametersMerged = true;
				}
			}
		}
	}
...
}




[GLASSFISH-21321] JDK9 - Need to update felix.jar Created: 01/Mar/15  Updated: 06/Mar/15  Resolved: 06/Mar/15

Status: Closed
Project: glassfish
Component/s: build_system
Affects Version/s: 4.1
Fix Version/s: future release

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

Issue Links:
Dependency
blocks GLASSFISH-21236 Glassfish 4.1 won't start with JDK 9 ... Resolved

 Description   

If we want to run glassfish with JDK 9 , (refer GLASSFISH-21236) we need to update glassfish4/glassfish/osgi/felix/bin/felix.jar . I have patch the jar to make it JDK 9 compatable .However the jar is coming from the felix Maven repository . I have logged a felix bug FELIX-4808 to make Felix JDK 9 comparable . Until the bug is resolved , if we want to run glassfish with JDK 9 we need to place the patched jar in glassfish private repository and change the pom of main/nucleus/osgi-platforms/felix project to pick
up the jar from glassfish local repository instead of maven central repository.



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

Felix update is not required . The issue can be fixed by adding the following entry in glassfish4/glassfish/config/osgi.properties.
org.osgi.framework.system.capabilities= \
${eecap-${java.specification.version}} eecap-1.9= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9"
eecap-1.8= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8"
eecap-1.7= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7"
eecap-1.6= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6"
eecap-1.5= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5"
eecap-1.4= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4"
eecap-1.3= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3"
eecap-1.2= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2"

Comment by Arindam Bandyopadhyay [ 06/Mar/15 ]

Closing the Task.





[GLASSFISH-21320] Automate check-up of Class-Path jar 'javaee.jar' Created: 27/Feb/15  Updated: 27/Feb/15

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

Type: Task Priority: Major
Reporter: Romain Grécourt Assignee: Romain Grécourt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Verify that all the required javax.* classes are present in the Class-Path jar 'javaee.jar'.
Possibly also verify that no other class files are present.

One way of doing this could be:

Reuse the list of spec that is defined under appserver/pom.xml, with a mojo in the spec-version-maven-plugin.

It would be similar to what we did to ensure all spec jars had compliant
metadata around the time of EE7/GFv4 release.

E.g. It could be an option to the current mojo "check-distribution", to check-up
a "class-path jar", or a separate mojo.

Possibly hook that by default in the build / CI job.






[GLASSFISH-21319] javax.inject.jar missing in javaee.jar Created: 27/Feb/15  Updated: 27/Feb/15

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

Type: Bug Priority: Major
Reporter: Romain Grécourt Assignee: Romain Grécourt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In the GlassFish lib directory there's a javaee.jar that just contains
a manifest Class-Path header referring to other jar files. It's missing
javax.inject.jar. And it includes weld-osgi-bundle.jar, which has no javax
classes in it.






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

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: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GLASSFISH-21236 Glassfish 4.1 won't start with JDK 9 ... Resolved
Tags: javaee_ri_fix

 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-21317] Glassfish 4.1 is giving NullPointerException when starting with JDK 9 Created: 26/Feb/15  Updated: 18/Mar/15  Resolved: 18/Mar/15

Status: Resolved
Project: glassfish
Component/s: configuration
Affects Version/s: 4.1
Fix Version/s: 4.2

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

Issue Links:
Related
is related to GLASSFISH-21236 Glassfish 4.1 won't start with JDK 9 ... Resolved
Tags: javaee_ri_fix

 Description   

If we want to run GlassFish in JDK 9 we need to delete following 3 jvm options from domain.xml.
<jvm-options>-XX:MaxPermSize=192m</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.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>
We need to delete those jvm options as JDK 9 does not support that JDK options.
After deleting those options if we start glassfish using JDK 9 we are getting the following NPE in server.log
-----------------------------------------------------------------------------------------------------

Exception occurred while satisfying optional package dependencies
java.lang.NullPointerException
at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
at java.util.StringTokenizer.<init>(StringTokenizer.java:221)
at
org.glassfish.deployment.common.InstalledLibrariesResolver.initializeInstalledLibRegistryForExtDirs(InstalledLibrariesResolver.java:140)
at
org.glassfish.deployment.common.InstalledLibrariesResolver.initializeInstalledLibRegistry(InstalledLibrariesResolver.java:131)
at
com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:163)
at
org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at
org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at
org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at
org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2064)
at
org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at
org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at
org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1223)
at
org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1154)
at
org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:754)
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)



 Comments   
Comment by Arindam Bandyopadhyay [ 26/Feb/15 ]

Root cause For this exception si

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.
However this exception does not prevent the glassfish server to start up.
We are working to fix it.

Comment by Arindam Bandyopadhyay [ 09/Mar/15 ]

Fixed the issue. Marge in man trunk
Sending nucleus/deployment/common/src/main/java/org/glassfish/deployment/common/InstalledLibrariesResolver.java
Transmitting file data .
Committed revision 63788.





[GLASSFISH-21316] Log Viewer inconsistencies Created: 26/Feb/15  Updated: 27/Mar/15

Status: In Progress
Project: glassfish
Component/s: admin_gui, logging
Affects Version/s: 4.0
Fix Version/s: None

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

Ubuntu 14.04



 Description   

This is about the Log Viewer in the Admin console (accessed through server-->View Log Files). When selecting the file "server.log", I get a list of logs in a table with Record Number, Log Level, Message, etc... In the Message field you can click on a link called "details" which brings you to the full stack trace of warnings for example. The problem is that sometimes clicking on this link brings you to a completely different log entry with respect to the one you clicked. Sometimes the record number is right but the message is the wrong one, other times both are wrong. For example, I click for details for the log entry n. 29, which automatically issues a request for
common/logViewer/logEntryDetail.jsf?instanceName=server&logLevel=INFO&logFile=server.log&recNumber=29
but I get log entry details for record 19, which also shows a wrong message!
The problem seems to disappear when I rotate logs and I access the file server.log_2015-SomeDate instead of server.log. And it should only be related to the way logs are queried, since I checked and the server.log file doesn't show any issues.
I'm using Glassfish 4.0.1 (build 8).






[GLASSFISH-21315] Ambiguous dependencies refer to the same CDI producer twice Created: 25/Feb/15  Updated: 24/Mar/15  Resolved: 24/Mar/15

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

Type: Bug Priority: Blocker
Reporter: arie_golos Assignee: jjsnyder83
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux cps601 3.0.101-0.7.17-default #1 SMP Tue Feb 4 13:24:49 UTC 2014 (90aac76) x86_64 x86_64 x86_64 GNU/Linux
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)



 Description   

The war file that used to boot without a problem in Glassfish 4.0 is refused by Glassfish 4.1 with the following funny message (Possible dependencies show two identical @Producer methods):
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ConfigValue<String> with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject @ConfigParams private com.epnet.ese.cds.metadata.DeliveryMetadataStoreImpl.defaultMetadataPlugin
at com.epnet.ese.cds.metadata.DeliveryMetadataStoreImpl.defaultMetadataPlugin(DeliveryMetadataStoreImpl.java:0)
Possible dependencies:

  • Producer Method [ConfigValue<Object>] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @Produces public com.epnet.ese.jese.config.ConfigServiceImpl.getConfigValue(InjectionPoint)],
  • Producer Method [ConfigValue<Object>] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @Produces public com.epnet.ese.jese.config.ConfigServiceImpl.getConfigValue(InjectionPoint)]

at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:291)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:165)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:529)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:515)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:490)
at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:419)



 Comments   
Comment by arie_golos [ 04/Mar/15 ]

I would like to withdraw that Jira. It was caused by having two jars of the same classes but with different versions.
On the other hand, why would cdi would take into account classes that will not be loaded due to the fact that they are behind the target classes in the classpath?

Comment by jjsnyder83 [ 24/Mar/15 ]

I'm not sure where the jars are that you refer to. If they are library jars then CDI processes them as such and you would see the Ambiguous exception.

Comment by arie_golos [ 24/Mar/15 ]

Yes, they are library jars. I was referring to my mental model in which all jars in lib directory form some kind of a class path. So, when looking for a class, the CDI would search jars in the order of their appearance in that classpath and when first class is found, it stops looking any further down the path.





[GLASSFISH-21314] Cannot create JDBC Connection Pool Created: 23/Feb/15  Updated: 11/Mar/15

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

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


 Description   

When attempting to create a new JDBC connection pool, GlassFish errors with the exception:

java.lang.IllegalStateException: getOutputStream() has already been called for this response

To reproduce, using the latest builds (from 23 Feb 2015):

1. Select Create New JDBCConnection Pool
2. Enter any valid information on Step 1 of 2 (New JDBC Connection Pool page)
3. Click the Next button and the error is thrown.

The full stack tace from the log files is as follows:

[2015-02-23T22:06:15.124+0000] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=178 _ThreadName=admin-listener(8)] [timeMillis: 1424729175124] [levelValue: 900] [[
StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:777)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224)
at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:846)
at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:504)
at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:79)
at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:642)
at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:120)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:201)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:126)
at javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:100)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
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: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:745)
]]

[2015-02-23T22:09:25.421+0000] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1424729365421] [levelValue: 800] [[
Exception Occurred :null]]



 Comments   
Comment by nabizamani [ 24/Feb/15 ]

What DB and version are you using? What JDBC driver are you using?

Did you also try via asadmin? Here you can see how it works via asadmin and with postgres: https://www.nabisoft.com/tutorials/glassfish/using-glassfish-3-and-java-ee-6-for-longitude-latitude-calculations-to-implement-server-side-location-based-services#Step3
Probably this helps you...

A few days ago I had a similar issue when I tried to connect to the latest Postgres 9.4.1 via its latest JDBC driver. Unfortunately, it did not work at all and I thought there is a bug somewhere in Glassfish. Then I found out that the latest JDBC driver (9.4-1200-jdbc41) for Postgres has a bug, see: https://github.com/pgjdbc/pgjdbc/pull/257

However, I also get many "java.lang.IllegalStateException: getOutputStream() has already been called for this response" exceptions in my log file

Comment by tovine [ 11/Mar/15 ]

I also got this error today (running Postgresql 9.3 and the latest JDBC driver, however the error was the same before I even included the jdbc jar in the glassfish lib folder).

Tried with the latest nightly (4.1-b13 from 2015-03-09).

UPDATE: it works with the nightly build dated 2015-02-18, so it must have happened sometime during that week...

Comment by Romain Grécourt [ 11/Mar/15 ]

Can you try against the following builds?

Thanks,
Romain





[GLASSFISH-21313] Ordering of Cipher Suites kills Forward Secrecy with major browsers Created: 23/Feb/15  Updated: 23/Feb/15

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

Type: Bug Priority: Critical
Reporter: nabizamani Assignee: JeffTancill
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 14.04 LTS Server x64, java 1.8.0_31 + JCE Unlimited Strength, GlassFish Server Open Source Edition 4.1 (build 13)


Tags: ciper, forward, order,, secrecy, suites,

 Description   

https://community.qualys.com/blogs/securitylabs/2013/06/25/ssl-labs-deploying-forward-secrecy

This is the list of supported cipher suites (when disabling RC4 via JSSE) as received via "asadmin list-supported-cipher-suites" (see below).
As you can see the following cipher suites are nor really "top listed", which means that for major browsers Forward Secrecy is disabled because the selected cipher suite does not support it:

TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
there are some more...

Here is a list of some of the affected browsers:
IE 11 / Win 7 R via TLS 1.2 ==> TLS_RSA_WITH_AES_128_CBC_SHA256
IE 8-10 / Win 7 R via TLS 1.0 ==> TLS_RSA_WITH_AES_128_CBC_SHA

Glassfish should at least allow to change the order of the "server-side" list of supported cipher suites. Furthermore, Java has even introduced an API for listening a little more to "what the client wants", see http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html :

Cipher Suite Preference:
During TLS handshaking, the client requests to negotiate a cipher suite from a list of cryptographic options that it supports, starting with its first preference. Then, the server selects a single cipher suite from the list of cipher suites requested by the client. Normally, the selection honors the client's preference. However, to mitigate the risks of using weak cipher suites, the server may select cipher suites based on its own preference rather than the client's preference, by invoking the method SSLParameters.setUseCipherSuitesOrder(true).

That means it would also be great to apply SSLParameters.setUseCipherSuitesOrder(bool) via asadmin settings (probably on the http-linteners ssl section).

#####################################################
And here is the complete list of cypher suites (RC4 is disabled):
#####################################################

$ /home/glassfish/bin/asadmin list-supported-cipher-suites
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_DSS_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_DSS_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
TLS_EMPTY_RENEGOTIATION_INFO_SCSV
TLS_DH_anon_WITH_AES_256_GCM_SHA384
TLS_DH_anon_WITH_AES_128_GCM_SHA256
TLS_DH_anon_WITH_AES_256_CBC_SHA256
TLS_ECDH_anon_WITH_AES_256_CBC_SHA
TLS_DH_anon_WITH_AES_256_CBC_SHA
TLS_DH_anon_WITH_AES_128_CBC_SHA256
TLS_ECDH_anon_WITH_AES_128_CBC_SHA
TLS_DH_anon_WITH_AES_128_CBC_SHA
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_DES_CBC_SHA
SSL_DHE_RSA_WITH_DES_CBC_SHA
SSL_DHE_DSS_WITH_DES_CBC_SHA
SSL_DH_anon_WITH_DES_CBC_SHA
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
TLS_RSA_WITH_NULL_SHA256
TLS_ECDHE_ECDSA_WITH_NULL_SHA
TLS_ECDHE_RSA_WITH_NULL_SHA
SSL_RSA_WITH_NULL_SHA
TLS_ECDH_ECDSA_WITH_NULL_SHA
TLS_ECDH_RSA_WITH_NULL_SHA
TLS_ECDH_anon_WITH_NULL_SHA
SSL_RSA_WITH_NULL_MD5



 Comments   
Comment by nabizamani [ 23/Feb/15 ]

For example, this would allow forward secrecy in IE on Win 7 (maybe there are better cipher suites that allow forward secrecy and which are supported by the different IE versions):

IE 11 / Win 7 R via TLS 1.2 ==> TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
IE 8-10 / Win 7 R via TLS 1.0 ==> TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

But unfortunately Glassfish only selects this, which has no Forward Secrecy as I believe to know:

IE 11 / Win 7 R via TLS 1.2 ==> TLS_RSA_WITH_AES_128_CBC_SHA256
IE 8-10 / Win 7 R via TLS 1.0 ==> TLS_RSA_WITH_AES_128_CBC_SHA





[GLASSFISH-21312] java.io.IOException: java.util.concurrent.TimeoutException comes up from time to time Created: 23/Feb/15  Updated: 25/Feb/15

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

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

Ubuntu 14.04 LTS Server x64, java 1.8.0_31 + JCE Unlimited Strength, GlassFish Server Open Source Edition 4.1 (build 13)



 Description   

Fo a client I migrated from Glassfish 3.1.2.2 to the latest Glassfish 4.1 and now suddenly I can see java.util.concurrent.TimeoutException (see logs below). I can't tell where this comes from. I checked all the log files from GF 3.1.2.2 and there I can't find even a single entry...

[2015-02-23T11:06:43.377+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=27 _ThreadName=http-listener-1(2)] [timeMillis: 1424686003377] [levelValue: 900] [[
StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
java.io.IOException: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:973)
at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:686)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:2199)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1085)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:568)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
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.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
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: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:745)
Caused by: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerGet(SafeFutureImpl.java:357)
at org.glassfish.grizzly.impl.SafeFutureImpl.get(SafeFutureImpl.java:264)
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:962)
... 42 more
]]



 Comments   
Comment by oleksiys [ 23/Feb/15 ]

This Exception appears when the server can't write the data to a client. Most probably client or network can't keep up with the server's pace.
You're right, in 3.1.2 we throw different Exception, but logic is the same.

Do you see a particular problem related to this Exception?

Comment by nabizamani [ 23/Feb/15 ]

As of now I don't see any real problem other than annoying amount of logs.
I have also some other new log entries which we never had in Glassfish 3.1.2.2:

  • java.lang.IllegalStateException: getOutputStream() has already been called for this response
  • java.lang.IllegalStateException: Unknown JCDI-enabled managed bean org.apache.struts2.views.jsp.TextTag@ee5597c of class class org.apache.struts2.views.jsp.TextTag

I believe that latter one occurs during restart oder the server or when underlying, maybe deploying.
I will monitor this the next days and let you know about my findings.

Comment by oleksiys [ 23/Feb/15 ]

Well, I think we can reduce the logging level for this exception.
Regarding:

java.lang.IllegalStateException: getOutputStream() has already been called for this response

looks like you call response.getWriter() after response.getOutputStream() was called, you can't combine byte- and character-based writes, that's why you see the exception.

Comment by nabizamani [ 23/Feb/15 ]

Yes, I figured that. However, we did not change anything in the jsp that seems to produce this exception. Like I said, I will monitor and analyze things and post my findings here...

Comment by nabizamani [ 24/Feb/15 ]

I think I got some fIndings:

I get somehow java.io.IOException: java.util.concurrent.TimeoutException
I cannot really reproduce it, it just happens from time to time...
Because of the exception my error page defined in web.xml gets called:

web.xml (just the relevant part):

<!-- catch all errors -->
<error-page>
    <location>/WEB-INF/jsp/error/error.jsp</location>
</error-page>

/WEB-INF/jsp/error/error.jsp :

<%@page isErrorPage="true" session="false"
%><%@ page import="org.apache.log4j.Logger"
%><%@ page trimDirectiveWhitespaces="true" 
%><%
response.setStatus(response.getStatus());   //or some other code
%><html>
    <head>
        <title>Error <%= response.getStatus() %></title>
    </head>
    <body>
        <h2 style="color:red;">Error <%= response.getStatus() %></h2>
    </body>
</html>
<%
Logger log = Logger.getLogger("error");
String uri = (String) request.getAttribute("javax.servlet.error.request_uri");
String info = "(ip='"+request.getRemoteAddr()+"' x-forwarded-for='"+request.getHeader("x-forwarded-for")+"')";
String qs = request.getQueryString();
if (qs != null)
    log.error("HTTP Status "+response.getStatus() +" for request '"+uri+"?"+qs+"' "+info);
else
    log.error("HTTP Status "+response.getStatus() +" for request '"+uri+"' "+info);
%>

So the error.jsp is called, and right after that I get this error in the log file:
java.lang.IllegalStateException: getOutputStream() has already been called for this response

I guess that is because Glassfish has either already sent "some" response or because the connection is closed (i.e. by peer?). What does timeout exactly mean? What kind of timeout are we talking about?

However, I still get the log entries I have in the error.jsp. This is an example log entry:
2015-02-24 17:27:44,985 ERROR error._jspService:76 - HTTP Status 200 for request '/assets/plugins/bootstrap/css/bootstrap.css' (ip='41.216.47.46' x-forwarded-for='null')]]

As you can see the HTTP Status code is 200 (and that is correct, because the file is on the server). Although an error was thrown by the runtime, I guess because the connection was closed or something... I believe that throwing TimeoutException because maybe a connection has closed for some reason and passing it all the way up is the issue here. Do you know if there is some change in the code somewhere here between 3.1.2.2 and 4.1? I can also see some "java.io.IOException: Broken pipe" exceptions in the logs (I believe this is related somehow).

A log file with some relevant parts is attached.

Comment by nabizamani [ 24/Feb/15 ]

Sorry, I can't attach files... So here some logs:

[2015-02-24T17:27:44.984+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=36 _ThreadName=http-listener-2(2)] [timeMillis: 1424795264984] [levelValue: 900] [[
StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
java.io.IOException: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:973)
at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:686)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:2199)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1085)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:568)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
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.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.web.filter.ForceHttpsFilter.doFilter(ForceHttpsFilter.java:51)
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: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:745)
Caused by: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerGet(SafeFutureImpl.java:357)
at org.glassfish.grizzly.impl.SafeFutureImpl.get(SafeFutureImpl.java:264)
at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:962)
... 45 more
]]

[2015-02-24T17:27:44.986+0100] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=36 _ThreadName=Thread-8] [timeMillis: 1424795264986] [levelValue: 800] [[
2015-02-24 17:27:44,985 ERROR error._jspService:76 - HTTP Status 200 for request '/assets/plugins/bootstrap/css/bootstrap.css' (ip='41.216.47.46' x-forwarded-for='null')]]

[2015-02-24T17:27:44.986+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.core] [tid: _ThreadID=36 _ThreadName=http-listener-2(2)] [timeMillis: 1424795264986] [levelValue: 900] [[
Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:777)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:152)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:195)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:188)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:240)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:185)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:137)
at org.apache.jsp.WEB_002dINF.jsp.error.error_jsp._jspService(error_jsp.java:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:695)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:626)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:500)
at org.apache.catalina.core.StandardHostValve.dispatchToErrorPage(StandardHostValve.java:699)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:309)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:232)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:417)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]

[2015-02-24T17:27:44.987+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=36 _ThreadName=http-listener-2(2)] [timeMillis: 1424795264987] [levelValue: 900] [[
org.apache.catalina.core.StandardHostValve@6d45b284: Exception Processing ErrorPage[errorCode=0, location=/WEB-INF/jsp/error/error.jsp]
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:777)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:152)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:195)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:188)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:240)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:185)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:137)
at org.apache.jsp.WEB_002dINF.jsp.error.error_jsp._jspService(error_jsp.java:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:695)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:626)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:500)
at org.apache.catalina.core.StandardHostValve.dispatchToErrorPage(StandardHostValve.java:699)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:309)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:232)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:417)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]

[2015-02-24T18:03:01.398+0100] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=38 _ThreadName=Thread-8] [timeMillis: 1424797381398] [levelValue: 800] [[
2015-02-24 18:03:01,397 ERROR error._jspService:76 - HTTP Status 404 for request '/robots.txt' (ip='77.66.121.243' x-forwarded-for='null')]]

[2015-02-24T18:12:38.665+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=39 _ThreadName=http-listener-2(5)] [timeMillis: 1424797958665] [levelValue: 900] [[
StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:470)
at org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer(TCPNIOUtils.java:149)
at org.glassfish.grizzly.nio.transport.TCPNIOUtils.writeSimpleBuffer(TCPNIOUtils.java:133)
at org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:109)
at org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:91)
at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:261)
at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:170)
at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:70)
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(TCPNIOTransportFilter.java:126)
at org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(TransportFilter.java:191)
at org.glassfish.grizzly.ssl.SSLBaseFilter$SSLTransportFilterWrapper.handleWrite(SSLBaseFilter.java:1004)
at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
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.filterchain.FilterChainContext.write(FilterChainContext.java:848)
at org.glassfish.grizzly.ssl.SSLBaseFilter.handleWrite(SSLBaseFilter.java:332)
at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
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.filterchain.FilterChainContext.write(FilterChainContext.java:848)
at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:817)
at org.glassfish.grizzly.http.io.OutputBuffer.flushBuffer(OutputBuffer.java:1024)
at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:680)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2477)
at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:2212)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1085)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:568)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
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.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.web.filter.ForceHttpsFilter.doFilter(ForceHttpsFilter.java:51)
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: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:745)
]]

[2015-02-24T18:12:38.666+0100] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=39 _ThreadName=Thread-8] [timeMillis: 1424797958666] [levelValue: 800] [[
2015-02-24 18:12:38,666 ERROR error._jspService:76 - HTTP Status 200 for request '/download/img/prifile.jpg‚ (ip='23.229.97.36' x-forwarded-for='null')]]

[2015-02-24T18:12:38.666+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.core] [tid: _ThreadID=39 _ThreadName=http-listener-2(5)] [timeMillis: 1424797958666] [levelValue: 900] [[
Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:777)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:152)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:195)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:188)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:240)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:185)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:137)
at org.apache.jsp.WEB_002dINF.jsp.error.error_jsp._jspService(error_jsp.java:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:695)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:626)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:500)
at org.apache.catalina.core.StandardHostValve.dispatchToErrorPage(StandardHostValve.java:699)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:309)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:232)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:417)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]

[2015-02-24T18:12:38.667+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=39 _ThreadName=http-listener-2(5)] [timeMillis: 1424797958667] [levelValue: 900] [[
org.apache.catalina.core.StandardHostValve@6d45b284: Exception Processing ErrorPage[errorCode=0, location=/WEB-INF/jsp/error/error.jsp]
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:777)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:152)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:195)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:188)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:240)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:185)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:137)
at org.apache.jsp.WEB_002dINF.jsp.error.error_jsp._jspService(error_jsp.java:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:695)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:626)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:500)
at org.apache.catalina.core.StandardHostValve.dispatchToErrorPage(StandardHostValve.java:699)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:309)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:232)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:417)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]

[2015-02-24T18:49:08.494+0100] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=30 _ThreadName=Thread-8] [timeMillis: 1424800148494] [levelValue: 800] [[
2015-02-24 18:49:08,493 ERROR error._jspService:76 - HTTP Status 404 for request '/WEB-INF/tiles.xml' (ip='202.46.62.153' x-forwarded-for='null')]]

Comment by nabizamani [ 24/Feb/15 ]

I can confirm the assumptions I made above and I can reproduce it now:

1. I assume you have access to a remote glassfish server - NOT ON YOUR OWN MACHINE!
2. Deploy some large file onto that server which you download via browser in the next step - large enough so that you have enough time to disable the network connection (i.e. wifi) on you local machine abruptly
3. Use your browser to download that large file after you have deployed it
4. Once the download has started make sure to a abruptly disable your network connection (on your local machine) before the download finishes - that will simulate a lost network connection...
5. Now check the log files, they will be pretty close to what you can see in my logs

That means:
1. It seems from time to time people accessing our machine simply loose their connection while requesting/downloading some content (that ist not unusual)
2. In GF 4.1 these events are raised/logged as exceptions, it was not like this in GF 3.1.2.2
3. This can cause unwanted behavior, see my explanations in the previous comments. Was there some related change in the Java EE 7 specs???

I don't think that calling the error-page defined in the web.xml is a good decision in case some client has lost network connectivity (caused because the exception is thrown). I am not even sure if it's worth logging it, is it? Others might have different opinions...

Can you reproduce the issue? What do you think?
I think the caller of the Grizzly API should swallow the exceptions, unless there was a change in the Java EE specs...

Comment by oleksiys [ 25/Feb/15 ]

I changed the error message in Grizzly to be more understandable, TimeoutException will be hidden and user will see IOException only with better description.
Otherwise I'll redirect this issue to webcontainer, since it's webcontainer logging the exception and tries to serve the error page.





[GLASSFISH-21311] In the Java EE6,when the version of web2.3 is used,compile JSP pages by the command of jspc exception is happened Created: 23/Feb/15  Updated: 23/Feb/15

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

Type: Bug Priority: Major
Reporter: Cai_Ming Assignee: kchung
Resolution: Unresolved Votes: 0
Labels: PWC6117, web2.3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java EE6


Issuezilla Id: 21,311

 Description   

In my application's JSP page, the taglib directive is used to define tag library,
--------------------------
<%@ taglib uri="abc-taglib" prefix="abc" %>
--------------------------
and the web.xml(2.3) is as following with the element 'taglib':
--------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

<taglib>
<taglib-uri>abc-taglib</taglib-uri>
<taglib-location>/WEB-INF/abcall.tld</taglib-location>
</taglib>

</web-app>
--------------------------

But,In the Java EE6,when I run the command as following:
--------------------------
"jspc -webapp C:\myapp\ContextRoot -v -compile -d C:\myapp\ContextRoot\WEB-INF\classes"
--------------------------
I've got such error message:
--------------------------
"org.apache.jasper.JasperException: file:C:/myapp/ContextRoot/main.jsp(8,41)
PWC6117: File "/abc-taglib" not found".
--------------------------
By the way,In the Java EE5,the exception doesn't happen.

The following is the coding of the org.apache.jasper.compiler.TagLibraryInfoImpl.
--------------------------
public TagLibraryInfoImpl(JspCompilationContext ctxt,
ParserController pc,
String prefix,
String uriIn,
String[] location,▲1
ErrorDispatcher err) throws JasperException {
super(prefix, uriIn);

this.ctxt = ctxt;
this.parserController = pc;
this.pageInfo = pc.getCompiler().getPageInfo();
this.err = err;
InputStream in = null;
JarFile jarFile = null;

if (location == null)

{ // The URI points to the TLD itself or to a JAR file in which the // TLD is stored location = generateTLDLocation(uri, ctxt);▲2 }

try {
if (!location[0].endsWith("jar")) {
// Location points to TLD file
try {
in = getResourceAsStream(location[0]);
if (in == null)

{ throw new FileNotFoundException(location[0]); }

} catch (FileNotFoundException ex)

{ err.jspError("jsp.error.file.not.found", location[0]); ▲3 }

--------------------------
The direct reason is the parameter of the location▲1 is null.
after ▲2,because the resource was not found,exception happened at ▲3.

By the following coding,
the reason why the parameter of the location is null is that the element 'jsp-config' is not found in web.xml(2.3).
--------------------------
org.apache.jasper.servlet.JspCServletContext
private void parseWebDotXml() {

TreeNode jspConfig = web.findChild("jsp-config");   
if (jspConfig == null)

{ return;                      ★1 }

 ...

jspConfigDescriptor =
new JspConfigDescriptorImpl(taglibs, jspPropertyGroups);  
}

org.apache.jasper.runtime.TldScanner
private void processWebDotXml() throws Exception {

JspConfigDescriptor jspConfig = ctxt.getJspConfigDescriptor();   
if (jspConfig == null)

{ return;                             ★2 }

for (TaglibDescriptor taglib: jspConfig.getTaglibs()) {

if (taglib == null)

{ continue; }

String tagUri = taglib.getTaglibURI();      
String tagLoc = taglib.getTaglibLocation();   
...
mappings.put(tagUri, new String[]

{ tagLoc, tagLoc2 }

);      
}
}
--------------------------

as we know,in web 2.3 <taglib> doesn't need to be inside <jsp-config>.
so,web 2.3 is not supported by Java EE6?
or, the phenomenon is a glassfish internal bug?






[GLASSFISH-21310] Broken links in about.html Created: 22/Feb/15  Updated: 22/Feb/15

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

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


 Description   

The file about.html (in glassfish4\glassfish\docs) contains 3 broken links at the bottom:

Your First Cup: An Introduction to the Java EE Platform
should link to https://docs.oracle.com/javaee/7/firstcup/index.html

The Java EE Tutorial
should link to https://docs.oracle.com/javaee/7/tutorial/index.html

Java™ Platform, Enterprise Edition (Java EE) API online documentation (only in SDK bundle)
should have href="../../docs/api/index.html"






[GLASSFISH-21309] pgk list cannot be executed on Ubuntu 14.04 x64 Created: 21/Feb/15  Updated: 21/Feb/15

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

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

Ubuntu 14.04 LTS Server x64, java 1.8.0_31 + JCE Unlimited Strength, GlassFish Server Open Source Edition 4.1 (build 13)


Tags: DoS, glassfish, renegotiation, security, tls

 Description   

"pgk list" cannot be executed on Ubuntu 14.04 x64. Below you cen find the commands I tried. That means, I have no chance to upgrade Glassfish 4.1 with pkg if installed on an Ubuntu 14.04 x64 system. That's very sad, not to say a catastrophe...
As requested by the command line tool I have tried to install ia32-libs, but it is not available in 14.04. I have tried some alternatives found via google, but non of them work:
#sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
#sudo apt-get install lib32stdc++6
#sudo apt-get install libjpeg62:i386

Please update the documentation - it should contain exactly what to do. The pkg command line tool is essential. I believe it is a good idea to have a more platform transparent implementation of pkg.

#######################################

  1. 1. try to run ./pkg list
    #######################################
    me@ubuntu:/home/glassfish/bin$ ./pkg list

The software needed for this command (pkg) is not installed.

When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:

http://wikis.oracle.com/display/updatecenter/UsageMetricsUC2

Once installation is complete you may re-run this command.

Would you like to install this software now (y/n): y

Proxy: Using system proxy settings.
Install image: /home/glassfish
Installing pkg packages.
Downloading 3 packages.
Downloading pkg-toolkit-incorporation (2 files, 71,742 bytes).
File 2/2
Downloading pkg (511 files, 6,237,953 bytes).
File 511/511
Downloading python2.4-minimal (304 files, 6,873,977 bytes).
File 304/304
Executing 936 install actions.
Initialization complete.

Software successfully installed. You may now re-run this command (pkg).
me@ubuntu:/home/glassfish/bin$

#######################################

  1. 2. Ok, let's do what is requested
    #######################################
    me@ubuntu:/home/glassfish/bin$ ./pkg list
    ./pkg: 228: ./pkg: /home/glassfish/pkg/bin/../python2.4-minimal/bin/python: not found
    ---------------------------------------------------------------
    There was an error running

/home/glassfish/pkg/bin/../python2.4-minimal/bin/python

You are running on a 64 bit Linux distribution and the 32 bit Linux
compatibility libraries do not appear to be installed. In order to use
the Update Center tools you must install the 32 bit compatibility libraries.

On Ubuntu (and possibly other Debian based systems) please install the
ia32-libs package. On RedHat 4 (and other RPM based systems), you may
need to add multiple 'compat' runtime library packages. Please see the
Update Center Release Notes for more information
---------------------------------------------------------------
me@ubuntu:/home/glassfish/bin$

#######################################

  1. 3. Ok, let's do again what is requested
    #######################################
    me@ubuntu:/home/glassfish/bin$ sudo apt-get update
    me@ubuntu:/home/glassfish/bin$ sudo apt-get upgrade
    me@ubuntu:/home/glassfish/bin$ sudo apt-get install ia32-libs
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package ia32-libs is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
    lib32z1 lib32ncurses5 lib32bz2-1.0

E: Package 'ia32-libs' has no installation candidate
me@ubuntu:/home/glassfish/bin$






[GLASSFISH-21308] Support for TLS_FALLBACK_SCSV to prevent downgrade attack Created: 21/Feb/15  Updated: 21/Feb/15

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

Type: Improvement Priority: Critical
Reporter: nabizamani Assignee: JeffTancill
Resolution: Unresolved Votes: 0
Labels: TLS, security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 14.04 LTS Server x64, java 1.8.0_31 + JCE Unlimited Strength, GlassFish Server Open Source Edition 4.1 (build 13)


Tags: DoS, glassfish, renegotiation, security, tls

 Description   

see https://community.qualys.com/thread/13896 and especially see
https://datatracker.ietf.org/doc/draft-ietf-tls-downgrade-scsv/






[GLASSFISH-21307] Secure Client-Initiated Renegotiation cannot be disabled: DoS Danger Created: 21/Feb/15  Updated: 22/Feb/15

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

Type: Bug Priority: Critical
Reporter: nabizamani Assignee: JeffTancill
Resolution: Unresolved Votes: 0
Labels: TLS, security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 14.04 LTS Server x64, java 1.8.0_31 + JCE Unlimited Strength, GlassFish Server Open Source Edition 4.1 (build 13)


Tags: DoS, glassfish, renegotiation, security, tls

 Description   

Glassfish 4.1 supports Secure Client-Initiated Renegotiation. However, this opens all doors for DoS attacks, see https://community.qualys.com/blogs/securitylabs/2011/10/31/tls-renegotiation-and-denial-of-service-attacks

As Ivan Ristić found out there was an undocumented ability to disable client-initiated renegotiation in Java 8 (see http://blog.ivanristic.com/2014/03/ssl-tls-improvements-in-java-8.html). However, this seems not to work at all (I guess it has been removed + it is undocumented anyway)! In other words: adding the following to <jdk1.8-HOME>/jre/lib/security/java.security does not help at all (whereas I think OpenJDK has support for this, but I did not crosscheck this):

jdk.tls.rejectClientInitiatedRenegotiation=true
jdk.tls.rejectClientInitiatedRenego=true

I have not found anything that allows to disable Secure Client-Initiated Renegotiation in the Glassfish settings. Since there seems to be no way to
disable it globally via JSSE (<jdk1.8-HOME>/jre/lib/security/java.security) I believe that Glassfish should introduce a way to disable it somehow. I believe this is very critical.



 Comments   
Comment by Anthony Ve [ 22/Feb/15 ]

jdk.tls.rejectClientInitiatedRenegotiation is a system property, so simply adding a JVM Option "-Djdk.tls.rejectClientInitiatedRenegotiation=true" (Configurations -> server-config -> JVM Settings -> JVM Options) should work

Comment by nabizamani [ 22/Feb/15 ]

You are absolutely right, that does the trick. I simply did not recognize that it's a system property (although it is mentioned as such in Ivan's article) because at the same time I was working on jdk.tls.disabledAlgorithms in <jdk1.8-HOME>/jre/lib/security/java.security to disable RC4 (so I just got a little bit confused)...

However, I don't feel very safe using the undocumented system property via JVM options in a production environment because it's just undocumented. Using something undocumented means it could be removed with the next java update and therefore I would need to check if it is still available or not whenever I update my jdk. Therefore I still believe that there should be an explicit Glassfish setting directly in Glassfish. On the other side, everything would be fine if jdk.tls.rejectClientInitiatedRenegotiation would be a documented system property.

Does that sound reasonable? What do you think?

Comment by Anthony Ve [ 22/Feb/15 ]

It actually is documented in the "Compatibility Guide for JDK 8" [1], where it says: "In Oracle's JSSE provider, a new system property, jdk.tls.rejectClientInitializedRenego, is defined to reject client initialized renegotiation in server side. If the system property is set to true, the server side does not accept client initialized renegotiation, and fails with a fatal handshake_failure alert if the receiving client initialized the renegotiation request."

I doubt this property is ever going away. And surely it won't go away in a minor release. So as long as you read the compatibility guides with every major release (which you should do anyway), you're safe.

I don't like the idea of "an explicit GlassFish setting", because of:
1) duplication: it would just duplicate setting the appropriate JVM Option
2) confusion: if the explicit setting is set to false, but the JVM Option is manually set to true, what should happen?

In my opinion, the question is simply: should GlassFish add this option to the default JVM Options, yes or no? And my answer would be "yes".

[1] http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html#A999198

Comment by nabizamani [ 22/Feb/15 ]

You are right again - it is documented. However, it is documented as jdk.tls.rejectClientInitializedRenego and not as jdk.tls.rejectClientInitializedRenegotiation.
I have just tested both system properties and only jdk.tls.rejectClientInitializedRenegotiation seems to work - the one that is not documented! Of course, I should stick with jdk.tls.rejectClientInitializedRenego as this is the one that is documented, but it seems not to work.
Can you somehow verify this? Maybe this is just a documentation error in the Compatibility Guide for JDK 8?

I also agree that duplication is not a good idea and avoiding confusion is also a good idea.
You question is correct: should GlassFish add this option to the default JVM Options, yes or no?
My answer is YES as well.

Comment by Anthony Ve [ 22/Feb/15 ]

It's just an oversight in the compatibility guide: in the guide there's a link to the bug report [1], where you will see another related bug, namely "JDK-8017049 - rename property jdk.tls.rejectClientInitializedRenego" [2]
So I bet it went like this: initially this functionality was implemented with a property named "jdk.tls.rejectClientInitializedRenego" & a note was added to the compatibility guide. Later, the developers realized it was clearer to use "jdk.tls.rejectClientInitiatedRenegotiation", so they renamed the property & changed the implementation, but forgot to have the compatibility guide updated.

[1] http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7188658
[2] http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8017049

Comment by nabizamani [ 22/Feb/15 ]

Thank you Anthony, that clarifies a lot. I guessed something like that...
So let's wait and see if "-Djdk.tls.rejectClientInitiatedRenegotiation=true" will be added as default JVM option to the next release of Glassfish or not.





[GLASSFISH-21306] FileUpload doesn't in webFragment application. Created: 05/Feb/15  Updated: 20/Feb/15

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

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

Mojarra 2.2.9
Java 8
All browsers


Attachments: File FileUploadWar-1.0-SNAPSHOT.war     Zip Archive jsffileuploadissue.zip    

 Description   

The file upload component does not work when web-fragment application(Project1) is put inside web application(Project2). The file is not uploaded and ,there are no javascript or server side exceptions thrown.

The projects structure:
Project1:
\src\main\java\com\torqueits\fileupload\Bean.java
\src\main\resources\META-INF\resources\single.xhtml
\src\main\resources\META-INF\web-fragment.xml

Project2: (has dependency to Project 1)
\src\main\webapp\WEB-INF\web.xml



 Comments   
Comment by MikhailChibel [ 05/Feb/15 ]

I added a test projects to reproduce the issue.
https://bitbucket.org/mchibel/jsffileuploadissue/src

Comment by Manfred Riem [ 05/Feb/15 ]

On which container did you test this?

Comment by MikhailChibel [ 08/Feb/15 ]

Hi.we test it in Glassfish 4.0 build 89 with mojarra 2.2.9

Comment by Manfred Riem [ 11/Feb/15 ]

Can you please send the reproducer (with sources) to issues@javaserverfaces.java.net Thanks!

Comment by MikhailChibel [ 12/Feb/15 ]

The war file and sources sent to the email provided.

Comment by Manfred Riem [ 20/Feb/15 ]

Unfortunately web-fragment processing is a container level concern. Moved it to the Glassfish tracker as it belongs there. Thanks!





[GLASSFISH-21305] Glassfish 4.1 Application Client Java Web Start Compability Issue. Created: 13/Feb/15  Updated: 13/Feb/15

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

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

Windows x64 2008 Server



 Description   

I have created a Java EE "Enterprise Applicaiton Client" from Netbeans 8.02 (with not code changes whatsoever) and deployed it to
GlassFish 4.1 (b13) using java 1.8 u31.

I have replaced the glassfish s1as certificate with a signed one.

If I try and launch the Application Client I get the message "Application Blocked by Java Security", Reason: The Java security settings have prevented this application form running. You may change this behavior in the Java Control Panel. I get the same result from the glassfish control panel or javaws (1.8 u31).

Adding my site to the Exception Site List does not work.

It looks like the problem is between the newer Java Web Start clients and the Glassfish 4.1 auto-generated JNLP file .

If I install a java 1.7 u25 or earler javaws (Java Web Start 10.21.2.11 or earlier). I can start the application client and it will run in
the java 1.8 u31 environment.






[GLASSFISH-21304] Reference Correct Javadoc for Glassfish 4 Created: 12/Feb/15  Updated: 12/Feb/15

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

Type: Bug Priority: Minor
Reporter: jskillin.idt Assignee: sbcaruso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

(The docs@glassfish mailing list asked me to post my issue here instead.)

The Javadoc for Glassfish 4 is not linked in the main documentation page.

Also, the installation guide PDF, under "Related Documentation", claims the Javadoc is at http://glassfish.java.net/nonav/docs/v3/api/. When I opened that URL, I found it was the Javadoc for Glassfish 3. That document, and possibly others, will need to get updated to reference the 4 API.






[GLASSFISH-21303] A class annotated with both WebService and WebServlet causes deployment failure. Created: 09/Feb/15  Updated: 09/Feb/15

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

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


 Description   

A class in a war with the following annotations causes this exception upon deployment.
Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: http://localhost:8080/RequestContext/translator?wsdl

If I make the class extend HttpServlet I get a different exception:

Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Premature end of file.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:601)

Here is the class:

@WebServlet(loadOnStartup = 1, name = "Translator", urlPatterns = "/translator")
@WebService(endpointInterface = "org.jboss.cdi.tck.tests.context.request.ws.Translator", serviceName = "Translator")
public class TranslatorEndpoint implements Translator {}

I will attach a sample war shortly.






[GLASSFISH-21302] Wrong context path with webservice stateless Created: 09/Feb/15  Updated: 09/Feb/15

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

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


 Description   

When I have a webservice stateless it isn't available in the application context.

e.g.

@WebService @Stateless //It will be available in http://localhost:8080/StatelessWebServiceService. Not with the application context
public class StatelessWebService {
public boolean executeTest()

{ return true;}

}

Without @Stateless it works right (http://localhost:8080/as-test-suite/StatelessWebServiceService)
@WebService
public class StatelessWebService

{ ... }




[GLASSFISH-21301] Glassfish deployment Problem Created: 09/Feb/15  Updated: 11/Feb/15  Resolved: 11/Feb/15

Status: Closed
Project: glassfish
Component/s: cdi, jsf
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ceyhun Assignee: Manfred Riem
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

hi there, I was worked on simple JSF dynamic web project.There is no problem while running on Glassfish server. When I ran it ,
following error returned to me. But when i create same project on Netbeans , its working. I don't think there is a problem in the code side.

Error = http://i.hizliresim.com/DlR7v6.png



 Comments   
Comment by Manfred Riem [ 11/Feb/15 ]

What version of JSF are you using?

Comment by ceyhun [ 11/Feb/15 ]

I used 2.2

Comment by Manfred Riem [ 11/Feb/15 ]

You sure as the com.sun.faces.cdi.ViewProducer does not exist in 2.2?

Comment by ceyhun [ 11/Feb/15 ]

I solved this. This is not about CDI. When I use JSF which use jsf zip file(User library downloaded link= https://maven.java.net/content/repositories/releases/org/glassfish/javax.faces/2.3.0-m01/ ), glassfish has error like image which i shared. But after that i used JSF glassfish system library, well done.
Thank you for your interest Manfred.

Comment by Manfred Riem [ 11/Feb/15 ]

Closing this one as Invalid as it was pulling in an incorrect version of JSF

Comment by ceyhun [ 11/Feb/15 ]

Its not working on 2.2 too. Only work for glassfish system library.
Link = https://maven.java.net/content/repositories/releases/org/glassfish/javax.faces/2.2.8/javax.faces-2.2.8.jar





[GLASSFISH-21300] TransactionRequiredException in Servlet Created: 06/Feb/15  Updated: 06/Feb/15

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

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

OS X 10.10.3



 Description   

I have a simple HttpServlet using EntityManager.find in its doGet method and EntityManager.persist in its doPost method. The EntityManager is injected using @PersistenceContext. The class has the @javax.transaction.Transactional annotation. This class worked fine on 4.0 but no longer works on 4.1. A TransactionRequiredException is thrown when I try to persist an entity.






[GLASSFISH-21299] GlassFish looses connection pool Created: 05/Feb/15  Updated: 05/Feb/15

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

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


 Description   

Our app is talking to a PostgreSQL database via JPA layer, and when under load it intermittently looses the connection pool entirely.

Our production setup is running with GlassFish 4.0 b89 (we are unable to move or test on 4.1 due to GlassFish-21114).

We have tested with postgresql drivers 9.3-1102.jdbc41 and 9.4-1200.jdbc41, and we have tried substituting baked in eclipselink version for 2.5.2.v20140319, all to no avail.

Any suggestions as to what could be the cause of this?

Stacktrace:

[2015-02-05T15:15:45.649+0100] [glassfish 4.0] [INFO] [] [dk.dbc.dataio.commons.utils.service.AbstractMessageConsumerBean] [tid: _ThreadID=92 _ThreadName=p: thread-pool-1; w: 5] [timeMillis: 1423145745649] [levelValue: 800] [[
Validating message<ID:1073-127.0.1.1(b3:7d:c0:af:d7:e0)-1-1423145745644> with deliveryCount=1]]

[2015-02-05T15:15:45.651+0100] [glassfish 4.0] [INFO] [] [dk.dbc.dataio.sink.utils.messageproducer.JobProcessorMessageProducerBean] [tid: _ThreadID=92 _ThreadName=p: thread-pool-1; w: 5] [timeMillis: 1423145745651] [levelValue: 800] [[
Sending delivered Chunk 215 for job 1]]

[2015-02-05T15:15:45.758+0100] [glassfish 4.0] [INFO] [] [dk.dbc.dataio.commons.utils.service.AbstractMessageConsumerBean] [tid: _ThreadID=163 _ThreadName=p: thread-pool-1; w: 7] [timeMillis: 1423145745758] [levelValue: 800] [[
Validating message<ID:1078-127.0.1.1(b3:7d:c0:af:d7:e0)-1-1423145745751> with deliveryCount=1]]

[2015-02-05T15:15:45.760+0100] [glassfish 4.0] [INFO] [] [dk.dbc.dataio.sink.utils.messageproducer.JobProcessorMessageProducerBean] [tid: _ThreadID=163 _ThreadName=p: thread-pool-1; w: 7] [timeMillis: 1423145745760] [levelValue: 800] [[
Sending delivered Chunk 216 for job 1]]

[2015-02-05T15:15:45.786+0100] [glassfish 4.0] [WARNING] [jdbc.pool_not_reachable] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=22 _ThreadName=http-listener-1(3)] [timeMillis: 1423145745786] [levelValue: 900] [[
RAR7010: Pool not reachable. ]]

[2015-02-05T15:15:45.787+0100] [glassfish 4.0] [WARNING] [] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=22 _ThreadName=http-listener-1(3)] [timeMillis: 1423145745787] [levelValue: 900] [[
jdbc.exc_get_conn]]

[2015-02-05T15:15:45.795+0100] [glassfish 4.0] [WARNING] [] [org.eclipse.persistence.session.file:/home/jbn/dev/repos/dataio/integration-test/glassfish/home/glassfish4/glassfish/domains/domain1/applications/new-job-store-service/WEB-INF/lib/dataio-new-job-store-service-ejb-1.0-SNAPSHOT.jar_jobstorePU] [tid: _ThreadID=22 _ThreadName=http-listener-1(3)] [timeMillis: 1423145745795] [levelValue: 900] [[

Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
Error Code: 0
Call: UPDATE job SET PARTNUMBER = ? WHERE (ID = ?)
bind => [2 parameters bound]
Query: UpdateObjectQuery(dk.dbc.dataio.jobstore.service.entity.JobEntity@6393c78b)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1619)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1995)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:296)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateObject(DatasourceCallQueryMechanism.java:797)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:435)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1057)
at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:300)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2894)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1730)
at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:267)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:130)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4200)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1439)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1529)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:3166)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:352)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:158)
at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:452)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:854)
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:4475)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy262.addChunkProcessed(Unknown Source)
at dk.dbc.dataio.jobstore.service.ejb._EJB31_GeneratedJobsBeanIntf__Bean_.addChunkProcessed(Unknown Source)
at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
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:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:323)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)
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:357)
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)
Caused by: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1625)
at com.sun.enterprise.connectors.ConnectorRuntime.getConnection(ConnectorRuntime.java:639)
at org.glassfish.jdbcruntime.service.JdbcDataSource.getConnection(JdbcDataSource.java:86)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
... 96 more
Caused by: javax.resource.ResourceException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:661)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1617)
... 99 more
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1093)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:989)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:654)
... 100 more
Caused by: javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/jdbc/dataio/jobstore/pool' 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.NameNotFoundException: pool 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:238)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:876)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1009)
... 102 more
Caused by: javax.naming.NameNotFoundException: pool 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.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
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)
... 108 more
]]

[2015-02-05T15:15:45.803+0100] [glassfish 4.0] [WARNING] [enterprise_distributedtx.before_completion_excep] [javax.enterprise.resource.jta.com.sun.enterprise.transaction] [tid: _ThreadID=22 _ThreadName=http-listener-1(3)] [timeMillis: 1423145745803] [levelValue: 900] [[
DTX5014: Caught exception in beforeCompletion() callback:
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
Error Code: 0
Call: UPDATE job SET PARTNUMBER = ? WHERE (ID = ?)
bind => [2 parameters bound]
Query: UpdateObjectQuery(dk.dbc.dataio.jobstore.service.entity.JobEntity@6393c78b)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl$1.handleException(EntityManagerSetupImpl.java:692)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.handleException(AbstractSynchronizationListener.java:275)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:170)
at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:452)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:854)
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:4475)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy262.addChunkProcessed(Unknown Source)
at dk.dbc.dataio.jobstore.service.ejb._EJB31_GeneratedJobsBeanIntf__Bean_.addChunkProcessed(Unknown Source)
at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
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:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:323)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)
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:357)
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)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
Error Code: 0
Call: UPDATE job SET PARTNUMBER = ? WHERE (ID = ?)
bind => [2 parameters bound]
Query: UpdateObjectQuery(dk.dbc.dataio.jobstore.service.entity.JobEntity@6393c78b)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1619)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1995)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:296)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateObject(DatasourceCallQueryMechanism.java:797)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:435)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1057)
at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:300)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2894)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1730)
at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:267)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:130)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4200)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1439)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1529)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:3166)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:352)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:158)
... 62 more
Caused by: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1625)
at com.sun.enterprise.connectors.ConnectorRuntime.getConnection(ConnectorRuntime.java:639)
at org.glassfish.jdbcruntime.service.JdbcDataSource.getConnection(JdbcDataSource.java:86)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
... 96 more
Caused by: javax.resource.ResourceException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:661)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1617)
... 99 more
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1093)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:989)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:654)
... 100 more
Caused by: javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/jdbc/dataio/jobstore/pool' 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.NameNotFoundException: pool 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:238)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:876)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1009)
... 102 more
Caused by: javax.naming.NameNotFoundException: pool 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.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
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)
... 108 more
]]

[2015-02-05T15:15:45.808+0100] [glassfish 4.0] [WARNING] [ejb.system_exception] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=22 _ThreadName=http-listener-1(3)] [timeMillis: 1423145745808] [levelValue: 900] [[
EJB5184:A system exception occurred during an invocation on EJB JobsBean, method: public javax.ws.rs.core.Response dk.dbc.dataio.jobstore.service.ejb.JobsBean.addChunkProcessed(javax.ws.rs.core.UriInfo,java.lang.String,long,long) throws dk.dbc.dataio.jsonb.JSONBException,dk.dbc.dataio.jobstore.types.JobStoreException]]

[2015-02-05T15:15:45.808+0100] [glassfish 4.0] [WARNING] [] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=22 _ThreadName=http-listener-1(3)] [timeMillis: 1423145745808] [levelValue: 900] [[

javax.ejb.EJBException: Transaction aborted
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:725)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4475)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy262.addChunkProcessed(Unknown Source)
at dk.dbc.dataio.jobstore.service.ejb._EJB31_GeneratedJobsBeanIntf__Bean_.addChunkProcessed(Unknown Source)
at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
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:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:323)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)
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:357)
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)
Caused by: javax.transaction.RollbackException: Transaction marked for rollback.
at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:490)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:854)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:719)
... 58 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
Error Code: 0
Call: UPDATE job SET PARTNUMBER = ? WHERE (ID = ?)
bind => [2 parameters bound]
Query: UpdateObjectQuery(dk.dbc.dataio.jobstore.service.entity.JobEntity@6393c78b)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl$1.handleException(EntityManagerSetupImpl.java:692)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.handleException(AbstractSynchronizationListener.java:275)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:170)
at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:452)
... 60 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
Error Code: 0
Call: UPDATE job SET PARTNUMBER = ? WHERE (ID = ?)
bind => [2 parameters bound]
Query: UpdateObjectQuery(dk.dbc.dataio.jobstore.service.entity.JobEntity@6393c78b)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1619)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1995)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:296)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateObject(DatasourceCallQueryMechanism.java:797)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:435)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1057)
at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:300)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2894)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1730)
at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:267)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:130)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4200)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1439)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1529)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:3166)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:352)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:158)
... 62 more
Caused by: java.sql.SQLException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1625)
at com.sun.enterprise.connectors.ConnectorRuntime.getConnection(ConnectorRuntime.java:639)
at org.glassfish.jdbcruntime.service.JdbcDataSource.getConnection(JdbcDataSource.java:86)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
... 96 more
Caused by: javax.resource.ResourceException: This pool is not registered with the runtime environment : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:661)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1617)
... 99 more
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jdbc/dataio/jobstore/pool
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1093)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:989)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:654)
... 100 more
Caused by: javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/jdbc/dataio/jobstore/pool' 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.NameNotFoundException: pool 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:238)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:876)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1009)
... 102 more
Caused by: javax.naming.NameNotFoundException: pool 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.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
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)
... 108 more
]]

[2015-02-05T15:15:45.815+0100] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=22 _ThreadName=http-listener-1(3)] [timeMillis: 1423145745815] [levelValue: 900] [[
StandardWrapperValve[dk.dbc.dataio.jobstore.service.rs.JobStoreApplication]: Servlet.service() for servlet dk.dbc.dataio.jobstore.service.rs.JobStoreApplication threw exception
javax.naming.NameNotFoundException: pool 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.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
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)
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:238)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:876)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1009)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:989)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:654)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1617)
at com.sun.enterprise.connectors.ConnectorRuntime.getConnection(ConnectorRuntime.java:639)
at org.glassfish.jdbcruntime.service.JdbcDataSource.getConnection(JdbcDataSource.java:86)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1619)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1995)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:296)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateObject(DatasourceCallQueryMechanism.java:797)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:435)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1057)
at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:300)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2894)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1730)
at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:267)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:130)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4200)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1439)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1529)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:3166)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:352)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:158)
at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:452)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:854)
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:4475)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy262.addChunkProcessed(Unknown Source)
at dk.dbc.dataio.jobstore.service.ejb._EJB31_GeneratedJobsBeanIntf__Bean_.addChunkProcessed(Unknown Source)
at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
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:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:323)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)
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:357)
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)
]]






[GLASSFISH-21298] JAVA EE 7 weird behaviour with JAVA 8 features Created: 04/Feb/15  Updated: 25/Feb/15

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

Type: Bug Priority: Major
Reporter: casmeiron Assignee: jjsnyder83
Resolution: Unresolved Votes: 0
Labels: ejb, java1.8, jax-rs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MAC OSX YOSEMITE
JAVA 1.8
GLASSFISH V4.1



 Description   

We’re tryin’ few java 8 features with JAVA EE 7 using glassfish v4.1.

JAX-RS is not able to work with @Path annotation when used in a method implementation inside an interface.
Example:

public interface Controller {

@GET
default Response ok() {// it works
	return Response.ok.build();
}

@GET
@Path(“error”)
default Response error() { // doesn’t work
   return Response.ok.build();
}
@Produces({APPLICATION_JSON})
@Consumes({APPLICATION_JSON})
@LocalBean
@Stateless
public class ControllerImplementation implements Controller {

}

When you try to run with the second method uncommented, JAX-RS throws exception when it tries to initialize the REST stack. Weird ‘cause @GET/@POST works, only @Path gives error.

Another weird situation happens when you try to annotate your interface methods with @TransactionAttribute annotation. EJB is unable to check that info and open a transaction, thus giving an error (TransactionRequired).

To fix that, you have to override the method in your implementation class and call the super, and then the transaction gets opened.

Example:

public interface Controller {

@POST
@TransactionAttribute(TransactionAttributeType.MANDATORY)
default Response create(JsonObject obj)

{ return Response.ok.build(); }

@Produces(

{APPLICATION_JSON})
@Consumes({APPLICATION_JSON}

)
public class ControllerImplementation implements Controller {
// you must override to make the transaction available, otherwise it will fail!
@Override
@POST
public Response create(JsonObject obj)

{ super.create(obj); }

}

So it seems we cannot use all features that java 8 brings without having headache with JAVA EE 7. Does anybody knows why this happens?



 Comments   
Comment by casmeiron [ 04/Feb/15 ]

public interface Controller {

@GET
// it works
default Response ok()

{ return Response.ok.build(); }

@GET
@Path(“error”)
// it doesnt work
default Response error()

{ return Response.ok.build(); }

@Produces(

{APPLICATION_JSON})
@Consumes({APPLICATION_JSON}

)
@LocalBean
@Stateless
public class ControllerImplementation implements Controller {

}

Comment by Michal Gajdos [ 12/Feb/15 ]

Have you tried to deploy just JAX-RS resources with default methods in your interface (without any EJB integration)? I assume that ControllerImplementation also has @Path annotation, am I right?

Comment by casmeiron [ 12/Feb/15 ]

I didn't try without the ejb annotations.
ControllerImplementation has to have @Path to make it work and interface must not.
I've deployed in WILDFLY 8.2 and it worked as it should so I think there must be a bug in glassfish implementation.

Comment by Adam Lindenthal [ 25/Feb/15 ]

Hi, I tried this as well with latest Jersey on Grizzly (without @LocalBean and @Stateless annotations) and on latest Glassfish (with annotations) and also confirm this is fully functional. The resources can be freely divided into interface and implementing class and everything works as I would expect. There's the missing @Path on the implementing class, as you stated. Also note (nothing new again, I guess), that the interface must not be registered in the ResourceConfig / javax.ws.rs.core.Application subclass, as Jersey tries to instantiate such classes.

Haven't try the TransactionAttribute part of the issue, but as for the JAX-RS part - it just work for me out of the box.
I will attach my sample app (based on the sources from this issue). Build it with mvn clean package (alternatively, change Jersey version to non-snapshot version if maven fails to resolve the dependencies). Than try to deploy the war from target directory to GF and access:

  • [app-root]/test - resource method from interface with no @Path
  • [app-root/test/path - resource method from interface with @Path
  • [app-root]/test/class - resource method from the implementing class

Does this work on your GF instance?

Regards,
Adam





[GLASSFISH-21297] asadmin set command throws NPE on beans with read only properties Created: 04/Feb/15  Updated: 10/Mar/15

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

Type: Bug Priority: Major
Reporter: lgathy Assignee: mukesh.kumawat
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When setting some configurable attribute via asadmin set command, the operation fails with "remote failure: Cannot change the element: null".
To reproduce, execute:
asadmin set configs.config.default-config.java-config.jvm-options=-server



 Comments   
Comment by lgathy [ 04/Feb/15 ]

I have isolated the root cause of this and prepared a small patch that worked for me. I do not seem to have right to attach the patch here, but I can send it via email (or copy-paste it into a comment here).

Short description on the problem: in nucleus/core/kernel module com.sun.enterprise.v3.admin.SetCommand.setLeafElement iterates through all the methods of the parent bean to find the appropriate setter method. In line 539 the expression bean.model.toProperty(m) could return null, thus the method will raise a NPE. If the appropriate setter method is located after such a method in the returned array of methods then the attribute could never be set. In case of configs.config.default-config.java-config.jvm-options the parent class is com.sun.enterprise.config.serverbeans.JavaConfig, it throws an exception when reaching the getJavacOptionsAsList() method making e.g. jvmOptions property impossible to set.

Proposed solution is to check if bean.model.toProperty(m) returns null and continue to the next method.

Comment by lgathy [ 06/Feb/15 ]

Here is my patch:

Index: nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/SetCommand.java
===================================================================
--- nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/SetCommand.java	(revision 63760)
+++ nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/SetCommand.java	(working copy)
@@ -536,7 +536,9 @@
                     // collection parameter that parameterized with the right type
                     Class argClasses[] = m.getParameterTypes();
                     Type argTypes[] = m.getGenericParameterTypes();
-                    if (!bean.model.toProperty(m).xmlName().equals(elementName) ||
+                    ConfigModel.Property prop = bean.model.toProperty(m);
+                    if (prop == null ||
+                            !prop.xmlName().equals(elementName) ||
                             argClasses.length != 1 ||
                             !Collection.class.isAssignableFrom(argClasses[0]) ||
                             argTypes.length != 1 ||




[GLASSFISH-21296] the value of create in MDB is worng Created: 04/Feb/15  Updated: 18/Mar/15

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

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

linux



 Description   

The method of MessageDrivenBeanStatsProvider'getCreateCount override the method of EjbMonitoringStatsProvider'getCreateCount,
but ManagedAttribute id of MessageDrivenBeanStatsProvider'getCreateCount is messagecount,
and return value of MessageDrivenBeanStatsProvider'getCreateCount is messageCount,
So I think the method name of MessageDrivenBeanStatsProvider is wrong.

org.glassfish.ejb.mdb.monitoring.stats.MessageDrivenBeanStatsProvider is as follows.

    @ManagedAttribute(id="messagecount")
    @Description( "Number of messages received for a message-driven bean")
    public CountStatistic getCreateCount() {
        return messageCount.getStatistic();
    }

com.sun.ejb.monitoring.stats.EjbMonitoringStatsProvider is as follows.

    @ManagedAttribute(id="createcount")
    @Description( "Number of times EJB create method is called")
    public CountStatistic getCreateCount() {
        return createStat.getStatistic();
    }


 Comments   
Comment by lzg5039 [ 04/Feb/15 ]

Modify the method name.The modified code is as follows.

The following source in the org.glassfish.ejb.mdb.monitoring.stats.MessageDrivenBeanStatsProvider

    @ManagedAttribute(id="messagecount")
    @Description( "Number of messages received for a message-driven bean")
    public CountStatistic getMessageCount() {
        return messageCount.getStatistic();
    }
Comment by zhouronghui [ 09/Feb/15 ]

Would you please give the operations and the error message?
By the way, the Title has a miss. "worng" should be "wrong".

Comment by lzg5039 [ 11/Mar/15 ]

Hi zhou

The following steps are excuted,the bug would happen
1.start imqbrokerd.
2.create jms resource.
3.write MDB APP(bussiness method print "Hello world" in server.log).
4.deploy MDB(receive jms message)
5.a client send a jms message,after MDB processed this message("Hello world" has been printed in server.log),the client send another jms message.

bug happens:
Because after MDB processed first message, the MDB receive second message, the MDB use the same instance to process first and second message.So the value of message-driven-bean-mon'createcount should be 1.But at this time use jconsole to see the value of message-driven-bean-mon'createcount which is 2.





[GLASSFISH-21295] Some EE7 APIs missing during JSP compilation Created: 03/Feb/15  Updated: 27/Mar/15

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

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

Glassfish 4.1 full zip, RHEL 7.0, Oracle 1.7.0_71 JDK


Tags: glassfish, jsp

 Description   

I have a web application (single war) which includes a few JSPs. This web app worked fine under Glassfish 3.1.2.x and GF would compile the JSPs just fine.

When Glassfish 4.1 attempts to compile these same JSPs I get a bunch of errors because it can't locate javax.jax-rs API classes. This never happened in Glassfish 3.1.2.x. It appears that the contents of the default-web.xml have changed related to how the JSP servlet is configured. Specifically the APIs listed in the system-jar-includes no longer included javax.jaxrs as they once did. Instead it now includes jersey-mvc-jsp.jar. This seems like a regression.






[GLASSFISH-21294] JPA Memory Leak caused by improper getDeligate for non transactional Entity Manager Created: 29/Jan/15  Updated: 29/Jan/15

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

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


 Description   

If you have an EJB that is using @TransactionAttribute TransactionAttributeType.NOT_SUPPORTED any calls into EntityManager.getDeligate() return detached EM, which leaks memory, and also doesn't have the proper transaction scope.

I am using OpenJPA 2.3.x and here is my code:

@Stateless
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)

//EJB Injected EM
@PersistenceContext(name="XXX", unitName="XXX")
private EntityManager emNoTran;

// code in my method...
OpenJPAEntityManager kem = OpenJPAPersistence.cast(emNoTran);
kem.getFetchPlan().addFetchGroup("contactDetails");
Contact c = kem.find(Contact.class, new Integer(contactId));

What I find is that the EM returned from OpenJPAPersistence.cast(emNoTran) is returning a completly new EM, detached from the CMP and therefore is able to leak memory. In addition the type of the em is not NON Transactional, as I am able to get lazy fields from the entity after the em.find is called, which doesn't match the behavior of the original EM.






[GLASSFISH-21293] DAS becomes deadlock at start-up after setting log level Created: 22/Jan/15  Updated: 22/Jan/15

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

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

OS: Windows 8.1 64bits
RI: glassfish-4.1
JDK: 7u25, 8u20



 Description   

Follow the steps below, asadmin command waits for a response forever.

(1)asadmin create-domain --nopassword=true mydomain
(2)asadmin start-domain mydomain
(3)asadmin set-log-levels org.jvnet.hk2.osgiadapter=FINER
(4)asadmin stop-domain mydomain
(5)asadmin start-domain mydomain

Here is a thread dump for this.
It looks like a deadlock happened on these threads.
"RunLevelControllerThread-1421897830803" daemon prio=6 tid=0x000000000ba99800
"RunLevelControllerThread-1421897830796" daemon prio=6 tid=0x000000000b99f000

2015-01-22 12:44:33
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.76-b04 mixed mode):

"pool-1-thread-1" daemon prio=6 tid=0x000000000bb1b800 nid=0x3fe4 waiting on condition [0x000000000d98f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x00000000f7fd57f0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1090)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

"RunLevelControllerThread-1421897830803" daemon prio=6 tid=0x000000000ba99800 nid=0x2c20 in Object.wait() [0x000000000e0de000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f7879d08> (a org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext)
    at java.lang.Object.wait(Object.java:503)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:188)
  • locked <0x00000000f7879d08> (a org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
  • locked <0x00000000f86b5398> (a java.lang.Object)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:647)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:237)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
  • locked <0x00000000f7d55060> (a java.lang.Object)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
    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)

"RunLevelControllerThread-1421897830796" daemon prio=6 tid=0x000000000b99f000 nid=0x2398 waiting on condition [0x000000000dd5c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x00000000f85fbde8> (a java.util.concurrent.FutureTask)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:425)
    at java.util.concurrent.FutureTask.get(FutureTask.java:187)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.get(LRUHybridCache.java:164)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:303)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetDescriptor(ServiceLocatorImpl.java:1147)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:687)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at com.sun.enterprise.server.logging.UniformLogFormatter.getProductId(UniformLogFormatter.java:192)
    at com.sun.enterprise.server.logging.UniformLogFormatter.uniformLogFormat(UniformLogFormatter.java:291)
    at com.sun.enterprise.server.logging.UniformLogFormatter.format(UniformLogFormatter.java:178)
    at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
  • locked <0x00000000f85b3260> (a java.util.logging.ConsoleHandler)
    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
    at java.util.logging.Logger.log(Logger.java:616)
    at java.util.logging.Logger.doLog(Logger.java:641)
    at java.util.logging.Logger.logp(Logger.java:810)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:181)
  • locked <0x00000000e1045178> (a org.jvnet.hk2.osgiadapter.OSGiModuleImpl)
    at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:77)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2058)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:413)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.narrow(ServiceLocatorImpl.java:2120)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.access$900(ServiceLocatorImpl.java:119)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$8.compute(ServiceLocatorImpl.java:1063)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$8.compute(ServiceLocatorImpl.java:1058)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:115)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:111)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.run(LRUHybridCache.java:173)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:292)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetDescriptor(ServiceLocatorImpl.java:1147)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:687)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at com.sun.enterprise.server.logging.UniformLogFormatter.getProductId(UniformLogFormatter.java:192)
    at com.sun.enterprise.server.logging.UniformLogFormatter.uniformLogFormat(UniformLogFormatter.java:291)
    at com.sun.enterprise.server.logging.UniformLogFormatter.format(UniformLogFormatter.java:178)
    at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
  • locked <0x00000000f85b3260> (a java.util.logging.ConsoleHandler)
    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
    at java.util.logging.Logger.log(Logger.java:616)
    at java.util.logging.Logger.doLog(Logger.java:641)
    at java.util.logging.Logger.logp(Logger.java:810)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:181)
  • locked <0x00000000e103b210> (a org.jvnet.hk2.osgiadapter.OSGiModuleImpl)
    at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:77)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2058)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:413)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.narrow(ServiceLocatorImpl.java:2120)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.access$900(ServiceLocatorImpl.java:119)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$10.compute(ServiceLocatorImpl.java:1260)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$10.compute(ServiceLocatorImpl.java:1255)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:115)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:111)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.run(LRUHybridCache.java:173)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:292)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetAllServiceHandles(ServiceLocatorImpl.java:1333)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:726)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:714)
    at com.sun.enterprise.server.logging.LogManagerService.getHandlerServices(LogManagerService.java:639)
    at com.sun.enterprise.server.logging.LogManagerService.postConstruct(LogManagerService.java:404)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
  • locked <0x00000000f7d54fd8> (a java.lang.Object)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
    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)

"Timer-0" daemon prio=6 tid=0x0000000009eec000 nid=0x2b70 in Object.wait() [0x000000000dabf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f786d2a0> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:503)
    at java.util.TimerThread.mainLoop(Timer.java:526)
  • locked <0x00000000f786d2a0> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:505)

"FelixStartLevel" daemon prio=6 tid=0x000000000a011800 nid=0x1b28 in Object.wait() [0x000000000a3ae000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f9be27a8> (a java.util.ArrayList)
    at java.lang.Object.wait(Object.java:503)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:279)
  • locked <0x00000000f9be27a8> (a java.util.ArrayList)
    at java.lang.Thread.run(Thread.java:745)

"FelixDispatchQueue" daemon prio=6 tid=0x000000000906f000 nid=0xfc0 in Object.wait() [0x000000000923e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f9c16020> (a java.util.ArrayList)
    at java.lang.Object.wait(Object.java:503)
    at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1063)
  • locked <0x00000000f9c16020> (a java.util.ArrayList)
    at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
    at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:101)
    at java.lang.Thread.run(Thread.java:745)

"Service Thread" daemon prio=6 tid=0x0000000008d77000 nid=0x136c runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=10 tid=0x0000000008d5b000 nid=0x17b0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=10 tid=0x0000000008d5a000 nid=0x382c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Attach Listener" daemon prio=10 tid=0x00000000076ed000 nid=0x439c runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x00000000076e4800 nid=0x3f50 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x000000000767f000 nid=0x13ec in Object.wait() [0x0000000008b6f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000e09c93b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
  • locked <0x00000000e09c93b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" daemon prio=10 tid=0x0000000007678000 nid=0x4014 in Object.wait() [0x000000000899f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000e09b4e98> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:503)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
  • locked <0x00000000e09b4e98> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x00000000020fe800 nid=0x2304 in Object.wait() [0x000000000261e000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f7cad488> (a java.lang.Object)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.waitForResult(CurrentTaskFuture.java:485)
  • locked <0x00000000f7cad488> (a java.lang.Object)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.get(CurrentTaskFuture.java:334)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.get(CurrentTaskFuture.java:306)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFutureWrapper.get(CurrentTaskFutureWrapper.java:75)
    at org.glassfish.hk2.runlevel.internal.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:73)
    at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:534)
    at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:315)
    at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:228)
    at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:219)
  • locked <0x00000000f7c3c538> (a com.sun.enterprise.v3.server.AppServerStartup)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
  • locked <0x00000000f7c486a0> (a com.sun.enterprise.glassfish.bootstrap.GlassFishImpl)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)

"VM Thread" prio=10 tid=0x0000000007674800 nid=0x4098 runnable

"GC task thread#0 (ParallelGC)" prio=6 tid=0x0000000002114000 nid=0x4080 runnable

"GC task thread#1 (ParallelGC)" prio=6 tid=0x0000000002115800 nid=0x2588 runnable

"GC task thread#2 (ParallelGC)" prio=6 tid=0x0000000002117000 nid=0x1568 runnable

"GC task thread#3 (ParallelGC)" prio=6 tid=0x0000000002118800 nid=0x3ad4 runnable

"VM Periodic Task Thread" prio=10 tid=0x0000000008d6c000 nid=0xddc waiting on condition

JNI global references: 370






[GLASSFISH-21292] If messages are put in DMQ and Glassfish is restarted, the messages get consumed twice Created: 21/Jan/15  Updated: 21/Jan/15

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

Type: Bug Priority: Minor
Reporter: FionaS Assignee: David Zhao
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

linux



 Description   

I had this problem with Glassfish 4, which was using

Message Queue 5.0 Oracle Version: 5.0 (Build 14-e) Compile: April 12 2013 0104

I had a really simple experimental application, similar to the app from https://weblogs.java.net/blog/felipegaucho/archive/2009/09/24/handling-poison-messages-glassfish.

The onMessage() called a SLB method which had a TransactionAttributeType.REQUIRES_NEW. ( and did some simple JPA stuff)

If the messages temporarily could not be consumed, they were put in the DMQ.
If I stopped/started Glassfish, they were read from the DMQ and
processed TWICE. I ended up with twice the JPA entries I should have!

Anyway, I found someone who had the same problem in Stackoverflow
with GF 3.1.2
http://stackoverflow.com/questions/16716087/strange-behavior-of-jms-queue-in-glassfish-3-1-2






[GLASSFISH-21291] Ampersand in path causes appclient to fail to launch on Windows Created: 21/Jan/15  Updated: 21/Jan/15  Resolved: 21/Jan/15

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

Type: Bug Priority: Major
Reporter: WedgeJarrad Assignee: Joe Di Pol
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: appclient

 Description   

I run an application using the appclient. It is launched using a bat script with a line like the following:

appclient/glassfish/bin/appclient -Djavax.net.ssl.keyStore=appclient/glassfish/domains/domain1/config/keystore.jks -Djavax.net.ssl.trustStore=appclient/glassfish/domains/domain1/config/cacerts.jks -client myapp.jar

This works fine however if the path includes an & then it fails to launch the application. For example, if my application is located at C:\stuffandthings\myapp\ then it will work. The same app located at C:\stuff&things\myapp\ will fail. Logging from running from that location looks like this:

'things\myapp\appclient\glassfish\bin\..' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
Error: Could not find or load main class org.glassfish.appclient.client.CLIBootstrap

I suspect that this has something to do with how appclient.bat handles the variables containing the path. If I edit appclient.bat to set @echo on then some more detailed logging is produced. Here is a snippet of it:

C:\stuff&things\myapp>setlocal

C:\stuff&things\myapp>goto :main 

C:\stuff&things\myapp>set _AS_INSTALL=C:\stuff  & things\myapp\appclient\glassfish\bin\..
'things\myapp\appclient\glassfish\bin\..' is not recognized as an internal or external command,
operable program or batch file.

C:\stuff&things\myapp>call "C:\stuff\config\asenv.bat" 
The system cannot find the path specified.

As you can see the path is getting broken up around the &. I've tried tinkering with appclient.bat doing better quoting and playing around with delayed expansion to try to fix it. I was able to get it to go further but I'm an absolute novice at batch scripting so I haven't had any success in fixing it.



 Comments   
Comment by Tim Quinn [ 21/Jan/15 ]

Windows treats an ampersand as a way to separate multiple commands entered on the same line, whether inside a script or not. (I do not know this for sure, but it would not surprise me if Windows uses "Documents and Settings" instead of "Documents & Settings" to avoid such problems.)

Have you tried escaping the ampersand when you enter the command?

For example, if you enter

echo hello & there

you get

hello
'there' is not recognized as an internal or external command,
operable program or batch file.

as you found with the appclient script.

But, if you enter

echo hello ^& there

you get

hello & there

I do not currently have access to a Windows environment with GlassFish installed to see if escaping the ampersand works when using the appclient command; there is another level of token processing that Windows will do when preparing the command line arguments to pass to Java.

If that does not work then I'm not sure there is much GlassFish will be able to do to help with this.

There is the workaround of using a path that does not include an ampersand.

Comment by WedgeJarrad [ 21/Jan/15 ]

The situation is more like this:

C:\>set foo=hello ^& there

C:\>echo %foo%
hello
'there' is not recognized as an internal or external command,
operable program or batch file.

The situation can be improved with better quoting:

C:\>set foo="hello & there"

C:\>echo %foo%
"hello & there"

But now the hello & there is surrounded by quotes in the output which isn't really what we want. Instead we can quote like this and use delayed expansion to make it work correctly:

C:\>setlocal enableDelayedExpansion

C:\>set "foo=hello & there"

C:\>echo !foo!
hello & there

The problem is that appclient.bat handles things the same way that your first broken example shows. And I don't set the path (appclient.bat does) so escaping isn't an option. The path is set to a variable and then used in these lines:

:main
set _AS_INSTALL=%~dp0..
call "%_AS_INSTALL%\config\asenv.bat"

This produces the errors shown in the original report.

This situation can be improved by making the following adjustments:

:main
set "_AS_INSTALL=%~dp0.."
call "%_AS_INSTALL%\config\asenv.bat"

The logging from the original post then becomes this:

C:\stuff&things\myapp>goto :main 

C:\stuff&things\myapp>set "_AS_INSTALL=C:\stuff&things\myapp\appclient\glassfish\bin\.." 

C:\stuff&things\myapp>call "C:\stuff&things\myapp\appclient\glassfish\bin\..\config\asenv.bat" 

But this just kicks the can further down the road and it breaks later:

C:\stuff&things\myapp>for %a in ("C:\stuff&things\myapp\appclient\glassfish\bin\../lib/gf-client.jar") do set XCLASSPATH=%~sa 

C:\stuff&things\myapp>set XCLASSPATH=C:\STUFF&~1\myapp\APPCLI~1\GLASSF~1\lib\GF-CLI~1.JAR 
& was unexpected at this time.

And this is where we run into the limits of my batch skills and I don't know how to proceed in fixing it.

The point is that this is caused but improper path handling in a script provided by Glassfish. It ought to be able to run from any legal path on the filesystem.





[GLASSFISH-21290] Returned value from SLSB takes minutes to the caller Created: 18/Jan/15  Updated: 21/Jan/15

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

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


 Description   

We moved an EAR project containing an EJB module and an ACC module from GF 4.0 to GF 4.1.

When we make a remote call from the ACC client (Java Swing App started via webstart) on GF 4.0, the duration is about 2 secs and on GF 4.1 about 120 seconds.

The EJB makes some JPA calls (Hibernate 4.3) and returns a fairly complex entity, but as we have seen very fast. The times gets lost after the EJB method return.

So what happens after the EJB return - marshalling of the returned value? Can anybody point me to a topic, where I can further look at?

Thanks, Andreas



 Comments   
Comment by anowac01 [ 21/Jan/15 ]

You may want to look at GLASSFISH-21285 and the thread linked there, which sounds like a similar issue, though I don't believe there is much in the way of solutions identified there yet.





[GLASSFISH-21289] JMS broker fails on concurrent writes to single topic when using distributed transactions. Created: 17/Jan/15  Updated: 11/Mar/15

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

Type: Bug Priority: Critical
Reporter: jiggster Assignee: David Zhao
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tested with glass fish-embedded on Windows 7 & Mac OSX 10.10.1


Tags: 4-0-b78

 Description   

When multiple threads write to single JMS topic (only tested with topic, but that might be true for the queues also), each in its own distributed transaction, the broker fails with an error like the one below:

Jan 17, 2015 10:13:51 PM com.sun.messaging.jms.ra.DirectXAResource validateAndSaveXidTransactionID
INFO: DXAR:start():Warning: XAResource with state COMPLETE received diff Xid for open txnId:switching transactionId:
DXAR  Xid=(GlobalTransactionID=[B@1d8256f1, BranchQualifier=[B@42963311) 
DXAR TXid=5598056773328087040
got   Xid=(GlobalTransactionID=[B@1c462fe0, BranchQualifier=[B@47c43f17) 
got  TXid=5598056773328088320
Jan 17, 2015 10:13:51 PM com.sun.messaging.jms.ra.DirectXAResource prepare
SEVERE: prepareTransaction (XA) on JMSService:jmsdirect failed for connectionId:5598056773326219776 due to Unknown JMSService server error ERROR: com.sun.messaging.jmq.jmsserver.util.BrokerException: Bad transaction state transition. Cannot perform operation PREPARE_TRANSACTION(56) (XAFlag=null) on a transaction in state STARTED(1).
Jan 17, 2015 10:13:51 PM com.sun.jts.CosTransactions.RegisteredResources distributePrepare
WARNING: JTS5031: Exception [java.lang.RuntimeException: javax.transaction.xa.XAException] on Resource [prepare] operation.
Jan 17, 2015 10:13:51 PM com.sun.messaging.jms.ra.DirectXAResource rollback
SEVERE: rollbackTransaction (XA) on JMSService:jmsdirect failed for connectionId:5598056773326219776:transactionId=5598056773328088320 due to Unknown JMSService server error ERROR: com.sun.messaging.jmq.jmsserver.util.BrokerException: Transaction XID mismatch 6A696767626F6F6B2E6C6F63616C2C7365727665722C503130302C013B0000004D8FBEF96A696767626F6F6B2E6C6F63616C2C7365727665722C50313030, expected 6A696767626F6F6B2E6C6F63616C2C7365727665722C503130302C013C0000004D8FBEF96A696767626F6F6B2E6C6F63616C2C7365727665722C50313030 for transaction 5598056773328088320
Jan 17, 2015 10:13:51 PM com.sun.jts.jtsxa.OTSResourceImpl rollback
WARNING: JTS5068: Unexpected error occurred in rollback
javax.transaction.xa.XAException
	at com.sun.messaging.jms.ra.DirectXAResource.rollback(DirectXAResource.java:738)
	at com.sun.messaging.jms.ra.DirectXAResource.rollback(DirectXAResource.java:689)
	at com.sun.jts.jta.TransactionState._rollback(TransactionState.java:202)
	at com.sun.jts.jta.TransactionState.rollback(TransactionState.java:180)
	at com.sun.jts.jtsxa.OTSResourceImpl.rollback(OTSResourceImpl.java:333)
	at com.sun.jts.CosTransactions.RegisteredResources.distributeRollback(RegisteredResources.java:1040)
	at com.sun.jts.CosTransactions.TopCoordinator.rollback(TopCoordinator.java:2291)
	at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:391)
	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:185)
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:859)
	at com.sun.enterprise.transaction.UserTransactionImpl.commit(UserTransactionImpl.java:212)
	at com.ibm.jbatch.container.transaction.impl.JTAUserTransactionAdapter.commit(JTAUserTransactionAdapter.java:91)
	at com.ibm.jbatch.container.impl.ChunkStepControllerImpl.invokeChunk(ChunkStepControllerImpl.java:620)
	at com.ibm.jbatch.container.impl.ChunkStepControllerImpl.invokeCoreStep(ChunkStepControllerImpl.java:684)
	at com.ibm.jbatch.container.impl.BaseStepControllerImpl.execute(BaseStepControllerImpl.java:144)
	at com.ibm.jbatch.container.impl.ExecutionTransitioner.doExecutionLoop(ExecutionTransitioner.java:112)
	at com.ibm.jbatch.container.impl.JobThreadRootControllerImpl.originateExecutionOnThread(JobThreadRootControllerImpl.java:110)
	at com.ibm.jbatch.container.util.BatchWorkUnit.run(BatchWorkUnit.java:80)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:141)
	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)
	at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)
Caused by: com.sun.messaging.jmq.jmsservice.JMSServiceException: rollbackTransaction: rollback transaction failed. Connection ID: 5598056773326219776, Transaction ID: 5598056773328088320, XID: (Available at FINE log level) Caused by:com.sun.messaging.jmq.jmsserver.util.BrokerException: Transaction XID mismatch 6A696767626F6F6B2E6C6F63616C2C7365727665722C503130302C013B0000004D8FBEF96A696767626F6F6B2E6C6F63616C2C7365727665722C50313030, expected 6A696767626F6F6B2E6C6F63616C2C7365727665722C503130302C013C0000004D8FBEF96A696767626F6F6B2E6C6F63616C2C7365727665722C50313030 for transaction 5598056773328088320
	at com.sun.messaging.jmq.jmsserver.service.imq.JMSServiceImpl.rollbackTransaction(JMSServiceImpl.java:1718)
	at com.sun.messaging.jms.ra.DirectXAResource.rollback(DirectXAResource.java:714)
	... 27 more
Caused by: com.sun.messaging.jmq.jmsserver.util.BrokerException: Transaction XID mismatch 6A696767626F6F6B2E6C6F63616C2C7365727665722C503130302C013B0000004D8FBEF96A696767626F6F6B2E6C6F63616C2C7365727665722C50313030, expected 6A696767626F6F6B2E6C6F63616C2C7365727665722C503130302C013C0000004D8FBEF96A696767626F6F6B2E6C6F63616C2C7365727665722C50313030 for transaction 5598056773328088320
	at com.sun.messaging.jmq.jmsserver.data.protocol.ProtocolImpl.rollbackTransaction(ProtocolImpl.java:921)
	at com.sun.messaging.jmq.jmsserver.service.imq.JMSServiceImpl.rollbackTransaction(JMSServiceImpl.java:1706)
	... 28 more

I've created a test case that reproduces the issue quite repeatedly - it's available on github.

The test case consists of a batch job that contains a single chunk-style step with partition mapper (step's partitioned as the problem occurs in a concurrent environment). ItemReader creates random number (between MIN and MAX as defined in SimplePartitionMapper) of entity instances of type Subscriber. ItemProcessor does nothing, but sleeps for 50 ms. Item writer persists entities created by the reader and then publishes the collection of items to JMS topic (in a single distributed transaction) and here's where the problem occurs. Will try to provide the more detailed description of the test case in the README.md file on github.



 Comments   
Comment by stephanbauer7 [ 11/Mar/15 ]

Hi,
I have the same problem with Queues in Glassfish 4.1. I am also using XA-Transactions.

Information:   11 Mrz 2015 10:55:53,039 [p: thread-pool-1; w: 3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ==>  Preparing: delete from ACT_RU_EVENT_SUBSCR where ID_ = ? and REV_ = ?
Information:   11 Mrz 2015 10:55:53,039 [pool-22-thread-3] DEBUG org.activiti.engine.impl.db.DbSqlSession:828 - executing: delete JobEntity [id=42532]
Information:   11 Mrz 2015 10:55:53,039 [pool-22-thread-3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ooo Using Connection [com.sun.gjc.spi.jdbc40.ConnectionWrapper40@4e70cf77]
Schwerwiegend:   commitTransaction (XA) on JMSService:jmsdirect failed for connectionId:6980944495603333120 and onePhase:true due to Unknown JMSService server error ERROR: com.sun.messaging.jmq.jmsserver.util.BrokerException: Transaction XID mismatch 6D75686861676C2C7365727665722C50333730302C000C000000660039086D75686861676C2C7365727665722C5033373030, expected 6D75686861676C2C7365727665722C50333730302C000B000000660039086D75686861676C2C7365727665722C5033373030 for transaction 6980944495768780544
Information:   11 Mrz 2015 10:55:53,039 [p: thread-pool-1; w: 3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ==> Parameters: 40068(String), 1(Integer)
Information:   11 Mrz 2015 10:55:53,039 [pool-22-thread-3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ==>  Preparing: delete from ACT_RU_JOB where ID_ = ? and REV_ = ?
Schwerwiegend:   rollbackTransaction (XA) on JMSService:jmsdirect failed for connectionId:6980944495603333120:transactionId=6980944495768780544 due to Unknown JMSService server error ERROR: com.sun.messaging.jmq.jmsserver.util.BrokerException: Transaction XID mismatch 6D75686861676C2C7365727665722C50333730302C000C000000660039086D75686861676C2C7365727665722C5033373030, expected 6D75686861676C2C7365727665722C50333730302C000B000000660039086D75686861676C2C7365727665722C5033373030 for transaction 6980944495768780544
Information:   11 Mrz 2015 10:55:53,040 [p: thread-pool-1; w: 3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - <==    Updates: 1
Comment by amyk [ 11/Mar/15 ]

Assuming the test case follows the JMS and Java EE spec (haven't looked at it myself) in using transaction, JMS Session, JMSContext etc., I suspect this is likely an issue with jms-service DIRECT (or EMBEDDED) mode for it uses a completely different path in JMSRA to interact with broker. I'd suggest first check the test case to ensure spec compliance, then try jms-service LOCAL mode.





[GLASSFISH-21288] SHARED SUBSCRIPTIONS NOT WORKING WITH MDB TOPIC DURABLE SUBSCRIBERS Created: 13/Jan/15  Updated: 13/Jan/15

Status: Open
Project: glassfish
Component/s: jms
Affects Version/s: 3.1.2.2, 4.0, 4.1
Fix Version/s: future release

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

Tags: jms

 Description   

See :GlassFish bug 19568699 - SHARED SUBSCRIPTIONS NOT WORKING WITH MDB TOPIC DURABLE SUBSCRIBERS


When Glassfish is configured to use a remote Broker(s) it is unable to establish a shared durable subscription however when using an EMBEDDED broker it will create a shared subscription fine.

This has been replicated in GF 3.1.2.2, GF 4.0 build 89, and GF Build 13.

Would like to see a fix back filled to GF 4.x if possible.






[GLASSFISH-21287] Error Deploying Java 8 Jars With Lambdas Using compatibility=v2 Created: 12/Jan/15  Updated: 12/Jan/15

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

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


 Description   

When deploying an EJB jar using the compatability=v2 flag, and that jar contains another JAR which has a class that uses Java 8 lambda expressions, the deployment fails and I get the following errors in the log:

Failed to scan for annotations: 52264
Archive type of (path to EJB JAR) was not recognized.

This may be the same issue as or related to HK2-136.






[GLASSFISH-21286] Reuse jms connection from pool as much as possible when creating new connection in a transaction Created: 12/Jan/15  Updated: 12/Jan/15

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

Type: Improvement Priority: Major
Reporter: David Zhao Assignee: David Zhao
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on MQ-360 Reuse jms connection from pool as muc... Open

 Description   

This is a request from customers:

-------- Forwarded Message --------
Subject: [gf-users] JMS Connection pooling
Date: Fri, 9 Jan 2015 10:19:20 -0800
From: Will Hartung <willh@mirthcorp.com>
Reply-To: users@glassfish.java.net
To: users@glassfish.java.net

I was disappointed to learn that when getting a JMS connection more
than once in the same transaction, it actually consumes another
connection from the pool.

We do a lot of side affect event stuff in to JMS, and with a large
transaction, this can burn through connections at a pretty fast rate.

I came up with a way to mitigate it a little bit using a Stateful
Session Bean, and SessionSynchronization. But even with that, in the
end, I have the same issues of having to pass it around, since
whenever I ask for a new bean from JNDI, I get a new bean – and a new
connection. But it does handle connection lifecycle, and closing the
connection properly, in a reasonably elegant manner.

In today's day and age of declarative properties, it sees quite
"creaky" to have to be passing around things like JMS connections in
order to conserve them.

What I would really like is something that lets me tie in to the
current transaction life cycle, then I can use a combination
singleton/threadlocal to cache the "current" JMS connection, and then
clean it up afterward.

I've tried using TransactionSynchronizationRegistry, but things get
out of sync and I get all sorts of transaction errors. I also tried
using TransactionSynchronizationRegistry.getTransactionKey() to use
that as a key to a map, but it too lead to problems. I contemplated
using the UserTranscation as a key, but JNDI won't even give me one in
a CMT environment (which is what I'm in).

I can't just use a raw ThreadLocal, because we do a lot of nested
transactions, so the connection needs to be mated with the current
transaction.

For now, I'm simply passing my Stateful Bean around, just like I did
back 15 years ago. I'm hoping there's a better solution. A GlassFish
specific vs a JEE solution would be fine, we have no plans on porting
this code to anything else anytime soon.

We're running GF 3.1.2.

Speaking of Stateful Beans, if I don't have a @StatefulTimeout, are
the beans automatically destroyed when the transaction
commits/rollsback?

Thanks for any thoughts on this.

Regards,

Will Hartung
(willh@mirthcorp.com)


This message, and any documents attached hereto, may contain confidential
or proprietary information intended only for the use of the addressee(s)
named above or may contain information that is legally privileged. If you
are not the intended addressee, or the person responsible for delivering it
to the intended addressee, you are hereby notified that reading,
disseminating, distributing or copying this message is strictly prohibited.
If you have received this message by mistake, please immediately notify us
by replying to the message and delete the original message and any copies
immediately thereafter. Thank you for your cooperation.






[GLASSFISH-21285] Remote EJBs very slow Created: 11/Jan/15  Updated: 11/Jan/15

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

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

Windows 7, jdk 1.7.0.65, EclipseLink 2.5.2.v20140319



 Description   

We upgraded to Glassfish 4.1. We have a problem with our remote EJBs returning very slowly. What used to return in 1 second on Glassfish 3.1 now returns in 30 seconds.
We have this problem on several projects. All these remote EJBs fetch different data from MySQL (EclipseLink). Execution enviroment: the same hardware and the same Glassfish container.
Also it works fine with local EJB access (not remote).

We have found similar issues here https://java.net/projects/glassfish/lists/users/archive/2014-10/message/49
They made test project https://github.com/jamie-lb/GF4ProblemProject






[GLASSFISH-21284] test failures in admin devtests after last HK2 integration (2.4.0-b06) Created: 09/Jan/15  Updated: 09/Feb/15  Resolved: 09/Feb/15

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: None
Fix Version/s: future release

Type: Bug Priority: Critical
Reporter: Romain Grécourt Assignee: jwells
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File GLASSFISH-21284.sh    
Tags: admin, glassfish, hk2, jersey

 Description   

list of failed tests:

lbconfig:

58.delete-http-lb-config FAILED!!!
59.create-http-lb-config FAILED!!!
62.disable-http-lb-server FAILED!!!
64.delete-http-lb-server-ref FAILED!!!
65.delete-http-lb-config FAILED!!!

getset:

issue-12172-delete-cl-no-ins

Note that it was integrated by jersey team at the time of the integration of jersey 2.14.

The issue itself seems to be in the HK2 config system. When a config ref is removed, the reference stays in memory but is persisted to the config file properly. A restart acts as a workaround.



 Comments   
Comment by Romain Grécourt [ 20/Jan/15 ]

attaching reproducer script.

Comment by Romain Grécourt [ 09/Feb/15 ]
Project:    glassfish
Repository: svn
Revision:   63761
Author:     jwells
Date:       2015-02-07 20:30:15 UTC
Link:       

Log Message:
------------
Fix asadmin tests that do negative transactions in hk2-config


Revisions:
----------
63761


Modified Paths:
---------------
trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java
trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java
trunk/main/nucleus/pom.xml
trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java


Diffs:
------
Index: trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java
===================================================================
--- trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java	(revision 63760)
+++ trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java	(revision 63761)
@@ -417,12 +417,12 @@
         /**
             Convert incoming attributes to HK2 requirements.
          */
-            List<ConfigSupport.AttributeChanges>
+            List<AttributeChanges>
         toAttributeChanges(final Map<String, Object> values)
         {
             if ( values == null ) return null;
             
-            final List<ConfigSupport.AttributeChanges> changes = ListUtil.newList();
+            final List<AttributeChanges> changes = ListUtil.newList();
             for (final String xmlName : mAttrs.keySet() )
             {
                 final Object value = mAttrs.get(xmlName);
@@ -728,7 +728,7 @@
     /**
     Callback to create sub-elements (recursively) on a newly created child element.
      */
-    private final class SubElementsCallback implements ConfigSupport.TransactionCallBack<WriteableView>
+    private final class SubElementsCallback implements TransactionCallBack<WriteableView>
     {
         private final List<CreateParams> mSubs;
 
Index: trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java
===================================================================
--- trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java	(revision 63760)
+++ trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java	(revision 63761)
@@ -49,6 +49,7 @@
 import org.glassfish.tests.utils.Utils;
 import static org.junit.Assert.*;
 import org.junit.Test;
+import org.jvnet.hk2.config.AttributeChanges;
 import org.jvnet.hk2.config.ConfigBean;
 import org.jvnet.hk2.config.ConfigBeanProxy;
 import org.jvnet.hk2.config.ConfigSupport;
@@ -120,7 +121,7 @@
 
         support.createAndSet(serviceBean, DasConfig.class, (List) null);
 
-        List<ConfigSupport.AttributeChanges> profilerChanges = new ArrayList<ConfigSupport.AttributeChanges>();
+        List<AttributeChanges> profilerChanges = new ArrayList<AttributeChanges>();
         String[] values = { "-Xmx512m", "-RFtrq", "-Xmw24" };
         ConfigSupport.MultipleAttributeChanges multipleChanges = new ConfigSupport.MultipleAttributeChanges("jvm-options", values );
         String[] values1 = { "profile" };
Index: trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java
===================================================================
--- trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java	(revision 63760)
+++ trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java	(revision 63761)
@@ -46,6 +46,7 @@
 import org.glassfish.tests.utils.Utils;
 import org.jvnet.hk2.config.ConfigBean;
 import org.jvnet.hk2.config.ConfigSupport;
+import org.jvnet.hk2.config.TransactionCallBack;
 import org.jvnet.hk2.config.TransactionFailure;
 import org.jvnet.hk2.config.WriteableView;
 
@@ -89,7 +90,7 @@
         configChanges.put("name", "funky-listener");
 
         ConfigSupport.createAndSet(serviceBean, NetworkListener.class, configChanges,
-                new ConfigSupport.TransactionCallBack<WriteableView>() {
+                new TransactionCallBack<WriteableView>() {
                     @SuppressWarnings({"unchecked"})
                     public void performOn(WriteableView param) throws TransactionFailure {
                         // if you know the type...
Index: trunk/main/nucleus/pom.xml
===================================================================
--- trunk/main/nucleus/pom.xml	(revision 63760)
+++ trunk/main/nucleus/pom.xml	(revision 63761)
@@ -147,8 +147,8 @@
         <servlet-api.version>3.1.0</servlet-api.version>
         <grizzly.version>2.3.15-gfa</grizzly.version>
         <saaj-api.version>1.3.4</saaj-api.version>
-        <hk2.version>2.4.0-b06</hk2.version>
-        <hk2.plugin.version>2.4.0-b06</hk2.plugin.version>
+        <hk2.version>2.4.0-b10</hk2.version>
+        <hk2.plugin.version>2.4.0-b10</hk2.plugin.version>
         <javax.el.version>3.0.1-b03</javax.el.version>
         <javax.el-api.version>3.0.1-b03</javax.el-api.version>
         <trilead-ssh2.version>build212-hudson-6</trilead-ssh2.version>




[GLASSFISH-21283] WAR undeployment ends up with .glassfishStaleFiles after upgrading Glassfish 4.0 up to 4.1 Created: 31/Dec/14  Updated: 12/Jan/15

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

Type: Bug Priority: Critical
Reporter: alexander.v.morozov Assignee: Hong Zhang
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64 Professional, JDK 7u72 x64



 Description   

We have simple WAR archive, which contains several jar-files (some of them contains beans.xml) and several classes within WAR, which uses Managed Beans. Our application works well under Glassfish 4.0 and redeployment time takes about 3 seconds.
Once we upgrade Glassfish up to 4.1 (release) - undeployment time dramatically increased up to 40 and more seconds. After that Glassfish creates ".glassfishStaleFiles" which enumerates all JAR-archives with beans.xml. There is no any errors in Glassfish log file. We will try to provide sample application archive a bit later.



 Comments   
Comment by alexander.v.morozov [ 12/Jan/15 ]

Sample project was uploaded to Github https://github.com/shuraa/gf41 .





[GLASSFISH-21282] In 'asadmin change-master-password', entry of password less than 6 chars,Console display messy code Created: 31/Dec/14  Updated: 31/Dec/14

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

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

Windows 7 - Simplified Chinese


Issue Links:
Relates
relates to GLASSFISH-21017 In 'asadmin change-master-password', ... In Progress

 Description   

1. Called 'asadmin change-master-password --savemasterpassword=true <domain_name>'
2. Entered 'changeit' as existing password
3. Entered a new password of less than 6 characters (and then again)
4. Console display messy code

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

Errors generated by the process

1:Execute $

{JAVA_HOME}

/bin/ keytool.exe, if Exception, get ExceptionMessage
ProcessExecutor#execute() 332

2:From TempFile get ExceptionMessage
KeystoreManager#getExceptionMessage() 116
In the windows environment, read the following two positions TempFile
C:\Users\cxm\AppData\Local\Temp\stdout55263003497713392.tmp
C:\Users\cxm\AppData\Local\Temp\stderr2806922793298260583.tmp
Both TempFile use Unicode character set.
We can see, in Chinese environment, TempFile contains Chinese character.

3:Read the text in the TempFile
ProcessExecutor#readWithoutCheck() 584,590
In GF V4, using RandomAccessFile#readLine () to read the text line
According to JDK docs, RandomAccessFile#readLine (not) does support the full Unicode character set.
For details see:
http://docs.oracle.com/javase/7/docs/api/index.html
If in a similar Chinese this environment to execute the'asadmin change-master-password'command, When an error occurs console may display messy code.



 Comments   
Comment by WilsonCheng [ 31/Dec/14 ]

The solution
The use of RandomAccessFile#read (byte[] b) instead of RandomAccessFile#readLine ()
For details see ProcessExecutor.java.patch

ProcessExecutor.java
Index: ProcessExecutor.java
===================================================================
--- ProcessExecutor.java	(revision 63140)
+++ ProcessExecutor.java	(working copy)
@@ -577,17 +577,14 @@
         private String readWithoutCheck(final long seekPos) {
             final StringBuffer sb = new StringBuffer();
             RandomAccessFile rf = null;
-            int lines = 0;
             try {
                 rf = new RandomAccessFile(file, RMODE);
                 rf.seek(seekPos);
-                String tmp = rf.readLine();
-                while (tmp != null) {
-                    lines++;
+                byte[] byteArray = new byte[LAST_BYTES];
+                int count = rf.read(byteArray);
+                if (count > 0) {
+                    String tmp = new String(byteArray, 0, count);
                     sb.append(tmp);
-                    //sb.append(Character.LINE_SEPARATOR);
-                    sb.append('\n'); // adding a newline character is going to add one extra byte
-                    tmp = rf.readLine();
                 }
             }
             catch (Exception e) {
Comment by zhouronghui [ 31/Dec/14 ]

If GLASSFISH-21017 is fixed, this ISSUE should NOT happen? So, I link it to GLASSFISH-21017.





[GLASSFISH-21281] Glassfish 3 , jvms suddenly going down Created: 29/Dec/14  Updated: 23/Mar/15

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

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


 Description   

We have setup glassfish V-Open Source Edition 3.1.2.2 (build 5) in our production environment. The jvms from two of the glassfish nodes , go down frequently. Glassfish Jvm logs do not indicate anything unusual .

Can you please help to figure out what could be the issue



 Comments   
Comment by Ptejas [ 29/Dec/14 ]

Any update regarding this issue ?

Comment by Joe Di Pol [ 29/Dec/14 ]

Things you could try if you haven't already:

  • Update to the latest version of the JDK
  • Modify the JVM arguments especially around heap size and GC behavior
  • Identify what is different between the nodes that crash and those that don't (assuming there are some nodes that don't) and see if that sheds any light
  • Post to the GlassFish forum: https://www.java.net/forums/glassfish/glassfish
  • Try GlassFish 4.1

Beyond that if you need formal GlassFish 3 support then you could consider switching to the commercial product (Oracle GlassFish Server 3.1.2.2).

Comment by tejas.pathak [ 23/Mar/15 ]

Hi Joe,

Thanks for the information.
We already have a latest jdk sun-jdk "jdk1.6.0_45" with this glassfish. The heap size and gc parameters for the jvms look good.
Jvms from all the nodes suddenly go down intermittently
I will post to the glassfish Forum.

Thanks,
--Tejas





[GLASSFISH-21280] Transaction attribute in subclass is ignored if a generic supertype exist Created: 29/Dec/14  Updated: 29/Dec/14

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

Type: Bug Priority: Critical
Reporter: martinandersson.com Assignee: Srini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 1 week
Time Spent: Not Specified
Original Estimate: 1 week
Environment:

Tested on Windows 7 x64 and Windows 8 x64


Tags: annotations, ejb-container, inheritance, transactionmanager

 Description   

According to "Common Annotations" spec as well as the EJB spec, supertype transaction attribute annotations are "always ignored" if the subclass override a method. Only if the superclass has a method not overridden by the subclass do annotations put in the superclass apply.

This work as long as the supertype, whether that be a class or interface, is not generic. As soon as it is, GlassFish behave in the other way around: ignoring the most specific subclass annotations and instead use annotations declared in the supertype.

Full description, specification quotes as well as test cases is located here (the project is a working Maven project, clone + build and all tests are executed using Arquillian):

https://github.com/MartinanderssonDotcom/java-ee-concepts/blob/master/src/test/java/com/martinandersson/javaee/ejb/transactions/AnnotationInheritanceTest.java

In a separate project my mine that first exposed this issue, I have no workaround to apply. I have to stop using GlassFish or begin a new architectural design. Given that transactions are an intrinsic part of applications, as well as inheritance is a common method for code reuse in object oriented design, I consider this bug "critical". Also note that WildFly 8.2.0 pass all the tests provided in the link.






[GLASSFISH-21279] Application deployed failed, but application is deployed and alive Created: 25/Dec/14  Updated: 25/Dec/14

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

Type: Bug Priority: Major
Reporter: mtomasek Assignee: Hong Zhang
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.0_45 64-bit



 Description   

Hi, I have war application, which used restEasy library to build rest interface. When I want to try deploy application via asadmin, then error message is shown:

remote failure: Request failed
Command deploy failed.

Step to reproduce
1. Download latest GlassFish version https://glassfish.java.net/download.html
2. Download war file from https://github.com/tomasma5/AFSwinx/blob/master/ExecutableArtifacts/AFServer.war or you can buy war file when you will clone repository and in root make: mvn clean install
3. Navigate to GlassFish directory to bin and type:
asadmin
start-domain domain1
deploy PATH_TO_APPLICATION
4. Deploy failed. Go to http://localhost:8080/AFServer and application is alive moreover you can try use web api on http://localhost:8080/AFServer/rest/country/list content-type:application/json method get
5. Running instance is freeze asadmin cant stop domain or shown you deployed application via list-applications command. Admin console on port 4848 is not working now. It helps when application is removed manually from applications folder.

Error log could be download here
This war works fine on GlassFish 3.1.2.

Sample from error log:

  An error occurred while processing the request. Please see the server logs for details.
org.glassfish.jersey.server.ContainerException: java.lang.AbstractMethodError: javax.ws.rs.core.Response.getStatusInfo()Ljavax/ws/rs/core/Response$StatusType;
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer$ResponseWriter.rethrow(GrizzlyHttpContainer.java:317)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer$ResponseWriter.failure(GrizzlyHttpContainer.java:299)
	at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:439)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)





[GLASSFISH-21278] SessionScoped object sharing between different sessions when Async Servlet 3.0 involved in execution path Created: 22/Dec/14  Updated: 10/Feb/15

Status: Open
Project: glassfish
Component/s: web_container, web_socket
Affects Version/s: 3.1.2.2
Fix Version/s: None

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

JDK 1.7.0_62



 Description   

We've noticed a bug related to Session "sharing" between threads when using the Servlet 3.0 Async implementation in Glassfish.
If few users log in to the application, use an Async Servlet and logout, there is a reuse of a @javax.enterprise.context.SessionScoped object between the frontend threads.

Find attached a test case that easely reproduces the errors, with the following configuration at the application server domain:

server-config -> Web Container -> (Tab) Manager Properties -> Max Sessions: 2
server-config -> Thread Pools -> http-thread-pool -> Max Thread Pool Size : 6, Min Thread Pool Size: 6
server-config -> Network Config -> Network Listeners -> http-listener-1 -> (Tab) HTTP -> Comet Support: true, Websocket support: true

The code is commented to enable easy change, and STOP the problem from happening by setting asyncSupported=false in both the AuditFilter and the AsyncDownloadProxy servlet (the AsyncDownloadProxy servlet has comments to indicate where to change the code to support synchronous mode only - marked by "//COMMENT FOR SYNC TESTING")...

The problem shows in the domain's server.log file in the following forms:

1.Looking for the String "REUSING INSTANCES", as by this example:

[#|2014-11-17T17:16:19.624+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=108;_ThreadName=Thread-2;|AuditFilter: ************** REUSING INSTANCES!!!!!|#]

2. Checking for this exception in the logs:
[#|2014-11-17T17:16:21.059+0000|SEVERE|glassfish3.1.2|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=108;_ThreadName=Thread-2;|java.lang.NullPointerException
at com.sun.grizzly.arp.AsyncProcessorTask.obtainAndSetThreadAttachment(AsyncProcessorTask.java:233)
at com.sun.grizzly.arp.AsyncProcessorTask.enableTimeout(AsyncProcessorTask.java:227)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:131)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:210)
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:745)

#]

[#|2014-11-17T17:16:21.060+0000|INFO|glassfish3.1.2|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=108;_ThreadName=Thread-2;|Processor exception
java.lang.RuntimeException: java.lang.NullPointerException
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:144)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:210)
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:745)
Caused by: java.lang.NullPointerException
at com.sun.grizzly.arp.AsyncProcessorTask.obtainAndSetThreadAttachment(AsyncProcessorTask.java:233)
at com.sun.grizzly.arp.AsyncProcessorTask.enableTimeout(AsyncProcessorTask.java:227)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:131)
... 14 more

#]

We've allready tried to use the following strategies:
1. Update the grizzly-*.jar from the "modules" directory (don't forget to clean the osgi-cache from the domain dir after this process) to the latest minor released version 1.9.60
2. Update only the grizzly-websockets.jar with the fix indicated at the https://java.net/jira/browse/GRIZZLY-1289

None of them resolved the problem efectively.

Moreover, the NullPointerException is confirmed on this line:

case AsyncTask.FINISH:
enableTimeout();

asyncExecutor.finishExecute();
asyncExecutor.getAsyncHandler().returnTask(this);
return;

caused by the highlighted code returning "null".

final SelectionKey selectionKey = asyncExecutor.getProcessorTask().getSelectionKey();

And I think that on NPE, the code

asyncExecutor.finishExecute();

is not allowed to run, and so the "session" is left associated with the thread, which will come to cause trouble later on following requests.

The most similar report we found is on StackOverflow:
http://stackoverflow.com/questions/25017334/weld-gf4-sessionscoped-sometimes-wrong-bean
which states the same problem very accurately, although with Glassfish 4 instead.



 Comments   
Comment by moonysun [ 22/Dec/14 ]

I also have example code to show this (the code that is referenced by my initial comment) but I can't seem to find any way to upload it to the issue...

Comment by oleksiys [ 22/Dec/14 ]

can you pls. try to apply this patch first
https://dl.dropboxusercontent.com/u/7319744/grizzly-gf3122-patch.zip
?

If you still can reproduce the problem - then we'll need a testcase. Unfortunately you can't upload it here

Comment by moonysun [ 23/Dec/14 ]

Bug is still very much reproducible even with the patch provided.

During this last test, some exceptions showed up in the logs:

[#|2014-12-23T01:49:13.524+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=83;_ThreadName=Thread-2;|WebModule[/session-share-bug]PWC1322: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener
java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:56)
at javax.servlet.ServletRequestEvent.<init>(ServletRequestEvent.java:77)
at javax.servlet.ServletRequestAttributeEvent.<init>(ServletRequestAttributeEvent.java:83)
at org.apache.catalina.connector.Request.removeAttribute(Request.java:1625)
at org.apache.catalina.connector.RequestFacade.removeAttribute(RequestFacade.java:581)
at org.jboss.weld.context.http.HttpConversationContextImpl.removeRequestAttribute(HttpConversationContextImpl.java:32)
at org.jboss.weld.context.http.HttpConversationContextImpl.removeRequestAttribute(HttpConversationContextImpl.java:12)
at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:163)
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4648)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]

and

[#|2014-12-23T01:49:14.772+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=85;_ThreadName=Thread-2;|WebModule[/session-share-bug]PWC1322: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener
java.lang.NullPointerException
at org.apache.catalina.connector.Request.doGetSession(Request.java:2845)
at org.apache.catalina.connector.Request.getSession(Request.java:2583)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920)
at org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:16)
at org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:12)
at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:157)
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4648)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)
14566,15-22 72%

and even more:

[#|2014-12-23T01:49:13.973+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=82;_ThreadName=Thread-2;|WebModule[/session-share-bug]PWC1322: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener
java.lang.NullPointerException
at org.apache.catalina.connector.Request.removeAttribute(Request.java:1621)
at org.apache.catalina.connector.RequestFacade.removeAttribute(RequestFacade.java:581)
at org.jboss.weld.context.http.HttpConversationContextImpl.removeRequestAttribute(HttpConversationContextImpl.java:32)
at org.jboss.weld.context.http.HttpConversationContextImpl.removeRequestAttribute(HttpConversationContextImpl.java:12)
at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:163)
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4648)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]

Relative to the test, at this web addres:

https://www.dropbox.com/sh/stk0cgehvch4ecd/AABI-mPTo9722U5PiIxMNFfCa?dl=0

You will find three files:
session-share-bug.war (deploy to glassfish)
session-share-bug.zip (maven project source code)
TestCDILogout.jmx (jmeter test plan to show the problem)

To reproduce the issue:
Use apache-jmeter to run the TestCDILogout.jmx

and loof for messages in the server.log as:

REUSING

Comment by oleksiys [ 24/Dec/14 ]

Just wanted to confirm, you are able to reproduce the problem with only one jmeter user thread?
How long you normally wait?

Comment by jpereira@linkare.com [ 24/Dec/14 ]

I am able to reproduce it with 2 user threads. But with 10 users it takes about 1 min (sometimes less) to get a few errors like the one i mentioned (finding in the logs REUSING is considered an error as you might understand from the code for obvious reasons).

I can also do it using two browsers each with two tabs/windows and hitting refresh in a quick but random order on the two servlet urls... so you don't actually need too much load to run into it...

Comment by oleksiys [ 25/Dec/14 ]

Pls. try this patch

https://dl.dropboxusercontent.com/u/7319744/grizzly-gf3122-patch.zip

Comment by moonysun [ 25/Dec/14 ]

Nope. Still nothing changes... It even looks like the problem repeated faster... (but that might be my new laptop being faster).

Oh, and by the way, I tested again with a single thread on jmeter and the problem also shows.

Comment by oleksiys [ 25/Dec/14 ]

can you pls. attach the stacktrace?

Comment by moonysun [ 25/Dec/14 ]

The problem shows up even in the event of no StackTrace.
I hope you understand the severity of the problem of sharing session objects in between sessions from different users.

Sometimes, this NPE also shows up, but it is quite rare:

[#|2014-12-25T20:06:08.337+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=94;_ThreadName=Thread-2;|WebModule[/session-share-bug]PWC1322: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener
java.lang.NullPointerException
at org.apache.catalina.connector.Request.doGetSession(Request.java:2845)
at org.apache.catalina.connector.Request.getSession(Request.java:2583)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920)
at org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:23)
at org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:12)
at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:156)
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4648)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]
Comment by oleksiys [ 25/Dec/14 ]

Do you see NPE similar to the one you reported earlier:

_ThreadName=Thread-2;|java.lang.NullPointerException
at com.sun.grizzly.arp.AsyncProcessorTask.obtainAndSetThreadAttachment(AsyncProcessorTask.java:233)
at com.sun.grizzly.arp.AsyncProcessorTask.enableTimeout(AsyncProcessorTask.java:227)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:131)
.....

?

Comment by jpereira@linkare.com [ 25/Dec/14 ]

This time I didn't. But before it only showed up sometimes so there is an amount of uncertainty on tthe observation

even so the main issue of session sharing is still present

Comment by oleksiys [ 26/Dec/14 ]

I think Grizzly part is fixed, the rest IMO is related to webcontainer.
It (webcontainer) must not executes chain postInvoke in the service() thread, if Servlet request was suspended.

Comment by jpereira@linkare.com [ 26/Dec/14 ]

Ok. So I will test your last patch more throughly and report if I can find the NPE or some other bugs related to grizzly... meanwhile have you seen my initial comment stating that an error at the enableTimeout() method call would never allow the finishExecute to be reached?

One other thing... what were the code changes related to your last patch?

Comment by oleksiys [ 26/Dec/14 ]

Right, enableTimeout() race is fixed
https://java.net/jira/browse/GRIZZLY-1729

Comment by moonysun [ 26/Dec/14 ]

So now, as far as I can tell, the only exceptions that remained are:

[#|2014-12-26T22:13:28.230+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=75;_ThreadName=Thread-2;|WebModule[/session-share-bug]PWC1322: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener
java.lang.NullPointerException
at org.apache.catalina.connector.Request.removeAttribute(Request.java:1621)
at org.apache.catalina.connector.RequestFacade.removeAttribute(RequestFacade.java:581)
at org.jboss.weld.context.http.HttpConversationContextImpl.removeRequestAttribute(HttpConversationContextImpl.java:32)
at org.jboss.weld.context.http.HttpConversationContextImpl.removeRequestAttribute(HttpConversationContextImpl.java:12)
at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:163)
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4648)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]

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

[#|2014-12-26T22:13:28.235+0000|SEVERE|glassfish3.1.2|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=75;_ThreadName=Thread-2;|PWC3989: An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.apache.catalina.connector.Request.setAttribute(Request.java:1689)
at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:570)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4654)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]

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

[#|2014-12-26T22:13:32.325+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=79;_ThreadName=Thread-2;|WebModule[/session-share-bug]PWC1322: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener
java.lang.NullPointerException
at org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:24)
at org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:12)
at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:159)
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4648)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]

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

[#|2014-12-26T22:13:39.775+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=77;_ThreadName=Thread-2;|WebModule[/session-share-bug]PWC1322: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener
java.lang.NullPointerException
at org.apache.catalina.connector.Request.doGetSession(Request.java:2845)
at org.apache.catalina.connector.Request.getSession(Request.java:2583)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920)
at org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:23)
at org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:12)
at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:156)
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117)
at org.apache.catalina.core.StandardContext.fireRequestDestroyedEvent(StandardContext.java:4648)
at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:242)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:333)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]

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

[#|2014-12-26T22:13:46.649+0000|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=78;_ThreadName=Thread-2;|StandardWrapperValve[AsyncDownloadProxy]: PWC1406: Servlet.service() for servlet AsyncDownloadProxy threw exception
java.lang.IllegalStateException: Missing wrapper
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:226)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at pt.segsocial.ii.session.AuditFilter.doFilter(AuditFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
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:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
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:1042)
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:745)

#]

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

And the main problem still remains, as reported in the initial statement.

Comment by moonysun [ 26/Dec/14 ]

Meanwhile, sorry for bothering, but the error still seems to be present, just by inspection of the code... I'll explain my reasoning:

in the following lines, at method doTask of class AsyncProcessor Task:

case AsyncTask.FINISH:
enableTimeout(); //If this method fails for some reason, the "finishExecute" will never get called...

asyncExecutor.finishExecute(); //this might never get called at all, if enableTimeout() above fails
asyncExecutor.getAsyncHandler().returnTask(this);
return;

on the other hand, at the method enableTimeout(), we have:

private void enableTimeout()

{ final ThreadAttachment attachment = obtainAndSetThreadAttachment();//check this method for possible exceptions... attachment.setIdleTimeoutDelay(SelectionKeyAttachment.UNSET_TIMEOUT); //this is not prone to exceptions unless "attachment" is null attachment.setTimeout(System.currentTimeMillis()); //this is not prone to exceptions unless "attachment" is null }

and on the method obtainAndSetThreadAttachment() we have:

private ThreadAttachment obtainAndSetThreadAttachment() {
final ProcessorTask processorTask = asyncExecutor.getProcessorTask();//
final SelectionKey selectionKey = processorTask.getSelectionKey();

//those two previous lines were previously written
//final SelectionKey selectionKey = asyncExecutor.getProcessorTask().getSelectionKey();
//so the NPE at asyncExecutor.getProcessorTask() might still occur nonetheless...

Object attachment = selectionKey.attachment();
if (attachment == null || !(attachment instanceof ThreadAttachment))

{ attachment = obtainThreadAttachment(); selectionKey.attach(attachment); }

return (ThreadAttachment) attachment;
}

(check my comments in the code snippets above)...

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

Nonetheless, I made a more comprehensive run (100 virtual users, download -> logout) and I didn't find the original NPE in the logs anymore...

Comment by jpereira@linkare.com [ 10/Feb/15 ]

Bump





[GLASSFISH-21277] RMI/IIOP calls include the "local classpath" instead of the remote classpath, incurring in performance penalties without apparent benefits Created: 22/Dec/14  Updated: 22/Dec/14

Status: Open
Project: glassfish
Component/s: ejb_container, orb
Affects Version/s: 3.1.2.2
Fix Version/s: None

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

Solaris 11, Linux 3.6+, JDK 1.7.0_62



 Description   

We've noticed (by capturing with snoop and tcpdump) that a glassfish v3.1.2.2 being called by an external client or glassfish v3.1.2.2 calling other application server via RMI/IIOP sends and/or receives CORBA messages that include gf classpath pointers.

Example:
getParametroByPeriodo.......................................NEO...................'~file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/slf4j-api-1.7.5.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-jpa-3.2.8p.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/commons-io-2.3.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/gfct-service-export-3.5.25d.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/rewrite-servlet-2.0.6.Final.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/hibernate-core-4.2.7.SP1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/logging-adapter-slf4j-1.0.2.Final.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/rewrite-config-prettyfaces-2.0.6.Final.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/shiro-cas-3.2.8p.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/gfct-layouts-3.5.25d-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/commons-fileupload-1.2.2.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/generated/ejb/fc// file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/cas-client-core-3.2.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/IIESCommons-2.0.14.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/ehcache-2.8.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/gfct-api-3.5.25d.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/sicc-service-export-2.0.197b.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/logback-classic-1.1.0.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/rewrite-integration-cdi-2.0.6.Final.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/gson-2.2.2.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-utilities-3.2.8p.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/joda-time-2.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/ehcache-jgroupsreplication-1.7.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-main-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-guicomponents-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/commons-beanutils-1.8.3.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-cdi-3.2.8p.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/hibernate-ehcache-4.2.7.SP1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/commons-lang3-3.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/framework-server-2.0.69c.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-primefaces-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/groovy-all-2.0.0.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEGIOP............B-INF/lib/hibernate-envers-4.2.7.SP1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/jul-to-slf4j-1.7.5.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/primefaces-3.5.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/logback-core-1.1.0.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-jsf-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/dom4j-1.6.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-script-it-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/guava-16.0.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/app-service-export-3.0.19b.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/myfaces-extcdi-bundle-jsf20-1.0.6.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-grs-3.2.8p.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/shiro-core-1.2.2.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/commons-collections-3.2.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/jcl-over-slf4j-1.7.5.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/resources-codemirror-0.7.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/primefaces-extensions-0.7.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/gfct-batch-3.5.25d.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/commons-codec-1.8.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/generated/fc/ file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/xmlsec-1.4.3.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/app-webapp-3.0.19b-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/jgroups-3.1.0.Final.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/resources-ckeditor-0.7.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/cmp-service-export-2.0.20h.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/rewrite-integration-faces-2.0.6.Final.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/shiro-web-1.2.2.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/siccservicos-service-export-2.0.31a.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-accesslog-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/jboss-logging-3.1.0.GA.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/idq-service-export-2.0.238b.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/micap-service-export-2.0.40d.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/httpclient-4.3.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/shiro-ehcache-1.2.2.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/jollyday-0.4.5.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar file:/var/opGIOP............t/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-security-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/hibernate-entitymanager-4.2.7.SP1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-agenda-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/gcservicos-service-export-2.0.135.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/log4j-over-slf4j-1.7.5.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/public-api-3.6.20e.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/opensaml-1.1.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/app-api-3.0.19b.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/classes/ file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-api-3.2.8p.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/hibernate-commons-annotations-4.0.2.Final.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/gfct-webresources-3.5.25d-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/antlr-2.7.7.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/omnifaces-1.7.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/fraw-messaging-3.2.8p-web-fragment.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/ssn-service-export-2.8.49b.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/httpcore-4.3.jar file:/var/opt/glassfish3/nodes/localhost-domain_gf3_1/instance2/applications/fc/WEB-INF/lib/commons-logging-1.1.1.jar.as...URMI:pt.segsocial.idq.service.export.vo.ParametroVO:EF7D3D9277551DC8:6EAB90E26C3A7990.r f...
...:RMI:java.util.Hashtable:86573568A211C011:13BB0F25214AE4B8.li......s/?@.........

This increases the average size of each message and doesn't provide a way for remote class loading to actually occur, since, generally, the client/server does not have access to the classpath of the gf3 container.

We've implemented a workaround/fix for this issue and saw a reduction in message size of about 75% for small requests/replies.

The workaround is basically the implementation of the following class:

package pt.segsocial.corba;

import java.net.MalformedURLException;
import java.rmi.server.RMIClassLoader;
import java.rmi.server.RMIClassLoaderSpi;

public class CodebaseSpeedupRMIClassLoaderSpi extends RMIClassLoaderSpi {

private RMIClassLoaderSpi defaultProviderInstance;

public CodebaseSpeedupRMIClassLoaderSpi()

{ defaultProviderInstance = RMIClassLoader.getDefaultProviderInstance(); }

@Override
public String getClassAnnotation(Class<?> cl)

{ return null; }

@Override
public Class<?> loadClass(String codebase, String name, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException

{ return defaultProviderInstance.loadClass(codebase, name, defaultLoader); }

@Override
public Class<?> loadProxyClass(String codebase, String[] interfaces, ClassLoader defaultLoader) throws MalformedURLException,
ClassNotFoundException

{ return defaultProviderInstance.loadProxyClass(codebase, interfaces, defaultLoader); }

@Override
public ClassLoader getClassLoader(String codebase) throws MalformedURLException

{ return defaultProviderInstance.getClassLoader(codebase); }

}

and providing a file META-INF/services/java.rmi.server.RMIClassLoaderSpi on the created jar with the contents

pt.segsocial.corba.CodebaseSpeedupRMIClassLoaderSpi

This implementation is based on the documentation at
http://docs.oracle.com/javase/1.5.0/docs/api/java/rmi/server/RMIClassLoader.html
and
http://docs.oracle.com/javase/1.5.0/docs/api/java/rmi/server/RMIClassLoaderSpi.html

Then we place the created jar in $GLASSFISH_HOME/glassfish/modules/endorsed and it works as expected.

Are there any potential pitfalls we should be aware of? What other tests should we account for in this scenario? Why isn't this provided by default?

We also saw that SunOne 8.2 doesn't seem to have this issue, so another question is regarding if this is a bug, a regression or caused by other glassfish corba orb improvments?






[GLASSFISH-21276] A number of monitor mbeans are broken Created: 20/Dec/14  Updated: 27/Mar/15  Resolved: 24/Mar/15

Status: Resolved
Project: glassfish
Component/s: amx
Affects Version/s: 4.1
Fix Version/s: 4.2

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

Tags: javaee_ri_fix, payara

 Description   

The following MBeans have broken attributes for statistics gathering. A RuntimeException is thrown when the attributes are accessed.

servlet-instance-mon
bean-pool-mon
bean-method-mon
singleton-bean-mon
message-driven-bean-mon
security-realm-mon
equest-mon
ThreadPoolStatsImpl
transaction-service-mon
stateless-session-bean-mon



 Comments   
Comment by smillidge-c2b2 [ 20/Dec/14 ]

Forgot to say this is 4.1 GlassFish

Comment by smillidge-c2b2 [ 20/Dec/14 ]

This Payara commit fixes the issue https://github.com/payara/Payara/commit/17587c03b928018765c496332f6fb3164c53d8e7

Comment by Arindam Bandyopadhyay [ 09/Mar/15 ]

I was working to add the fix in glassfish. Please provide the test case for this issue.

Comment by smillidge-c2b2 [ 11/Mar/15 ]

Hi Arindam,

Just access their attributes through VisualVM MBean browser or JConsole you will see some attributes give an error.

Steve

Comment by Arindam Bandyopadhyay [ 24/Mar/15 ]

Fixed in trunk/main
Committed revision 63803.





[GLASSFISH-21275] Glassfish4 log rotation “Maximum History Files” issue Created: 19/Dec/14  Updated: 16/Jan/15

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

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

Glassfish 4.0 (only one DAS), Windows Server 2012 R2, Java 1.7.0_51



 Description   

Environment:
Glassfish 4.0 (only one DAS), Windows Server 2012 R2, Java 1.7.0_51
Create the DAS instance service by using the create-service subcommand.

Issue:
The maximum history files attribute has been set, however, Glassfish Server couldn’t remove the old log files due to the lock file server.log.lck

Path --> C:\glassfish4\glassfish\domains\domain1\config\logging.properties
com.sun.enterprise.server.logging.GFFileHandler.maxHistoryFiles=10

Log Snippet:
[2014-12-10T18:00:39.372+0900] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=16 _ThreadName=Thread-5] [timeMillis: 1418202039372] [levelValue: 1000] [[
java.util.logging.ErrorManager: 0: FATAL ERROR: COULD NOT DELETE LOG FILE.]]

[2014-12-10T18:00:39.372+0900] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=16 _ThreadName=Thread-5] [timeMillis: 1418202039372] [levelValue: 1000] [[
java.io.IOException: Could not delete log file: C:\glassfish4\glassfish\domains\domain1\logs\server.log.lck
at com.sun.enterprise.server.logging.GFFileHandler.cleanUpHistoryLogFiles(GFFileHandler.java:725)
at com.sun.enterprise.server.logging.GFFileHandler$4.run(GFFileHandler.java:802)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.server.logging.GFFileHandler.rotate(GFFileHandler.java:744)
at com.sun.enterprise.server.logging.GFFileHandler$1.run(GFFileHandler.java:301)
at com.sun.enterprise.server.logging.LogRotationTimerTask.run(LogRotationTimerTask.java:68)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)]]

Findings:
1, If the lock file “server.log.lck” exists in the log folder, the issue occurred, and can find the above errors in the log every day when Glassfish server tries to remove the old log files. If there is no “server.log.lck” in the log folder, no any issue and work properly.

2, If the DAS instance is started by the command “asadmin start-domain domain1”, there is no lock file “server.log.lck” generated in the log folder. But if the DAS instance is started in Windows Service, the lock file “server.log.lck” will be generated automatically and keep 0KB until stop the service, this file will be removed automatically.

3, If the DAS instance is started by the command “asadmin start-domain -w domain1” which adds the watchdog option, the lock file “server.log.lck” will be generated automatically and exist until stop the service.

4, When the lock file “server.log.lck” appears, there is always one more java.exe process existing. Therefore, when start the DAS instance from Windows Service, there are two “java.exe” running in the process and “server.log.lck” is using by one of them.

Questions:
1, I’d like to start/stop the DAS instance by Windows Service, not using the subcommand. Moreover, I don’t want to keep all Glassfish logs on my server and it will cause a disk full issue so that I would prefer to turn on the Glassfish Logging Maximum history Files option. Is there any workaround or solution for that?

2, Is this a defect of Glassfish or it’s just a setting issue? I did try to install on other servers and all had the same issue.

3, Why there are two java.exe processes running if started from Windows Server, is the 2nd one used for “watchdog”?

Thank you so much for your help and please let me know if there is any further information you’d like to know or want me to do some other tests.



 Comments   
Comment by binru [ 16/Jan/15 ]

Has anyone verified this is a defect and will be resolved? Thank you!





[GLASSFISH-21274] EJB container threads carry wrong transactional context Created: 18/Dec/14  Updated: 18/Dec/14

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

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


 Description   

Guys.

I sure there is an issue in the ejb container by which invocations from either batch jobs (@Schedule) or @Asynchronous that happen on threads from the ejb-thread-pool carry stale transactional information.

I have seen things like:

@TransactionAttribute(TransactionAttributeType.NEVER)
@Schedule(minute = "", second = "/10", dayOfMonth = "", month = "", year = "", hour = "", dayOfWeek = "*", persistent = false)
public void cleanupSessions(Timer timer) {

This method only gets invoked by the container and some times, mostly under a bit of load i see things like

Warning: javax.ejb.TransactionRolledbackLocalException: Client's transaction aborted
at com.sun.ejb.containers.EJBContainerTransactionManager.useClientTx(EJBContainerTransactionManager.java:357)
at com.sun.ejb.containers.EJBContainerTransactionManager.preInvokeTx(EJBContainerTransactionManager.java:251)
at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:4433)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1921)
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3990)
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1199)
at com.sun.ejb.containers.EJBTimerService.access$000(EJBTimerService.java:89)
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1919)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)

Alsoooo.......

I have seen an @Asynchronous method marked as @TransactionAttribute(TransactionAttributeType.NEVER)

calling another @Asynchronous method also marked as @TransactionAttribute(TransactionAttributeType.NEVER)

and the invocation on the second method failing with an error saying the method is marked as NEVER but there is a transasction in progress

It only seems to happen with threds from the ejb thread pool






[GLASSFISH-21273] Glassfish won't clear files descriptors Created: 16/Dec/14  Updated: 17/Dec/14

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

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

CentOS 6.6 x64



 Description   

Hi,

I have problem with glassfish 3.1.2.2 build 5 which won't clear file descriptor and after some time there are a lot of open files and we can see this using 'lsof -p $pid | wc -l' or cat /proc/$pid/fd. Today after two hour I had > 200000 files open. I need help because I don't want to increase all the time max open files in linux by ulimit. If the limit is reached server crash. Please help or give me some tips.

Kind Regards.



 Comments   
Comment by ljachowicz [ 16/Dec/14 ]

Problem was resolved. It was caused by Googlebot-Image which all the time indexing images bumping into a loop. Googlebot was connected to my site 24/7 from 25 November and I think that someone change and broke something, because I didn't have this before.

I created robots.txt and report new file through Google Webmaster Tools. The problem stop .

Robots.txt:

User-agent: Googlebot-Image
Disallow: /

Kind Regards.

Comment by ljachowicz [ 17/Dec/14 ]

Bad news. The problem still exists. If for example I'm browsing pages and glassfish puts all images to memory and doesn't release resources like files descriptors and it is slowly growing up.

When I checked 'lsof -p $pid | grep $image_name' I'm seeing that one image was opened 450 Times. How can I force glassfish to clear useless file descriptor ? I hink that's impossible and it's serious critical bug.

Kind Regards.





[GLASSFISH-21272] JDBC Monitoring MBeans not working in JConsole Created: 16/Dec/14  Updated: 16/Dec/14

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

Type: Bug Priority: Minor
Reporter: smillidge-c2b2 Assignee: prasads
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Some of the attributes of the jdbc-connection-pool-mon MBean do not show up but instead show as Unavailable due to an Invocation Target Exception.



 Comments   
Comment by smillidge-c2b2 [ 16/Dec/14 ]

Suggested fix is in this Payara commit.

https://github.com/payara/Payara/commit/f6fc06e3a0175c87b76a4f5b3ad4da1f3a076c5d





[GLASSFISH-21271] essin Created: 14/Dec/14  Updated: 15/Dec/14  Resolved: 15/Dec/14

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

Type: Bug Priority: Critical
Reporter: Essin Assignee: Joe Di Pol
Resolution: Invalid Votes: 0
Labels: maven
Remaining Estimate: 3 weeks
Time Spent: Not Specified
Original Estimate: 3 weeks
Environment:

Linux


Status Whiteboard:

Wiki

Tags: 3_1_1-approved

 Description   

member






[GLASSFISH-21270] Source build is missing some jaxws-ri (+ policy) modules Created: 11/Dec/14  Updated: 15/Mar/15  Resolved: 15/Mar/15

Status: Resolved
Project: glassfish
Component/s: build_system
Affects Version/s: 4.1
Fix Version/s: future release

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


 Description   

An EE7 RI build error occurred when building metro-2.3.1-b419 which tries to
get and compile com.sun.xml.ws:policy:jar:sources:2.4. It seems
com.sun.xml.ws:policy:jar:sources:2.4 was not provided in Maven
repository yet.

We will address this by redeploying com.sun.xml.ws:policy:jar:sources:2.4 to maven central, but the long term fix is to add this to the RI source bundle.






[GLASSFISH-21269] Cancelled POST via AJP triggers busy wait by http-listener-1 thread Created: 11/Dec/14  Updated: 16/Dec/14

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

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

Ubuntu 12.04.4, Chrome browser with SPDY, apache 2.2.22-1ubuntu1.4, mod_jk 1:1.2.32-1, JAX-RS-based servlet with async-supported set to true



 Description   

A http worker thread goes into a busy conversation with Apache's mod_jk. Both the mod_jk thread and http-listener-1 pool thread are sitting at high CPU (together at around 100% for my single CPU test setup) and the listener appears never to return to the thread pool.

The conversation is as follows (captured using strace on the high CPU glassfish thread):
glassfish -> mod_jk: 0x41 0x42 0x00 0x03 0x06 0x1f 0xfa (Send me up to 8186 bytes of the body)
mod_jk -> glassfish: 0x12 0x34 0x00 0x00 (end of body)
This sequence of messages is repeated very very rapidly, suggesting that the glassfish side is not handling the end of body message from mod_jk.

The request is to an asynchronous JAX-RS method via the @Suspended annotation on an AsyncResponse parameter. The body of the message is JSON and is being deserialised in the container into another method parameter.

I think the following is occurring:

  • The browser sends a post request with a (in this case) 39260 byte body, but cancels it. This closes the spdy stream and causes mod_spdy to report an end of file to mod_jk internally within apache
  • Meanwhile glassfish begins to process the request. It has not read the whole request at this time. It invokes jackson to read the request which in turn reads from the InputStream that AjpHandlerFilter provides (see AjpHandlerFilter.handleRead in the stack trace).
  • The filter chain then appears to mishandle the AJP end of file message and instead continues to request more data. I didn't see AjpHandlerFilter in the read stack trace I captured so maybe it isn't intercepting correctly.

Restarting either apache or glassfish resolves the problem. This bug may be related to https://java.net/jira/browse/GLASSFISH-21202 which seems to have a similar trigger but results in memory growth rather than the high cpu and thread exhaustion I am seeing.

I have included stack traces for the write and read phases of the conversation as captured by jstack. I have also included strace output for the beginning of the problem, and to show how it recovers once Apache is restarted:
Thread 12324: (state = IN_NATIVE)

  • sun.nio.ch.FileDispatcherImpl.write0(java.io.FileDescriptor, long, int) @bci=0 (Compiled frame; information may be imprecise)
  • sun.nio.ch.SocketDispatcher.write(java.io.FileDescriptor, long, int) @bci=4, line=47 (Compiled frame)
  • sun.nio.ch.IOUtil.writeFromNativeBuffer(java.io.FileDescriptor, java.nio.ByteBuffer, long, sun.nio.ch.NativeDispatcher) @bci=114, line=93 (Compiled frame)
  • sun.nio.ch.IOUtil.write(java.io.FileDescriptor, java.nio.ByteBuffer, long, sun.nio.ch.NativeDispatcher) @bci=12, line=51 (Compiled frame)
  • sun.nio.ch.SocketChannelImpl.write(java.nio.ByteBuffer) @bci=206, line=487 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer(java.nio.channels.SocketChannel, java.nio.ByteBuffer) @bci=2, line=149 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOUtils.writeSimpleBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, org.glassfish.grizzly.Buffer) @bci=130, line=133 (Compil
    ed frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTransport.write(org.glassfish.grizzly.nio.transport.TCPNIOConnection, org.glassfish.grizzly.asyncqueue.WritableMessage, org.glassfish.
    grizzly.WriteResult) @bci=53, line=680 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTemporarySelectorWriter.writeNow0(org.glassfish.grizzly.nio.NIOConnection, java.net.SocketAddress, org.glassfish.grizzly.asyncqueue.WritableMessage, org.glassfish.grizzly.WriteResult) @bci=14, line=65 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write0(org.glassfish.grizzly.nio.NIOConnection, java.net.SocketAddress, org.glassfish.grizzly.asyncqueue.WritableMessage, org.glassfish.grizzly.WriteResult, long, java.util.concurrent.TimeUnit) @bci=50, line=202 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(org.glassfish.grizzly.Connection, java.net.SocketAddress, org.glassfish.grizzly.asyncqueue.WritableMessage, org.glassfish.grizzly.CompletionHandler, org.glassfish.grizzly.asyncqueue.PushBackHandler, long, java.util.concurrent.TimeUnit) @bci=71, line=153 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(org.glassfish.grizzly.Connection, java.net.SocketAddress, org.glassfish.grizzly.asyncqueue.WritableMessage, org.glassfish.grizzly.CompletionHandler, org.glassfish.grizzly.asyncqueue.MessageCloner) @bci=19, line=78 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(org.glassfish.grizzly.Connection, java.lang.Object, org.glassfish.grizzly.asyncqueue.WritableMessage, org.glassfish.grizzly.CompletionHandler, org.glassfish.grizzly.asyncqueue.MessageCloner) @bci=11, line=58 (Compiled frame)
  • org.glassfish.grizzly.AbstractWriter.write(org.glassfish.grizzly.Connection, java.lang.Object, org.glassfish.grizzly.asyncqueue.WritableMessage, org.glassfish.grizzly.CompletionHandler) @bci=10, line=105 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=104, line=129 (Compiled frame)
  • org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=20, line=191 (Compiled frame)
  • org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=2, line=111 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(org.glassfish.grizzly.filterchain.FilterExecutor, org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=38, line=284 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(org.glassfish.grizzly.filterchain.FilterChainContext, org.glassfish.grizzly.filterchain.FilterExecutor, int, int, org.glassfish.grizzly.filterchain.DefaultFilterChain$FiltersState) @bci=48, line=201 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=50, line=133 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.process(org.glassfish.grizzly.Context) @bci=103, line=112 (Compiled frame)
  • org.glassfish.grizzly.ProcessorExecutor.execute(org.glassfish.grizzly.Context) @bci=53, line=77 (Compiled frame)
  • org.glassfish.grizzly.filterchain.FilterChainContext.write(java.lang.Object, java.lang.Object, org.glassfish.grizzly.CompletionHandler, org.glassfish.grizzly.asyncqueue.PushBackHandler, org.glassfish.grizzly.asyncqueue.MessageCloner, boolean) @bci=135, line=848 (Compiled frame)
  • org.glassfish.grizzly.filterchain.FilterChainContext.write(java.lang.Object) @bci=13, line=702 (Compiled frame)
  • org.glassfish.grizzly.http.ajp.AjpHandlerFilter.sendMoreDataRequestIfNeeded(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=114, line=504 (Compiled frame)
  • org.glassfish.grizzly.http.ajp.AjpHandlerFilter.handleRead(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=18, line=197 (Compiled frame)
  • org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=2, line=119 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(org.glassfish.grizzly.filterchain.FilterExecutor, org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=38, line=284 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(org.glassfish.grizzly.filterchain.FilterChainContext, org.glassfish.grizzly.filterchain.FilterExecutor, int, int, org.glassfish.grizzly.filterchain.DefaultFilterChain$FiltersState) @bci=48, line=201 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.read(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=83, line=351 (Compiled frame)
  • org.glassfish.grizzly.filterchain.FilterChainContext.read() @bci=65, line=695 (Compiled frame)
  • org.glassfish.grizzly.http.io.InputBuffer.blockingRead() @bci=4, line=1119 (Compiled frame)
  • org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead() @bci=18, line=95 (Compiled frame)
  • org.glassfish.grizzly.http.io.InputBuffer.fill(int) @bci=23, line=1143 (Compiled frame)
  • org.glassfish.grizzly.http.io.InputBuffer.read(byte[], int, int) @bci=74, line=353 (Interpreted frame)
  • org.apache.catalina.connector.InputBuffer.read(byte[], int, int) @bci=33, line=267 (Interpreted frame)
  • org.apache.catalina.connector.CoyoteInputStream.read(byte[], int, int) @bci=97, line=270 (Interpreted frame)
  • org.glassfish.jersey.message.internal.EntityInputStream.read(byte[], int, int) @bci=7, line=101 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.loadMore() @bci=48, line=178 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.parseEscapedName(int[], int, int, int, int) @bci=268, line=1749 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.slowParseName() @bci=64, line=1654 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser._parseName(int) @bci=78, line=1499 (Compiled frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken() @bci=255, line=700 (Compiled frame)
  • com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringMap(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.util.Map) @bci=133, line=416 (Compiled frame)
  • com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=143, line=312 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=3, line=26 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=59, line=525 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object) @bci=5, line=106 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.core.JsonToken) @bci=53, line=242 (Compiled frame)
  • com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=26, line=118 (Compiled frame)
  • com.fasterxml.jackson.databind.ObjectReader._bind(com.fasterxml.jackson.core.JsonParser, java.lang.Object) @bci=128, line=1233 (Interpreted frame)
  • com.fasterxml.jackson.databind.ObjectReader.readValue(com.fasterxml.jackson.core.JsonParser) @bci=6, line=677 (Interpreted frame)
  • com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.InputStream) @bci=204, line=777 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(javax.ws.rs.ext.ReaderInterceptorContext, javax.ws.rs.ext.MessageBodyReader, org.glassfish.jersey.message.internal.EntityInputStream) @bci=61, line=251 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(javax.ws.rs.ext.ReaderInterceptorContext) @bci=292, line=229 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed() @bci=46, line=149 (Interpreted frame)
  • org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundReadFrom(javax.ws.rs.ext.ReaderInterceptorContext) @bci=1, line=73 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed() @bci=46, line=149 (Interpreted frame)
  • org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, org.glassfish.jersey.internal.PropertiesDelegate, java.io.InputStream, java.lang.Iterable, boolean) @bci=48, line=1124 (Interpreted frame)
  • org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], org.glassfish.jersey.internal.PropertiesDelegate) @bci=116, line=851 (Interpreted frame)
  • org.glassfish.jersey.server.ContainerRequest.readEntity(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[]) @bci=8, line=270 (Interpreted frame)
  • org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.provide() @bci=60, line=96 (Interpreted frame)
  • org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(java.util.List) @bci=46, line=81 (Interpreted frame)
  • org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues() @bci=4, line=121 (Interpreted frame)
  • org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(java.lang.Object, javax.ws.rs.core.Request) @bci=3, line=136 (Interpreted frame)
  • org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(java.lang.Object, org.glassfish.jersey.server.ContainerRequest) @bci=5, line=104 (Interpreted frame)
  • org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(org.glassfish.jersey.server.internal.process.RequestProcessingContext, java.lang.Object) @bci=28, line=387 (Interpreted frame)
  • org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(org.glassfish.jersey.server.internal.process.RequestProcessingContext) @bci=97, line=331 (Interpreted frame)
  • org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(java.lang.Object) @bci=5, line=103 (Interpreted frame)
  • org.glassfish.jersey.server.ServerRuntime$1.run() @bci=57, line=271 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors$1.call() @bci=4, line=271 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors$1.call() @bci=1, line=267 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors.process(java.util.concurrent.Callable, boolean) @bci=36, line=315 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors.process(org.glassfish.jersey.internal.util.Producer, boolean) @bci=2, line=297 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors.process(java.lang.Runnable) @bci=9, line=267 (Interpreted frame)
  • org.glassfish.jersey.process.internal.RequestScope.runInScope(org.glassfish.jersey.process.internal.RequestScope$Instance, java.lang.Runnable) @bci=23, line=297 (Interpreted frame)
  • org.glassfish.jersey.server.ServerRuntime.process(org.glassfish.jersey.server.ContainerRequest) @bci=164, line=254 (Interpreted frame)
  • org.glassfish.jersey.server.ApplicationHandler.handle(org.glassfish.jersey.server.ContainerRequest) @bci=5, line=1028 (Interpreted frame)
  • org.glassfish.jersey.servlet.WebComponent.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=119, line=372 (Interpreted frame)
  • org.glassfish.jersey.servlet.ServletContainer.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=9, line=381 (Interpreted frame)
  • org.glassfish.jersey.servlet.ServletContainer.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=362, line=344 (Interpreted frame)
  • org.glassfish.jersey.servlet.ServletContainer.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=39, line=221 (Interpreted frame)
  • org.apache.catalina.core.StandardWrapper.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.Servlet) @bci=122, line=1682 (Interpreted frame)
  • org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=694, line=318 (Interpreted frame)
  • org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=74, line=160 (Interpreted frame)
  • org.apache.catalina.core.StandardPipeline.doInvoke(org.apache.catalina.Request, org.apache.catalina.Response, boolean) @bci=168, line=734 (Interpreted frame)
  • org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=4, line=673 (Interpreted frame)
  • com.sun.enterprise.web.WebPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=99, line=99 (Interpreted frame)
  • org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=44, line=174 (Interpreted frame)
  • org.apache.catalina.connector.CoyoteAdapter.doService(org.glassfish.grizzly.http.server.Request, org.apache.catalina.connector.Request, org.glassfish.grizzly.http.server.Response, org.apache.catalina.connector.Response, boolean) @bci=425, line=415 (Interpreted frame)
  • org.apache.catalina.connector.CoyoteAdapter.service(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=183, line=282 (Interpreted frame)
  • com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call() @bci=12, line=459 (Interpreted frame)
  • com.sun.enterprise.v3.services.impl.ContainerMapper.service(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=15, line=167 (Interpreted frame)
  • org.glassfish.grizzly.http.server.HttpHandler.runService(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=48, line=201 (Interpreted frame)
  • org.glassfish.grizzly.http.server.HttpHandler.doHandle(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=131, line=175 (Interpreted frame)
  • org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=348, line=235 (Interpreted frame)
  • org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=2, line=119 (Interpreted frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(org.glassfish.grizzly.filterchain.FilterExecutor, org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=38, line=284 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(org.glassfish.grizzly.filterchain.FilterChainContext, org.glassfish.grizzly.filterchain.FilterExecutor, int, int, org.glassfish.grizzly.filterchain.DefaultFilterChain$FiltersState) @bci=48, line=201 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=50, line=133 (Interpreted frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.process(org.glassfish.grizzly.Context) @bci=103, line=112 (Interpreted frame)
  • org.glassfish.grizzly.ProcessorExecutor.execute(org.glassfish.grizzly.Context) @bci=53, line=77 (Interpreted frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEventLifeCycleListener) @bci=69, line=561 (Interpreted frame)
  • org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.IOEventLifeCycleListener, java.util.logging.Logger) @bci=9, line=112 (Interpreted frame)
  • org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.IOEventLifeCycleListener) @bci=6, line=117 (Interpreted frame)
  • org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.IOEventLifeCycleListener) @bci=3, line=56 (Interpreted frame)
  • org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run() @bci=12, line=137 (Interpreted frame)
  • org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork() @bci=47, line=565 (Interpreted frame)
  • org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run() @bci=9, line=545 (Interpreted frame)
  • java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)

The read phase of the cycle looks like this:
Thread 12324: (state = IN_NATIVE)

  • sun.nio.ch.FileDispatcherImpl.read0(java.io.FileDescriptor, long, int) @bci=0 (Compiled frame; information may be imprecise)
  • sun.nio.ch.SocketDispatcher.read(java.io.FileDescriptor, long, int) @bci=4, line=39 (Compiled frame)
  • sun.nio.ch.IOUtil.readIntoNativeBuffer(java.io.FileDescriptor, java.nio.ByteBuffer, long, sun.nio.ch.NativeDispatcher) @bci=114, line=223 (Compiled frame)
  • sun.nio.ch.IOUtil.read(java.io.FileDescriptor, java.nio.ByteBuffer, long, sun.nio.ch.NativeDispatcher) @bci=29, line=192 (Compiled frame)
  • sun.nio.ch.SocketChannelImpl.read(java.nio.ByteBuffer) @bci=234, line=379 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOUtils.readSimpleByteBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, java.nio.ByteBuffer) @bci=10, line=344 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOUtils.allocateAndReadBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection) @bci=55, line=237 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTransport.read(org.glassfish.grizzly.Connection, org.glassfish.grizzly.Buffer) @bci=22, line=618 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTemporarySelectorReader.readNow0(org.glassfish.grizzly.nio.NIOConnection, org.glassfish.grizzly.Buffer, org.glassfish.grizzly.ReadResult) @bci=25, line=65 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read0(org.glassfish.grizzly.nio.NIOConnection, org.glassfish.grizzly.ReadResult, org.glassfish.grizzly.Buffer, long, java.util.concurrent.TimeUnit) @bci=39, line=171 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read0(org.glassfish.grizzly.nio.NIOConnection, org.glassfish.grizzly.Interceptor, org.glassfish.grizzly.ReadResult, org.glassfish.grizzly.Buffer, long, java.util.concurrent.TimeUnit) @bci=20, line=141 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(org.glassfish.grizzly.Connection, org.glassfish.grizzly.Buffer, org.glassfish.grizzly.CompletionHandler, org.glassfish.grizzly.Interceptor, long, java.util.concurrent.TimeUnit) @bci=52, line=113 (Compiled frame)
  • org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(org.glassfish.grizzly.Connection, org.glassfish.grizzly.Buffer, org.glassfish.grizzly.CompletionHandler, org.glassfish.grizzly.Interceptor) @bci=18, line=75 (Compiled frame)
  • org.glassfish.grizzly.AbstractReader.read(org.glassfish.grizzly.Connection, org.glassfish.grizzly.Buffer) @bci=12, line=72 (Compiled frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=57, line=77 (Compiled frame)
  • org.glassfish.grizzly.filterchain.TransportFilter.handleRead(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=20, line=173 (Compiled frame)
  • org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=2, line=119 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(org.glassfish.grizzly.filterchain.FilterExecutor, org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=38, line=284 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(org.glassfish.grizzly.filterchain.FilterChainContext, org.glassfish.grizzly.filterchain.FilterExecutor, int, int, org.glassfish.grizzly.filterchain.DefaultFilterChain$FiltersState) @bci=48, line=201 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.read(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=83, line=351 (Compiled frame)
  • org.glassfish.grizzly.filterchain.FilterChainContext.read() @bci=65, line=695 (Compiled frame)
  • org.glassfish.grizzly.http.io.InputBuffer.blockingRead() @bci=4, line=1119 (Compiled frame)
  • org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead() @bci=18, line=95 (Compiled frame)
  • org.glassfish.grizzly.http.io.InputBuffer.fill(int) @bci=23, line=1143 (Compiled frame)
  • org.glassfish.grizzly.http.io.InputBuffer.read(byte[], int, int) @bci=74, line=353 (Interpreted frame)
  • org.apache.catalina.connector.InputBuffer.read(byte[], int, int) @bci=33, line=267 (Interpreted frame)
  • org.apache.catalina.connector.CoyoteInputStream.read(byte[], int, int) @bci=97, line=270 (Interpreted frame)
  • org.glassfish.jersey.message.internal.EntityInputStream.read(byte[], int, int) @bci=7, line=101 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.loadMore() @bci=48, line=178 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.parseEscapedName(int[], int, int, int, int) @bci=268, line=1749 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.slowParseName() @bci=64, line=1654 (Interpreted frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser._parseName(int) @bci=78, line=1499 (Compiled frame)
  • com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken() @bci=255, line=700 (Compiled frame)
  • com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringMap(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.util.Map) @bci=133, line=416 (Compiled frame)
  • com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=143, line=312 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=3, line=26 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=59, line=525 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lan
    g.Object) @bci=5, line=106 (Interpreted frame)
  • com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.core.JsonToken) @bci=53, line=242 (Compiled frame)
  • com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) @bci=26, line=118 (Compiled frame)
  • com.fasterxml.jackson.databind.ObjectReader._bind(com.fasterxml.jackson.core.JsonParser, java.lang.Object) @bci=128, line=1233 (Interpreted frame)
  • com.fasterxml.jackson.databind.ObjectReader.readValue(com.fasterxml.jackson.core.JsonParser) @bci=6, line=677 (Interpreted frame)
  • com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.InputStream) @bci=204, line=777 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(javax.ws.rs.ext.ReaderInterceptorContext, javax.ws.rs.ext.MessageBodyReader, org.glassfish.jersey.message.internal.EntityInputStream) @bci=61, line=251 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(javax.ws.rs.ext.ReaderInterceptorContext) @bci=292, line=229 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed() @bci=46, line=149 (Interpreted frame)
  • org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundReadFrom(javax.ws.rs.ext.ReaderInterceptorContext) @bci=1, line=73 (Interpreted frame)
  • org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed() @bci=46, line=149 (Interpreted frame)
  • org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, org.glassfish.jersey.internal.PropertiesDelegate, java.io.InputStream, java.lang.Iterable, boolean) @bci=48, line=1124 (Interpreted frame)
  • org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], org.glassfish.jersey.internal.PropertiesDelegate) @bci=116, line=851 (Interpreted frame)
  • org.glassfish.jersey.server.ContainerRequest.readEntity(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[]) @bci=8, line=270 (Interpreted frame)
  • org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.provide() @bci=60, line=96 (Interpreted frame)
  • org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(java.util.List) @bci=46, line=81 (Interpreted frame)
  • org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues() @bci=4, line=121 (Interpreted frame)
  • org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(java.lang.Object, javax.ws.rs.core.Request) @bci=3, line=136 (Interpreted frame)
  • org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(java.lang.Object, org.glassfish.jersey.server.ContainerRequest) @bci=5, line=104 (Interpreted frame)
  • org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(org.glassfish.jersey.server.internal.process.RequestProcessingContext, java.lang.Object) @bci=28, line=387 (Interpreted frame)
  • org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(org.glassfish.jersey.server.internal.process.RequestProcessingContext) @bci=97, line=331 (Interpreted frame)
  • org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(java.lang.Object) @bci=5, line=103 (Interpreted frame)
  • org.glassfish.jersey.server.ServerRuntime$1.run() @bci=57, line=271 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors$1.call() @bci=4, line=271 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors$1.call() @bci=1, line=267 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors.process(java.util.concurrent.Callable, boolean) @bci=36, line=315 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors.process(org.glassfish.jersey.internal.util.Producer, boolean) @bci=2, line=297 (Interpreted frame)
  • org.glassfish.jersey.internal.Errors.process(java.lang.Runnable) @bci=9, line=267 (Interpreted frame)
  • org.glassfish.jersey.process.internal.RequestScope.runInScope(org.glassfish.jersey.process.internal.RequestScope$Instance, java.lang.Runnable) @bci=23, line=297 (Interpreted frame)
  • org.glassfish.jersey.server.ServerRuntime.process(org.glassfish.jersey.server.ContainerRequest) @bci=164, line=254 (Interpreted frame)
  • org.glassfish.jersey.server.ApplicationHandler.handle(org.glassfish.jersey.server.ContainerRequest) @bci=5, line=1028 (Interpreted frame)
  • org.glassfish.jersey.servlet.WebComponent.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=119, line=372 (Interpreted frame)
  • org.glassfish.jersey.servlet.ServletContainer.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=9, line=381 (Interpreted frame)
  • org.glassfish.jersey.servlet.ServletContainer.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=362, line=344 (Interpreted frame)
  • org.glassfish.jersey.servlet.ServletContainer.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=39, line=221 (Interpreted frame)
  • org.apache.catalina.core.StandardWrapper.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.Servlet) @bci=122, line=1682 (Interpreted frame)
  • org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=694, line=318 (Interpreted frame)
  • org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=74, line=160 (Interpreted frame)
  • org.apache.catalina.core.StandardPipeline.doInvoke(org.apache.catalina.Request, org.apache.catalina.Response, boolean) @bci=168, line=734 (Interpreted frame)
  • org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=4, line=673 (Interpreted frame)
  • com.sun.enterprise.web.WebPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=99, line=99 (Interpreted frame)
  • org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=44, line=174 (Interpreted frame)
  • org.apache.catalina.connector.CoyoteAdapter.doService(org.glassfish.grizzly.http.server.Request, org.apache.catalina.connector.Request, org.glassfish.grizzly.http.server.Response, org.apache.catalina.connector.Response, boolean) @bci=425, line=415 (Interpreted frame)
  • org.apache.catalina.connector.CoyoteAdapter.service(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=183, line=282 (Interpreted frame)
  • com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call() @bci=12, line=459 (Interpreted frame)
  • com.sun.enterprise.v3.services.impl.ContainerMapper.service(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=15, line=167 (Interpreted frame)
  • org.glassfish.grizzly.http.server.HttpHandler.runService(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=48, line=201 (Interpreted frame)
  • org.glassfish.grizzly.http.server.HttpHandler.doHandle(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) @bci=131, line=175 (Interpreted frame)
  • org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=348, line=235 (Interpreted frame)
  • org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=2, line=119 (Interpreted frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(org.glassfish.grizzly.filterchain.FilterExecutor, org.glassfish.grizzly.filterchain.Filter, org.glassfish.grizzly.filterchain.FilterChainContext) @bci=38, line=284 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(org.glassfish.grizzly.filterchain.FilterChainContext, org.glassfish.grizzly.filterchain.FilterExecutor, int, int, org.glassfish.grizzly.filterchain.DefaultFilterChain$FiltersState) @bci=48, line=201 (Compiled frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(org.glassfish.grizzly.filterchain.FilterChainContext) @bci=50, line=133 (Interpreted frame)
  • org.glassfish.grizzly.filterchain.DefaultFilterChain.process(org.glassfish.grizzly.Context) @bci=103, line=112 (Interpreted frame)
  • org.glassfish.grizzly.ProcessorExecutor.execute(org.glassfish.grizzly.Context) @bci=53, line=77 (Interpreted frame)
  • org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEventLifeCycleListener) @bci=69, line=561 (Interpreted frame)
  • org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.IOEventLifeCycleListener, java.util.logging.Logger) @bci=9, line=112 (Interpreted frame)
  • org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.IOEventLifeCycleListener) @bci=6, line=117 (Interpreted frame)
  • org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(org.glassfish.grizzly.Connection, org.glassfish.grizzly.IOEvent, org.glassfish.grizzly.IOEventLifeCycleListener) @bci=3, line=56 (Interpreted frame)
  • org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run() @bci=12, line=137 (Interpreted frame)
  • org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork() @bci=47, line=565 (Interpreted frame)
  • org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run() @bci=9, line=545 (Interpreted frame)
  • java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)

strace output on the glassfish http-listener-1 thread:
futex(0x7fc2b8219454, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7fc2b8219450,

{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7fc2b8219428, FUTEX_WAKE_PRIVATE, 1) = 1
read(480, "\0224\4a\2\4\0\10HTTP/1.1\0\0\34/base/resourc"..., 242337) = 8027
read(484, "\0224\4[\2\4\0\10HTTP/1.1\0\0\34/base/resourc"..., 242337) = 9311
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4
.... many more repeats until I restart apache ...
futex(0x7fc2b8219454, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7fc2b8219450, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}

) = 1
futex(0x7fc2b8219428, FUTEX_WAKE_PRIVATE, 1) = 1
read(480, "\0224\4a\2\4\0\10HTTP/1.1\0\0\34/base/resourc"..., 242337) = 8027
read(484, "\0224\4[\2\4\0\10HTTP/1.1\0\0\34/base/resourc"..., 242337) = 9311
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4
write(484, "AB\0\3\6\37\372", 7) = 7
read(484, "\0224\0\0", 242337) = 4



 Comments   
Comment by fuzzyBSc2 [ 11/Dec/14 ]

Oops, sorry. The recovery portion of the strace when apache is restarted should be this:
read(484, 0x7fc261e29ff0, 242337) = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(488, EPOLL_CTL_ADD, 484, {EPOLLIN, {u32=484, u64=9290625383554613732}}) = 0
epoll_ctl(488, EPOLL_CTL_MOD, 484, {EPOLLIN, {u32=484, u64=9290625383554613732}}) = 0
epoll_wait(488, {{EPOLLIN|EPOLLERR|EPOLLHUP,

{u32=484, u64=9290625383554613732}

}}, 4096, 30000) = 1
read(484, 0x7fc261e29ff0, 242337) = -1 ECONNRESET (Connection reset by peer)
write(441, "\1", 1) = 1
epoll_ctl(488, EPOLL_CTL_DEL, 484, {0, {u32=484, u64=484}}) = -1 ENOENT (No such file or directory)
close(484) = 0
epoll_wait(488, {}, 4096, 0) = 0
write(2, "[#|2014-12-09T15:42:00.719+1000|"..., 8192) = -1 EPIPE (Broken pipe)
— SIGPIPE (Broken pipe) @ 0 (0) —
write(2, "(DefaultFilterChain.java:133)\n\ta"..., 955) = -1 EPIPE (Broken pipe)
— SIGPIPE (Broken pipe) @ 0 (0) —

Comment by fuzzyBSc2 [ 11/Dec/14 ]

Note: I have tried applying the patches from GLASSFISH-21202 to see if they resolve this problem, but currently they appear to have been prepared for glassfish 4.0 only, not 4.1.

Comment by oleksiys [ 12/Dec/14 ]

pls. try this patch
https://dl.dropboxusercontent.com/u/7319744/glassfish-4.1/glassfishv41-patch.zip

Comment by fuzzyBSc2 [ 15/Dec/14 ]

Thanks,

I have applied this patch and retested. I have not been able to reproduce the problem with this patch in place

Comment by fuzzyBSc2 [ 16/Dec/14 ]

If you don't mind, just a procedural question: Is there any way I could trace this binary patch to a change in the source tree? Part of the open source policy of the company I work for is that I need to show how I would build the software from source if required.

Comment by oleksiys [ 16/Dec/14 ]

)

you can track it on github
https://github.com/GrizzlyNIO/grizzly-mirror/tree/glassfish41





[GLASSFISH-21268] JAX-WS servlet-mapping in web.xml Created: 10/Dec/14  Updated: 10/Dec/14

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

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


 Description   

Basically a JAX-WS web service can be provided as servlet-based service implementation. In this case the container scans a web application for all classes annotated as web service.

Using the @WebService annotation a serviceName can be specified. This service name is used to make up the path to the web service (url-pattern=/<serviceName>).
If an additional web.xml file is supplied in the WAR the url-pattern of the servlet-mapping is to be considered as the path to the web service.

This is based on JSR 109 http://download.oracle.com/otn-pub/jcp/websvcs-1_4-mrel3-eval-spec/websvcs-1_4-fr.pdf stating in 5.3.2.1:

Following default mapping rules apply for Web modules that contain Servlet based endpoints that use this annotation but do not package a web.xml or a partial web.xml:

  • fully qualified name of the Service Implementation Bean class maps to <servlet-name> element in web.xml.
  • fully qualified name of the Service Implementation Bean class maps to <servlet-class> element in web.xml (also specified in section 7.1.2)
  • serviceName attribute of javax.jws.WebService annotation prefixed with "/" maps to <url-pattern> element in web.xml. If the serviceName attribute in javax.jws.WebService annotation is not specified, then the default value as specified in JSR-181 specification is used.

and in 71.2

Servlet Mapping. A developer may optionally specify a servlet-mapping, in the web.xml deployment descriptor, for a JAX-RPC or JAX-WS Service Endpoint. No more than one servlet-mapping may be specified for a servlet that is linked to by a port-component. The url-pattern of the servlet-mapping must be an exact match pattern (i.e. it must not contain an asterisk (“*”)).

For the attached example WAR this should yield a web service with the following path (expected behaviour):
http://<host>/<web_application>/de.testjsr109.ServiceWithNameURLPattern

Unfortunately Glassfish only takes the serviceName-Attribute into consideration and provides the web service at (actuial behaviour):
http://<host>/<web_application>/ServiceWithNameAnnotation



 Comments   
Comment by blasss [ 10/Dec/14 ]

No File attaching....

ServiceWithName.java
package de.testjsr109;

import javax.jws.WebService;

@WebService(serviceName="ServiceWithNameAnnotation")
public class ServiceWithName
{
    public String sayHello(String name)
    {
        return "Hello " + name;
    }
}
web.xml
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    <servlet><servlet-name>JAXWSServiceWithName</servlet-name><servlet-class>de.testjsr109.ServiceWithName</servlet-class></servlet>
    <servlet-mapping><servlet-name>JAXWSServiceWithName</servlet-name><url-pattern>/de.testjsr109.ServiceWithNameURLPattern</url-pattern></servlet-mapping>
</web-app>




[GLASSFISH-21267] Unnecessary resolving of not required JNDI-dependencies in com.sun.enterprise.container.common.impl.util.InjectionManagerImpl#_inject Created: 10/Dec/14  Updated: 24/Mar/15  Resolved: 24/Mar/15

Status: Resolved
Project: glassfish
Component/s: cdi, naming, performance
Affects Version/s: 3.1.2_b08, 4.0, 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: lsxx Assignee: jjsnyder83
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In com.sun.enterprise.container.common.impl.util.InjectionManagerImpl#_inject there is a loop over injectableResources. Within this loop:
1. The resource is resolved using JNDI.
2. there is check if this resource is required (is suitable for target object), if not we go to next iteration.
3. The resource is injected.

As

  • The resource is not required to make the check in point 2.
  • list of (potentially) injectable resources is much bigger (at least in my case) than list of required resources
  • the frequent resolving of JNDI components leads to contention (due to shared context and usage of environment variable implemented as Hashtable in javax.naming API).
    I made a change to resolve resources only after passing point 2.

My change to fix the problem:
Numbers of lines relate to https://java.net/projects/glassfish/sources/svn/content/trunk/main/appserver/common/container-common/src/main/java/com/sun/enterprise/container/common/impl/util/InjectionManagerImpl.java?rev=63719

a) I replaced the lines 631-638 with following line (additional "sharedValue" is required to resolve the "value" only once witin the inner loop because "value" has to be final as it is referenced from inner classes).

Object sharedValue = null;

b) I inserted the following lines after line 647:

if (sharedValue == null){
	String lookupName = next.getComponentEnvName();
	if( !lookupName.startsWith("java:") ) {
		lookupName = "java:comp/env/" + lookupName;
	}
	
	sharedValue =  (componentId != null) ?
			glassfishNamingManager.lookup(componentId, lookupName) :
			glassfishNamingManager.getInitialContext().lookup(lookupName);                    	
}

final Object value = sharedValue;


 Comments   
Comment by jjsnyder83 [ 24/Mar/15 ]

This will not work in all cases. The for loop checks all injectable resources that have been defined for a class. These resources may not be the same and so the first time through the loop will assign sharedValue and every iteration through the loop after that will not get a new value.





[GLASSFISH-21266] Start domain does not follow savelogin/savemasterpassword rules Created: 09/Dec/14  Updated: 09/Dec/14

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

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

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

OS X 10.10.1 (14B25)


Tags: asadmin, password, start-domain

 Description   

Created a domain with following:
./bin/asadmin --passwordfile ./PASS_FILE --user admin create-domain --portbase 9000 --savemasterpassword --savelogin domain2

PASS_FILE:
AS_ADMIN_PASSWORD=password
AS_ADMIN_MASTERPASSWORD=password

Starting the domain now asks for the password:
./bin/asadmin start-domain domain2
Enter master password (3) attempt(s) remain)>

If I enter the password, all other asadmin commands work as expected, including stop-domain, with out having to enter the password. Even enable-secure-admin worked fine.

It seems odd that saving the password information doesn't work for the start-domain command.



 Comments   
Comment by ender01 [ 09/Dec/14 ]

Output of the create-domain command:

Using port 9048 for Admin.
Using port 9080 for HTTP Instance.
Using port 9076 for JMS.
Using port 9037 for IIOP.
Using port 9081 for HTTP_SSL.
Using port 9038 for IIOP_SSL.
Using port 9039 for IIOP_MUTUALAUTH.
Using port 9086 for JMX_ADMIN.
Using port 9066 for OSGI_SHELL.
Using port 9009 for JAVA_DEBUGGER.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=rohan.local,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=rohan.local-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Domain domain2 created.
Domain domain2 admin port is 9048.
Domain domain2 admin user is "admin".
Admin login information for host [localhost] and port [9048]
is being overwritten with credentials provided because the
--savelogin option was used during the create-domain command.
Login information relevant to admin user name [admin]
for this domain [domain2] stored at
[/Users/nick/.gfclient/pass] successfully.
Make sure that this file remains protected.
Information stored in this file will be used by
administration commands to manage this domain.
Command create-domain executed successfully.





[GLASSFISH-21265] TypeNotPresentExceptionProxy deploying Spring Boot application Created: 07/Dec/14  Updated: 27/Mar/15  Resolved: 06/Mar/15

Status: Resolved
Project: glassfish
Component/s: deployment
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Major
Reporter: philwebb Assignee: Vinay Vishal
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: javaee_ri_fix, payara

 Description   

When trying to deploy a Spring Boot application to GlassFish 4.1 the following error occurs:

[2014-12-06T23:18:14.803-0800] [glassfish 4.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=59 _ThreadName=AutoDeployer] [timeMillis: 1417936694803] [levelValue: 1000] [[
  Exception during lifecycle processing
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
	at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:673)
	at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:480)
	at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:306)
	at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:241)
	at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88)
	at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
	at java.lang.Class.initAnnotationsIfNecessary(Class.java:3178)
	at java.lang.Class.getAnnotations(Class.java:3158)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:285)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
	at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626)
	at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462)
	at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
	at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338)
	at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91)
	at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420)
	at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
	at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
	at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203)
	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)
	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)
	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:356)
	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:356)
	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 org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
	at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597)
	at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484)
	at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412)
	at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403)
	at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

I believe that this is because GlassFish is reading a class that has an annotation that refers to another class not available at deployment time. There are many such classes with Spring Boot due to the way that auto-configuration works (e.g. @ConditionalOnClass([SomeClass.class]) where SomeClass may not be on the classpath).

I'm unsure why GlassFish is attempting to read the annotation and why it doesn't silently ignore such errors.

You can find an example deployment test application here.

Equivalent tests for TomEE and WildFly deploy fine.



 Comments   
Comment by smillidge-c2b2 [ 07/Dec/14 ]

Suggested Patch below

From 71db6c614a0d32ccf81dc61f7a347d405f31a0c9 Mon Sep 17 00:00:00 2001
Subject: [PATCH] Handled exception when processing annotations

---
 .../main/java/org/glassfish/apf/impl/AnnotationProcessorImpl.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/appserver/common/annotation-framework/src/main/java/org/glassfish/apf/impl/AnnotationProcessorImpl.java b/appserver/common/annotation-framework/src/main/java/org/glassfish/apf/impl/AnnotationProcessorImpl.java
index eb20604..c12cf59 100644
--- a/appserver/common/annotation-framework/src/main/java/org/glassfish/apf/impl/AnnotationProcessorImpl.java
+++ b/appserver/common/annotation-framework/src/main/java/org/glassfish/apf/impl/AnnotationProcessorImpl.java
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+// Portions Copyright [2014] [C2B2 Consulting Limited]
 
 package org.glassfish.apf.impl;
 
@@ -281,7 +282,8 @@ public class AnnotationProcessorImpl implements AnnotationProcessor {
     {
     
         HandlerProcessingResultImpl result= new HandlerProcessingResultImpl();
-        
+
+        try {
         for (Annotation annotation : element.getAnnotations()) {
             // initialize the result...
             AnnotationInfo subElement = new AnnotationInfo(ctx, element, annotation, getTopElementType());
@@ -293,6 +295,9 @@ public class AnnotationProcessorImpl implements AnnotationProcessor {
                 }
             }       
         }
+        } catch ( Exception tnpe) {
+            logger.info("Got Exception when scanning " + element + " for annotations " + tnpe.toString() + " ignoring Annotations");
+        } 
         return result;
     }
     
-- 
1.9.1

Graphical view here https://github.com/payara/Payara/commit/71db6c614a0d32ccf81dc61f7a347d405f31a0c9

Comment by smillidge-c2b2 [ 07/Dec/14 ]

Can you try this Payara download and see if it fixes everything for you.
http://payara.co.s3-website-eu-west-1.amazonaws.com/payara.zip
It incorporates the patch above.

I tested with a build off your branch and the war deployed and showed "Hello World". Is that enough to pass the test?

Comment by philwebb [ 08/Dec/14 ]

I can confirm that the patch appears to fix things. Thanks.

Comment by Vinay Vishal [ 19/Feb/15 ]

In the suggested patch above, "java.lang.Exception" super class itself is being caught. Wherein if intention is to allow deployment to continue whenever sun.reflect.annotation.TypeNotPresentExceptionProxy is encountered during annotation processing, we can just catch the "java.lang.ArrayStoreException" and put a check on the message inside it. If reason for failure is TypeNotPresentException, deployment can be allowed to continue, in all other exceptions, deployment should fail.

Please suggest.

Comment by Vinay Vishal [ 06/Mar/15 ]

Merged in main trunk.

Sending appserver/common/annotation-framework/src/main/java/org/glassfish/apf/impl/AnnotationProcessorImpl.java
Transmitting file data .
Committed revision 63785.





[GLASSFISH-21264] maven source and javadoc is empty Created: 02/Dec/14  Updated: 02/Dec/14

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

Type: Bug Priority: Minor
Reporter: wulcan Assignee: Romain Grécourt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

sources.jar and javadoc.jar contains neither sources nor javadocs

http://search.maven.org/#artifactdetails%7Corg.glassfish.main.extras%7Cglassfish-embedded-web%7C4.1%7Cjar

The artifacts on maven.java.net are empty too.



 Comments   
Comment by Romain Grécourt [ 02/Dec/14 ]

The embedded artifacts are currently built using some mixture of ant. These ubber jars don't have their corresponding ubber sources.jar and ubber javadoc.jar.
Mavenizing them properly would require addressing other packaging enhancements.





[GLASSFISH-21263] SEVERE log record on calling newGlassFish Created: 02/Dec/14  Updated: 02/Dec/14

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

Type: Bug Priority: Minor
Reporter: wulcan Assignee: Bhavanishankar
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 8
jdk1.7.0_72
maven 3.0.5



 Description   

Following the Embedded Server Guide found on https://glassfish.java.net/documentation.html I get a SEVERE log record in the system error stream.

After the log record, the container seems to start.

Output

Found populator: org.glassfish.kernel.embedded.EmbeddedDomainXml
Dec 02, 2014 12:09:05 PM org.jvnet.hk2.config.ConfigParser handleElement
SEVERE: Ignoring unrecognized element jms-service at Line number = 101
Column number = 72
System Id = null
Public Id = null
Location Uri= null
CharacterOffset = 5783

...

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>fjaf</groupId>
    <artifactId>fjaf</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.glassfish.main.extras</groupId>
            <artifactId>glassfish-embedded-web</artifactId>
            <version>4.1</version>
        </dependency>
    </dependencies>

</project>

a.java

import org.glassfish.embeddable.GlassFishRuntime;

public class a {
    public static void main(String[] args) throws Exception {
        GlassFishRuntime.bootstrap().newGlassFish().start();
    }
}





[GLASSFISH-21262] Jbatch db2 database creaition script is incorrect Created: 01/Dec/14  Updated: 01/Dec/14

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

Type: Bug Priority: Trivial
Reporter: davidwinters1980 Assignee: Masoud Kalali
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
);






[GLASSFISH-21261] Cannot deploy .ear if same ear was deployed, then undeployed on NFS Created: 28/Nov/14  Updated: 27/Mar/15

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

Type: Bug Priority: Major
Reporter: davidwinters1980 Assignee: Vinay Vishal
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, Linux


Tags: javaee_ri_fix, payara

 Description   

The undeployment/deployment of applications (.ear, .war) can fail on NFS in GF 4.1 build 13. There was a previous issue raised with this exact same issue on windows which has been addressed as documented here on GF 4.x: https://java.net/jira/browse/GLASSFISH-19898

This issue occurs on NFS on SUSE Linux Enterprise Server 11 (x86_64). The fix for the defect above solely addresses issues on the windows ploatform whereby each second for a period of 5 seconds an attempt to delete the file in the .glassfishStaleFiles tracker file after a garbage collection is forced by calling System.gc()

I have a patch which be uploaded to here shortly to address this issue on all platforms. Furthermore, the retry interval and retry attempts are configurable rather than having hard coded properties in the code.



 Comments   
Comment by davidwinters1980 [ 01/Dec/14 ]

Patch which fixes this issue on NFS:

/*

  • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    *
  • Copyright (c) 2006-2013 Oracle and/or its affiliates. All rights reserved.
    *
  • The contents of this file are subject to the terms of either the GNU
  • General Public License Version 2 only ("GPL") or the Common Development
  • and Distribution License("CDDL") (collectively, the "License"). You
  • may not use this file except in compliance with the License. You can
  • obtain a copy of the License at
  • https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
  • or packager/legal/LICENSE.txt. See the License for the specific
  • language governing permissions and limitations under the License.
    *
  • When distributing the software, include this License Header Notice in each
  • file and include the License file at packager/legal/LICENSE.txt.
    *
  • GPL Classpath Exception:
  • Oracle designates this particular file as subject to the "Classpath"
  • exception as provided by Oracle in the GPL Version 2 section of the License
  • file that accompanied this code.
    *
  • Modifications:
  • If applicable, add the following below the License Header, with the fields
  • enclosed by brackets [] replaced by your own identifying information:
  • "Portions Copyright [year] [name of copyright owner]"
    *
  • Contributor(s):
  • If you wish your version of this file to be governed by only the CDDL or
  • only the GPL Version 2, indicate your decision by adding "[Contributor]
  • elects to include this software in this distribution under the [CDDL or GPL
  • Version 2] license." If you don't indicate a single choice of license, a
  • recipient has the option to distribute your version of this file under
  • either the CDDL, the GPL Version 2 or to extend the choice of license to
  • its licensees as provided above. However, if you add GPL Version 2 code
  • and therefore, elected the GPL Version 2 license, then the option applies
  • only if the new code is made subject to such option by the copyright
  • holder.
    */
    package com.sun.enterprise.util.io;

import com.sun.enterprise.universal.i18n.LocalStringsImpl;
import com.sun.enterprise.universal.io.SmartFile;
import com.sun.enterprise.util.CULoggerInfo;
import com.sun.enterprise.util.OS;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.RandomAccessFile;
import java.io.Writer;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.WritableByteChannel;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.TreeSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;

import javax.inject.Inject;

import org.jvnet.hk2.config.ConfigBean;

public class FileUtils {
final static Logger _utillogger = CULoggerInfo.getLogger();
private final static LocalStringsImpl messages = new LocalStringsImpl(FileUtils.class);

public static void setFileProperties()
{
Integer retryCounter = Integer.getInteger("com.sun.appserv.winFileLockRetryLimit");
Integer retryInterval = Integer.getInteger("com.sun.appserv.winFileLockRetryDelay");
if (retryCounter != null && retryCounter > 0)

{ FILE_OPERATION_MAX_RETRIES=retryCounter; }

if (retryInterval != null && retryInterval > 0)

{ FILE_OPERATION_SLEEP_DELAY_MS=retryInterval; }

}
/**

  • The method, java.io.File.getParentFile() does not necessarily do what
  • you would think it does. What it really does is to simply chop off the
  • final element in the path and return what is left-over. E.g.
  • if the file is /foo/. then the "parent" that is returned is /foo
  • which is probably not what you expected.
  • This method really returns the parent directory - or null if there is none.
  • @param f
  • @return
    */
    public static File getParentFile(File f) { if (f == null) return null; return SmartFile.sanitize(f).getParentFile(); }

/**

  • Wrapper for File.mkdirs
  • This version will return true if the directory exists when the method returns.
  • Unlike File.mkdirs which returns false if the directory already exists.
  • @param f The file pointing to the directory to be created
  • @return
    */
    public static boolean mkdirsMaybe(File f) { return f != null && (f.isDirectory() || f.mkdirs()); }

/**

  • Wrapper for File.delete
  • This version will return true if the file does not exist when the method returns.
  • Unlike File.delete which returns false if the file does not exist.
  • @param f The file to be deleted
  • @return
    */
    public static boolean deleteFileMaybe(File f) { return f != null && (!f.exists() || f.delete()); }

/*

  • Wrapper for File.listFiles
  • Guaranteed to return an array in all cases.
  • File.listFiles() returns either null or an empty array. This is annoying and results in harder
  • than neccessry to read code – i.e. there are 3 results possible:
  • an array with files in it
  • an empty array
  • a null
    */
    public static File[] listFiles(File f) {
    try { File[] files = f.listFiles(); if(files != null) return files; }

    catch(Exception e)

    { // fall through }

    return new File[0];
    }

    public static File[] listFiles(File f, FileFilter ff) {
    try { File[] files = f.listFiles(ff); if(files != null) return files; }
    catch(Exception e) { // fall through }

return new File[0];
}

public static File[] listFiles(File f, FilenameFilter fnf) {
try

{ File[] files = f.listFiles(fnf); if(files != null) return files; }

catch(Exception e)

{ // fall through }

return new File[0];
}

///////////////////////////////////////////////////////////////////////////

public static boolean safeIsDirectory(File f) { if (f == null || !f.exists() || !f.isDirectory()) return false; return true; }

///////////////////////////////////////////////////////////////////////////

public static boolean safeIsRealDirectory(String s) { return safeIsRealDirectory(new File(s)); }

///////////////////////////////////////////////////////////////////////////

public static boolean safeIsRealDirectory(File f) { if (safeIsDirectory(f) == false) return false; // these 2 values while be different for symbolic links String canonical = safeGetCanonicalPath(f); String absolute = f.getAbsolutePath(); if (canonical.equals(absolute)) return true; /* Bug 4715043 -- WHOA -- Bug Obscura!! * In Windows, if you create the File object with, say, "d:/foo", then the * absolute path will be "d:\foo" and the canonical path will be "D:\foo" * and they won't match!!! **/ if (OS.isWindows() && canonical.equalsIgnoreCase(absolute)) return true; return false; }

///////////////////////////////////////////////////////////////////////////

public static boolean safeIsDirectory(String s) { return safeIsDirectory(new File(s)); }

///////////////////////////////////////////////////////////////////////////

public static String safeGetCanonicalPath(File f) {
if (f == null)
return null;

try { return f.getCanonicalPath(); }
catch (IOException e) { return f.getAbsolutePath(); }
}

///////////////////////////////////////////////////////////////////////////

public static File safeGetCanonicalFile(File f) {
if (f == null)
return null;

try { return f.getCanonicalFile(); }
catch (IOException e) { return f.getAbsoluteFile(); }
}

///////////////////////////////////////////////////////////////////////////

public static boolean hasExtension(String filename, String ext) { if (filename == null || filename.length() <= 0) return false; return filename.endsWith(ext); }

///////////////////////////////////////////////////////////////////////////

public static boolean hasExtension(File f, String ext) { if (f == null || !f.exists()) return false; return f.getName().endsWith(ext); }

///////////////////////////////////////////////////////////////////////////

public static boolean hasExtensionIgnoreCase(String filename, String ext) { if (filename == null || filename.length() <= 0) return false; return filename.toLowerCase(Locale.ENGLISH).endsWith(ext.toLowerCase(Locale.ENGLISH)); }

///////////////////////////////////////////////////////////////////////////

public static boolean hasExtensionIgnoreCase(File f, String ext) { if (f == null || !f.exists()) return false; return f.getName().toLowerCase(Locale.ENGLISH).endsWith(ext.toLowerCase(Locale.ENGLISH)); }

///////////////////////////////////////////////////////////////////////////

public static boolean isLegalFilename(String filename) { if (!isValidString(filename)) return false; for (int i = 0; i < ILLEGAL_FILENAME_CHARS.length; i++) if (filename.indexOf(ILLEGAL_FILENAME_CHARS[i]) >= 0) return false; return true; }

///////////////////////////////////////////////////////////////////////////

public static boolean isFriendlyFilename(String filename) { if (!isValidString(filename)) return false; if (filename.indexOf(BLANK) >= 0 || filename.indexOf(DOT) >= 0) return false; return isLegalFilename(filename); }

///////////////////////////////////////////////////////////////////////////

public static String makeLegalFilename(String filename) { if (isLegalFilename(filename)) return filename; // let's use "__" to replace "/" and "\" (on Windows) so less chance // to collide with the actual name when reverting filename = filename.replaceAll("[/" + Pattern.quote("\\") + "]", "__"); for (int i = 0; i < ILLEGAL_FILENAME_CHARS.length; i++) filename = filename.replace(ILLEGAL_FILENAME_CHARS[i], REPLACEMENT_CHAR); return filename; }

///////////////////////////////////////////////////////////////////////////

public static String makeLegalNoBlankFileName(String filename)
{ return makeLegalFilename(filename).replace( BLANK, REPLACEMENT_CHAR); }


///////////////////////////////////////////////////////////////////////////
public static String makeFriendlyFilename(String filename) { if (isFriendlyFilename(filename)) return filename; String ret = makeLegalFilename(filename).replace(BLANK, REPLACEMENT_CHAR); ret = ret.replace(DOT, REPLACEMENT_CHAR); return ret; }

///////////////////////////////////////////////////////////////////////////

public static String makeFriendlyFilenameNoExtension(String filename) { int index = filename.lastIndexOf('.'); if (index > 0) filename = filename.substring(0, index); return (makeFriendlyFilename(filename)); }

///////////////////////////////////////////////////////////////////////////

public static String makeFriendlyFilenameExtension(String filename) {
if (filename == null) { return null; }

filename = makeLegalNoBlankFileName(filename);

String extension = "";
if (filename.endsWith(".ear")) { filename = filename.substring(0, filename.indexOf(".ear")); extension = "_ear"; } else if (filename.endsWith(".war")) { filename = filename.substring(0, filename.indexOf(".war")); extension = "_war"; } else if (filename.endsWith(".jar")) { filename = filename.substring(0, filename.indexOf(".jar")); extension = "_jar"; } else if (filename.endsWith(".rar")) { filename = filename.substring(0, filename.indexOf(".rar")); extension = "_rar"; }
return filename + extension;
}

public static String revertFriendlyFilenameExtension(String filename) {
if (filename == null ||
!(filename.endsWith("_ear") || filename.endsWith("_war") ||
filename.endsWith("_jar") || filename.endsWith("_rar"))) { return filename; }

String extension = "";
if (filename.endsWith("_ear")) { filename = filename.substring(0, filename.indexOf("_ear")); extension = ".ear"; } else if (filename.endsWith("_war")) { filename = filename.substring(0, filename.indexOf("_war")); extension = ".war"; } else if (filename.endsWith("_jar")) { filename = filename.substring(0, filename.indexOf("_jar")); extension = ".jar"; } else if (filename.endsWith("_rar")) { filename = filename.substring(0, filename.indexOf("_rar")); extension = ".rar"; }
return filename + extension;
}

public static String revertFriendlyFilename(String filename) { //first, revert the file extension String name = revertFriendlyFilenameExtension(filename); //then, revert the rest of the string return name.replaceAll("__", "/"); }

/////////////////////////////////////////////////////////

public static void liquidate(File parent) { whack(parent); }

///////////////////////////////////////////////////////////////////////////

public static boolean isJar(String filename)
{ return hasExtension(filename, ".jar"); }

///////////////////////////////////////////////////////////////////////////

public static boolean isZip(String filename)
{ return hasExtensionIgnoreCase(filename, ".zip"); }

///////////////////////////////////////////////////////////////////////////

public static boolean isJar(File f)
{ return hasExtension(f, ".jar"); }

///////////////////////////////////////////////////////////////////////////
public static boolean isZip(File f)
{ return hasExtensionIgnoreCase(f, ".zip"); }

/**
* Deletes a directory and its contents.
* <p/>
* If this method encounters a symbolic link in the subtree below "parent"
* then it deletes the link but not any of the files pointed to by the link.
* Note that whack will delete files if a symbolic link appears in the
* path above the specified parent directory in the path.
*
* @param parent the File at the top of the subtree to delete
* @return success or failure of deleting the directory
*/
public static boolean whack(File parent) { return whack(parent, null); }

/**
* Deletes a directory and its contents.
* <p/>
* If this method encounters a symbolic link in the subtree below "parent"
* then it deletes the link but not any of the files pointed to by the link.
* Note that whack will delete files if a symbolic link appears in the
* path above the specified parent directory in the path.
*
* @param parent the File at the top of the subtree to delete
* @return success or failure of deleting the directory
*/
public static boolean whack(File parent, Collection<File> undeletedFiles) {
try { /* *Resolve any links up-stream from this parent directory and *then whack the resulting resolved directory. */ return whackResolvedDirectory(parent.getCanonicalFile(), undeletedFiles); } catch (IOException ioe) { _utillogger.log(Level.SEVERE, CULoggerInfo.exceptionIO, ioe); return false; }
}

/**
* Deletes a directory and its contents.
* <p/>
* The whackResolvedDirectory method is invoked with a File argument
* in which any upstream file system links have already been resolved.
* This method will treate Any file passed in that does not have the same
* absolute and canonical path - as evaluated in safeIsRealDirectory -
* as a link and will delete the link without deleting any files in the
* linked directory.
*
* @param parent the File at the top of the subtree to delete
* @return success or failure of deleting the directory
*/
private static boolean whackResolvedDirectory(File parent, Collection<File> undeletedFiles) {
/*
*Do not recursively delete the contents if the current parent
*is a symbolic link.
*/
if (safeIsRealDirectory(parent)) {
File[] kids = listFiles(parent);

for (int i = 0; i < kids.length; i++) {
File f = kids[i];

if (f.isDirectory())
whackResolvedDirectory(f, undeletedFiles);
else if (!deleteFile(f) && undeletedFiles != null) { undeletedFiles.add(f); }

}
}

/*
*Delete the directory or symbolic link.
*/
return deleteFile(parent);
}

/**
* Delete a file. If impossible to delete then try to delete it when the JVM exits.
* E.g. when Windows is using a jar in the current JVM – you can not delete the jar until
* the JVM dies.
* @param f file to delete
*/
public static void deleteFileNowOrLater(File f) { if(!deleteFile(f)) f.deleteOnExit(); }

/**
* Delete a file. Will retry every ten milliseconds for five seconds, doing a
* gc after each second.
*
* @param f file to delete
* @return boolean indicating success or failure of the deletion atttempt; returns true if file is absent
*/
public static boolean deleteFileWithWaitLoop(File f) { return internalDeleteFile(f, true); }

/**
* Delete a file. If on Windows and the delete fails, run the gc and retry the deletion.
*
* @param f file to delete
* @return boolean indicating success or failure of the deletion atttempt; returns true if file is absent
*/
public static boolean deleteFile(File f) { return internalDeleteFile(f, false); }

/**
* Delete a file. If on Windows and the delete fails, run the gc and retry the deletion.
*
* @param f file to delete
* @return boolean indicating success or failure of the deletion atttempt; returns true if file is absent
*/
private static boolean internalDeleteFile(File f, boolean doWaitLoop) {
/*
*The operation succeeds immediately if the file is deleted
*successfully. On systems that support symbolic links, the file
*will be reported as non-existent if the file is a sym link to a
*non-existent directory. In that case invoke delete to remove
*the link before checking for existence, since File.exists on
*a symlink checks for the existence of the linked-to directory or
*file rather than of the link itself.
*/
if (!doWaitLoop) {
if (f.delete()) { return true; }
}
else {
DeleteFileWork work = new DeleteFileWork(f);

doWithRetry(work);

if (work.workComplete()) { return true; }
}

boolean log = _utillogger.isLoggable(FILE_OPERATION_LOG_LEVEL);
String filePath = f.getAbsolutePath();

/*
*The deletion failed. This could be simply because the file
*does not exist. In that case, log an appropriate message and
*return.
*/
if (!f.exists()) {
if (log) { _utillogger.log(Level.FINE, CULoggerInfo.deleteFailedAbsent, filePath); }
return true;
} else {
/*
*The delete failed and the file exists. Log a message if that
*level is enabled and return false to indicate the failure.
*/
if (log) { _utillogger.log(FILE_OPERATION_LOG_LEVEL, CULoggerInfo.deleteFailed, filePath); }
return false;
}
}

/**
* Opens a stream to the specified output file, retrying if necessary.
*
* @param out the output File for which a stream is needed
* @return the FileOutputStream
* @throws IOException for any errors opening the stream
*/
public static FileOutputStream openFileOutputStream(File out) throws IOException {
FileOutputStreamWork work = new FileOutputStreamWork(out);
int retries = doWithRetry(work);
if (retries > 0) { _utillogger.log(Level.FINE, "Retrying " + retries + " times"); }
if (work.workComplete()) { return work.getStream(); } else { IOException ioe = new IOException(); ioe.initCause(work.getLastError()); throw ioe; }
}

/**
* Return a set of all the files (File objects) under the directory specified, with
* relative pathnames filtered with the filename filter (can be null for all files).
*/
public static Set<File> getAllFilesUnder(File directory, FilenameFilter filenameFilter) throws IOException {
if (!directory.exists() || !directory.isDirectory()) { throw new IOException("Problem with: " + directory + ". You must supply a directory that exists"); }
return getAllFilesUnder(directory, filenameFilter, true);
}

public static Set<File> getAllFilesUnder(File directory, FilenameFilter filenameFilter, boolean relativize) throws IOException { Set<File> allFiles = new TreeSet<File>(); File relativizingDir = relativize ? directory : null; recursiveGetFilesUnder( relativizingDir, directory, filenameFilter, allFiles, false ); return allFiles; }

public static Set<File> getAllFilesAndDirectoriesUnder(File directory) throws IOException {
if (!directory.exists() || !directory.isDirectory()) { throw new IOException("Problem with: " + directory + ". You must supply a directory that exists"); }
Set<File> allFiles = new TreeSet<File>();
recursiveGetFilesUnder(directory, directory, null, allFiles, true);
return allFiles;
}

// relativizingRoot can be null, in which case no relativizing is
// performed.
private static void recursiveGetFilesUnder(File relativizingRoot, File directory, FilenameFilter filenameFilter, Set<File> set, boolean returnDirectories) {
File[] files = listFiles(directory, filenameFilter);
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
recursiveGetFilesUnder(relativizingRoot, files[i], filenameFilter, set, returnDirectories);
if (returnDirectories) {
if( relativizingRoot != null ) { set.add(relativize(relativizingRoot, files[i])); } else { set.add(files[i]); }
}
} else {
if( relativizingRoot != null ) { set.add(relativize(relativizingRoot, files[i])); } else { set.add(files[i]); }
}
}
}

/**
* Given a directory and a fully-qualified file somewhere
* under that directory, return the portion of the child
* that is relative to the parent.
*/
public static File relativize(File parent, File child) {
String baseDir = parent.getAbsolutePath();
String baseDirAndChild = child.getAbsolutePath();

String relative = baseDirAndChild.substring(baseDir.length(),
baseDirAndChild.length());

// Strip off any extraneous file separator character.
if( relative.startsWith(File.separator) ) { relative = relative.substring(1); }

return new File(relative);
}


/**
* Executes the supplied work object until the work is done or the max.
* retry count is reached.
*
* @param work the RetriableWork implementation to be run
* @return the number of retries performed; 0 indicates the work succeeded without having to retry
*/
private static int doWithRetry(RetriableWork work) {
int retries = 0;

/*
*Try the work the first time. Ideally this will work.
*/
work.run();

/*
*If the work failed and this is Windows - on which running gc may
*unlock the locked file - then begin the retries.
*/
if (!work.workComplete()) {
if(cmdfilepropertieset)
{ setFileProperties(); cmdfilepropertieset=false; }
_utillogger.log(FILE_OPERATION_LOG_LEVEL, CULoggerInfo.performGC);
while (!work.workComplete() && retries++ < FILE_OPERATION_MAX_RETRIES) {
try { Thread.sleep(FILE_OPERATION_SLEEP_DELAY_MS); } catch (InterruptedException ex) {
}
System.gc();
work.run();
}
}
return retries;
}

/**
* Creates a String listing the absolute paths of files, separated by
* the platform's line separator.
*
* @param files the Collection of File objects to be listed
* @return String containing the absolute paths of the files with the line separator between them
*/
public static String formatFileCollection(Collection<File> files) {
StringBuilder sb = new StringBuilder();
String lineSep = System.getProperty("line.separator");
String prefix = "";
for (File f : files) { sb.append(prefix).append(f.getAbsolutePath()); prefix = lineSep; }
return sb.toString();
}
///////////////////////////////////////////////////////////////////////////

public static File getDirectory(File f) { String filename = f.getAbsolutePath(); return new File((new File(filename)).getParent()); }

///////////////////////////////////////////////////////////////////////////

public static File createTempFile(File directory) {
File f = null;

try { f = File.createTempFile(TMPFILENAME, "jar", directory); }
catch (IOException ioe) { _utillogger.log(Level.SEVERE, CULoggerInfo.exceptionIO, ioe); }

f.deleteOnExit(); // just in case
return f;
}

/**
* Returns an array of abstract pathnames that matches with the given
* file extension. If the given abstract pathname does not denote a
* directory, then this method returns null. If there is no matching
* file under the given directory and its sub directories,
* it returns null;
*
* @param dirName dir name under which search will begin
* @param ext file extension to look for
* @return an array of abstract pathnames that matches with the extension
*/
public static File[] listAllFiles(File dirName, String ext) {
File[] target = null;
List<File> list = searchDir(dirName, ext);

if ((list != null) && (list.size() > 0)) { target = new File[list.size()]; target = (File[]) list.toArray(target); }

return target;
}

/**
* Returns a list of abstract pathnames that matches with the given
* file extension. If the given abstract pathname does not denote a
* directory, then this method returns null. If there is no matching
* file under the given directory and its sub directories, it returns
* an empty list.
*
* @param dirName dir name under which search will begin
* @param ext file extension to look for
* @return a list of abstract pathnames of type java.io.File
* that matches with the given extension
*/
public static List<File> searchDir(File dirName, String ext) {
List<File> targetList = null;

if (dirName.isDirectory()) {
targetList = new ArrayList<File>();

File[] list = listFiles(dirName);

for (int i = 0; i < list.length; i++) {
if (list[i].isDirectory()) { targetList.addAll(searchDir(list[i], ext)); } else {
String name = list[i].toString();
if (hasExtension(name, ext)) { targetList.add(list[i]); }
}
}
}

return targetList;
}

/**
* Copies a file.
*
* @param from Name of file to copy
* @param to Name of new file
* @throws IOException if an error while copying the content
*/
public static void copy(String from, String to) throws IOException { //if(!StringUtils.ok(from) || !StringUtils.ok(to)) if (from == null || to == null) throw new IllegalArgumentException("null or empty filename argument"); File fin = new File(from); File fout = new File(to); copy(fin, fout); }

/**
* Copies a file.
*
* @param fin File to copy
* @param fout New file
* @throws IOException if an error while copying the content
*/
public static void copy(File fin, File fout) throws IOException {
if (safeIsDirectory(fin)) { copyTree(fin, fout); return; }

if (!fin.exists())
throw new IllegalArgumentException("File source doesn't exist");

if(!mkdirsMaybe(fout.getParentFile()))
throw new RuntimeException("Can't create parent dir of output file: " + fout);

copyFile(fin, fout);
}

/**
* Copies the entire tree to a new location.
*
* @param din File pointing at root of tree to copy
* @param dout File pointing at root of new tree
* @throws IOException if an error while copying the content
*/
public static void copyTree(File din, File dout)
throws IOException {
if (!safeIsDirectory(din))
throw new IllegalArgumentException("Source isn't a directory");

if(!mkdirsMaybe(dout))
throw new IllegalArgumentException("Can't create destination directory");

FileListerRelative flr = new FileListerRelative(din);
String[] files = flr.getFiles();

for (int i = 0; i < files.length; i++) { File fin = new File(din, files[i]); File fout = new File(dout, files[i]); copy(fin, fout); }
}


/**
* Returns a String with uniform slashes such that all the
* occurances of '
' are replaced with '/'.
* In other words, the returned string will have all forward slashes.
* Accepts non-null strings only.
*
* @param inputStr non null String
* @return a String which <code> does not contain `
` character </code>
*/
public static String makeForwardSlashes(String inputStr) { if (inputStr == null) throw new IllegalArgumentException("null String FileUtils.makeForwardSlashes"); return (inputStr.replace('\\', '/')); }

/**
* Given a string (typically a path), quote the string such that spaces
* are protected from interpretation by a Unix or Windows command shell.
* Note that this method does not handle quoting for all styles of special
* characters. Just for the basic case of strings with spaces.
*
* @param s input string
* @return a String which is quoted to protect spaces
*/
public static String quoteString(String s) {
if (s == null) { throw new IllegalArgumentException("null string"); }

if (!s.contains("\'")) { return("\'" + s + "\'"); } else if(!s.contains("\"")) { return("\"" + s + "\""); } else {
// Contains a single quote and a double quote. Use backslash
// On Unix. Double quotes on Windows. This method does not claim
// to support this case well if at all
if (OS.isWindows()) { return("\"" + s + "\""); } else { return(s.replaceAll("\040", "\134 ")); }
}
}

///////////////////////////////////////////////////////////////////////////

public static String getIllegalFilenameCharacters() { return ILLEGAL_FILENAME_STRING; }

///////////////////////////////////////////////////////////////////////////

static boolean isValidString(String s) { return ((s != null) && (s.length() != 0)); }


/**
* This method is used to copy a given file to another file
* using the buffer sixe specified
*
* @param fin the source file
* @param fout the destination file
*/
public static void copyFile(File fin, File fout) throws IOException { InputStream inStream = new BufferedInputStream(new FileInputStream(fin)); FileOutputStream fos = FileUtils.openFileOutputStream(fout); copy(inStream, fos, fin.length()); }


public static void copy(InputStream in, FileOutputStream out, long size) throws IOException {

try { copyWithoutClose(in, out, size); } finally { if (in != null) in.close(); if (out != null) out.close(); }
}

public static void copyWithoutClose(InputStream in, FileOutputStream out, long size) throws IOException { ReadableByteChannel inChannel = Channels.newChannel(in); FileChannel outChannel = out.getChannel(); outChannel.transferFrom(inChannel, 0, size); }

public static void copy(InputStream in, OutputStream os, long size) throws IOException {
if (os instanceof FileOutputStream) { copy(in, (FileOutputStream) os, size); } else {
ReadableByteChannel inChannel = Channels.newChannel(in);
WritableByteChannel outChannel = Channels.newChannel(os);
if (size==0) {

ByteBuffer byteBuffer = ByteBuffer.allocate(10240);
int read;
do {
read = inChannel.read(byteBuffer);
if (read>0) { byteBuffer.limit(byteBuffer.position()); byteBuffer.rewind(); outChannel.write(byteBuffer); byteBuffer.clear(); }
} while (read!=-1);
} else {
ByteBuffer byteBuffer;
try{ byteBuffer = ByteBuffer.allocate(Long.valueOf(size).intValue()); }catch(Throwable err){ throw new IOException(messages.get("allocate.more.than.java.heap.space", err)); }
inChannel.read(byteBuffer);
byteBuffer.rewind();
outChannel.write(byteBuffer);
}
}
}

/**
*Rename, running gc on Windows if needed to try to force open streams to close.
*@param fromFile to be renamed
*@param toFile name for the renamed file
*@return boolean result of the rename attempt
*/
public static boolean renameFile(File fromFile, File toFile) {
boolean log = _utillogger.isLoggable(FILE_OPERATION_LOG_LEVEL) || _utillogger.isLoggable(Level.FINE);

RenameFileWork renameWork = new RenameFileWork(fromFile, toFile);
int retries = doWithRetry(renameWork);
boolean result = renameWork.workComplete();

String fromFilePath = null;
String toFilePath = null;
if (log || ! result) { fromFilePath = fromFile.getAbsolutePath(); toFilePath = toFile.getAbsolutePath(); }

/*
*If the rename worked, then write an appropriate log message if the
*logging level allows.
*/
if (result) {
if (log) {
/*
*If the rename worked without retries, then log a FINE message.
*If retries were needed then use the configured
*FILE_OPERATION_LOG_LEVEL.
*/
if (retries == 0) {
if (_utillogger.isLoggable(Level.FINE)) {
_utillogger.log(Level.FINE, CULoggerInfo.renameInitialSuccess,
new Object [] {fromFilePath, toFilePath});
}
} else {
_utillogger.log(FILE_OPERATION_LOG_LEVEL, CULoggerInfo.retryRenameSuccess,
new Object [] {fromFilePath, toFilePath, Integer.valueOf(retries)});
}
}
} else {
/*
*The rename has failed. Write a warning message.
*/
_utillogger.log(Level.WARNING, CULoggerInfo.retryRenameFailure,
new Object [] {fromFilePath, toFilePath, Integer.valueOf(retries) });
}
return result;
}

/** Appends the given line at the end of given text file. If the given
* file does not exist, an attempt is made to create it.
* Note that this method can handle only text files.
* @param fileName name of the text file that needs to be appended to
* @param line the line to append to
* @throws RuntimeException in case of any error - that makes it callable
* from a code not within try-catch. Note that NPE will be thrown if either
* argument is null.
* Note that this method is not tested with String containing characters
* with 2 bytes.
*/
public static void appendText(String fileName, String line) throws
RuntimeException {
RandomAccessFile file = null;
try { final String MODE = "rw"; file = new RandomAccessFile(fileName, MODE); file.seek(file.getFilePointer() + file.length()); file.writeBytes(line); }
catch(Exception e) { throw new RuntimeException("FileUtils.appendText()", e); }
finally {
try { if (file != null) file.close(); }
catch(Exception e){}
}
}
public static void appendText(String fileName, StringBuffer buffer)
throws IOException, FileNotFoundException
{ appendText(fileName, buffer.toString()); }
///////////////////////////////////////////////////////////////////////////

/** A utility routine to read a <b> text file </b> efficiently and return
* the contents as a String. Sometimes while reading log files of spawned
* processes this kind of facility is handy. Instead of opening files, coding
* FileReaders etc. this method could be employed. It is expected that the
* file to be read is <code> small </code>.
* @param fileName String representing absolute path of the file
* @return String representing the contents of the file, empty String for an empty file
* @throws java.io.IOException if there is an i/o error.
* @throws java.io.FileNotFoundException if the file could not be found
*/
public static String readSmallFile(final String fileName)
throws IOException, FileNotFoundException { return (readSmallFile(new File(fileName)) ); }

public static String readSmallFile(final File file)
throws IOException {
final BufferedReader bf = new BufferedReader(new FileReader(file));
final StringBuilder sb = new StringBuilder(); //preferred over StringBuffer, no need to synchronize
String line = null;
try {
while ( (line = bf.readLine()) != null ) { sb.append(line); sb.append(System.getProperty("line.separator")); }
}
finally {
try { bf.close(); }
catch (Exception e) {}
}
return ( sb.toString() );
}

/**
* If the path dir/file does not exist, look for it in the classpath. If found
* in classpath, create dir/file.
*
* @param file - path to look for
* @param dir - directory where the path file should exist
* @return the File representing dir/file. If that does not exist, return null.
* @throws IOException
*/

public static File getManagedFile(String file, File dir) throws IOException {
File f = new File(dir, file);
if (f.exists())
return f;
InputStream is = null, bis = null;
OutputStream os = null;
try {
is = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
if (is == null)
return null;
bis = new BufferedInputStream(is);

if(!mkdirsMaybe(f.getParentFile()))
throw new RuntimeException("Can't create parent dir of output file: " + f);

os = new BufferedOutputStream(FileUtils.openFileOutputStream(f));
byte buf[] = new byte[10240];
int len = 0;
while ((len =bis.read(buf)) > 0) { os.write(buf, 0, len); }
return f;
} finally {
if (os != null)
try { os.close(); } catch (IOException ex) {}

if (bis != null)
try { bis.close(); } catch (IOException ex) {}

if (is != null)
try { is.close(); } catch (IOException ex) {}
}
}

/**
* Write the String to a file. Then make the file readable and writable.
* If the file already exists it will be truncated and the contents replaced
* with the String argument.
* @param s The String to write to the file
* @param f The file to write the String to
* @throws IOException if any errors
*/
public static void writeStringToFile(String s, File f) throws IOException {
Writer writer = null;

try { writer = new PrintWriter(f); writer.write(s); }
finally {
if(writer != null) {
try { writer.close(); }
catch(Exception e) { //ignore }
f.setReadable(true);
f.setWritable(true);
}
}
}
/**
* Find files matching the regular expression in the given directory
* @param dir the directory to search
* @param regexp the regular expression pattern
* @return either an array of matching File objects or an empty array. Guaranteed
* to never return null
*/
public static File[] findFilesInDir(File dir, final String regexp) {
try {
File[] matches = dir.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) { return name.matches(regexp); }
});
if (matches != null)
return matches;
}
catch (Exception e) { // fall through }

return new File[0];
}

/**

  • Read in the given resourceName as a resource, and convert to a String
    *
  • @param resourceName
  • @return the contents of the resource as a String or null if absent
    */
    public static String resourceToString(String resourceName) { byte[] bytes = resourceToBytes(resourceName); return bytes == null ? null : new String(bytes); }

/**

  • Read in the given resourceName as a resource, and convert to a byte array
    *
  • @param resourceName
  • @return the contents of the resource as a byte array or null if absent
    */
    public static byte[] resourceToBytes(String resourceName) {
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    InputStream is = cl.getResourceAsStream(resourceName);

if (is == null)
return null;

try {
is = new BufferedInputStream(is);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int n;

while ((n = is.read(buffer)) != -1)

{ baos.write(buffer, 0, n); }

is.close();
return baos.toByteArray();
}
catch (Exception e) {
try

{ is.close(); }

catch (Exception ex)

{ // ignore... }

return null;
}
}

/**

  • Represents a unit of work that should be retried, if needed, until it
  • succeeds or the configured retry limit is reached.
  • <p/>
  • The <code>run</code> method required by the Runnable interface is invoked
  • to perform the work.
    */
    private interface RetriableWork extends Runnable { /** * Returns whether the work to be done by this instance of RetriableWork * has been completed successfully. * <p/> * This method may be invoked multiple times and so should not have * side effects. * * @return whether the work has been successfully completed */ public boolean workComplete(); }

/**
*Retriable work for renaming a file.
*/
private static class RenameFileWork implements RetriableWork {

private File originalFile;
private File newFile;
private boolean renameResult = false;

public RenameFileWork(File originalFile, File newFile)

{ this.originalFile = originalFile; this.newFile = newFile; }

public boolean workComplete()

{ return renameResult; }

public void run()

{ renameResult = originalFile.renameTo(newFile); }

}

/**

  • Retriable work for opening a FileOutputStream.
    */
    private static class FileOutputStreamWork implements RetriableWork {

private FileOutputStream fos = null;
private Throwable lastError = null;
private File out;

public FileOutputStreamWork(File out)

{ this.out = out; }

public boolean workComplete()

{ return fos != null; }

public void run() {
try

{ fos = new FileOutputStream(out); lastError = null; }

catch (IOException ioe)

{ lastError = ioe; }

}

public FileOutputStream getStream()

{ return fos; }

public Throwable getLastError()

{ return lastError; }

}

/**

  • Retriable work for deleting a file
    */
    private static class DeleteFileWork implements RetriableWork {

private final File deleteMe;
private boolean complete = false;

private DeleteFileWork(File deleteMe)

{ this.deleteMe = deleteMe; }

@Override
public void run()

{ if (complete) return; if (deleteMe.delete()) complete = true; }

@Override
public boolean workComplete()

{ return complete; }

}

///////////////////////////////////////////////////////////////////////////

private final static char[] ILLEGAL_FILENAME_CHARS =

{'/', '\\', ':', '*', '?', '"', '<', '>', '|'}

;
private final static String ILLEGAL_FILENAME_STRING = "\\/:*?\"<>|";
private final static char REPLACEMENT_CHAR = '_';
private final static char BLANK = ' ';
private final static char DOT = '.';
private static String TMPFILENAME = "scratch";
/*
*The following property names are private, unsupported, and unpublished.
*/

private static int FILE_OPERATION_MAX_RETRIES=20;
private static int FILE_OPERATION_SLEEP_DELAY_MS=1000;
private static boolean cmdfilepropertieset=true;
private static final Level FILE_OPERATION_LOG_LEVEL = Level.FINE;
}

Comment by davidwinters1980 [ 08/Jan/15 ]

Although we suspected this issue was originally an NFS file locking issue whereby we allowed users to configure the file delete retry count and interval, we discovered this issue was caused as as a result of the existing code in FileUtils.safeIsRealDirectory(..) not correctly validating symbolic links if the application directory path being checked at undeployment time contained a reference to a symbolic link i.e. the application domain directory is a symbolic link however the application directory and files within this directory are not symbolic links

The amended code below to FileUtils.safeIsRealDirectory(..) fixes this issue:

public static boolean safeIsRealDirectory(File f) {
if (safeIsDirectory(f) == false)
return false;

String canonical =null;
String absolute=null;

try {
canonical = safeGetCanonicalPath(f);
absolute = f.getParentFile().getCanonicalPath() + File.separator + f.getName();

_utillogger.log(Level.FINE,"Canonical path and abolute path values are " + canonical + " " + absolute);

if(canonical.equals(absolute))

{ _utillogger.log(Level.FINE,"The directory " + absolute + " is a symbolic link false"); return true; }

} catch (IOException ioe)

{ _utillogger.log(Level.SEVERE, CULoggerInfo.exceptionIO, ioe); }

/* Bug 4715043 – WHOA – Bug Obscura!!

  • In Windows, if you create the File object with, say, "d:/foo", then the
  • absolute path will be "d:\foo" and the canonical path will be "D:\foo"
  • and they won't match!!!
    **/
    if (OS.isWindows() && canonical.equalsIgnoreCase(absolute)) { _utillogger.log(Level.FINE,"The directory " + absolute + " is a symbolic link false"); return true; }

_utillogger.log(Level.FINE,"The directory " + absolute + " is a symbolic link true");
return false;
}

Comment by dmatej [ 08/Jan/15 ]

Hi Dave,

I recently reported an issue GLASSFISH-21147 , it seems our problem si the same. I patched some other things, but GF team was too slow and finally my patches were accepted in Payara (and maybe later will occur also in Glassfish, but some of them were not still applied). Maybe you should send the patch there - C2B2 reaction is very fast.

I didn't find this bug, so this is great news for me, because redeploys are very annoying at this time (our script deletes directories after successful undeploy).
I will take a look at this, but I think you hit the nail on the head

EDIT: already in Payara, so I will try it! Thanks!

Comment by dmatej [ 12/Jan/15 ]

Hi Dave,

I can confirm that your patch fixed also GLASSFISH-21147 !

Thank you very much!





[GLASSFISH-21260] Cannot start instance on working cluster Created: 26/Nov/14  Updated: 27/Nov/14

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

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

Glassfish 4.1 b13
Java 7 update 51 64bit
debian 7.5 64bit



 Description   

I built a Glassfish cluster work properly. It has 3 machine

  • 1 machine for DAS
  • 2 machines for SSH nodes.

SSH nodes are configured to connect database via Connection Pool

When I start the cluster from new, everything work well.

But when I stop 1 instance, and restart it, it take too long time to start and cannot work properly (it cannot auto run webapps are deployed).

I viewed log file on that instance, and found the last section:

[2014-11-26T15:57:21.217+0700] [glassfish 4.1] [INFO] [] [org.eclipse.persistence.session.file:/home/gbsofts/glassfish4/glassfish/nodes/gbweb1node/gbweb1instance/applications/gbear/gbeejb_jar/_gbePU] [tid: _ThreadID=15 _ThreadName=RunLevelControllerThread-1416992190038] [timeMillis: 1416992241217] [levelValue: 800] [[
EclipseLink, version: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd]]

Every time I restart instance, it stop at this section.

What happen with this, Glassfish or EclipseLink or anything else?



 Comments   
Comment by davidwinters1980 [ 26/Nov/14 ]

Hi,

Could you take a stack trace after you have restarted the instance whereby the instance appears to hang? Also have you any ejb timer based applications deployed to the cluster?

Thanks,
David

Comment by dungld [ 26/Nov/14 ]

I stack trace glassfish at the hang moment as your request.

Please download here: https://drive.google.com/file/d/0B30EeVPAcvhvejJwRS1kVzZYR1E/view

They are 2 files:
stacktrace_1.log : data at the hang point appears
stacktrace_2.log: data after 5 minute when the hang appear

I don't use any EJB Timer on my application.

Thank you for support!

Comment by davidwinters1980 [ 26/Nov/14 ]

Hi,

Based on the stack traces you sent forward, this issue appears to be the same as https://java.net/jira/browse/GLASSFISH-21175

If you do not require XA transactions to be recovered on GF startup then disabling automatic recovery on the transaction manager should resolve this issue. This issue is a result of transaction recovery until to finish completely when GF starts up since there are other XA resources which are in use by other containers/services at server start up time. As a result the transaction recovery thread sits in a wait() indefinitely.

I have provided a patch for this in the jira above but it has not been merged into trunk however we have integrated a patch for this issue on Payara 4.1.144 which can be found here: http://www.payara.co.uk/downloads

If you wish to test with Payara and let us know if that helps.

Comment by davidwinters1980 [ 26/Nov/14 ]

Payara 4.1.144 commit: https://github.com/payara/Payara/commit/9e287e47b7ae18f571e8bb3adacae2b453082758

Comment by dungld [ 27/Nov/14 ]

Thank you for your comment. I disabled automatic recovery feature and that issue disappears. I have few question about this bug:
1. Why don’t Glassfish team fix this bug when receive your code?
2. Is Payara a clone of Glassfish? If Glassfish fix some bugs or improve new features, does Payara also do that?





[GLASSFISH-21259] admin-thread-pool is created after logging in the admin console Created: 26/Nov/14  Updated: 26/Nov/14

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

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


 Description   

domain.xml of server-config has the definition of admin-thread-pool.

        <network-listeners>
          <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
          <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
          <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
        </network-listeners>
        <transports>
          <transport name="tcp"></transport>
        </transports>
      </network-config>
      <thread-pools>
          <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool>
          <thread-pool name="http-thread-pool" max-queue-size="4096"></thread-pool>
          <thread-pool name="thread-pool-1" max-thread-pool-size="200"/>
      </thread-pools>

On the other hand, default-config doesn't have admin-thread-pool,
and http-thread-pool is referenced by admin-listener.

             <network-listeners>
                 <network-listener address="0.0.0.0" port="${HTTP_LISTENER_PORT}" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" />
                 <network-listener address="0.0