[GLASSFISH-21164] On deploy jpa validation Eclipselink do not recognize entity class if has lambda expressions inside a method Created: 13/Aug/14  Updated: 13/Aug/14

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

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

java jdk 1.8_05


Tags: eclipselink, jpa

 Description   

During deploy process if a jpa entity (@Entity) in one of his methods has a java 8 lambda expression the entity is not recognized has a jpa entity and skipped. This cause validation error during deployment if the entity is in relation with others.



 Comments   
Comment by Hong Zhang [ 13/Aug/14 ]

assign to persistence team for evaluation

Comment by Lukas Jungmann [ 13/Aug/14 ]

this is fixed in EclipseLink 2.6.0, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=429992 GF currently uses 2.5.2

Comment by fantarama [ 13/Aug/14 ]

Thanks, but is there a future plan to update GF to 2.6.0? Any workaround to be able to deploy the application?





[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-20970] Classloader leak in PoolResizeTimerTask Created: 04/Feb/14  Updated: 03/Jun/14

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

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

Tags: 4_0_1-evangelists, 4_0_1-reviewed

 Description   

There is a classloader leak in the com.sun.ejb.containers.util.pool.NonBlockingPool and com.sun.ejb.containers.util.pool.NonBlockingPool$PoolResizeTimerTask.

When a application is re-deployed instances of these two classes are created as described in https://java.net/jira/browse/GLASSFISH-16676

This also leads to a classloader leak, which eventually prevents re-deployment of applications.



 Comments   
Comment by electricsam [ 04/Feb/14 ]

Here is the reference tree to the GC root:

this - EarClassLoader

  • parent - WebappClassLoader
    • <classloader> - GenericEJBHome_Generated
      • cls - PresentationManagerImpl$ClassDataImpl
        • value - WeakHashMapSafeReadLock$Entry
          • [] - WeakHashMapSafeReadLock$Entry[]
            • table - WeakHashMapSafeReadLock
              • map - PresentationManagerImpl$1
                • classToClassData - PresentationManagerImpl
                  • presentationMgr - POAProtocolMgr
                    • protocolMgr - StatelessSessionContainer
                      • this$0 - StatelessSessionContainer$SessionContextFactory
                        • factory - NonBlockingPool
                          • this$0 - NonBlockingPool$PoolResizeTimerTask
Comment by electricsam [ 05/Feb/14 ]

I think the actual issue is that there is a hard reference in the dictionary map in PresentationManagerImpl$ClassDataImpl

Here is some cleanup code that I've tried running in the @PreDestroy method of a singleton startup bean to try to clean up classloader leaks. This seems to get rid of many of them. This is just test code.

public abstract class ClassLoaderCleaner {

    private static final Logger logger = Logger.getLogger(ClassLoaderCleaner.class.getName());

    private ClassLoader loader = null;

    protected void destroy() {
        try {
            loader = getClass().getClassLoader();
            cleanUp();
        } catch (Throwable e) {
            logger.log(Level.SEVERE, null, e);
        }
    }

    private Thread[] getThreads() {
        ThreadGroup rootGroup = Thread.currentThread().getThreadGroup();
        ThreadGroup parentGroup;
        while ((parentGroup = rootGroup.getParent()) != null) {
            rootGroup = parentGroup;
        }

        Thread[] threads = new Thread[rootGroup.activeCount()];
        while (rootGroup.enumerate(threads, true) == threads.length) {
            threads = new Thread[threads.length * 2];
        }
        return threads;
    }

    private boolean loaderRemovable(ClassLoader cl) {
        if (cl == null) {
            return false;
        }
        Object isDoneCalled = getObject(cl, "doneCalled");
        if (cl.getClass().getName().equals(loader.getClass().getName())
                && isDoneCalled instanceof Boolean && (Boolean) isDoneCalled) {
            return true;
        }
        return loader == cl;
    }

    private Field getField(Class clazz, String fieldName) {
        Field f = null;
        try {
            f = clazz.getDeclaredField(fieldName);
        } catch (NoSuchFieldException ex) {

        } catch (SecurityException ex) {
            logger.log(Level.WARNING, "Unable to get field " + fieldName + " on " + clazz.getName(), ex);
        }

        if (f == null) {
            Class parent = clazz.getSuperclass();
            if (parent != null) {
                f = getField(parent, fieldName);
            }
        }
        if (f != null) {
            f.setAccessible(true);
        }
        return f;
    }

    private Object getObject(Object instance, String fieldName) {
        Class clazz = instance.getClass();
        Field f = getField(clazz, fieldName);
        if (f != null) {
            try {
                return f.get(instance);
            } catch (IllegalArgumentException | IllegalAccessException ex) {
                logger.log(Level.WARNING, "Unable to get " + fieldName + " on " + clazz.getName(), ex);
            }
        }
        return null;
    }

    private void cleanUp() {
        Thread[] threads = getThreads();
        for (Thread thread : threads) {
            if (thread != null) {
                cleanContextClassLoader(thread);
                cleanOrb(thread);
                cleanThreadLocal(thread);
                cleanTimers(thread);
            }

        }
    }

    private void cleanContextClassLoader(Thread thread) {
        if (loaderRemovable(thread.getContextClassLoader())) {
            thread.setContextClassLoader(null);
            logger.log(Level.INFO, "Cleaned context classloader {0}", thread.getName());
        }
    }

    private void cleanOrb(Thread thread) {
        Object currentWork = getObject(thread, "currentWork");
        if (currentWork != null) {
            Object orb = getObject(currentWork, "orb");
            if (orb != null) {
                Object transportManager = getObject(orb, "transportManager");
                if (transportManager != null) {
                    Thread selector = (Thread) getObject(transportManager, "selector");
                    if (selector != null && loaderRemovable(selector.getContextClassLoader())) {
                        selector.setContextClassLoader(null);
                        logger.log(Level.INFO, "Cleaned orb ref {0}", thread.getName());
                    }
                }
            }
        }
    }

    private void removeThreadLocal(Object entry, Object threadLocals, Thread thread) {
        ThreadLocal threadLocal = (ThreadLocal) getObject(entry, "referent");
        if (threadLocal != null) {
            Class clazz = null;
            try {
                clazz = Class.forName("java.lang.ThreadLocal$ThreadLocalMap");
            } catch (ClassNotFoundException ex) {
                logger.log(Level.WARNING, null, ex);
            }
            if (clazz != null) {
                Method removeMethod = null;
                Method[] methods = clazz.getDeclaredMethods();
                if (methods != null) {
                    for (Method method : methods) {
                        if (method.getName().equals("remove")) {
                            removeMethod = method;
                            removeMethod.setAccessible(true);
                            break;
                        }
                    }
                }
                if (removeMethod != null) {
                    try {
                        removeMethod.invoke(threadLocals, threadLocal);
                        logger.log(Level.INFO, "Cleaned threadlocal {0}", thread.getName());
                    } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                        logger.log(Level.SEVERE, null, ex);
                    }
                }

            }

        }
    }

    private void cleanThreadLocal(Thread thread) {
        Object threadLocals = getObject(thread, "threadLocals");
        if (threadLocals != null) {
            Object table = getObject(threadLocals, "table");
            if (table != null) {
                int size = Array.getLength(table);
                for (int i = 0; i < size; i++) {
                    Object entry = Array.get(table, i);
                    if (entry != null) {
                        Field valueField = getField(entry.getClass(), "value");
                        if (valueField != null) {
                            try {
                                Object value = valueField.get(entry);
                                if (value != null && value instanceof ClassLoader && loaderRemovable((ClassLoader) value)) {
                                    removeThreadLocal(entry, threadLocals, thread);
                                }
                            } catch (IllegalArgumentException | IllegalAccessException ex) {
                                logger.log(Level.WARNING, "Unable to get threadlocal value", ex);
                            }

                        }
                    }

                }
            }
        }
    }

    private void cleanTimers(Thread thread) {
        Object queue = getObject(thread, "queue");
        if (queue != null) {
            Object queue2 = getObject(queue, "queue");
            if (queue2 != null) {
                Object[] taskArray = (Object[]) queue2;
                for (Object timerTask : taskArray) {
                    if (timerTask != null) {
                        Object timerService = getObject(timerTask, "timerService_");
                        if (timerService != null) {
                            Object ejbContainerUtil = getObject(timerService, "ejbContainerUtil");
                            if (ejbContainerUtil != null) {

                                Object orbHelper = getObject(ejbContainerUtil, "orbHelper");
                                if (orbHelper != null) {
                                    Object protocolManager = getObject(orbHelper, "protocolManager");
                                    if (protocolManager != null) {
                                        Object presentationMgr = getObject(protocolManager, "presentationMgr");
                                        if (presentationMgr != null) {
                                            //PresentationManagerImpl$1
                                            Object classToClassData = getObject(presentationMgr, "classToClassData");
                                            if (classToClassData != null) {
                                                Object lock = getObject(classToClassData, "lock");
                                                //WeakHashMapSafeReadLock
                                                Object map = getObject(classToClassData, "map");
                                                if (lock != null && lock instanceof ReentrantReadWriteLock && map != null && map instanceof Map) {
                                                    ReentrantReadWriteLock theLock = (ReentrantReadWriteLock) lock;
                                                    Set<Object> toBeRemoved = new HashSet<>();
                                                    synchronized (presentationMgr) {
                                                        synchronized (classToClassData) {
                                                            theLock.writeLock().lock();
                                                            try {
                                                                Map theMap = (Map) map;
                                                                for (Object key : theMap.keySet()) {
                                                                    if (key != null) {
                                                                        //PresentationManagerImpl$ClassDataImpl
                                                                        Object value = theMap.get(key);

                                                                        if (value != null) {
                                                                            Object cls = getObject(value, "cls");
                                                                            if (cls != null && cls instanceof Class) {
                                                                                ClassLoader cl = ((Class) cls).getClassLoader();
                                                                                if (cl != null) {
                                                                                    if (loaderRemovable(cl) || loaderRemovable(cl.getParent())) {
                                                                                        toBeRemoved.add(key);
                                                                                    }
                                                                                }
                                                                            }

                                                                            Object dictionary = getObject(value, "dictionary");
                                                                            if (dictionary != null && dictionary instanceof Map) {
                                                                                Iterator it = ((Map) dictionary).values().iterator();
                                                                                while (it.hasNext()) {
                                                                                    Object o = it.next();
                                                                                    if (o != null  && o instanceof Class) {
                                                                                        ClassLoader cl = ((Class) o).getClassLoader();
                                                                                        if (cl != null) {
                                                                                            if (loaderRemovable(cl) || loaderRemovable(cl.getParent())) {
                                                                                                it.remove();
                                                                                                logger.log(Level.INFO, "Cleaned dictionary: {0}", thread.getName());
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }

                                                                            }

                                                                        }
                                                                    }
                                                                }

                                                            } finally {
                                                                theLock.writeLock().unlock();
                                                            }
                                                        }
                                                    }

                                                    Method removeMethod = null;
                                                    Method[] methods = presentationMgr.getClass().getDeclaredMethods();
                                                    if (methods != null) {
                                                        for (Method method : methods) {
                                                            if (method.getName().equals("flushClass")) {
                                                                removeMethod = method;
                                                                removeMethod.setAccessible(true);
                                                                break;
                                                            }
                                                        }
                                                    }
                                                    if (removeMethod != null) {
                                                        for (Object cls : toBeRemoved) {
                                                            try {
                                                                removeMethod.invoke(presentationMgr, cls);
                                                                logger.log(Level.INFO, "Cleaned classToClassData: {0}", thread.getName());
                                                            } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                                                logger.log(Level.SEVERE, null, ex);
                                                            }
                                                        }
                                                    }

                                                }

                                            }
                                        }
                                    }
                                }

                                Object timer = getObject(ejbContainerUtil, "_timer");
                                if (timer != null && timer instanceof Timer) {
                                    int purged = ((Timer) timer).purge();
                                    logger.log(Level.INFO, "Cleaned timer {0}. Purged {1} tasks.", new Object[]{thread.getName(), purged});
                                }
                            }
                        }
                    }
                }
            }
        }
    }

}

There is still a leak in a thread local with the following tree

this     - value: org.glassfish.javaee.full.deployment.EarClassLoader #6
 <- loader     - class: com.sun.ejb.containers.CMCSingletonContainer, value: org.glassfish.javaee.full.deployment.EarClassLoader #6
  <- container     - class: com.sun.ejb.containers.EJBLocalObjectInvocationHandler, value: com.sun.ejb.containers.CMCSingletonContainer #9
   <- optionalEjbLocalBusinessObjectImpl     - class: com.sun.ejb.containers.SingletonContextImpl, value: com.sun.ejb.containers.EJBLocalObjectInvocationHandler #12
    <- [0]     - class: java.lang.Object[], value: com.sun.ejb.containers.SingletonContextImpl #10
     <- elementData     - class: java.util.ArrayList, value: java.lang.Object[] #96711
      <- beans     - class: com.sun.ejb.containers.ContainerSynchronization, value: java.util.ArrayList #97409
       <- sync     - class: com.sun.ejb.containers.EjbContainerUtilImpl$TxData, value: com.sun.ejb.containers.ContainerSynchronization #2
        <- containerData     - class: com.sun.enterprise.transaction.JavaEETransactionImpl, value: com.sun.ejb.containers.EjbContainerUtilImpl$TxData #2
         <- clientTx     - class: com.sun.ejb.EjbInvocation, value: com.sun.enterprise.transaction.JavaEETransactionImpl #2
          <- inv     - class: com.sun.enterprise.security.authorize.HandlerData, value: com.sun.ejb.EjbInvocation #5
           <- value     - class: java.lang.ThreadLocal$ThreadLocalMap$Entry, value: com.sun.enterprise.security.authorize.HandlerData #6
            <- [121]     - class: java.lang.ThreadLocal$ThreadLocalMap$Entry[], value: java.lang.ThreadLocal$ThreadLocalMap$Entry #1185
             <- table     - class: java.lang.ThreadLocal$ThreadLocalMap, value: java.lang.ThreadLocal$ThreadLocalMap$Entry[] #179
              <- threadLocals (thread object)     - class: java.lang.Thread, value: java.lang.ThreadLocal$ThreadLocalMap #179




[GLASSFISH-21161] NoClassDefFound on @Converter when inside a EJB JAR Created: 10/Aug/14  Updated: 07/Sep/14

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

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

Windows



 Description   

I have an attribute converter that converts Joda-Time LocalDate to a String

@Converter(autoApply = true)
public class LocalDateConverter implements
AttributeConverter<LocalDate, String> {

@Override
public String convertToDatabaseColumn(final LocalDate localDate) {
if (localDate == null)

{ return null; }
return localDate.toString();
}

@Override
public LocalDate convertToEntityAttribute(final String dbData) {
if (dbData == null) { return null; }

return LocalDate.parse(dbData);
}
}

And I have a @Singleton @Startup bean that has a @PostConstruct that fails because of a NoClassDefFound error for org.joda.time.LocalDate when working with an @PersistenceContext. However, if I don't use the entity manager org.joda.time.LocalDate resolves correctly and I can invoke its methods including .now()

If I put it in the WAR I have a different issue in that it says the web container has not started.



 Comments   
Comment by atrajano [ 10/Aug/14 ]

After looking a bit further, it appears that the classloader for converters do not use the same classpath as the EJB itself. So basically @Converter does not work at all when it is defined in an EJB JAR.

Comment by atrajano [ 10/Aug/14 ]

I have taken out the @Converter and everything works as expected.

Comment by Sanjeeb Sahoo [ 11/Aug/14 ]

From your comments it's clear that it's JPA entity manager module which is not using correct class loader to load org.joda.time.LocalDate.class. So, reassigning this to enity-persistence module to investigate. I strongly recommend attaching a test case and describing how you have packaged jodatime library.

Comment by atrajano [ 16/Aug/14 ]

Further experiments show that Converters function as expected for WAR only deployments, but not for EAR deployments.

WAR only example
https://github.com/trajano/jodatime-jpa-converter-example/tree/still-working

EAR which failed
https://github.com/trajano/jodatime-jpa-converter-example/tree/ear-fails

EAR which failed but works on Wildfly 8 is on master
https://github.com/trajano/jodatime-jpa-converter-example/

Comment by atrajano [ 16/Aug/14 ]

Relevant stack trace lines

Caused by: java.lang.NoClassDefFoundError: org/joda/time/LocalDate
	at net.trajano.example.jpa.LocalDateConverter.convertToDatabaseColumn(LocalDateConverter.java:1)
	at org.eclipse.persistence.internal.jpa.metadata.converters.ConverterClass.convertObjectValueToDataValue(ConverterClass.java:88)
	at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getFieldValue(AbstractDirectMapping.java:776)
	at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.writeFromObjectIntoRow(AbstractDirectMapping.java:1281)
	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildRow(ObjectBuilder.java:1394)
	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildRow(ObjectBuilder.java:1382)
	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:450)
	at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
	at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
	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.commitNewObjectsForClassWithChangeSet(CommitManager.java:226)
	at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:125)
	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.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1585)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:452)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:846)
	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.flush(EntityManagerWrapper.java:437)
	at net.trajano.example.jpa.AddEjb.addSomething(AddEjb.java:24)
	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:601)
	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:4695)
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
	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:601)
	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:582)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	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:4667)
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
	... 85 more
Caused by: java.lang.ClassNotFoundException: org.joda.time.LocalDate
	at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:830)
	at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:744)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
Comment by atrajano [ 07/Sep/14 ]

I found a work around which was to put the converters in a separate JAR file and add it into the WEB-INF/lib folder. This work around works with both Glassfish and WildFly





[GLASSFISH-21076] GF4 ignores the new org.glassfish.ejb.persistent.timer.TimerState class provided in the JPA persistence.xml configuration Created: 28/May/14  Updated: 18/Sep/14

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

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

OSs: Windows 7 Enterprise or Windows Server 2008 R2 Standard
Database: Microsoft SQL Server Version: 10.50.4266


Tags: 4_0_1-approved, EJB, JPA, Timer, TimerState

 Description   

During the deployment of an EAR that make use of the EJB Timer GF4 seems to be aware of the new class org.glassfish.ejb.persistent.timer.TimerState which is configured as part of the persistence.xml JPA configuration (see ejb-timer-service-app), but while loading the timer application the following exception is raised "Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob" which clearly evidences that GF4 is still searching the old TimerState class used until GF 3.1.2.2

Following is the relevant log for your review:

[2014-05-28T09:51:15.801+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.metadata] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475801] [levelValue: 700] [[
The access type for the persistent class [class org.glassfish.ejb.persistent.timer.TimerState] is set to [FIELD].]]

[2014-05-28T09:51:15.832+0200] [glassfish 4.0] [INFO] [ejb.portable_jndi_names] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475832] [levelValue: 800] [[
EJB5181:Portable JNDI names for EJB TimerBean: [java:global/ejb-timer-service-app/TimerBean, java:global/ejb-timer-service-app/TimerBean!org.glassfish.ejb.persistent.timer.TimerLocal]]]

[2014-05-28T09:51:15.957+0200] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00172] [javax.enterprise.web] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475957] [levelValue: 800] [[
Loading application [ejb-timer-service-app] at [/ejb-timer-service-app]]]

[2014-05-28T09:51:15.972+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475972] [levelValue: 800] [[
ejb.timer_service_started]]

[2014-05-28T09:51:15.972+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475972] [levelValue: 800] [[
==> Restoring Timers ... ]]

[2014-05-28T09:51:16.004+0200] [glassfish 4.0] [INFO] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476004] [levelValue: 800] [[
EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130507-3faac2b]]

[2014-05-28T09:51:16.035+0200] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476035] [levelValue: 500] [[
Detected database platform: org.eclipse.persistence.platform.database.SQLServerPlatform]]

[2014-05-28T09:51:16.050+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476050] [levelValue: 700] [[
connecting(DatabaseLogin(
platform=>DatabasePlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))]]

[2014-05-28T09:51:16.050+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476050] [levelValue: 700] [[
Connected: jdbc:sqlserver://10.5.6.136:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=CSIPortal;applicationName=Microsoft SQL Server JDBC Driver;
User: CSIPortal
Database: Microsoft SQL Server Version: 10.50.4266
Driver: Microsoft SQL Server JDBC Driver 3.0 Version: 3.0.1301.101]]

[2014-05-28T09:51:16.050+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476050] [levelValue: 700] [[
connecting(DatabaseLogin(
platform=>SQLServerPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))]]

[2014-05-28T09:51:16.144+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476144] [levelValue: 700] [[
Connected: jdbc:sqlserver://10.5.6.136:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=CSIPortal;applicationName=Microsoft SQL Server JDBC Driver;
User: CSIPortal
Database: Microsoft SQL Server Version: 10.50.4266
Driver: Microsoft SQL Server JDBC Driver 3.0 Version: 3.0.1301.101]]

[2014-05-28T09:51:16.238+0200] [glassfish 4.0] [INFO] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476238] [levelValue: 800] [[
file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful]]

[2014-05-28T09:51:16.269+0200] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.sql] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476269] [levelValue: 500] [[
SELECT "TIMERID", "APPLICATIONID", "BLOB", "CONTAINERID", "CREATIONTIMERAW", "INITIALEXPIRATIONRAW", "INTERVALDURATION", "LASTEXPIRATIONRAW", "OWNERID", "PKHASHCODE", "SCHEDULE", "STATE" FROM "EJB_TIMER_TBL" WHERE (("OWNERID" = ?) AND ("STATE" = ?))
bind => [instance1, 0]]]

[2014-05-28T09:51:16.284+0200] [glassfish 4.0] [WARNING] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476284] [levelValue: 900] [[

Local Exception Stack:
Exception [EclipseLink-66] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not deserialize object from byte array.
Internal Exception: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[blob-->EJB__TIMER__TBL.BLOB]
Descriptor: RelationalDescriptor(org.glassfish.ejb.persistent.timer.TimerState --> [DatabaseTable(EJB__TIMER__TBL)])
at org.eclipse.persistence.exceptions.DescriptorException.notDeserializable(DescriptorException.java:1230)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:75)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getObjectValue(AbstractDirectMapping.java:614)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.valueFromRow(AbstractDirectMapping.java:1215)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.buildCloneFromRow(AbstractDirectMapping.java:203)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoWorkingCopyClone(ObjectBuilder.java:1811)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneFromRow(ObjectBuilder.java:1958)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:726)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:629)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:587)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:571)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:782)
at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:848)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:490)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1155)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1114)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:402)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1202)
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:1744)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:468)
at org.glassfish.ejb.persistent.timer.TimerBean.findTimersByOwnerAndState(TimerBean.java:212)
at org.glassfish.ejb.persistent.timer.TimerBean.findActiveTimersOwnedByThisServer(TimerBean.java:523)
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 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:4695)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:4667)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy264.findActiveTimersOwnedByThisServer(Unknown Source)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.restoreEJBTimers(PersistentEJBTimerService.java:369)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.resetEJBTimers(PersistentEJBTimerService.java:1400)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:236)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:758)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandMultInMultOut(CommandResource.java:256)
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 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.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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:744)
Caused by: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConvertedToClass(ConversionException.java:95)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:446)
at org.eclipse.persistence.internal.helper.ConversionManager.convertClassNameToClass(ConversionManager.java:799)
at org.eclipse.persistence.internal.helper.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:42)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:73)
... 133 more
Caused by: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1761)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:443)
... 141 more
]]

[2014-05-28T09:51:16.893+0200] [glassfish 4.0] [WARNING] [ejb.system_exception] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476893] [levelValue: 900] [[
EJB5184:A system exception occurred during an invocation on EJB TimerBean, method: public java.util.Set org.glassfish.ejb.persistent.timer.TimerBean.findActiveTimersOwnedByThisServer()]]

[2014-05-28T09:51:16.893+0200] [glassfish 4.0] [WARNING] [] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476893] [levelValue: 900] [[

javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
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.$Proxy264.findActiveTimersOwnedByThisServer(Unknown Source)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.restoreEJBTimers(PersistentEJBTimerService.java:369)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.resetEJBTimers(PersistentEJBTimerService.java:1400)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:236)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:758)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandMultInMultOut(CommandResource.java:256)
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 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.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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:744)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-66] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not deserialize object from byte array.
Internal Exception: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[blob-->EJB__TIMER__TBL.BLOB]
Descriptor: RelationalDescriptor(org.glassfish.ejb.persistent.timer.TimerState --> [DatabaseTable(EJB__TIMER__TBL)])
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:479)
at org.glassfish.ejb.persistent.timer.TimerBean.findTimersByOwnerAndState(TimerBean.java:212)
at org.glassfish.ejb.persistent.timer.TimerBean.findActiveTimersOwnedByThisServer(TimerBean.java:523)
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 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:4695)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:4667)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 86 more
Caused by: Exception [EclipseLink-66] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not deserialize object from byte array.
Internal Exception: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[blob-->EJB__TIMER__TBL.BLOB]
Descriptor: RelationalDescriptor(org.glassfish.ejb.persistent.timer.TimerState --> [DatabaseTable(EJB__TIMER__TBL)])
at org.eclipse.persistence.exceptions.DescriptorException.notDeserializable(DescriptorException.java:1230)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:75)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getObjectValue(AbstractDirectMapping.java:614)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.valueFromRow(AbstractDirectMapping.java:1215)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.buildCloneFromRow(AbstractDirectMapping.java:203)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoWorkingCopyClone(ObjectBuilder.java:1811)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneFromRow(ObjectBuilder.java:1958)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:726)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:629)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:587)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:571)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:782)
at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:848)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:490)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1155)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1114)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:402)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1202)
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:1744)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:468)
... 110 more
Caused by: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConvertedToClass(ConversionException.java:95)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:446)
at org.eclipse.persistence.internal.helper.ConversionManager.convertClassNameToClass(ConversionManager.java:799)
at org.eclipse.persistence.internal.helper.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:42)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:73)
... 133 more
Caused by: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1761)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:443)
... 141 more
]]

[2014-05-28T09:51:16.893+0200] [glassfish 4.0] [WARNING] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476893] [levelValue: 900] [[
ejb.timer_service_init_error
javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
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.$Proxy264.findActiveTimersOwnedByThisServer(Unknown Source)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.restoreEJBTimers(PersistentEJBTimerService.java:369)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.resetEJBTimers(PersistentEJBTimerService.java:1400)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:236)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:758)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandMultInMultOut(CommandResource.java:256)
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 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.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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:744)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-66] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not deserialize object from byte array.
Internal Exception: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[blob-->EJB__TIMER__TBL.BLOB]
Descriptor: RelationalDescriptor(org.glassfish.ejb.persistent.timer.TimerState --> [DatabaseTable(EJB__TIMER__TBL)])
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:479)
at org.glassfish.ejb.persistent.timer.TimerBean.findTimersByOwnerAndState(TimerBean.java:212)
at org.glassfish.ejb.persistent.timer.TimerBean.findActiveTimersOwnedByThisServer(TimerBean.java:523)
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 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:4695)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:4667)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 86 more
Caused by: Exception [EclipseLink-66] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not deserialize object from byte array.
Internal Exception: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[blob-->EJB__TIMER__TBL.BLOB]
Descriptor: RelationalDescriptor(org.glassfish.ejb.persistent.timer.TimerState --> [DatabaseTable(EJB__TIMER__TBL)])
at org.eclipse.persistence.exceptions.DescriptorException.notDeserializable(DescriptorException.java:1230)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:75)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getObjectValue(AbstractDirectMapping.java:614)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.valueFromRow(AbstractDirectMapping.java:1215)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.buildCloneFromRow(AbstractDirectMapping.java:203)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoWorkingCopyClone(ObjectBuilder.java:1811)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneFromRow(ObjectBuilder.java:1958)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:726)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:629)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:587)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:571)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:782)
at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:848)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:490)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1155)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1114)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:402)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1202)
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:1744)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:468)
... 110 more
Caused by: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConvertedToClass(ConversionException.java:95)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:446)
at org.eclipse.persistence.internal.helper.ConversionManager.convertClassNameToClass(ConversionManager.java:799)
at org.eclipse.persistence.internal.helper.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:42)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:73)
... 133 more
Caused by: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1761)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:443)
... 141 more
]]

[2014-05-28T09:51:16.893+0200] [glassfish 4.0] [INFO] [ejb.portable_jndi_names] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476893] [levelValue: 800] [[
EJB5181:Portable JNDI names for EJB EJBSchedulerSessionBean: [java:global/CSIPortal-J2EE6/EJBScheduler-ejb/EJBSchedulerSessionBean, java:global/CSIPortal-J2EE6/EJBScheduler-ejb/EJBSchedulerSessionBean!com.portal.scheduler.EJBSchedulerSessionBeanLocal]]]

[2014-05-28T09:51:17.049+0200] [glassfish 4.0] [INFO] [ejb.portable_jndi_names] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263477049] [levelValue: 800] [[
EJB5181:Portable JNDI names for EJB LSCTServicesSessionBean: [java:global/CSIPortal-J2EE6/LSCTServices-ejb/LSCTServicesSessionBean, java:global/CSIPortal-J2EE6/LSCTServices-ejb/LSCTServicesSessionBean!com.contshipitalia.ejb.lsct.LSCTServicesSession]]]

[2014-05-28T09:51:17.205+0200] [glassfish 4.0] [INFO] [NCLS-COMUTIL-00017] [javax.enterprise.system.util] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263477205] [levelValue: 800] [[
com.contshipitalia.ejb.mct.NewCustomsDeclarationEntityPK actually got transformed]]

[2014-05-28T09:51:17.267+0200] [glassfish 4.0] [INFO] [NCLS-COMUTIL-00017] [javax.enterprise.system.util] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263477267] [levelValue: 800] [[
com.contshipitalia.ejb.mct.NewCustomsDeclarationEntity actually got transformed]]

[2014-05-28T09:51:17.267+0200] [glassfish 4.0] [INFO] [ejb.portable_jndi_names] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263477267] [levelValue: 800] [[
EJB5181:Portable JNDI names for EJB MCTNewServicesSessionBean: [java:global/CSIPortal-J2EE6/MCTServices-ejb/MCTNewServicesSessionBean, java:global/CSIPortal-J2EE6/MCTServices-ejb/MCTNewServicesSessionBean!com.contshipitalia.ejb.mct.MCTNewServicesSession]]]

[2014-05-28T09:51:18.141+0200] [glassfish 4.0] [WARNING] [] [org.jboss.weld.interceptor.util.InterceptionTypeRegistry] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263478141] [levelValue: 900] [[
Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled]]

[2014-05-28T09:51:18.141+0200] [glassfish 4.0] [WARNING] [] [org.jboss.weld.interceptor.util.InterceptionTypeRegistry] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263478141] [levelValue: 900] [[
Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled]]

[2014-05-28T09:51:18.640+0200] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263478640] [levelValue: 1000] [[
Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method
java.lang.RuntimeException: EJB Timer Service is not available
at com.sun.ejb.containers.BaseContainer.startApplication(BaseContainer.java:3951)
at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:163)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandMultInMultOut(CommandResource.java:256)
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 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.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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:744)
]]

[2014-05-28T09:51:18.640+0200] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263478640] [levelValue: 1000] [[
Exception during lifecycle processing
java.lang.RuntimeException: EJB Timer Service is not available
at com.sun.ejb.containers.BaseContainer.startApplication(BaseContainer.java:3951)
at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:163)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandMultInMultOut(CommandResource.java:256)
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 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.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java: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:744)
]]

[2014-05-28T09:51:18.655+0200] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263478655] [levelValue: 1000] [[
Exception while loading the app]]

[2014-05-28T09:51:18.687+0200] [glassfish 4.0] [SEVERE] [AS-WEB-GLUE-00192] [javax.enterprise.web] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263478687] [levelValue: 1000] [[
Undeployment failed for context /svc]]

[2014-05-28T09:51:18.749+0200] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263478749] [levelValue: 1000] [[
Exception while loading the app : EJB Timer Service is not available]]



 Comments   
Comment by sjkirkpatrick [ 18/Sep/14 ]

Encountered nearly identical issue, but was able to workaround by setting ejb-timer-service-upgraded property (in domain.xml) to false.





[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-21108] PostgreSQL XA transactions are not supported Created: 27/Jun/14  Updated: 27/Jun/14

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

Type: Bug Priority: Critical
Reporter: sergey.s.sazonov Assignee: Srini
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

postgresql-9.3-1101.jdbc4.jar



 Description   

We are trying to use XA transactions in PostgreSQL and facing with strange behaviour. We have many parallel EJB requests and small part of them fail due to business logic rules, exception goes up through nested EJBs and transaction rolles back. It works fine most of the time but sometimes request ends with HTTP 500 and we see these errors in log. Could you please check that. In administration guide PostgreSQL XA driver is not mentioned, so maybe it is just not supported yet.

[2014-06-26T20:53:40.677+0400] [glassfish 4.0] [WARNING] [jts.exception_on_resource_operation] [javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions] [tid: _ThreadID=35 _ThreadName=http-listener-1(10)] [timeMillis: 1403801620677] [levelValue: 900] [[
  JTS5031: Exception [java.lang.RuntimeException: org.postgresql.xa.PGXAException: Error preparing transaction] on Resource [prepare] operation.]]

[2014-06-26T20:53:40.678+0400] [glassfish 4.0] [WARNING] [jts.unexpected_error_occurred_twopc_rollback] [javax.enterprise.system.core.transaction.com.sun.jts.jtsxa] [tid: _ThreadID=35 _ThreadName=http-listener-1(10)] [timeMillis: 1403801620678] [levelValue: 900] [[
  JTS5068: Unexpected error occurred in rollback
org.postgresql.xa.PGXAException: Error rolling back prepared transaction
	at org.postgresql.xa.PGXAConnection.rollback(PGXAConnection.java:418)
	at com.sun.gjc.spi.XAResourceImpl.rollback(XAResourceImpl.java:195)
	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.jta.TransactionImpl.commit(TransactionImpl.java:122)
	at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:509)
	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.$Proxy337.updateIssue(Unknown Source)
	at com.btf.soesg.api.__EJB31_Generated__CommandEndpoint__Intf____Bean__.updateIssue(Unknown Source)
	at com.btf.soesg.api.rest.Endpoint.updateIssue(Endpoint.java:219)
	at sun.reflect.GeneratedMethodAccessor800.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	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.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:354)
	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:744)
Caused by: org.postgresql.util.PSQLException: ERROR: prepared transaction with identifier "4871251_UhsAAL/TCNl0ZXN0LmJ0Zi5sb2NhbCxzZXJ2ZXIsUDEwMA==_dGVzdC5idGYubG9jYWwsc2VydmVyLFAzNzAwLAA=" does not exist
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:331)
	at org.postgresql.xa.PGXAConnection.rollback(PGXAConnection.java:406)
	... 73 more
]]

[2014-06-26T20:53:40.693+0400] [glassfish 4.0] [WARNING] [ejb.system_exception] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=35 _ThreadName=http-listener-1(10)] [timeMillis: 1403801620693] [levelValue: 900] [[
  EJB5184:A system exception occurred during an invocation on EJB CommandEndpoint, method: public void com.btf.soesg.api.CommandEndpoint.updateIssue(java.lang.String,com.btf.soesg.api.dto.UpdateIssueParam) throws com.btf.soesg.api.APIException]]

[2014-06-26T20:53:40.694+0400] [glassfish 4.0] [WARNING] [] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=35 _ThreadName=http-listener-1(10)] [timeMillis: 1403801620694] [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.$Proxy337.updateIssue(Unknown Source)
	at com.btf.soesg.api.__EJB31_Generated__CommandEndpoint__Intf____Bean__.updateIssue(Unknown Source)
	at com.btf.soesg.api.rest.Endpoint.updateIssue(Endpoint.java:219)
	at sun.reflect.GeneratedMethodAccessor800.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	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.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:354)
	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:744)
Caused by: javax.transaction.RollbackException
	at com.sun.jts.jta.TransactionImpl.commit(TransactionImpl.java:127)
	at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:509)
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:854)
	at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:719)
	... 61 more
]]

[2014-06-26T20:53:40.697+0400] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=35 _ThreadName=http-listener-1(10)] [timeMillis: 1403801620697] [levelValue: 900] [[
  StandardWrapperValve[com.btf.soesg.api.rest.App]: Servlet.service() for servlet com.btf.soesg.api.rest.App threw exception
javax.transaction.RollbackException
	at com.sun.jts.jta.TransactionImpl.commit(TransactionImpl.java:127)
	at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:509)
	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.$Proxy337.updateIssue(Unknown Source)
	at com.btf.soesg.api.__EJB31_Generated__CommandEndpoint__Intf____Bean__.updateIssue(Unknown Source)
	at com.btf.soesg.api.rest.Endpoint.updateIssue(Endpoint.java:219)
	at sun.reflect.GeneratedMethodAccessor800.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	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.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:354)
	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:744)
]]





[GLASSFISH-21195] CDI Injection in Entity Listener - NullPointerException Created: 15/Sep/14  Updated: 24/Mar/15

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

Type: Bug Priority: Critical
Reporter: emresindir Assignee: Srini
Resolution: Unresolved Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I just up to date glassfish 4.0 to 4.1. When inject cdi bean in entity listener, i get NullPointerException.

Excetion Details:
java.lang.NullPointerException
at org.eclipse.persistence.internal.sessions.cdi.EntityListenerInjectionManagerImpl.createEntityListenerAndInjectDependancies(EntityListenerInjectionManagerImpl.java:55)
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.createEntityListenerAndInjectDependancies(EntityListener.java:137)
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.constructListenerInstance(EntityListener.java:151)
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.getListener(EntityListener.java:234)
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.invokeMethod(EntityListener.java:350)
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.prePersist(EntityListener.java:449)
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:748)
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:674)
at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:229)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4316)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4293)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:518)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4235)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:496)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:287)

Details:

public class MyEntityListener {

@Inject
UserSession userSession;

@PrePersist
public void prePersist(AbstractEntity entity)

{ UserOrganization organizastion = userSession.getUserOrganization(); //... //... }

@PreUpdate
public void preUpdate(AbstractEntity entity)

{ //... }

@PreRemove
public void preRemove(AbstractEntity entity)

{ //... }

}



 Comments   
Comment by emresindir [ 15/Sep/14 ]

My project works fine with Glassfish 4.0 but Glassfish 4.1 not. Actually i don't get any lifecycle exception when i deploy. And also i can inject my "UserSession" CDI bean anywhere, except EntityListener.

Edit
-----------------
OS: Linux Mint 17 Qiana (Cinnamon)
Java: JDK 1.7.0.60
IDE: Netbeans 8.0.1

Comment by azuchi [ 22/Sep/14 ]

I was just hit by that same issue too. (Ubuntu 14.04 LTS, JDK 1.8.0_05-b13.)
Works fine with Glassfish 4.0.

Comment by chzbrgla [ 23/Sep/14 ]

I am getting NullPointerException when injecting into an @EntityListener

It used to work on gf4.0, but is not working on gf4.1.

Ubuntu 14.04 LTS; JDK 1.7.0_67-b01

Comment by drame1499 [ 24/Sep/14 ]

Same Problem here. Glassfish 4.1 Build 13 on Ubuntu Server 14.04, JDK 1.7.0_67 Server 64Bit.

Comment by smillidge-c2b2 [ 24/Feb/15 ]

I suspect this is due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=438105 which was introduced in Eclipselink 2.5.2

Comment by jjsnyder83 [ 24/Mar/15 ]

I don't think this has anything to do with CDI so changing the component.





[GLASSFISH-15144] <post-construct> in web.xml doesn't apply to EJB classes Created: 13/Dec/10  Updated: 19/Sep/14

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

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

Tags: 3_1-exclude

 Description   

If I add a <post-construct> entry to web.xml, it doesn't apply to any EJB classes in the war file.

Currently, all post-construct (and pre-destroy) information for an EJB is stored in the
EJBDescriptor. Because of this, these entries in web.xml aren't visible.

Storing the post-construct information in the WebBundleDescriptor caused other failures.
If a superclass and EJB subclass both have the same @PostConstruct method, it was being
called twice. It wasn't properly computing the visibility of methods and which apply;
that seems to only be done in ComponentDefinition when processing EJB annotations. I wasn't
able to figure out exactly why it was going wrong in this case, so the post-construct
information was left at the EJBDescriptor level until this could be fixed. The consequence
of that is this bug.



 Comments   
Comment by marina vatkina [ 20/Dec/10 ]

Not enough time to address it in 3.1





[GLASSFISH-17282] Got "EJB Container initialization error" when deploy a WLS QA ejb test application to GlassFish Created: 08/Sep/11  Updated: 13/Dec/12

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

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

windowsXP


Attachments: Text File server.log     File SimpleSFSBean.ear    
Tags: 3_1_x-exclude

 Description   

P.S. File the bug as per management's request.

I tried to deploy the attached WLS QA ejb test application to Glassfish v3.1.1 and it failed to deploy. And the same ear file was successfully deployed to Weblogic server.
I got the following error when deploying the app.
Error occurred during deployment: Exception while loading the app : EJB Container initialization error. Please see server.log for more details.

The server.log displayed the following exceptions:
----------------------------------------------------

[#|2011-09-08T13:50:21.531-0700|SEVERE|glassfish3.1.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=25;_ThreadName=Thread-2;|Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:242)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:202)
at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:195)
at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:184)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Error while binding JNDI name wlstest.functional.ejb30.session.clientview.common.apps.stateful.annotated.HelperSFSRemoteIntf#wlstest.functional.ejb30.session.clientview.common.apps.stateful.annotated.HelperSFSRemoteIntf for EJB : HelperSFS
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1550)
at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:217)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230)
... 55 more
Caused by: javax.naming.NameAlreadyBoundException: Use rebind to override
at com.sun.enterprise.naming.impl.TransientContext.doBindOrRebind(TransientContext.java:333)
at com.sun.enterprise.naming.impl.TransientContext.bind(TransientContext.java:268)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.bind(SerialContextProviderImpl.java:98)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.bind(LocalSerialContextProviderImpl.java:99)
at com.sun.enterprise.naming.impl.SerialContext.bind(SerialContext.java:672)
at com.sun.enterprise.naming.impl.SerialContext.bind(SerialContext.java:689)
at javax.naming.InitialContext.bind(InitialContext.java:404)
at javax.naming.InitialContext.bind(InitialContext.java:404)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:208)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:189)
at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.java:5607)
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1535)
... 58 more

#]
-------------------------------
The server.log is attached.


 Comments   
Comment by sonialiu [ 08/Sep/11 ]

The following lines in the server.log:

011-09-08T13:49:23.187-0700|INFO|glassfish3.1.1|org.glassfish.admingui|_Thre
=22;_ThreadName=Thread-2;|uploadFileName=SimpleSFSBean.ear|#]

011-09-08T13:49:23.812-0700|WARNING|glassfish3.1.1|javax.enterprise.system.t
.deployment.org.glassfish.deployment.common|_ThreadID=24;_ThreadName=Thread-
gnore META-INF/weblogic-ejb-jar.xml as it is not supported in this release.|

Does this mean we don't support weblogic-ejb-jar.xml in GF V3.1.1?

Comment by Cheng Fang [ 12/Sep/11 ]

Yes, weblogic-ejb-jar.xml is not supported in GlassFish 3.x.

Comment by Cheng Fang [ 21/Sep/11 ]

Since weblogic-ejb-jar.xml is ignored and so any product-specific jndi names will not take effect.

Meanwhile, if we configure GlassFish to disable product-specific jndi names, the test app deploys fine:

asadmin set server.ejb-container.property.disable-nonportable-jndi-names="true"

Comment by Cheng Fang [ 04/Nov/11 ]

Sonia, did the solution in my last comment work?

Comment by sonialiu [ 08/Nov/11 ]

As suggested, after set the server.ejb-container.property.disable-nonportable-jndi-names="true", I could deploy the app successfully. However, we might have to decide if BG will support the weblogic-ejb-jar.xml in the future.

Comment by Cheng Fang [ 08/Nov/11 ]

Thanks Sonia for verifying it. Added 3_1_x-exclude tag to exclude it from 3.1.x.





[GLASSFISH-17350] NameNotFoundException thrown during undeployment of a WAR containing EJBs annotated with portable global JNDI names Created: 26/Sep/11  Updated: 03/Sep/13

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

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

Attachments: Zip Archive webejbexample.zip    
Tags: 3_1_x-exclude

 Description   

Original Java.net forum thread is http://www.java.net/forum/topic/glassfish/glassfish/namenotfoundexception-thrown-during-undeployment-war-containing-ejbs

The following exception stacktrace was produced during undeployment of a Web Archive containing EJBs with an explicit global and portable JNDI name:

[#|2011-09-26T17:39:47.229+0530|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=20;_ThreadName=Thread-4;|WEB0610: [/WebEJBExample] failed to unbind namespace
javax.naming.NameNotFoundException: Cannot find name to unbind
at com.sun.enterprise.naming.impl.TransientContext.doUnbind(TransientContext.java:398)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:420)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.unbind(SerialContextProviderImpl.java:124)
at com.sun.enterprise.naming.impl.SerialContext.unbind(SerialContext.java:740)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.unpublishObject(GlassfishNamingManagerImpl.java:246)
at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl.unbindFromComponentNamespace(ComponentEnvManagerImpl.java:355)
at com.sun.enterprise.web.WebModuleContextConfig.unbindFromComponentNamespace(WebModuleContextConfig.java:454)
at com.sun.enterprise.web.WebModuleContextConfig.stop(WebModuleContextConfig.java:447)
at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:174)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5603)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1049)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2211)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2166)
at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:159)
at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:322)
at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:999)
at com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1025)
at org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:330)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
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:662)

#]

The error appears to occur when Glassfish attempts to undeploy the web module after undeploying the EJB module. The EJB module appears to be the one that owns the portable JNDI name, and when the web module attempts to unbind the non-existent JNDI name, the afore-mentioned exception is thrown. This has grave consequences in a more complicated scenario (like the usage of Hibernate as a JPA provider within the application), as the web-module does not appear to be completely undeployed, resulting in vague exceptions being thrown on a subsequent deployment and use of the application.

Surprisingly, the exception is not thrown when the EJB module is packaged in a EAR file, as an ejb-jar file. Also, no exceptions are thrown when no portable JNDI names are specified for the EJB using the @EJB annotation.

A testcase (an Eclipse project) to reproduce this is attached.



 Comments   
Comment by Hong Zhang [ 26/Sep/11 ]

assign to cheng for initial evaluation

Comment by Cheng Fang [ 27/Sep/11 ]

I was able to reproduce it. The use case is valid and should not cause exception logging. However, a cursory look at webModuleContextConfig.unbindFromComponentNamespace(...) method shows it only logs the exception, which shouldn't affect normal application flow. Can you provide more details how other parts of your app is affected?

Re-assign to web container for further evaluation.

From the above forum post, "the exception is not thrown when the EJB module is packaged in a EAR file, as an ejb-jar file. Also, no exceptions are thrown when no portable JNDI names are specified for the EJB using the @EJB annotation."

In addition, the exception is not thrown when @EJB is on servlet class.

The exception is thrown when @EJB is on ejb bean class and the ejb is packaged inside war.

Comment by Vineet Reynolds [ 28/Sep/11 ]

I'll attempt to enhance the provided test case with the failures I'm seeing in my application, since no exceptions are being thrown when using the redeployed testcase. My application currently uses Arquillian to deploy a WAR to a Glassfish instance via the REST interface. Manual deployment of the same WAR also gives the same problem, so we could rule out the REST interface. Currently, exceptions like the one shown in the below stacktrace are thrown, when attempting to use the application after redeployment. A restart of Glassfish always resolves this issue.

[#|2011-09-28T10:54:32.943+0530|WARNING|glassfish3.1.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=22;_ThreadName=Thread-4;|A system exception occurred during an invocation on EJB GroupRepository method public info.galleria.domain.Group info.galleria.service.jpa.GroupRepository.create(info.galleria.domain.Group)
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean
at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:5049)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4884)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2039)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1990)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:236)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at $Proxy234.create(Unknown Source)
at info.galleria.service.jpa._EJB31_GeneratedGroupRepositoryIntf__Bean_.create(Unknown Source)
at info.galleria.service.ejb.GroupServiceImpl.createRegisteredUsersGroup(GroupServiceImpl.java:41)
at info.galleria.service.ejb.GroupServiceImpl.getOrCreateRegisteredUsersGroup(GroupServiceImpl.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5366)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5338)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5326)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at $Proxy237.getOrCreateRegisteredUsersGroup(Unknown Source)
at info.galleria.service.ejb.UserServiceImpl.signupUser(UserServiceImpl.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5366)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5338)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5326)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at $Proxy239.signupUser(Unknown Source)
at info.galleria.view.user.UserManager.signupUser(UserManager.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at info.galleria.filters.UserRedirectFilter.doFilter(UserRedirectFilter.java:57)
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 com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
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:662)
Caused by: javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of info.galleria.domain.Group.groupId
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1179)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1112)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1118)
at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:618)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)
at info.galleria.service.jpa.GroupRepository.create(GroupRepository.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5366)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5338)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5326)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
... 104 more
Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of info.galleria.domain.Group.groupId
at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:62)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:230)
at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:3852)
at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:3560)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:204)
at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:532)
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:102)
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61)
at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:800)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:774)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:778)
at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:612)
... 128 more
Caused by: java.lang.IllegalArgumentException: Can not set java.lang.String field info.galleria.domain.Group.groupId to info.galleria.domain.Group
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
at java.lang.reflect.Field.get(Field.java:358)
at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:59)
... 139 more

#]
Comment by Shing Wai Chan [ 11/Oct/11 ]

From the debugger, I see that "GreetingManager" was unbind twice and hence has the exception in the second invocation. Web container only logs the exception as it wants the undeployment to continue in this case.

The following are the two calling stack:
1. at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:420)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.unbind(SerialContextProviderImpl.java:124)
at com.sun.enterprise.naming.impl.SerialContext.unbind(SerialContext.java:740)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.unpublishObject(GlassfishNamingManagerImpl.java:246)
at com.sun.ejb.containers.BaseContainer$JndiInfo.unpublish(BaseContainer.java:5636)
at com.sun.ejb.containers.BaseContainer.doContainerCleanup(BaseContainer.java:4318)
at com.sun.ejb.containers.BaseContainer.undeploy(BaseContainer.java:4222)
at org.glassfish.ejb.startup.EjbApplication.stop(EjbApplication.java:305)
at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:322)
at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:999)
at com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1025)
at org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:330)

2. at com.sun.enterprise.naming.impl.TransientContext.doUnbind(TransientContext.java:398)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:420)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424)
at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.unbind(SerialContextProviderImpl.java:124)
at com.sun.enterprise.naming.impl.SerialContext.unbind(SerialContext.java:740)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.unpublishObject(GlassfishNamingManagerImpl.java:246)
at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl.unbindFromComponentNamespace(ComponentEnvManagerImpl.java:355)
at com.sun.enterprise.web.WebModuleContextConfig.unbindFromComponentNamespace(WebModuleContextConfig.java:454)
at com.sun.enterprise.web.WebModuleContextConfig.stop(WebModuleContextConfig.java:447)
at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:174)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5603)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1049)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2216)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2171)
at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:159)
at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:322)
at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:999)
at com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1025)
at org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:330)

The "GreetingManager" was unbind twice as the ejb reference presents in both ejb and web bundle descriptors. Note that those descriptors are from annotation processing for ejb in war.

Comment by Cheng Fang [ 08/Nov/11 ]

Added tag 3_1_x-exclude. There are various workaround as described in previous comments. The logged stack trace is only warning message and should not affect normal app functioning.

Comment by markokanala [ 20/Mar/13 ]

I stumbled upon this issue. I can confirm this breaks the redeploy cycle as the deploy after this exception fails. This very annoying in development use.

I'm not really sure what exactly breaks but it seems that injecting EJB's on redeploy fails.

[#|2013-03-20T15:18:25.528+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-3;|WebModule[/api]PWC1270: Exception starting filter VirtualHostingFilter
java.lang.InstantiationException
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:124)
...
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class our.application.api.security.VirtualHostingFilter
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:315)
at com.sun.enterprise.web.WebContainer.createFilterInstance(WebContainer.java:745)
...
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Local ejb-ref name= ... into nto class our.application.api.security.VirtualHostingFilter: Can not set our.application.core.service.CompanyService field our.application.api.security.VirtualHostingFilter.companyService to our.application.api.security.VirtualHostingFilter

and

[#|2013-03-20T15:18:25.919+0200|SEVERE|glassfish3.1.2|com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer|_ThreadID=19;_ThreadName=Thread-3;|Error when configuring to use the EJB interceptor binding API. JAX-RS EJB support is disabled.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer.initialize(EJBComponentProviderFactoryInitilizer.java:80)

Comment by klaasjanelzinga [ 03/Sep/13 ]

My redeployment cycle worked again after adding the messagelistener to the ejb-jar.xml:

<enterprise-beans>
<message-driven>
<ejb-name>...</ejb-name>
<ejb-class>...</ejb-class>
</message-driven>
</enterprise-beans>

Only the @MessageDriven with beans.xml caused the JAX-RS EJB support is disabled.

Comment by marina vatkina [ 03/Sep/13 ]

This seems very similar to https://java.net/jira/browse/GLASSFISH-20616





[GLASSFISH-20797] JPA Schema Generation Properties not creating scripts Created: 04/Sep/13  Updated: 03/Jun/14

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

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

Tags: 4_0_1-approved

 Description   

I've a sample to try script generation using JPA 2.1 javax.persistence.* properties:

https://github.com/arun-gupta/javaee7-samples/tree/master/jpa/schema-gen-scripts-generate

persistence.xml looks like:

<persistence
    version="2.1"
    xmlns="http://xmlns.jcp.org/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
 &nb sp;<persistence-unit name="MyPU" transaction-type="JTA">
    <properties>
      <property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>
      <property name="javax.persistence.schema-generation.scripts.create-target" value="file:/tmp/create.sql"/>
      <property name="javax.persistence.sche ma-generation.scripts.drop-target" value="file:/tmp/drop.sql"/>
    </properties>
  </persistence-unit>
</persistence>

persistence.xml defines the drop and create scripts to be generated at /tmp/create.sql and /tmp/drop.sql. But there is
neither an error in GlassFish log nor the scripts are generated.



 Comments   
Comment by Ed Bratt [ 20/May/14 ]

Assigned FYI...





[GLASSFISH-20944] @DataSourceDefinition defined data source can't be used in persistence.xml Created: 08/Jan/14  Updated: 03/Jun/14

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

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

Tags: 4_0_1-approved, 4_0_1-evangelists

 Description   

Defining a data source from within the application using either @DataSourceDefinition on a class or the data-source element in web.xml, and then using this in persistence.xml will cause a deployment failure.

E.g.

web.xml
<data-source>
    <name>java:app/MyApp/MyDS</name>
    <class-name>org.h2.jdbcx.JdbcDataSource</class-name>
    <url>jdbc:h2:mem:test</url>
</data-source>

and

persistence.xml
<persistence-unit name="testPU">
    <jta-data-source>java:app/MyApp/MyDS</jta-data-source>
</persistence-unit>

will result in:

org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe] on Resource [rollback] operation.  vmcid: 0x0  minor code: 0  completed: No
	at com.sun.jts.CosTransactions.RegisteredResources.distributeRollback(RegisteredResources.java:1187)
	at com.sun.jts.CosTransactions.TopCoordinator.rollback(TopCoordinator.java:2291)
	at com.sun.jts.CosTransactions.CoordinatorTerm.rollback(CoordinatorTerm.java:530)
	at com.sun.jts.CosTransactions.TerminatorImpl.rollback(TerminatorImpl.java:286)
	at com.sun.jts.jta.TransactionImpl.rollback(TransactionImpl.java:162)
	... 126 more

WARNING: RAR5035:Unexpected exception while destroying resource from pool __SYSTEM/pools/__datasource_definition/5f110772-6547-4c6e-9d56-1a437f052bd8/java:app/MyApp/MyDS. Exception message: This web container has not yet been started

I provided two test cases that demonstrate the issue for the Java EE samples project: https://github.com/javaee-samples/javaee7-samples/pull/188

Running these will immediately reproduce the issue.



 Comments   
Comment by Ed Bratt [ 20/May/14 ]

Assigned FYI.





[GLASSFISH-21137] NullPointerException calling ejbContext.getCallerPrincipal(); Created: 20/Jul/14  Updated: 30/Jul/14

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

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

Linux



 Description   

We have a non null (verified) ejbContext injected into an interceptor

Context is injected (and not null) using:
@Inject
private SessionContext ejbContext;

This interceptor is running as part of the ejb layer. It is intercepting the request to an ejb @Stateless @WebService.

Because it seems to be inconsistent, I want to add one thing I noticed. It seems to be fine if the web service is called directly, but the problem occurs when the web services are called from the web apps deployed on the same app server. That is we have several wars that make their calls to the business layer via web services.

This is obviously a show stopper when using this architecture.

Here is the stack trace of when we call ejbContext..getCallerPrincipal();

2014-07-19 20:17:28.066 - :: WARN [http-listener-2(9)] c.p.p.i.CurrentUserInstaller:60 - Got a NPE while trying to get caller principal from ejbContext
java.lang.NullPointerException: null
at org.apache.catalina.connector.Request.setAttribute(Request.java:2021) ~[web-core.jar:na]
at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:585) ~[web-core.jar:na]
at org.jboss.weld.context.beanstore.http.RequestBeanStore.setAttribute(RequestBeanStore.java:53) ~[na:na]
at org.jboss.weld.context.beanstore.AttributeBeanStore.put(AttributeBeanStore.java:125) ~[na:na]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:99) ~[weld-osgi-bundle.jar:2014-06-18 10:59]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) ~[weld-osgi-bundle.jar:2014-06-18 10:59]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99) [weld-osgi-bundle.jar:2014-06-18 10:59]
at org.jboss.weld.proxies.EJBContext$SessionContext$1591394485$Proxy$_$$_WeldClientProxy.getCallerPrincipal(Unknown Source) ~[weld-osgi-bundle.jar:na]



 Comments   
Comment by gcruscoe [ 30/Jul/14 ]

Wanted to add one more thing. I created a test case for 21118 and was able to use it to reproduce this issue as well. This time I am using 4.0.1 b09 (plus fix for 21118). I am using Java 8u20(ea).

This version of the exception occurs I believe when the session has timed out. It makes sense there is no user principal but it causes a NullPointerException and then the EJBException and rollback making it a big problem.

Here is the stack trace.
2014-07-30 09:48:07.800 - :: ERROR [http-listener-2(10)] com.sun.xml.ws.server.sei.TieHandler:282 - null
javax.ejb.EJBException: null
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748) ~[ejb-container.jar:na]
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698) ~[ejb-container.jar:na]
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503) ~[ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566) ~[ejb-container.jar:na]
at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:205) ~[ejb-container.jar:na]
at com.sun.proxy.$Proxy207.getMessage(Unknown Source) ~[na:na]
...
Caused by: java.lang.NullPointerException: null
at com.sun.ejb.containers.EJBContextImpl.getCallerPrincipal(EJBContextImpl.java:411) ~[ejb-container.jar:na]
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20-ea]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20-ea]
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38) ~[weld-osgi-bundle.jar:2014-06-18 10:59]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100) ~[weld-osgi-bundle.jar:2014-06-18 10:59]
at org.jboss.weld.proxies.EJBContext$SessionContext$692107405$Proxy$_$$_WeldClientProxy.getCallerPrincipal(Unknown Source) ~[weld-osgi-bundle.jar:na]
at com.test.interceptors.SystemUserInterceptor.findSystemUser(SystemUserInterceptor.java:27) ~[TestEjb-0.0.1-SNAPSHOT_jar/:na]





[GLASSFISH-21135] EJB TimerThread dies on RejectedExecutionException from EJB thread pool Created: 18/Jul/14  Updated: 18/Jul/14

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

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


 Description   

If there are not enough threads in the EJB thread pool, EJB Timers (non persistent?) stop to be executed.
The problem is that the EJB timer thread dies when RejectedExecutionException is thrown.
This happens in com.sun.ejb.containers.EJBTimerService#taskExpired method. The call ejbContainerUtil.addWork(work); does not catch RejectedExecutionException and it kills the thread. After that no EJB timer is executed. The solution would be to surround the code with an appropriate try-catch and log a warning.
We observed this bug on 3.1.2.2. But in 4.0 the code did not change, so I assume that the problem exists in 4.0 as well.






[GLASSFISH-21132] java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory in case when persistence.xml inside EJB module Created: 16/Jul/14  Updated: 18/Jul/14

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

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

Windows 8.1 Pro x64, JDK 7u13 x64, Maven 3.1



 Description   

I have very strange exception in out EE applications, then persistence.xml resides in EJB-jar. I use CDI+EJB in dev environment and qualifies each EntityManager with own CDI qualifer. If I make EntityManager producer bean EJB-bean (@Stateless), every works fine, but if I change it to Managed Bean (@ApplicationScoped) - got the exception below.

Sample application is attached. Have both maven profiles "glassfish3" and "glassfish4".

javax.ejb.EJBException: null
	at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5113) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4915) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.proxy.$Proxy178.process(Unknown Source) [na:na]
	at my.domain.application.__EJB31_Generated__TimerBean__Intf____Bean__.process(Unknown Source) [application-ejb-1.0-SNAPSHOT_jar/:na]
	at my.domain.application.TimerBean.onTimeout(TimerBean.java:42) [application-ejb-1.0-SNAPSHOT_jar/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
	at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49) [weld-osgi-bundle.jar:20120429-1045]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:149) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4058) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1832) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:108) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2646) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_15]
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_15]
	at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_15]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_15]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_15]
	at java.lang.Thread.run(Thread.java:722) [na:1.7.0_15]
Caused by: java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for unitName ModulePU
	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.init(EntityManagerWrapper.java:132) ~[container-common.jar:3.1.2.1-SNAPSHOT]
	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.getEntityManagerFactory(EntityManagerWrapper.java:875) ~[container-common.jar:3.1.2.1-SNAPSHOT]
	at my.mydomain.module.ModuleEntityManagerProducer.getEntityManager(ModuleEntityManagerProducer.java:21) ~[module-ejb-1.0-SNAPSHOT_jar/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267) ~[na:na]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) ~[na:na]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) ~[na:na]
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263) ~[na:na]
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:137) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.ProducerMethod$ProducerMethodProducer.produce(ProducerMethod.java:136) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:319) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68) ~[na:na]
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:637) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:703) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:136) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:686) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:695) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:134) ~[weld-integration.jar:3.1.2.1-SNAPSHOT]
	at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:293) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) ~[weld-osgi-bundle.jar:20120429-1045]
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) ~[weld-osgi-bundle.jar:20120429-1045]
	at my.mydomain.module.JpaDomainRepository$Proxy$_$$_WeldClientProxy.add(JpaDomainRepository$Proxy$_$$_WeldClientProxy.java) ~[module-ejb-1.0-SNAPSHOT_jar/:na]
	at my.domain.application.TimerBean.process(TimerBean.java:51) [application-ejb-1.0-SNAPSHOT_jar/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
	at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:42) [weld-osgi-bundle.jar:20120429-1045]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214) [ejb-container.jar:3.1.2.1-SNAPSHOT]
	... 43 common frames omitted



 Comments   
Comment by alexander.v.morozov [ 16/Jul/14 ]

Sample application archive is here https://www.sendspace.com/file/dra7f2





[GLASSFISH-21129] User ID in File security realm affects role mapping Created: 14/Jul/14  Updated: 14/Jul/14

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

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

using nightly build from 2014-07-14
using following param in config:
<security-service activate-default-principal-to-role-mapping="true">



 Description   

Suppose following two simple classes:

@Stateless
@RunAs("student")
@PermitAll
public class Student {

    @Resource
    private SessionContext context;

    @EJB
    Notebook notebook;

    public String getNotebookPrincipal(){
        return notebook.getCallerPrincipal();
    }

    public String getStudentPrincipal(){
        return context.getCallerPrincipal().toString();
    }
}

and:

@Stateless
@RunAs("notebook")
@RolesAllowed("student")
public class Notebook {

    @Resource
    private SessionContext context;

    public String getCallerPrincipal(){
        return context.getCallerPrincipal().toString();
    }
}

When I have following mapping then it's fine:

User ID Group
student student
notebook student:notebook

but I cannot see any reason, why it should fail with e.g.:

User ID Group
john student
notebook student:notebook

Getting:

Caused by: javax.ejb.EJBAccessException
	at com.sun.ejb.containers.BaseContainer.mapLocal3xException(BaseContainer.java:2351)
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2123)
	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.$Proxy254.getCallerPrincipal(Unknown Source)
	at test.sceurity.__EJB31_Generated__Notebook__Intf____Bean__.getCallerPrincipal(Unknown Source)
	at test.sceurity.Student.getNotebookPrincipal(Student.java:29)
	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 org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
	at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
	at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
	at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
	at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	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)
	... 103 more
Caused by: javax.ejb.AccessLocalException: Client not authorized for this invocation
	at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1960)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:210)
	... 137 more


 Comments   
Comment by tremes [ 14/Jul/14 ]

Maybe I am wrong, but I understand that @RunAs specifies role name and not user name. I would attach simple reproducer app, but looks like I cannot.





[GLASSFISH-21203] Shared entity Manager on high concurrency Created: 17/Sep/14  Updated: 17/Sep/14

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

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

Windows XP, Oracle 12c



 Description   

Hi I am using GlassFish Server Open Source Edition 3.1.2 (build 23) with Oracle Database 12c Enterprise Edition 12.1.0.1.0 64bit Production. I have in Persistence.xml only (Shared Cache is enabled to all Entities):

<shared-cache-mode>DISABLE_SELECTIVE</shared-cache-mode>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
I have observed this while making a remote call to pooled Stateless EJB. can anyone tell me if this is correct or if it is a bug ? It could make sense to think that this drives to a:

[EclipseLink-2004] org.eclipse.persistence.exceptions.ConcurrencyException Exception Description: A signal was attempted before wait() on ConcurrencyManager. This normally means that an attempt was made to commit or rollback a transaction before it was started, or to rollback a transaction twice.

I was testing the PersistenceContext propagation to ApplicationScoped CDI Beans, and i have used this 2 implementations, both of them instantiate the EntityManager via @PersistenceContext :

@ApplicationScoped
public class ApplicationScoped1 {...

@Stateless
public class TestFacadeImpl implements TestFacade {
I have printed as (more or less) the following on each call on each Implementation:

JpaEntityManager delegate = (JpaEntityManager) em.getDelegate();
Session activeSession = delegate.getActiveSession();
IdentityMapAccessor identityMapAccessor = activeSession.getIdentityMapAccessor();
LOGGER.info("delegate: " + delegate);
LOGGER.info("identityMapAccessor: " + identityMapAccessor);
TestFacadeImpl is triggered in parallel remotely from a client, and log delegate and identityMapAccessor.

I divide the results in 3 chunks

First Fine, not really parallel, Propagation Fine and each thread has his EntityManagerImpl instance and UnitOfWorkIdentityMapAccessor (can say that is L1/WorkUnit Cache right)

2014-09-09 10:22:20.997 INFO 37 delegate Trigger : org.eclipse.persistence.internal.jpa.EntityManagerImpl@5b86a92d (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:20.997 INFO 37 identityMapAccessor Trigger: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@65ccf84c (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.003 INFO 37 delegate: org.eclipse.persistence.internal.jpa.EntityManagerImpl@5b86a92d (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.004 INFO 37 identityMapAccessor: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@65ccf84c (com.foo.blah..impl.systemtests.ApplicationScoped1)

2014-09-09 10:22:21.009 INFO 36 delegate Trigger : org.eclipse.persistence.internal.jpa.EntityManagerImpl@4fff8693 (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.009 INFO 36 identityMapAccessor Trigger: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@10dc45ed (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.015 INFO 36 delegate: org.eclipse.persistence.internal.jpa.EntityManagerImpl@4fff8693 (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.016 INFO 36 identityMapAccessor: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@10dc45ed (com.foo.blah..impl.systemtests.ApplicationScoped1)
Second Fine, In the same millisecond each Thread has his own EntityManagerImpl and UnitOfWorkIdentityMapAccessor

2014-09-09 10:22:21.051 INFO 36 delegate Trigger : org.eclipse.persistence.internal.jpa.EntityManagerImpl@2b917db5 (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.052 INFO 36 identityMapAccessor Trigger: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@657b7469 (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.051 INFO 37 delegate Trigger : org.eclipse.persistence.internal.jpa.EntityManagerImpl@5cd40c6b (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.052 INFO 37 identityMapAccessor Trigger: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@c17cd8c (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.057 INFO 36 delegate: org.eclipse.persistence.internal.jpa.EntityManagerImpl@2b917db5 (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.057 INFO 37 delegate: org.eclipse.persistence.internal.jpa.EntityManagerImpl@5cd40c6b (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.058 INFO 36 identityMapAccessor: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@657b7469 (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.058 INFO 37 identityMapAccessor: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@c17cd8c (com.foo.blah..impl.systemtests.ApplicationScoped1)
Third, a bit strange, 2 Threads from the EJB pool get the same EntityManagerImpl and 2 different UnitOfWorkIdentityMapAccessor

2014-09-09 10:22:21.075 INFO 36 delegate Trigger : org.eclipse.persistence.internal.jpa.EntityManagerImpl@6d198dd7 (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.075 INFO 37 delegate Trigger : org.eclipse.persistence.internal.jpa.EntityManagerImpl@6d198dd7 (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.075 INFO 36 identityMapAccessor Trigger: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@28af5636 (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.075 INFO 37 identityMapAccessor Trigger: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@f450818 (com.foo.blah..impl.systemtests.TestFacadeImpl)
2014-09-09 10:22:21.081 INFO 37 delegate: org.eclipse.persistence.internal.jpa.EntityManagerImpl@6d198dd7 (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.081 INFO 36 delegate: org.eclipse.persistence.internal.jpa.EntityManagerImpl@6d198dd7 (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.081 INFO 37 identityMapAccessor: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@f450818 (com.foo.blah..impl.systemtests.ApplicationScoped1)
2014-09-09 10:22:21.081 INFO 36 identityMapAccessor: org.eclipse.persistence.internal.sessions.UnitOfWorkIdentityMapAccessor@28af5636 (com.foo.blah..impl.systemtests.ApplicationScoped1)






[GLASSFISH-21186] EJB Timer cannot mirgrate correctly Created: 07/Sep/14  Updated: 07/Sep/14

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

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

Debian 7.5 64bit
JDK 7 u51 64bit
Glassfish 4.1 b13



 Description   

I setup a cluster include 2 instances : instance1 and instance2

When I start cluster, EJB Timer run on instance2, when I stop instance2, default EJB Timer will change to instance1 automatically, but when I trace log from instance1, it show below:

[2014-09-07T12:03:20.720+0700] [glassfish 4.1] [INFO] [view.window.view.change] [ShoalLogger] [tid: _ThreadID=23 _ThreadName=GMS ViewWindowThread Group-gbcluster] [timeMillis: 1410066200720] [levelValue: 800] [[
GMS1092: GMS View Change Received for group: gbcluster : Members in view for PEER_STOP_EVENT(before change analysis) are :
1: MemberId: instance1, MemberType: CORE, Address: 10.43.3.10:10032:228.9.3.1:2048:gbcluster:instance1
2: MemberId: server, MemberType: SPECTATOR, Address: 10.43.3.16:10049:228.9.3.1:2048:gbcluster:server
]]

[2014-09-07T12:03:20.721+0700] [glassfish 4.1] [INFO] [membership.snapshot.analysis] [ShoalLogger] [tid: _ThreadID=23 _ThreadName=GMS ViewWindowThread Group-gbcluster] [timeMillis: 1410066200721] [levelValue: 800] [[
GMS1016: Analyzing new membership snapshot received as part of event: PEER_STOP_EVENT for member: instance2 of group: gbcluster]]

[2014-09-07T12:03:20.721+0700] [glassfish 4.1] [INFO] [plannedshutdownevent.announcement] [ShoalLogger] [tid: _ThreadID=23 _ThreadName=GMS ViewWindowThread Group-gbcluster] [timeMillis: 1410066200721] [levelValue: 800] [[
GMS1017: Received PlannedShutdownEvent Announcement from member: instance2 with shutdown type: INSTANCE_SHUTDOWN of group: gbcluster]]

[2014-09-07T12:03:20.723+0700] [glassfish 4.1] [INFO] [plannedshutdownsignals.send.member] [ShoalLogger] [tid: _ThreadID=22 _ThreadName=GMS SignalHandler for Group-gbcluster thread] [timeMillis: 1410066200723] [levelValue: 800] [[
GMS1008: Sending PlannedShutdownSignals to registered Actions for shutdownType INSTANCE_SHUTDOWN member: instance2 ...]]

[2014-09-07T12:03:20.725+0700] [glassfish 4.1] [INFO] [] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=60 _ThreadName=GMS-processNotify-Group-gbcluster-thread-1] [timeMillis: 1410066200725] [levelValue: 800] [[
[DistributedEJBTimerService] migrating timers from instance2]]

[2014-09-07T12:03:20.725+0700] [glassfish 4.1] [INFO] [] [ShoalLogger] [tid: _ThreadID=62 _ThreadName=GMS-processNotify-Group-gbcluster-thread-3] [timeMillis: 1410066200725] [levelValue: 800] [[
**VIEW: prevViewId: 2; curViewID: 3; signal: com.sun.enterprise.ee.cms.impl.common.PlannedShutdownSignalImpl@1e749200 [current: instance1] [previous: instance1, instance2]]]

[2014-09-07T12:03:20.725+0700] [glassfish 4.1] [INFO] [] [ShoalLogger] [tid: _ThreadID=62 _ThreadName=GMS-processNotify-Group-gbcluster-thread-3] [timeMillis: 1410066200725] [levelValue: 800] [[
**********************************************************************]]

[2014-09-07T12:03:20.726+0700] [glassfish 4.1] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=60 _ThreadName=GMS-processNotify-Group-gbcluster-thread-1] [timeMillis: 1410066200726] [levelValue: 800] [[
Beginning timer migration process from owner instance2 to instance1]]

[2014-09-07T12:03:20.816+0700] [glassfish 4.1] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=60 _ThreadName=GMS-processNotify-Group-gbcluster-thread-1] [timeMillis: 1410066200816] [levelValue: 800] [[
Timer migration phase 1 complete. Changed ownership of 2 timers. Now reactivating timers...]]

[2014-09-07T12:03:20.818+0700] [glassfish 4.1] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=60 _ThreadName=GMS-processNotify-Group-gbcluster-thread-1] [timeMillis: 1410066200818] [levelValue: 800] [[
Rescheduling missed expiration for periodic timer '1@@1410066146328@@instance2@@instance2' 'TimedObject = IpoScheduleGbJobEJB' 'Application = gbeearipo' 'CREATED' 'PERIODIC' 'Container ID = 92405000009744396' 'Sun Sep 07 12:02:26 ICT 2014' '500' . Last timer expiration occurred at Sun Sep 07 12:03:16 ICT 2014]]


Result is EJB Timer cannot active on instance1

I also trace log on instance2:
[2014-09-07T12:03:16.779+0700] [glassfish 4.1] [INFO] [AS_ACDEPL-00104] [javax.enterprise.system.container.appclient] [tid: _ThreadID=12622 _ThreadName=RunLevelControllerThread-1410066190958] [timeMillis: 1410066196779] [levelValue: 800] [[
Java Web Start services stopped for the app client gbear/eclipselink.jar]]

[2014-09-07T12:03:17.199+0700] [glassfish 4.1] [INFO] [] [org.eclipse.persistence.session.file:/home/gbsofts/glassfish4/glassfish/nodes/srv2.gbsofts.com/instance2/applications/gbear/gbeejb_jar/_gbePU.connection] [tid: _ThreadID=12622 _ThreadName=RunLevelControllerThread-1410066190958] [timeMillis: 1410066197199] [levelValue: 800] [[
file:/home/gbsofts/glassfish4/glassfish/nodes/srv2.gbsofts.com/instance2/applications/gbear/gbeejb_jar/_gbePU logout successful]]

[2014-09-07T12:03:17.216+0700] [glassfish 4.1] [INFO] [AS_ACDEPL-00104] [javax.enterprise.system.container.appclient] [tid: _ThreadID=12622 _ThreadName=RunLevelControllerThread-1410066190958] [timeMillis: 1410066197216] [levelValue: 800] [[
Java Web Start services stopped for the app client gbeearipo/eclipselink.jar]]

[2014-09-07T12:03:17.400+0700] [glassfish 4.1] [INFO] [] [org.eclipse.persistence.session.file:/home/gbsofts/glassfish4/glassfish/nodes/srv2.gbsofts.com/instance2/applications/gbeearipo/ipoejb_jar/_gbeipoPU.connection] [tid: _ThreadID=12622 _ThreadName=RunLevelControllerThread-1410066190958] [timeMillis: 1410066197400] [levelValue: 800] [[
file:/home/gbsofts/glassfish4/glassfish/nodes/srv2.gbsofts.com/instance2/applications/gbeearipo/ipoejb_jar/_gbeipoPU logout successful]]

[2014-09-07T12:03:17.433+0700] [glassfish 4.1] [INFO] [] [org.eclipse.persistence.session.file:/home/gbsofts/glassfish4/glassfish/nodes/srv2.gbsofts.com/instance2/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=12622 _ThreadName=RunLevelControllerThread-1410066190958] [timeMillis: 1410066197433] [levelValue: 800] [[
file:/home/gbsofts/glassfish4/glassfish/nodes/srv2.gbsofts.com/instance2/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App logout successful]]

[2014-09-07T12:03:17.439+0700] [glassfish 4.1] [INFO] [ejb.timer_service_shutdown_msg] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=12622 _ThreadName=RunLevelControllerThread-1410066190958] [timeMillis: 1410066197439] [levelValue: 800] [[
EJB5122:EJB Timer Service shutdown at [2014/09/07 12:03:17]]]

[2014-09-07T12:03:17.455+0700] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=12622 _ThreadName=Thread-8] [timeMillis: 1410066197455] [levelValue: 800] [[
JdbcRuntimeExtension, getAllSystemRAResourcesAndPools = [GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource]]]

[2014-09-07T12:03:17.477+0700] [glassfish 4.1] [INFO] [ra.stop-successful] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=12694 _ThreadName=Thread-157] [timeMillis: 1410066197477] [levelValue: 800] [[
RAR7094: __xa_jdbc_ra shutdown successful.]]

[2014-09-07T12:03:17.477+0700] [glassfish 4.1] [INFO] [ra.stop-successful] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=12695 _ThreadName=Thread-158] [timeMillis: 1410066197477] [levelValue: 800] [[
RAR7094: __ds_jdbc_ra shutdown successful.]]

[2014-09-07T12:03:17.478+0700] [glassfish 4.1] [INFO] [] [javax.resourceadapter.mqjmsra.lifecycle] [tid: _ThreadID=12698 _ThreadName=Thread-160] [timeMillis: 1410066197478] [levelValue: 800] [[
MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter stopping...]]

[2014-09-07T12:03:20.695+0700] [glassfish 4.1] [INFO] [] [javax.resourceadapter.mqjmsra.lifecycle] [tid: _ThreadID=12698 _ThreadName=Thread-160] [timeMillis: 1410066200695] [levelValue: 800] [[
MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter stopped.]]

[2014-09-07T12:03:20.696+0700] [glassfish 4.1] [INFO] [ra.stop-successful] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=12693 _ThreadName=Thread-156] [timeMillis: 1410066200696] [levelValue: 800] [[
RAR7094: jmsra shutdown successful.]]

[2014-09-07T12:03:20.696+0700] [glassfish 4.1] [INFO] [NCLS-CLSTR-10108] [javax.enterprise.cluster.gms] [tid: _ThreadID=12618 _ThreadName=Thread-82] [timeMillis: 1410066200696] [levelValue: 800] [[
GMSAdapter for member: instance2 group: gbcluster received GlassfishEventType: server_shutdown]]

[2014-09-07T12:03:20.697+0700] [glassfish 4.1] [INFO] [gms.leave] [ShoalLogger] [tid: _ThreadID=12618 _ThreadName=Thread-82] [timeMillis: 1410066200697] [levelValue: 800] [[
GMS1096: member: instance2 is leaving group: gbcluster]]

[2014-09-07T12:03:20.697+0700] [glassfish 4.1] [INFO] [shutdown.instanceshutdown] [ShoalLogger] [tid: _ThreadID=12618 _ThreadName=Thread-82] [timeMillis: 1410066200697] [levelValue: 800] [[
GMS1010: Leaving GMS group: gbcluster with shutdown type set to InstanceShutdown]]

[2014-09-07T12:03:20.698+0700] [glassfish 4.1] [CONFIG] [mgmt.masternode.processmsgcompleted] [ShoalLogger] [tid: _ThreadID=55 _ThreadName=GMS MasterNode processOutstandingChangeEvents Group-gbcluster] [timeMillis: 1410066200698] [levelValue: 700] [[
GMS1065: Completed processing outstanding master node messages for member: instance2 group: gbcluster outstandingMessages to process: 0]]

[2014-09-07T12:03:20.701+0700] [glassfish 4.1] [INFO] [] [ShoalLogger.monitor] [tid: _ThreadID=12618 _ThreadName=Thread-82] [timeMillis: 1410066200701] [levelValue: 800] [[
BlockingIOMulicastSender monitoring stats: received: 256 core poolsize:10 largest pool size:10 task count:256 max queue size:0 rejected execution:0]]

[2014-09-07T12:03:20.701+0700] [glassfish 4.1] [INFO] [mgmt.blockingiomulticast.threadcomplete] [ShoalLogger] [tid: _ThreadID=53 _ThreadName=IP Multicast Listener for /228.9.3.1:2048] [timeMillis: 1410066200701] [levelValue: 800] [[
GMS1110: Thread IP Multicast Listener for /228.9.3.1:2048 has completed.]]

[2014-09-07T12:03:20.704+0700] [glassfish 4.1] [INFO] [router.stats.monitor.msgqueue.high.water] [ShoalLogger.monitor] [tid: _ThreadID=12618 _ThreadName=Thread-82] [timeMillis: 1410066200704] [levelValue: 800] [[
GMS1115: router signal queue high water mark: 0 signal queue capacity: 600]]

[2014-09-07T12:03:20.704+0700] [glassfish 4.1] [INFO] [sig.handler.thread.terminated] [ShoalLogger] [tid: _ThreadID=22 _ThreadName=GMS SignalHandler for Group-gbcluster thread] [timeMillis: 1410066200704] [levelValue: 800] [[
GMS1107: SignalHandler task named GMS SignalHandler for Group-gbcluster thread exiting]]

[2014-09-07T12:03:20.704+0700] [glassfish 4.1] [INFO] [view.window.thread.terminated] [ShoalLogger] [tid: _ThreadID=23 _ThreadName=GMS ViewWindowThread Group-gbcluster] [timeMillis: 1410066200704] [levelValue: 800] [[
GMS1091: View Window event processing thread for group: gbcluster terminated normally]]

[2014-09-07T12:03:20.704+0700] [glassfish 4.1] [INFO] [msg.wdw.thread.terminated] [ShoalLogger] [tid: _ThreadID=24 _ThreadName=GMS MessageWindowThread Group-gbcluster] [timeMillis: 1410066200704] [levelValue: 800] [[
GMS1088: MessageWindow thread for group: gbcluster terminated due to shutdown notification]]

How can I resolve this problem?






[GLASSFISH-21167] Resource injection not working when empty <absoluteOrdering> is used in web.xml, for classes packed as jars in lib folder Created: 20/Aug/14  Updated: 08/Sep/14

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

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

OS: Windows 7 64bit. Java: 7u67 (also 7u51, 8u11).
Glassfish: 4.0, 4.1-b12 (nightly build)



 Description   

Resource injection does not work, in EJBs of an application (in war format), when these 2 conditions are both met:

1) The application uses, in web.xml file, an empty <absoluteOrdering> tag
2) The code (classes) of the application are all packed as jar archives in the [war]\WEB-INF\lib\ folder, instead of included them unpacked in the [war]\WEB-INF\classes\ folder

(purpose for doing this:

  • 1: for disabling altogether the scanning for web-fragment.xml files in all of the included library jar files, as not necessary;
  • 2: for applications with a big codebase, which is structured in separate modules, easy to pack as separate jars)

When the 2 conditions are met, resource injection does not work.
This is visible for example in EJBs marked with @Singleton @Startup, which have fields marked with @EJB or @Resource:

  • the Singleton beans are identified and constructed by the container
  • then resource injection for fields is skipped ?
  • then the methods marked with @PostConstruct are identified and called, but they may result in NullPointerException if using the fields expected to be injected by now.

If any of the 2 conditions is changed (either remove <absoluteOrdering/> tag OR include the ejb classes unpacked, in the WEB-INF\classes folder), injection works as it should.

This works well on older Glassfish 3.1.2.2 version.
Fails on 4.0 version; also tested on latest promoted nightly build, 4.1-b12, and still fails.



 Comments   
Comment by cristim1979 [ 20/Aug/14 ]

Test example:

1) Have a simple application with just 2 Singleton EJBs:
TestSingleton1.java:

package com.spmsoftware.test;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.ejb.TimerService;

@Singleton
@Startup
public class TestSingleton1 {
    @Resource
    public TimerService timerService;
    @EJB
    public TestSingleton2 testSingleton2;

    public TestSingleton1() {
        System.out.println("In TestSingleton1 constructor: injected fields state: @Resource timerService=" + timerService + "; @EJB testSingleton2=" + testSingleton2);
    }

    @PostConstruct
    public void init() {
        System.out.println("In TestSingleton1 @PostConstruct method: injected fields state: @Resource timerService=" + timerService + "; @EJB testSingleton2=" + testSingleton2);
    }
}

TestSingleton2.java:

package com.spmsoftware.test;

import javax.annotation.PostConstruct;
import javax.ejb.Singleton;

@Singleton
public class TestSingleton2 {
    public TestSingleton2() {
        System.out.println("TestSingleton2 constructor called.");
    }

    @PostConstruct
    public void init() {
        System.out.println("TestSingleton2 @PostConstruct method called.");
    }
}

2) Define also a web.xml file for the app:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">

    <!-- Just to ignore / not scan any web-fragment.xml files from jar files -->
    <absolute-ordering/>

</web-app>

3) Compile classes and pack the application as a war with this structure:

  • [test_app.war] (exploded, as folder)
    • in WEB-INF folder: the web.xml file
    • in WEB-INF\lib\ folder: a jar archive, test_app.jar, containing the compiled singleton classes

Testing:
Deploy the test application war on GF 4.0, and check console/log output related to the test singletons:

a) Incorrect output - when run on current GF 4.0 (note the null values on last line):

  EJB5181:Portable JNDI names for EJB TestSingleton1: [java:global/test_app_war_ejb_classes_packed_in_jar/TestSingleton1!com.spmsoftware.test.TestSingleton1, java:global/test_app_war_ejb_classes_packed_in_jar/TestSingleton1]
  In TestSingleton1 constructor: injected fields state: @Resource timerService=null; @EJB testSingleton2=null
  EJB5181:Portable JNDI names for EJB TestSingleton2: [java:global/test_app_war_ejb_classes_packed_in_jar/TestSingleton2!com.spmsoftware.test.TestSingleton2, java:global/test_app_war_ejb_classes_packed_in_jar/TestSingleton2]
  TestSingleton2 constructor called.
  In TestSingleton1 constructor: injected fields state: @Resource timerService=null; @EJB testSingleton2=null
  In TestSingleton1 @PostConstruct method: injected fields state: @Resource timerService=null; @EJB testSingleton2=null

b) Correct output - when run on GF 3.1.2.2 (or on GF 4 with one of the 2 conditions changed) - similar, except for the last line:

  In TestSingleton1 @PostConstruct method: injected fields state: @Resource timerService=com.sun.ejb.containers.EJBTimerServiceWrapper@7ec0c910; @EJB testSingleton2=com.spmsoftware.test.TestSingleton2@22d07a73
Comment by cristim1979 [ 08/Sep/14 ]

Any update on this / any plans to handle it in 4.1 release ?





[GLASSFISH-21162] Future.get() Doesn't block Created: 11/Aug/14  Updated: 11/Aug/14

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

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

NetBeans 8 and JDK 1.8.0_11 and Glassfish 4.1 promoted build 11 on Win8.1 Pro 64

&

JDK 1.8.0_11 and Glassfish 4.1 promoted build 11 on Ubuntu 14.04



 Description   

Code Snippet Below.

When I call (A) refresh from another class using @Schedule (in my ejb) the value of count in refresh is correct and statement (B.1) executes before (A.1).

However, when I call (A) refresh from an @ApplicationScoped bean (in my war) the value of count in refresh is incorrect and statement (A.1) executes before (B.1). Most of the time (B.1) doesn't execute at all. In this scenario count always has a different count.

No exception is thrown.

Method that kicks off the process
(A) public void refresh(String usr)

{ // ... count = count + processRelatedProjectData(); //... logger.log(Level.INFO, "\tExit refresh"); <-- Last statement before exit (A.1) }

Method that uses the @Asynchronous methods
(B) private Integer processRelatedProjectData() {

Future futureA = processProject.processData(Constant.COMPANY_A);
Future futureB = processProject.processData(Constant.COMPANY_B);
Future futureC = processProject.processData(Constant.COMPANY_C);
//... A bunch of these

try

{ count = count + (Integer) futureA.get(); count = count + (Integer) futureB.get(); count = count + (Integer) futureC.get(); //... A bunch of these }

catch (InterruptedException | ExecutionException | CancellationException ex)

{ throw new IllegalStateException("Cannot get the answer", ex); }

logger.log(Level.INFO, "\tEnter processRelatedProjectData"); <-- Last statement before exit (B.1)
}






[GLASSFISH-21157] RuntimeException in TimerService Created: 07/Aug/14  Updated: 07/Aug/14

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

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

Mac OS X, Java EE 7



 Description   

When a system exception occurs during invocation of an EJB (Stateless / Singleton) TimerService, it is discarded and TimerService is not loaded again.

Example:

import java.util.logging.Logger;

import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;

@Startup
@Singleton
public class TestTimerService {

/**

  • LOG
    */
    private static final Logger LOG = Logger.getLogger(TestTimerService.class.getName());

@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
@Schedule(minute = "/1", hour = "", persistent = false)
public void schedule()

{ LOG.info("Timer test............"); Integer.valueOf(1 / 0); // Force RuntimeException }

}

}






[GLASSFISH-21156] Allow disabling iiop-service when MDBs present Created: 06/Aug/14  Updated: 06/Aug/14

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

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

Glassfish 4.0
Java 7u40



 Description   

Currently it is not possible to deploy an MDB and disable all iiop listeners.

This happens due to the following line;

http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.main.ejb/ejb-full-container/4.0/org/glassfish/ejb/mdb/MessageBeanContainer.java#167

I am not sure if iiop is deemed a hard dependency of mdbs as issues such as GLASSFISH-12669 have brought it up in the past but been closed. If this is the case feel free to close the issue.






[GLASSFISH-21154] Missing Descriptor on Redeploy Created: 04/Aug/14  Updated: 11/Aug/14

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

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

JDK 1.8.0_11, NetBeans 8, Windows 8.1 Pro 64, i7-2600, 16GB RAM



 Description   

After redeploy I'm getting a missing descriptor error. The error is thrown when I call methods with an EntityManager.createNativeQuery() statement.

[snip]
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-6007] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.QueryException
Exception Description: Missing descriptor for...
[snip]

On restart of the application server and fresh deploy of the application I do not get this message.

I did not see this behavior in Glassfish 4.0.1 build 8. I'm not sure if this item existed in Glassfish 4.0.1 build 9 but would be glad to check if it would be useful for this bug report.



 Comments   
Comment by gesker [ 11/Aug/14 ]

Issue remains in Glassfish 4.1 build 11





[GLASSFISH-21074] Message-driven bean invocation exception: [javax.ejb.EJBException] Created: 27/May/14  Updated: 03/Jun/14

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

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

CentOS release 6.4 (Final), Glassfish 3.1.2.2



 Description   

Following exception occurs in GF logs when running JMS load tests for a couple of hours:

[#|2014-05-23T23:47:31.035+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.ejb.mdb.com.sun.ejb.containers|_ThreadID=714;_ThreadName=Thread-2;|MDB00037: [ht-ear-2.7.0-SNAPSHOT-PRETTY-7527:ObdMessageBean]: Message-driven bean invocation exception: [javax.ejb.EJBException]|#]

[#|2014-05-23T23:47:31.035+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.ejb.mdb.com.sun.ejb.containers|_ThreadID=714;_ThreadName=Thread-2;|javax.ejb.EJBException
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215)
at com.sun.ejb.containers.BaseContainer.checkExceptionNoTx(BaseContainer.java:5044)
at com.sun.ejb.containers.BaseContainer.checkExceptionBeanMgTx(BaseContainer.java:4965)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4865)
at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1211)
at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1186)
at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:86)
at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:190)
at com.sun.proxy.$Proxy669.onMessage(Unknown Source)
at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.lang.NullPointerException

#]

[#|2014-05-23T23:47:31.035+0200|WARNING|glassfish3.1.2|javax.resourceadapter.mqjmsra.inbound.message|_ThreadID=714;_ThreadName=Thread-2;|MQJMSRA_MR2001: run:Caught Exception from onMessage():Redelivering:
javax.ejb.EJBException: message-driven bean method public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message) system exception
at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1134)
at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
at com.sun.proxy.$Proxy669.onMessage(Unknown Source)
at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.lang.NullPointerException

#]


 Comments   
Comment by alebor [ 03/Jun/14 ]

This issue looks like a duplicate of https://java.net/jira/browse/GLASSFISH-21072 (upper part of the trace from NPE).
I cannot remove it because it do not have the rights.





[GLASSFISH-21063] Getting Exception during Junit testing of Ejb Created: 12/May/14  Updated: 12/May/14

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

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

Windows 7 64 bit, eclipse 3.2, Junit 4, glassfish3.1.2


Status Whiteboard:

org.jvnet.hk2.component.ComponentException: injection failed on com.sun.enterprise.v3.server.ServerContextImpl.env with class caused by NullpointerException


 Description   

org.jvnet.hk2.component.ComponentException: injection failed on com.sun.enterprise.v3.server.ServerContextImpl.env with class org.glassfish.server.ServerEnvironmentImpl
at org.jvnet.hk2.component.InjectionManager.error_injectionException(InjectionManager.java:284)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:165)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
at com.sun.hk2.component.ConstructorCreator$1.run(ConstructorCreator.java:86)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:83)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getByContract(Habitat.java:1050)
at com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:322)
at com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:334)
at com.sun.enterprise.naming.impl.SerialInitContextFactory.createInitialContext(SerialInitContextFactory.java:358)
at com.sun.enterprise.naming.impl.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:353)
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:69)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at com.test.pluginlib.test.UserManagerTest.setUp(UserManagerTest.java:58)
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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NullPointerException
at org.glassfish.server.ServerEnvironmentImpl.postConstruct(ServerEnvironmentImpl.java:155)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
at com.sun.hk2.component.ConstructorCreator$1.run(ConstructorCreator.java:86)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:83)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:1056)
at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:1037)
at com.sun.hk2.component.InjectInjectionResolver.getComponentInjectValue(InjectInjectionResolver.java:159)
at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:90)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:143)
... 44 more






[GLASSFISH-21060] EntityManager injected twice into single stateless session bean method when deployment descriptor exists. Created: 05/May/14  Updated: 04/Jun/14

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

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

Windows XP, RHEL, Java 1.6.0_45, Postgres 9.x, EclipseLink 2.0


Tags: 4_0_1-approved

 Description   

I've inherited a fairly convoluted code base that is using separate databases for regular data and archived data (postgres 9.x). There are two connection pools and two datasources defined in GF.

The app uses JPA 2.0 (EclipseLink) over Postgres as its persistence layer and a persistence.xml file contains two persistence contexts. A stateless session bean is used to manage interactions with JPA and the 'regular' database. A second SLSB manages interactions with the 'archive' database. The archive bean inherits from the regular bean.

A single EntityManager field is declared by the parent as protected. The parent defines a setter with a @PersistenceContext annotation referencing the regular persistence unit. The child bean overrides the parents setter method and is annotated with @PersistenceContext referencing the archive persistence unit.

When the above is deployed as a .war, an EntityManager for archive is injected ONCE into the child session bean. i.e. system behaves as expected.

If a deployment descriptor declaring the session beans (ejb-jar.xml) is added to the mix then the child session bean will have TWO distinct EntityManagers injected, archive followed by regular.



 Comments   
Comment by Stephen Davies [ 05/May/14 ]

@Stateless(name = "ParentBean")
@LocalBean
public class ParentBean {

protected EntityManager em;

@PersistenceContext(unitName = "regular")
public void setEntityManager(EntityManager em)

{ this.em = em; }

public void doIt() {}

}

Comment by Stephen Davies [ 05/May/14 ]

@Stateless(name = "ChildBean")
@LocalBean
public class ChildBean extends ParentBean {

@PersistenceContext(unitName = "archive")
@Override
public void setEntityManager(EntityManager em)

{ ServerSession session = ((EntityManagerFactoryImpl)em.getEntityManagerFactory()).getServerSession(); System.out.println("### Session name ###"); System.out.println(session.getName()); this.em = em; }

}

Comment by Stephen Davies [ 05/May/14 ]

@Singleton
@LocalBean
@Startup
public class Launch {

@EJB
private ChildBean cb;

@PostConstruct
public void init()

{ cb.doIt(); }

}

Comment by Stephen Davies [ 05/May/14 ]

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
xmlns = "http://java.sun.com/xml/ns/javaee"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
version = "3.1">

<enterprise-beans>

<session>
<ejb-name>ParentBean</ejb-name>
<ejb-class>jpa.test.ParentBean</ejb-class>
<session-type>Stateless</session-type>
</session>

<session>
<ejb-name>ChildBean</ejb-name>
<ejb-class>jpa.test.ChildBean</ejb-class>
<session-type>Stateless</session-type>
</session>

</enterprise-beans>

</ejb-jar>





[GLASSFISH-21042] Interfaces Specified by RemoteHome or LocalHome Not Resolved in SerialContext.lookup as Business Interfaces on EJB Session Beans, Resulting in NPE in JavaGlobalJndiNamingObjectProxy.create Created: 17/Apr/14  Updated: 03/Jun/14

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

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

Tags: 4_0_1-reviewed, embedded, maven-glassfish-plugin

 Description   

Had the following error in a JUnit test case using the embedded Glassfish 3.1.1 container:

shouldCreateABook(com.coverity.testsuite.ejb.localhome.BookLocalHomeBeanTest):
Communication exception for 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}
BookLocalHomeBeanTest.java
package com.coverity.testsuite.ejb.localhome;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.ejb.embeddable.EJBContainer;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.xml.ws.WebServiceRef;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import com.coverity.testsuite.ejb.Book;
import com.coverity.testsuite.ejb.localhome.BookLocal;

import static org.junit.Assert.*;

/**
 *
 * @author pasc
 */
public class BookLocalHomeBeanTest {

    private static EJBContainer ec=null;
    private static Context ctx=null;

    public BookLocalHomeBeanTest() {}

    @BeforeClass
    public static void initContainer() throws Exception {
        Map<String, Object> props=new HashMap<String, Object>();
        props.put(EJBContainer.MODULES, new File("target/embedded-classes"));
        props.put("org.glassfish.ejb.embedded.glassfish.instance.root","./src/test/testing-domain");
        props.put("org.glassfish.ejb.embedded.glassfish.web.http.port","");
        props.put("javax.enterprise.system.container.web", "FINE");
        ec = EJBContainer.createEJBContainer(props);
        ctx = ec.getContext();
    }

    @AfterClass
    public static void closeContainer() throws Exception {
        if(ctx!=null)
            ctx.close();
        if(ec!=null)
            ec.close();
    }

    @Test
    public void shouldCreateABook() throws Exception {
        Book book = new Book();
        book.setTitle("The Hitchhiker's Guide to the Galaxy");
        book.setPrice(12.5F);
        book.setDescription("Scifi book created by Douglas Adams");
        book.setIsbn("1-84023-742-2");
        book.setNbOfPages(354);
        book.setIllustrations(false);

        Object obj = ctx.lookup("java:global/embedded-classes/BookLocalHomeBean");
        BookLocalHome bookHome = (BookLocalHome) obj;
        BookLocal bookLocal = bookHome.createBook(book);
        book = bookLocal.findBookById(book.getId());
        assertNotNull("Book should not be null", book);
        assertNotNull("ID should not be null", book.getId());
    }
}

The application I'm using is a modified version of embedded-glassfish-example:

BookLocal.java
package com.coverity.testsuite.ejb.localhome;

import java.util.List;
import javax.ejb.EJBLocalObject;

import com.coverity.testsuite.ejb.Book;

public interface BookLocal extends EJBLocalObject {

    void deleteBook(Book book);

    Book findBookById(Long id);

    List<Book> findBooks();

    Book updateBook(Book book);
}
BookLocalHome.java
package com.coverity.testsuite.ejb.localhome;

import javax.ejb.EJBLocalHome;
import javax.ejb.CreateException;

import com.coverity.testsuite.ejb.Book;

public interface BookLocalHome extends EJBLocalHome {

    public BookLocal createBook(Book book) throws CreateException;
}
BookLocalHomeBean.java
package com.coverity.testsuite.ejb.localhome;

import java.util.List;
import javax.ejb.Stateful;
import javax.ejb.LocalHome;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.annotation.Resource;
import javax.ejb.SessionContext;

import com.coverity.testsuite.ejb.Book;

/**
 *
 * @author pasc
 */
@Stateful
@LocalHome(BookLocalHome.class)
public class BookLocalHomeBean {
    @PersistenceContext(unitName = "bookstore-ejb")
    EntityManager em;

    @Resource
    private SessionContext sessionContext;

    public List<Book> findBooks() {
        return em.createNamedQuery("Book.findAllBooks", Book.class).getResultList();
    }

    public Book findBookById(Long id) {
        return em.find(Book.class, id);
    }

    public void ejbCreateBook(Book book) {
        em.persist(book);
    }

    public void deleteBook(Book book) {
        em.remove(em.merge(book));
    }

    public Book updateBook(Book book) {
        return em.merge(book);
    }
}

The above code hasn't been validated another embedded EJB container, therefore it could be incorrect. It seems correct, based on looking at the JBoss quick start EJB test cases.

I enabled logging within Glassfish by specifying the following in a .properties file:

handlers= java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=FINEST
com.sun.enterprise.naming.level=FINEST

com.sun.enterprise.naming is specified in LogFacade, used as SerialContext's logger. Passing it to Maven as mvn clean test -Djava.util.logging.config.file=src/test/resources/customlogging.properties results in the nice stack trace, trimmed below:

Apr 16, 2014 11:42:55 AM com.sun.enterprise.naming.impl.SerialContext <init>
FINE: SerialContext ==> SerialContext instance created : 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}
Apr 16, 2014 11:42:55 AM com.sun.enterprise.naming.impl.SerialContext <init>
FINE: Serial Context initializing with process environment org.glassfish.api.admin.ProcessEnvironment@7a341251
Apr 16, 2014 11:42:55 AM com.sun.enterprise.naming.impl.SerialContext lookup
FINE: SerialContext ==> lookup( java:global/embedded-classes/BookLocalHomeBean)
Apr 16, 2014 11:42:55 AM com.sun.enterprise.naming.impl.SerialContext lookup
FINE: SerialContext ==> lookup relative name : java:global/embedded-classes/BookLocalHomeBean
Apr 16, 2014 11:42:55 AM com.sun.enterprise.naming.impl.SerialContextProviderImpl lookup
FINE:  SerialContextProviderImpl :: lookup java:global/embedded-classes/BookLocalHomeBean
Apr 16, 2014 11:42:55 AM com.sun.enterprise.naming.impl.SerialContext lookup
FINE: enterprise_naming.serialctx_communication_exception
Apr 16, 2014 11:42:55 AM com.sun.enterprise.naming.impl.SerialContext lookup
FINE:
java.lang.NullPointerException
        at com.sun.ejb.containers.JavaGlobalJndiNamingObjectProxy.create(JavaGlobalJndiNamingObjectProxy.java:65)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:507)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)

Kicking up Eclipse and debugging the app showed the following:

com.sun.ejb.containers.JavaGlobalJndiNamingObjectProxy.create(Context)
/*    */   public Object create(Context ic) {
/* 63 */     GenericEJBLocalHome genericLocalHome = this.container.getEJBLocalBusinessHome(this.intfName);
/*    */     
/* 65 */     return genericLocalHome.create(this.intfName);
/*    */   }
  • this.intfName = com.coverity.testsuite.ejb.localhome.BookLocalHome
  • genericLocalHome = null

null is being passed into the create call, which triggers the NPE. Looking into `getEJBLocalBusinessHome`:

com.sun.ejb.containers.BaseContainer.getEJBLocalBusinessHome(String)
/*      */   public final GenericEJBLocalHome getEJBLocalBusinessHome(String clientViewClassName)
/*      */   {
/* 1016 */     return isLocalBeanClass(clientViewClassName) ? this.ejbOptionalLocalBusinessHome : this.ejbLocalBusinessHome;
/*      */   }
  • clientViewClassName = com.coverity.testsuite.ejb.localhome.BookLocalHome
  • this.ejbOptionalLocalBusinessHome = null
  • this.ejbLocalBusinessHome = null

Both are null. Let's see which one should have been picked:

com.sun.ejb.containers.BaseContainer.isLocalBeanClass(String)
/*      */   boolean isLocalBeanClass(String className)
/*      */   {
/* 1023 */     return (this.hasOptionalLocalBusinessView) && ((className.equals(this.ejbClass.getName())) || (className.equals(this.ejbGeneratedOptionalLocalBusinessIntfClass.getName())));
/*      */   }
  • this.hasOptionalLocalBusinessView = false
  • className == com.coverity.testsuite.ejb.localhome.BookLocalHome
  • this.ejbClass.getName() == com.coverity.testsuite.ejb.localhome.BookLocalHomeBean
  • this.ejbGeneratedOptionalLocalBusinessIntfClass.getName() == null

isLocalBeanClass returns false. Assuming the bug isn't lurking above, this.ejbLocalBusinessHome should not be null.

Now, BaseContainer is the abstract class. Eclipse is telling me the actual type is com.sun.ejb.containers.StatefulSessionContainer. StatefulSessionContext doesn't set the field ejbLocalBusinessHome. Grepping around ejbLocalBusinessHome is set in BaseContainer:

com.sun.ejb.containers.BaseContainer.initializeHome()
/* 1444 */       if (this.hasLocalBusinessView) {
/* 1445 */         this.ejbLocalBusinessHomeImpl = instantiateEJBLocalBusinessHomeImpl();
/*      */         
/* 1447 */         this.ejbLocalBusinessHome = ((GenericEJBLocalHome)this.ejbLocalBusinessHomeImpl.getEJBLocalHome());
/*      */       

To get to that point, isLocal} needs to be true, which it is in this run. For the field to be set, {{this.hasLocalBusinessView needs to be true, which it isn't in this run. BaseContainer sets it only in one spot. (StatefulSessionContainer does reference it; it just doesn't set it.):

com.sun.ejb.containers.BaseContainer.BaseContainer(ContainerType, EjbDescriptor, ClassLoader)
/*  650 */         if (this.ejbDescriptor.isLocalBusinessInterfacesSupported()) {
/*  651 */           this.isLocal = true;
/*  652 */           this.hasLocalBusinessView = true;
  • this.ejbDescriptor = com.sun.enterprise.deployment.EjbSessionDescriptor

And digging into isLocalBusinessInterfacesSupported:

com.sun.enterprise.deployment.EjbAbstractDescriptor.isLocalBusinessInterfacesSupported()
/*     */   public boolean isLocalBusinessInterfacesSupported()
/*     */   {
/* 278 */     return this.localBusinessClassNames.size() > 0;
/*     */   }
  • this.ejbDescriptor.localBusinessClassNames == []

Well, shucks. localBusinessClassNames is set in a ctor and also com.sun.enterprise.deployment.EjbAbstractDescriptor.addLocalBusinessClassName(String):

com.sun.enterprise.deployment.EjbAbstractDescriptor.addLocalBusinessClassName(String)
/*     */   public void addLocalBusinessClassName(String className) {
/* 185 */     this.localBusinessClassNames.add(className);
/*     */   }

Eclipse is saying it's only called by org.glassfish.ejb.deployment.annotation.handlers.AbstractEjbHandler.setBusinessAndHomeInterfaces(EjbDescriptor, AnnotationInfo), whoop. Debugging that method shows this:

org.glassfish.ejb.deployment.annotation.handlers.AbstractEjbHandler.setBusinessAndHomeInterfaces(EjbDescriptor, AnnotationInfo)
...
/* 452 */     if (localBusIntfs.size() > 0) {
/* 453 */       for (Class next : localBusIntfs) {
/* 454 */         ejbDesc.addLocalBusinessClassName(next.getName());
/*     */       }
/*     */     }

And since the EJB bean doesn't have any business interfaces implemented, (as defined by JSR), localBusIntfs is null. From JSR 318:

While it is expected that the bean class will typically implement its business inter- face(s), if the bean class uses annotations or the deployment descriptor to designate its business interface(s), it is not required that the bean class also be specified as imple- menting the interface(s).

In my test case the EJB doesn't implement the interface. But the only way the logic above would not cause the NPE is if a business interface is found. To me that seems like a bug in Glassfish. I'd think the Local interface would have been returned. I dunno what the right thing is, though. Assuming the code above is valid, then yeah, it's a bug.






[GLASSFISH-19310] Ensure methods declared on Object class are not exposed as business methods of the no-interface view Created: 09/Nov/12  Updated: 19/Sep/14

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

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


 Description   

3.4.4 Session Bean's No-Interface View: Only public methods of the bean class (and any superclasses, except methods declared on the java.lang.Object class) may be invoked through the no-interface view.

GF already filters methods declared in Object (EjbOptionalIntfGenerator), this a tracker bug to investigate/fix any issues with the support.



 Comments   
Comment by Srini [ 18/Nov/12 ]

Support exists in GF already, convert to a tracker bug

Comment by marina vatkina [ 20/Nov/12 ]

equals (and hashCode) for the no-interface view must follow the rules defined in EJB 3.2 (Core) spec, section 3.4.7 Session Object Identity. Currently they use Object.equals and (even worse) allow bean developer to override it (that latter case must result in a warning).





[GLASSFISH-18999] remote statefull EJB stub not serializable Created: 13/Aug/12  Updated: 13/Dec/12

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

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

Server 1 (deliverer of the remote reverence:
Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs) running on
Linux ltusp01 2.6.32.54-0.3-xen #1 SMP 2012-01-27 17:38:56 +0100 x86_64 x86_64 x86_64 GNU/Linux

Server 2 retriever of the stub stored in the DB
GlassFish Server Open Source Edition 3.1.1 (build 12) running on Windows 7



 Description   

trying to store the stub of a remote statefull seesion bean in the database didn't work because the entry couldn't be instantiated back due to this Exception:

[#|2012-08-12T14:09:15.903+0200|WARNING|glassfish3.1.1|org.eclipse.persistence.session.file:/C:/USP/Develop/glassfish3/glassfish/domains/domain1/applications/usp-be-configurator/usp-be-data_jar/_usp5530596|_ThreadID=22;_ThreadName=Thread-7;|
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:53)
at com.sun.corba.ee.spi.presentation.rmi.StubAdapter.getDelegate(StubAdapter.java:175)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.selfAsBaseClass(CodegenStubBase.java:216)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:1032)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1115)
...

Workaround was found by using JavaEEObjectStreamHandlerForEJBs and JavaEEObjectInputStream.
Questions are
shouldn't a remote stub be serializable without such workarounds
is this workaround possible in future releases






[GLASSFISH-19399] Async method should not be allowed on component interface or ´╗┐web service client view Created: 04/Dec/12  Updated: 04/Dec/12

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

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


 Description   

EJB spec requires that

Business methods exposed through the local component, remote component, and web service client views must not be designated as asynchronous

GF doesn't prohibit it (not only deployment succeeds, but the method is executed without an error)






[GLASSFISH-21087]  ManagedExecutorService does not execute tasks submitted during application startup Created: 12/Jun/14  Updated: 17/Dec/14

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

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

Glassfish 4.0, Java 7, currently testing on Windows 7



 Description   

I'm attempting to schedule a task from inside a singleton bean which is initialised at startup:

@Singleton
@Startup
public class StartupSingleton {
      @Resource
      ManagedExecutorService executorService;

      @PostConstruct
      public void init() {
            System.out.println("init");
            Future<?> future = executorService.submit(new Runnable() {
                  public void run() {
                        System.out.println("run");
                  }
            });
            
            try {
                  Thread.sleep(1000);
                  if(future.isDone()) {
                        future.get();
                        System.out.println("ok");
                  } else {
                        System.out.println("not run");
                  }
            } catch (Exception e) {
                  e.printStackTrace();
            }
      }
}

I then get the following in the logs:

2014-06-10T15:45:07.497+0930|Info: init
2014-06-10T15:45:08.499+0930|Severe: java.util.concurrent.ExecutionException: javax.enterprise.concurrent.AbortedException: Module glassfish-executor-test is disabled
      at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      at foo.StartupSingleton.init(StartupSingleton.java:33)
      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.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1035)
      at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:72)
      at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:205)
      at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
      at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:986)
      at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:72)
      at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:205)
      at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
      at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:125)
      at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:986)
      at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:72)
      at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:412)
      at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:375)
      at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:1949)
      at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:475)
      at com.sun.ejb.containers.AbstractSingletonContainer.access$000(AbstractSingletonContainer.java:81)
      at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:654)
      at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:396)
      at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:219)
      at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:180)
      at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:158)
      at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:166)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
      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:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
      at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
      at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      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:744)
Caused by: javax.enterprise.concurrent.AbortedException: Module glassfish-executor-test is disabled
      at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:146)
      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:744)

And the submitted task is not run. (glassfish-executor-test is just the name of the standalone test case that I created).

Surely either the executor service should be initialized and available by the time @PostConstruct stuff is executed, or it should queue submitted tasks and execute them once the application is started.

This is just using the default managed executor service in a default domain.xml file.



 Comments   
Comment by kingsob [ 23/Jun/14 ]

I am seeing the same thing. Is this a bug? How else would I add a task to the executor on ejb start up?

Comment by mreichman [ 14/Jul/14 ]

Also seeing the same in 4.0.1b8, from an @Asynchronous method called from a @PostConstruct.

Was able to work around it by throwing a Thread.sleep in my @Asynchronous method, but that is certainly not a workable solution.

Comment by afcarv [ 17/Dec/14 ]

Got the same issue. Are you using module/application versioning?

Cause appears to be some mix-up at "org.glassfish.concurrent.runtime.ContextSetupProviderImpl"; method "isApplicationEnabled" checks to see if the current context application is enabled, but I think the app name contains only the base name (e.g. "my-application") while the app list contains the full name (e.g. "my-application:1.0.0"). So no match is found.

I was able to work around by deploying the app without the version but the obvious consequence is losing the versioning feature. Not sure if there's a better way.





[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-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-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-21200] EclipseLink doesn't process "javax.persistence.loadgraph". Created: 16/Sep/14  Updated: 16/Sep/14

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

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

N/A



 Description   

The query hint "javax.persistence.loadgraph" is not processed at all. You can confirm by setting it to a new Object() and see that no exception is thrown.

The problem lies with an error of omission in their QueryHintsHandler$Hint class which can be found in file eclipselink.runtime\jpa\org.eclipse.persistence.jpa\src\org\eclipse\persistence\internal\jpa\QueryHintsHandler.java in the EclipseLink source code.

That class registers all valid hints. It registers QueryHintsHandler$FetchGraphHint and contains a QueryHintsHandler$LoadGraphHint, but does not register it. It also looks like LoadGraphHint was copied from FetchGraphHint because they also forgot to change the error message when it checks the type of the object passed to the hint.

These bugs are still in the 2.5 branch of EclipseLink's GIT repository which when built has the version 2.5.3. But the bugs have been fixed in the 2.6 branch. I've requested that these fixes be brought back to the 2.5 branch so they can be in EclipseLink 2.5.3 when it is released, but have yet to hear back from anyone.

The fixes are just two lines of code. One to register the already created LoadGraphHint class with the Hint class. And another to the LoadGraphHint class to fix the error message output.

In fact I was able to make the fixes myself, recompile with all the tests passing, and can confirm that load graphs are now working in my Glassfish 4.1 without issue.

If you guys need, I can produce a diff. But I was hoping that you guys could patch Glassfish now instead of waiting for 2.5.3 which may not have the fixes, or for 2.6 which seems to still have a bunch of experimental code that is a long way from being released.

I imagine I'm not the only one that is/was having major performance impacts because of these bugs.

I will continue to try and reach out to the maintainer for EclipseLink's JPA implementation.

Thank you in advance for any help or advice you could give me in resolving this issue.






[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-21188] Unable to create a converter for javax.json.JsonObject Created: 07/Sep/14  Updated: 18/Mar/15

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

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


 Description   

I have tried to create a JsonObject to Clob converter

import java.sql.Clob;
import java.sql.SQLException;

import javax.json.Json;
import javax.json.JsonObject;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import javax.persistence.PersistenceException;
import javax.sql.rowset.serial.SerialClob;

@Converter(autoApply = true)
public class JsonObjectConverter implements
AttributeConverter<JsonObject, Clob> {

	@Override
	public Clob convertToDatabaseColumn(final JsonObject jsonObject) {
		if (jsonObject == null) {
			return null;
		}
		try {
			return new SerialClob(jsonObject.toString().toCharArray());
		} catch (final SQLException e) {
			throw new PersistenceException(e);
		}
	}

	@Override
	public JsonObject convertToEntityAttribute(final Clob dbData) {
		if (dbData == null) {
			return null;
		}
		try {
			return Json.createReader(dbData.getCharacterStream()).readObject();
		} catch (final SQLException e) {
			throw new PersistenceException(e);
		}
	}
}

I have also placed the converter in a separate JAR because of a bug with Joda Time and GLASSFISH-21161 .

Here is the relevant stack trace

Caused by: Exception [EclipseLink-67] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not serialize object into byte array.
Internal Exception: java.io.NotSerializableException: org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[json-->BEANWITHJODATIME.JSON]

Adding the @Converter will make the system report that the class was not found.



 Comments   
Comment by atrajano [ 08/Sep/14 ]

Code for this is at https://github.com/trajano/jodatime-jpa-converter-example/tree/json-converter

Comment by atrajano [ 18/Mar/15 ]

Also applies for 4.1





[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-21079] org.jboss.weld.ejb.api.SessionObjectReference#getBusinessObject now supports remote interfaces Created: 02/Jun/14  Updated: 19/Sep/14

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 19280581-fb7f-4e5c-a2b5-9d3d818e579a.war     Java Archive File test-source.jar    
Tags: 4_0_1-mustfix

 Description   

For cdi 1.2 org.jboss.weld.ejb.api.SessionObjectReference#getBusinessObject now supports remote interfaces. Previously it just supported local interfaces.

The test is causing SessionObjectReferenceImpl#getBusinessObject to be called with an ejb's remote interface. This in turn is calling into EjbContainerServicesImpl#getBusinessObject with what appears to be the correct ejb reference and the remote interface as paramters. But this method is not finding the ejb for the specified remote interface and so an exception is thrown from line 108:

throw new IllegalStateException("Unable to convert ejbRef for ejb " +

The ejb in question is the Spitz ejb (source attached) which has both a local and remote interface defined for it.

To reproduce the exception deploy the attached war and then execute this url:

http://localhost:8080/19280581-fb7f-4e5c-a2b5-9d3d818e579a/ArquillianServletRunner?className=org.jboss.cdi.tck.tests.event.observer.resolve.enterprise.ResolveEnterpriseEventObserverTest&methodName=testObserverMethodOnEnterpriseBeanIsBusinessMethodOrStatic






[GLASSFISH-21088] EJB invocations from a JBatch ChunkStep bundled within an EAR are incorrectly cast as SERVLET_INVOCATIONs within EntityManagerFactoryWrapper Created: 12/Jun/14  Updated: 12/Jun/14

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

Type: Bug Priority: Minor
Reporter: cstraw Assignee: Srini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 30 minutes
Time Spent: Not Specified
Original Estimate: 30 minutes

Tags: entitymanager, jbatch

 Description   

EntityManagerFactoryWrapper.lookupEntityManagerFactory casts 'descriptor' to WebBundleDescriptor when the ComponentInvocationType is SERVLET_INVOCATION without first checking if the descriptor is of this type.

For whatever reason, jbatch chunk steps bundled within an EAR that execute an EJB are currently considered type "SERVLET_INVOCATION", resulting in a ClassCastException, e.g.:

Failure in Read-Process-Write Loop
com.ibm.jbatch.container.exception.BatchContainerRuntimeException: java.lang.ClassCastException: org.glassfish.ejb.deployment.descriptor.EjbSessionDescriptor cannot be cast to com.sun.enterprise.deployment.WebBundleDescriptor

Bundling everything in a WAR appears to avoid this bug.

An potential fix is to pull the "case SERVLET_INVOCATION" up immediately after the "case EJB_INVOCATION" line so that the instanceof EjbDescriptor test is executed in both instances.

Similar issue was described online here:
https://www.java.net/forum/topic/glassfish/glassfish/jsr352-classcastexception-glassfish-v40






[GLASSFISH-21072] NullPointerException at com.sun.enterprise.resource.pool.PoolManagerImpl.handleLazilyAssociatedConnectionPools(PoolManagerImpl.java:623) Created: 26/May/14  Updated: 13/Jun/14

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

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


 Description   

We have a message processing application that receives messages via a message queue.
So there is a MDB that receives messages from this queue and forwards them to a singleton EJB for further processing.

Transactions:
MDB: @TransactionManagement(TransactionManagementType.BEAN)
Singleton EJB: @ConcurrencyManagement(ConcurrencyManagementType.BEAN)

After a few hours of load testing we continuously get exceptions in GF when MDB invokes a local call to Singleton EJB (MDB00037). After that the JMS message redelivered (MQJMSRA_MR2001) is received.

Exception snippet:
=============================================================================

[#|2014-05-23T12:01:16.698+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.ejb.mdb.com.sun.ejb.containers|_ThreadID=752;_ThreadName=Thread-2;|MDB00037: [ht-ear-2.7.0-SNAPSHOT-PRETTY-7527:ObdMessageBean]: Message-driven bean invocation exception: [javax.ejb.EJBException]|#]

[#|2014-05-23T12:01:16.699+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.ejb.mdb.com.sun.ejb.containers|_ThreadID=752;_ThreadName=Thread-2;|javax.ejb.EJBException
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215)
at com.sun.ejb.containers.BaseContainer.checkExceptionNoTx(BaseContainer.java:5044)
at com.sun.ejb.containers.BaseContainer.checkExceptionBeanMgTx(BaseContainer.java:4965)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4865)
at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1211)
at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1186)
at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:86)
at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:190)
at com.sun.proxy.$Proxy669.onMessage(Unknown Source)
at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.lang.NullPointerException
at com.sun.enterprise.resource.pool.PoolManagerImpl.handleLazilyAssociatedConnectionPools(PoolManagerImpl.java:623)
at com.sun.enterprise.resource.pool.PoolManagerImpl.postInvoke(PoolManagerImpl.java:601)
at com.sun.enterprise.resource.pool.PoolManagerImpl.afterPostInvoke(PoolManagerImpl.java:580)
at org.glassfish.api.invocation.InvocationManagerImpl.postInvoke(InvocationManagerImpl.java:220)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2021)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
at com.sun.proxy.$Proxy566.receiveMessages(Unknown Source)
at com.ht.ms.obd.ObdMessageBean.processMessage(ObdMessageBean.java:115)
at com.ht.ms.obd.ObdMessageBean.onMessage(ObdMessageBean.java:70)
at sun.reflect.GeneratedMethodAccessor1959.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099)
at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
... 5 more

#]

[#|2014-05-23T12:01:16.702+0200|INFO|glassfish3.1.2|com.ht.message.logic.MessageValidationBean|_ThreadID=679;_ThreadName=Thread-2;|Validating message Message[id=12792, obdId=null]|#]

[#|2014-05-23T12:01:16.703+0200|INFO|glassfish3.1.2|com.ht.logic.equipmentdetection.EquipmentDetectionProcessorBean|_ThreadID=679;_ThreadName=Thread-2;|No equipment processing for Message[id=12792], does not contain equipment couple info.|#]

[#|2014-05-23T12:01:16.704+0200|INFO|glassfish3.1.2|com.ht.logic.message.MessageProcessorBean|_ThreadID=679;_ThreadName=Thread-2;|Finished processing of Message[id=12792, obdId=null]|#]

[#|2014-05-23T12:01:16.701+0200|WARNING|glassfish3.1.2|javax.resourceadapter.mqjmsra.inbound.message|_ThreadID=752;_ThreadName=Thread-2;|MQJMSRA_MR2001: run:Caught Exception from onMessage():Redelivering:
javax.ejb.EJBException: message-driven bean method public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message) system exception
at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1134)
at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
at com.sun.proxy.$Proxy669.onMessage(Unknown Source)
at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.lang.NullPointerException
at com.sun.enterprise.resource.pool.PoolManagerImpl.handleLazilyAssociatedConnectionPools(PoolManagerImpl.java:623)
at com.sun.enterprise.resource.pool.PoolManagerImpl.postInvoke(PoolManagerImpl.java:601)
at com.sun.enterprise.resource.pool.PoolManagerImpl.afterPostInvoke(PoolManagerImpl.java:580)
at org.glassfish.api.invocation.InvocationManagerImpl.postInvoke(InvocationManagerImpl.java:220)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2021)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
at com.sun.proxy.$Proxy566.receiveMessages(Unknown Source)
at com.ht.ms.obd.ObdMessageBean.processMessage(ObdMessageBean.java:115)
at com.ht.ms.obd.ObdMessageBean.onMessage(ObdMessageBean.java:70)
at sun.reflect.GeneratedMethodAccessor1959.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099)
... 7 more

#]
=============================================================================


 Comments   
Comment by alebor [ 27/May/14 ]

Environment: CentOS release 6.4 (Final), Glassfish 3.1.2.2

Comment by alebor [ 11/Jun/14 ]

I have created a patch on

PoolManagerImpl.java

(connectors-runtime in https://svn.java.net/svn/glassfish~svn/tags/3.1.2.2-no-delete) to avoid this NullPointerException.

The lazy connection disassociation is skipped in case ResourceHandle or ResourceSpec (from ResourceHandle) are NULL.

PATCH START
===========

Index: PoolManagerImpl.java
===================================================================
--- PoolManagerImpl.java	(revision 63349)
+++ PoolManagerImpl.java	(working copy)
@@ -41,41 +41,48 @@
 package com.sun.enterprise.resource.pool;
 
 import com.sun.appserv.connectors.internal.api.ConnectorConstants.PoolType;
-import org.glassfish.resource.common.PoolInfo;
+import com.sun.appserv.connectors.internal.api.ConnectorRuntime;
 import com.sun.appserv.connectors.internal.api.PoolingException;
-import com.sun.appserv.connectors.internal.api.ConnectorRuntime;
 import com.sun.appserv.connectors.internal.spi.MCFLifecycleListener;
+import com.sun.enterprise.connectors.ConnectorConnectionPool;
 import com.sun.enterprise.connectors.ConnectorRegistry;
 import com.sun.enterprise.deployment.ResourceReferenceDescriptor;
 import com.sun.enterprise.resource.ClientSecurityInfo;
+import com.sun.enterprise.resource.ResourceHandle;
 import com.sun.enterprise.resource.ResourceSpec;
-import com.sun.enterprise.resource.ResourceHandle;
 import com.sun.enterprise.resource.allocator.ResourceAllocator;
 import com.sun.enterprise.resource.listener.PoolLifeCycle;
-import com.sun.enterprise.resource.rm.*;
+import com.sun.enterprise.resource.rm.LazyEnlistableResourceManagerImpl;
+import com.sun.enterprise.resource.rm.NoTxResourceManagerImpl;
+import com.sun.enterprise.resource.rm.ResourceManager;
+import com.sun.enterprise.resource.rm.ResourceManagerImpl;
+import com.sun.enterprise.resource.rm.SystemResourceManagerImpl;
 import com.sun.enterprise.transaction.api.JavaEETransaction;
 import com.sun.enterprise.transaction.api.JavaEETransactionManager;
+import com.sun.enterprise.util.i18n.StringManager;
 import com.sun.logging.LogDomains;
-import org.jvnet.hk2.annotations.Service;
-import org.jvnet.hk2.annotations.Inject;
-import org.jvnet.hk2.component.Habitat;
-import org.glassfish.api.invocation.InvocationException;
-import org.glassfish.api.invocation.ComponentInvocation;
-import org.glassfish.api.invocation.ComponentInvocationHandler;
-import com.sun.enterprise.connectors.ConnectorConnectionPool;
-
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.resource.ResourceException;
+import javax.resource.spi.ManagedConnection;
 import javax.resource.spi.ManagedConnectionFactory;
 import javax.resource.spi.RetryableUnavailableException;
+import javax.transaction.Synchronization;
 import javax.transaction.Transaction;
-import javax.transaction.Synchronization;
 import javax.transaction.xa.XAResource;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.ResourceException;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import com.sun.enterprise.util.i18n.StringManager;
+import org.glassfish.api.invocation.ComponentInvocation;
+import org.glassfish.api.invocation.ComponentInvocationHandler;
+import org.glassfish.api.invocation.InvocationException;
+import org.glassfish.resource.common.PoolInfo;
+import org.jvnet.hk2.annotations.Inject;
+import org.jvnet.hk2.annotations.Service;
+import org.jvnet.hk2.component.Habitat;
 
 /**
  * @author Tony Ng, Aditya Gore
@@ -204,7 +211,7 @@
             if (handle.getResourceState().isUnenlisted()) {
                 //The spec being used here is the spec with the updated
                 //lazy enlistment info
-                //Here's the real place where we care about the correct 
+                //Here's the real place where we care about the correct
                 //resource manager (which in turn depends upon the ResourceSpec)
                 //and that's because if lazy enlistment needs to be done
                 //we need to get the LazyEnlistableResourceManager
@@ -369,7 +376,7 @@
     public void unregisterPoolLifeCycleListener() {
         listener = null;
     }
-    
+
     public void unregisterResource(com.sun.appserv.connectors.internal.api.ResourceHandle resource, int xaresFlag) {
         ResourceHandle h = (ResourceHandle)resource;
         ResourceManager rm = getResourceManager(h.getResourceSpec());
@@ -513,7 +520,7 @@
                }
            }
        }
-    
+
     public ResourceReferenceDescriptor getResourceReference(String jndiName, String logicalName) {
         Set descriptors = getConnectorRuntime().getResourceReferenceDescriptor();
         List matchingRefs = new ArrayList();
@@ -617,10 +624,24 @@
 
         if (list.size() == 0) return;
 
-        ResourceHandle[] handles = (ResourceHandle[]) list.toArray(
-                new ResourceHandle[0]);
+        ResourceHandle[] handles = (ResourceHandle[]) list.toArray(new ResourceHandle[list.size()]);
+
         for (ResourceHandle h : handles) {
+            if (h == null) {
+                if (_logger.isLoggable(Level.INFO)) {
+                    _logger.info("Skipping lazy connection disassociation due to RecourceHandle: null");
+                }
+                continue;
+            }
+
             ResourceSpec spec = h.getResourceSpec();
+            if (spec == null) {
+                if (_logger.isLoggable(Level.INFO)) {
+                    _logger.info("Skipping lazy connection disassociation due to Recource Spec: null");
+                }
+                continue;
+            }
+
             if (spec.isLazyAssociatable()) {
                 //In this case we are assured that the managedConnection is
                 //of type DissociatableManagedConnection
@@ -675,11 +696,11 @@
         ResourcePool pool = getPool( poolInfo );
         if (pool != null ) {
             pool.reconfigurePool( ccp );
-        }        
+        }
     }
 
     /**
-     * Flush Connection pool by reinitializing the connections 
+     * Flush Connection pool by reinitializing the connections
      * established in the pool.
      * @param poolInfo
      * @throws com.sun.appserv.connectors.internal.api.PoolingException

===========
PATCH END

Does anyone know if this is sufficient to get rid of this NPE?
Maybe the side effects?

Please let me know.





[GLASSFISH-20995] Exception in thread "connector-timer-proxy" Created: 27/Feb/14  Updated: 03/Jun/14

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

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

Version by asadmin version --verbose is:
Version = GlassFish Server Open Source Edition 4.0 (build 89), JRE version 1.7.0_45

Installation windows, zip, full 4.0 version.

Patched: weld-osgi-bundle-2.0.5-Final.jar because leaking memory in JSF and nucleus-grizzly-all.jar because of compression error.


Tags: 4_0_1-reviewed

 Description   

Scenario:
EJB (Timer) takes connection from pool and executes query. After execution of few queries (each query obtains new connection and releases it after query) got 1 minute timeout and then exception is thrown:

[2014-02-27T17:20:29.953+0100] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=810 _ThreadName=Thread-4] [timeMillis: 1393518029953] [levelValue: 1000] [[
Exception in thread "connector-timer-proxy"]]

[2014-02-27T17:20:29.953+0100] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=810 _ThreadName=Thread-4] [timeMillis: 1393518029953] [levelValue: 1000] [[
java.lang.IllegalArgumentException: can't parse argument number: PoolInfo : (name=java:app/sqltbstelematico)
at java.text.MessageFormat.makeFormat(MessageFormat.java:1420)
at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
at java.text.MessageFormat.<init>(MessageFormat.java:363)
at com.sun.enterprise.util.i18n.StringManagerBase.getStringWithDefault(StringManagerBase.java:205)
at com.sun.enterprise.resource.pool.ConnectionLeakDetector.printConnectionLeakTrace(ConnectionLeakDetector.java:180)
at com.sun.enterprise.resource.pool.ConnectionLeakDetector.potentialConnectionLeakFound(ConnectionLeakDetector.java:160)
at com.sun.enterprise.resource.pool.ConnectionLeakDetector.access$000(ConnectionLeakDetector.java:63)
at com.sun.enterprise.resource.pool.ConnectionLeakDetector$ConnectionLeakTask.run(ConnectionLeakDetector.java:225)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.NumberFormatException: For input string: " PoolInfo : (name=java:app/sqltbstelematico)"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:481)
at java.lang.Integer.parseInt(Integer.java:527)
at java.text.MessageFormat.makeFormat(MessageFormat.java:1418)
... 9 more]]

Later timer is recreated and scheduled at fixed rate (see attached log).
Later have errors RAR5117 (2 times), RAR5114 (2 times) and after another minute again 4 errors.
After another minute got errors RAR5109, RAR7093, RAR8066 3 times and following queries execution continues.



 Comments   
Comment by labkeeper [ 27/Feb/14 ]

Cannot attach compressed log.





Generated at Fri Mar 27 10:17:17 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.