glassfish
  1. glassfish
  2. GLASSFISH-17295

Redeployment leads to a Closed EntityManagerFactory problem

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.0_b30
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      Windows 7 x64, also reported on Linux

      Description

      This may be a duplicate of GLASSFISH-16897.

      Recipe: from admin console,

      Deploy the attached WAR file (it requires a connection pool called jdbc/EmployeeDb).

      Check the page /all-employees.jsf (an empty basic JSF table should be shown).

      Click the "redeploy" button on the admin console.

      Check the page /all-employees.jsf again.

      The attached stack trace is thrown, with the pertinent error being:

      "Caused by: java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManagerFactory."

      Note that this doesn't seem to affect either autodeployment, or re-deploying through the asadmin tool, so I suspect this is a problem with the GUI admin tool.

        Activity

        Hide
        sdoca added a comment -

        I am experiencing this issue in GF-4.0, so this issue is not fixed. See my comments on https://java.net/jira/browse/GLASSFISH-16897. If I try to use the undeploy/deploy workaround mentioned above, I get this issue:

        Caused by: java.lang.IllegalArgumentException: Object: Change ID=TEST-6 is not a known entity type.
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4222)
        at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:496)
        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)

        where we are trying to create a "Batch" entity object that has a String attribut called "changeId" and we're passing the value "TEST-6" to the set method.

        On first deploy, the Batch object is correctly created and the changeId set. It's only on undeploy/deploy that we see this error and the server needs to be restarted.

        Show
        sdoca added a comment - I am experiencing this issue in GF-4.0, so this issue is not fixed. See my comments on https://java.net/jira/browse/GLASSFISH-16897 . If I try to use the undeploy/deploy workaround mentioned above, I get this issue: Caused by: java.lang.IllegalArgumentException: Object: Change ID=TEST-6 is not a known entity type. at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4222) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:496) 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) where we are trying to create a "Batch" entity object that has a String attribut called "changeId" and we're passing the value "TEST-6" to the set method. On first deploy, the Batch object is correctly created and the changeId set. It's only on undeploy/deploy that we see this error and the server needs to be restarted.
        Hide
        alexanderst added a comment -

        The problem is present in 3.1.2 (build 23).

        Show
        alexanderst added a comment - The problem is present in 3.1.2 (build 23).
        Hide
        reza_rahman added a comment -

        This is still a problem that is in the latest builds.

        Show
        reza_rahman added a comment - This is still a problem that is in the latest builds.
        Hide
        deepdish added a comment -

        I have the same problem at GF4...

        Show
        deepdish added a comment - I have the same problem at GF4...
        Hide
        win_wave added a comment -

        Still the same problem exists, if redeployment fails due to some CDI problems, requires restart of GF

        Show
        win_wave added a comment - Still the same problem exists, if redeployment fails due to some CDI problems, requires restart of GF

          People

          • Assignee:
            Anissa Lam
            Reporter:
            cultvoid
          • Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: