Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-9441

EAP5 JDK7: TestCases failing in Hibernate EntityManager due to SecurityException for prohibited package name

    XMLWordPrintable

Details

    • Not Required
    • NEW

    Description

      Testcases in PackagedEntityManageTest fails when run against JDk7 with following stacktrace:

      javax.persistence.PersistenceException: [PersistenceUnit: defaultpar] Unable to configure EntityManagerFactory
      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:266)
      at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
      at org.hibernate.ejb.test.PackagedEntityManagerTest.testDefaultPar(PackagedEntityManagerTest.java:44)
      Caused by: java.lang.SecurityException: Prohibited package name: java.org.hibernate.ejb.test.pack.defaultpar
      at java.lang.ClassLoader.preDefineClass(ClassLoader.java:649)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:785)

      Hudson Link:
      https://hudson.qa.jboss.com/hudson/job/eap5-hibernate-dballocator-jdk7-entitymanager/database=oracle11gR1,jdbc=jdbc4,jdk=java17_default,label=RHEL6_x86_64/lastCompletedBuild/testReport/

      It is clear that packagename starts with java.* which is prohibited.
      Not sure why the java. is picked up though...(could it be related to different jdk versions since we compiled the code with JDk6 and run it with JDk7)?

      Attachments

        Activity

          People

            brmeyer_jira Brett Meyer (Inactive)
            madhumita12_jira Madhumita Sadhukhan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: