Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-6441

naming context is not setup when starting the persistence unit

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JBoss AS7 7.1.1.Final, JBoss AS7 7.2.0.Final, 9.0.2.Final, 10.0.0.Final
    • Fix Version/s: 10.1.0.CR1, 10.1.0.Final
    • Component/s: JPA / Hibernate
    • Labels:
      None

      Description

      ookup of env-entry throws NameNotFoundException during persistence unit startup

      Version-Release number of selected component (if applicable):

      How reproducible:
      always

      Steps to Reproduce:
      1. add env-entry in application.xml
      2. try to lookup during persistent unit startup, e.g.
      public class MyType implements UserType {
      ...
      @Override
      public int[] sqlTypes() {
      try

      { Object ctx = new InitialContext().lookup("java:app/env"); log.info("java:app/env from JPA = " + ctx); }

      catch (Exception e)

      { log.error("unable to get java:app/env from JPA", e); }

      return new int[]

      { Types.VARCHAR }

      ;
      }

      Actual results:
      NameNotFoundException

      Expected results:
      value of env-entry is available

      Additional info:
      On 21.03.2016 23:47, Stuart Douglas wrote:
      > This should fix it (I think): https://github.com/stuartwdouglas/wildfly/tree/jpa-java-namespace
      >
      > Stuart

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  smarlow Scott Marlow
                  Reporter:
                  smarlow Scott Marlow
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: