1

I'm developing on WebLogic 12c (12.1.3.0) with it's delivered EclipseLink 2.5.2.

I configured a connection pool to a PostgreSQL-DB.

When I try to access the @EJB (SLSB) which contains the @PersistenceContext the WebLogic quits with an StackOverflowError while it tries to lookup a JNDI resource. I think it's the JTA datasource of the persistence.xml.

java.lang.StackOverflowError
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.naming.internal.VersionHelper12.getContextClassLoader(VersionHelper12.java:185)
    at com.sun.naming.internal.ResourceManager.getFactory(ResourceManager.java:418)
    at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:592)
    at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:550)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:339)
    at javax.naming.InitialContext.lookup(InitialContext.java:411)
    at weblogic.jndi.internal.ApplicationNamingNode.resolveObject(ApplicationNamingNode.java:169)
    at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:886)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:219)
    at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:131)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:253)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.ApplicationNamingNode.resolveObject(ApplicationNamingNode.java:170)
[...]

Does somebody knows such a behaviour?

Thanks, Stefan

Stefan B.
  • 83
  • 8
  • Is there something in the stack causing some sort of recursion? See http://stackoverflow.com/questions/214741/what-is-a-stackoverflowerror for what a stack overflow is, as you haven't provided enough info to show there is anything wrong with the code. Chances are, you just don't have enough memory allocated to the JVM running WebLogic – Chris Nov 05 '15 at 15:49
  • Thanks Chris for your comment. I solved the StackOverflowError. See my answer. – Stefan B. Nov 06 '15 at 06:21

1 Answers1

0

I solved my problem by increase the debug output of the Webogic server. There I realized a wrong JNDI adress for the JDBC lookup. It seems the persistence context tried to use the non-jta-data-source instead of the jta-data-source of the persistence.xml. They were different due to unit testing purpose. I removed the entry and now the initialization of the JPA contexts works.

Stefan B.
  • 83
  • 8
  • if a normal error causes a StackOverflowError in your server, you have other resource based issues to deal with as well. – Chris Nov 06 '15 at 13:28