Topics

Upgrading to glassfish 5 from 4.1 Stackoverflow error


Trond Arild Lode Tobiassen Heidelberg
 
Edited

Please note that before upgrading to 5.0 the below case/topic describes what happens when running the code (no id gets injected into a row of the the twentifirst table handled by the server)


I notice in the log that a number of things are skipped. Not sure whether this is parts of the libraries or the entire libraries. Also seems from end of log that this is related to annotations. Thus I have commented away those that I think might be slightly incorrect (trusting eclipselink to guide me on java.util.Map where value is a collection. Se below for example)

26.11.17
I have debugged and found that even though the annotations are commented the stackoverflow still occurs when a certain class is handled. I guess it is due to the Map<String, Collection<AbstractParamValue>>. Is there a way to persist this, or am I better off making an object containing a collection and use it as value?

@ElementCollection
@CollectionTable(name = "ABSTRACT_HEADER_PARAMS_PARAMS_TABLE")
@MapKeyColumn(name = "ABSTRACT_HEADER_PARAMS_PARAMS_KEY")
@Column(name = "ABSTRACT_HEADER_PARAMS_PARAMS_AS_MAP", unique = false, nullable = true, updatable = false)
protected Map<String, Collection<AbstractParamValue>> paramsAsMap;

 

11-24@11:34:11 DEBUG (CSipSimpleTest.java:30)     - starting up container
nov 24, 2017 11:34:12 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl createContainer
INFO: [EJBContainerProviderImpl] Using installation location C:\Program Files\Glassfish\glassfish5\glassfish
nov 24, 2017 11:34:12 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl createContainer
INFO: [EJBContainerProviderImpl] Using config file location: file:/C:/Users/trond/AppData/Local/Temp/domain1639859917860175844xml
nov 24, 2017 11:34:12 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl createContainer
INFO: [EJBContainerProviderImpl] Using runtime class: class com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime
nov 24, 2017 11:34:15 AM com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
nov 24, 2017 11:34:15 AM com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
nov 24, 2017 11:34:15 AM com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
nov 24, 2017 11:34:15 AM org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl initialize
INFO: Authorization Service has successfully initialized.
nov 24, 2017 11:34:16 AM org.glassfish.ha.store.spi.BackingStoreFactoryRegistry register
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
nov 24, 2017 11:34:16 AM com.sun.enterprise.v3.server.AppServerStartup postStartupJob
INFO: GlassFish Server Open Source Edition  5.0  (25) startup time : Embedded (1 878ms), startup services(1 835ms), total(3 713ms)
nov 24, 2017 11:34:16 AM com.sun.jts.CosTransactions.DefaultTransactionService setServerName
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
nov 24, 2017 11:34:16 AM org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread run
INFO: JMXStartupService has disabled JMXConnector system
nov 24, 2017 11:34:16 AM org.glassfish.admin.mbeanserver.JMXStartupService shutdown
INFO: JMXStartupService and JMXConnectors have been shut down.
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.JdbcResource]
nov 24, 2017 11:34:16 AM com.sun.enterprise.v3.server.AppServerStartup stop
INFO: Shutdown procedure finished
nov 24, 2017 11:34:16 AM org.glassfish.ha.store.spi.BackingStoreFactoryRegistry register
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
nov 24, 2017 11:34:16 AM com.sun.enterprise.v3.server.AppServerStartup postStartupJob
INFO: GlassFish Server Open Source Edition  5.0  (25) startup time : Embedded (4 375ms), startup services(34ms), total(4 409ms)
nov 24, 2017 11:34:16 AM org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread run
INFO: JMXStartupService has disabled JMXConnector system
nov 24, 2017 11:34:18 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: org.eclipse.jdt.annotation_2.0.100.v20150311-1658.jar
nov 24, 2017 11:34:18 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: glassfish-embedded-static-shell.jar
nov 24, 2017 11:34:19 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: org.eclipse.jdt.annotation_2.0.100.v20150311-1658.jar
nov 24, 2017 11:34:19 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: org.eclipse.jdt.annotation-2.1.0.jar
nov 24, 2017 11:34:19 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: glassfish-embedded-all-5.0.jar
nov 24, 2017 11:34:19 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding classes to exploded ear  isEJBModule? true isWebApp? false
nov 24, 2017 11:34:19 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding zipfs.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:19 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding classes to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-lang-2.6.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-codec-1.4.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding jaccess.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding jfxrt.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding resources.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding localedata.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding activation-1.1.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-configuration-1.7.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding sunec.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding .cp to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-net-3.3.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding access-bridge-64.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding animal-sniffer-annotations-1.14.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding .cp to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding jce.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-logging-1.1.1.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding sunpkcs11.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding dnsns.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding nashorn.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding ojdbc14-10.2.0.5.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding jfr.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding classes to exploded ear  isEJBModule? true isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-collections-3.2.1.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding cldrdata.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding netty-all-4.1.1.Final.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding guava-22.0.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding charsets.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding junit-dep-4.7.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding rt.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding javax.mail-1.6.0.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding error_prone_annotations-2.0.18.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding jsse.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding hamcrest-core-1.1.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding jsr305-1.3.9.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding javaee-api-8.0.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-beanutils-1.9.3.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding j2objc-annotations-1.1.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:24 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding test-classes to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:25 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding commons-digester-1.8.1.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:25 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding sunmscapi.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:25 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding sunjce_provider.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:25 AM org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding log4j-1.2.17.jar to exploded ear  isEJBModule? false isWebApp? false
nov 24, 2017 11:34:25 AM org.glassfish.ejb.embedded.EJBContainerImpl deploy
INFO: [EJBContainerImpl] Deploying app: C:\Users\trond\AppData\Local\Temp\ejb-app2914983357079903571
nov 24, 2017 11:34:25 AM org.glassfish.ejb.embedded.EJBContainerImpl deploy
INFO: [EJBContainerImpl] GlassFish status: STARTED
nov 24, 2017 11:34:25 AM org.glassfish.ejb.embedded.EJBContainerImpl deploy
INFO: [EJBContainerImpl] Deploying as a File
nov 24, 2017 11:34:36 AM org.glassfish.hk2.classmodel.reflect.Parser$5 on
SEVERE: Exception while visiting java/lang/Object.class of size 1497
java.lang.NullPointerException
at org.glassfish.hk2.classmodel.reflect.impl.TypesImpl.getType(TypesImpl.java:81)
at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor.visit(ModelClassVisitor.java:131)
at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.accept(ClassReader.java:624)
at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.accept(ClassReader.java:505)
at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:360)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)
at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:345)
at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:68)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:304)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:293)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
 
nov 24, 2017 11:34:45 AM com.sun.enterprise.security.SecurityLifecycle <init>
INFO: Java security manager is disabled.
nov 24, 2017 11:34:45 AM com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: Entering Security Startup Service.
nov 24, 2017 11:34:45 AM com.sun.enterprise.security.PolicyLoader loadPolicy
INFO: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
nov 24, 2017 11:34:45 AM com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: Security Service(s) started successfully.
nov 24, 2017 11:34:48 AM org.glassfish.api.ActionReport failure
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
nov 24, 2017 11:34:48 AM org.glassfish.api.ActionReport failure
SEVERE: Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method
org.glassfish.deployment.common.DeploymentException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [REGDB] failed.
Internal Exception: java.lang.StackOverflowError
at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:182)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:536)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:535)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:566)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:558)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:557)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1465)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:110)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1847)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1723)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:141)
at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:134)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:127)
at no.tobiassenit.test.sipstack.CSipSimpleTest.setUpBeforeClass(CSipSimpleTest.java:31)
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:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:539)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:761)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:461)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:207)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [REGDB] failed.
Internal Exception: java.lang.StackOverflowError
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:2080)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:2071)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactoryImpl(PersistenceProvider.java:347)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:313)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:199)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:309)
at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:88)
at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:155)
at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:152)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:232)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:241)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:267)
at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:152)
... 39 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [REGDB] failed.
Internal Exception: java.lang.StackOverflowError
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:231)
... 58 more
Caused by: java.lang.StackOverflowError
at java.util.HashMap.hash(HashMap.java:339)
at java.util.HashMap.get(HashMap.java:557)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.getMetadataClass(MetadataAsmFactory.java:152)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.getMetadataClass(MetadataAsmFactory.java:140)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement.getAnnotation(MetadataAnnotatedElement.java:215)
 


Trond Arild Lode Tobiassen Heidelberg
 

Found the problem. Ho-ho. Santa brought som insight. Turns out i was not annotating my nonpersistable guava types with @Transient. Maybe 5.0.1 can bring a clearer exception message to this case.


Ed Bratt
 

Could you file an issue about the exception improvement in the issue tracker? https://github.com/javaee/glassfish/issues
Thanks!