glassfish
  1. glassfish
  2. GLASSFISH-14907

RuntimeException when removing target for ejb timer application

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_b32
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      build: ogs-3.1-b31-11_30_2010.zip

      Description

      I managed to reproduce it, but only with this application:

      1. Create a standalone instance.
      2. Add both default resources to the instance, jdbc/_default and jdbc/_TimerPool.
      3. Start instance.
      4. Deploy ejb timer application to the instance - in my case it deploys with warnings, since there is some issue with re-creation of tables.
      5. Go to the Application page, Targets tab, Manage Targets and server as a target.
      6. Go to the Application page, Targets tab and disable application on instance target.
      7. Go to the Application page, Targets tab, Manage Targets and remove instance target and hit OK. RuntimeException is displayed on the screen.

        Activity

        Hide
        lidiam added a comment -

        SQL exceptions are in instance's server.log, the runtime exception is in DAS server.log.

        Show
        lidiam added a comment - SQL exceptions are in instance's server.log, the runtime exception is in DAS server.log.
        Hide
        lidiam added a comment -

        See if this file extension will work better from a browser.

        Show
        lidiam added a comment - See if this file extension will work better from a browser.
        Hide
        lidiam added a comment -

        change extension of attachment

        Show
        lidiam added a comment - change extension of attachment
        Hide
        Anissa Lam added a comment -

        This is because deployment believe the application is not deployed and returns failure. This error occurs only for this particular application, I don't know if this is due to the application itself or because there is some additional configuration that needs to be done.
        The problem that GUI cannot display the error nicely is because we are going through REST, and even though that is a valid endpoint, its throws runtime exception with 400 as return status before getting back to GUI.

        Hong, I just copy and paste my terminal output so you can reproduce this using CLI. v3admin is just my alias to asadmin. Notice it keeps saying:
        Application automatic-timer-ejb is not deployed on this target [in1]
        .

        ~ 1) v3admin create-instance --node localhost in1
        Using DAS host localhost and port 4848 from existing das.properties for node
        localhost. To use a different DAS, create a new node using create-node-ssh or
        create-node-config. Create the instance with the new node and correct
        host and port:
        asadmin --host das_host --port das_port create-local-instance --node node_name instance_name.
        Command _create-instance-filesystem executed successfully.
        Port Assignments for server instance in1:
        JMX_SYSTEM_CONNECTOR_PORT=28686
        JMS_PROVIDER_PORT=27676
        HTTP_LISTENER_PORT=28080
        ASADMIN_LISTENER_PORT=24848
        JAVA_DEBUGGER_PORT=29009
        IIOP_SSL_LISTENER_PORT=23820
        IIOP_LISTENER_PORT=23700
        OSGI_SHELL_TELNET_PORT=26666
        HTTP_SSL_LISTENER_PORT=28181
        IIOP_SSL_MUTUALAUTH_PORT=23920
        The instance, in1, was created on host localhost
        Command create-instance executed successfully.
        ~ 2)
        ~ 2) v3admin start-instance in1
        Waiting for in1 to start ...............
        Successfully started the instance: in1
        instance Location: /Users/anilam/Awork/V3/v3/dist-gf/glassfish/nodes/localhost/in1
        Log File: /Users/anilam/Awork/V3/v3/dist-gf/glassfish/nodes/localhost/in1/logs/server.log
        Admin Port: 24848
        Command start-local-instance executed successfully.
        The instance, in1, was started on host localhost
        Command start-instance executed successfully.
        ~ 3)
        ~ 3)
        ~ 3) v3admin deploy --target in1 automatic-timer-ejb.jar
        Application deployed with name automatic-timer-ejb.

        Cannot create tables for application automatic-timer-ejb. The expected DDL file automatic-timer-ejb_log_record_createDDL.jdbc is not available.

        Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20101020-r8375): org.eclipse.persistence.exceptions.DatabaseException
        Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused.
        Error Code: 0
        WARNING: Command _deploy did not complete successfully on server instance in1: org.glassfish.api.admin.CommandException: remote failure: Failed to load the application on instance in1. The application will not run properly. Please fix your application and redeploy.
        Failed to load the application on instance in1. The application will not run properly. Please fix your application and redeploy.
        Exception while preparing the app. Please see server.log for more details. : javax.naming.NamingException: Lookup failed for 'jdbc/__default' in SerialContext[targetHost=null,targetPort=null [Root exception is javax.naming.NameNotFoundException: jdbc]. Please see server.log for more details.
        Command deploy completed with warnings.
        ~ 4)
        ~ 4)
        ~ 4)
        ~ 4) v3admin list-components in1
        automatic-timer-ejb <ejb>
        Command list-components executed successfully.
        ~ 5)
        ~ 5)
        ~ 5)
        ~ 5) v3admin disable --target in1 automatic-timer-ejb
        org.glassfish.api.admin.CommandException: remote failure: An error occurred during replication
        FAILURE: Command disable failed on server instance in1: org.glassfish.api.admin.CommandException: remote failure: Application with name [automatic-timer-ejb] is not deployed
        Command disable failed.
        ~ 6)
        ~ 6)
        ~ 6)
        ~ 6)
        ~ 6)
        ~ 6)
        ~ 6) v3admin list-components --long in1
        NAME TYPE STATUS
        automatic-timer-ejb <ejb> disabled
        Command list-components executed successfully.
        ~ 7)
        ~ 7)
        ~ 7) v3admin delete-application-ref --target in1 automatic-timer-ejb
        org.glassfish.api.admin.CommandException: remote failure: An error occurred during replication
        FAILURE: Command delete-application-ref failed on server instance in1: org.glassfish.api.admin.CommandException: remote failure: Application automatic-timer-ejb is not deployed on this target [in1]
        Command delete-application-ref failed.
        ~ 8)
        ~ 8)
        ~ 8) v3admin list-components --long in1
        Nothing to list.
        Command list-components executed successfully.
        ~ 9)

        Show
        Anissa Lam added a comment - This is because deployment believe the application is not deployed and returns failure. This error occurs only for this particular application, I don't know if this is due to the application itself or because there is some additional configuration that needs to be done. The problem that GUI cannot display the error nicely is because we are going through REST, and even though that is a valid endpoint, its throws runtime exception with 400 as return status before getting back to GUI. Hong, I just copy and paste my terminal output so you can reproduce this using CLI. v3admin is just my alias to asadmin. Notice it keeps saying: Application automatic-timer-ejb is not deployed on this target [in1] . ~ 1) v3admin create-instance --node localhost in1 Using DAS host localhost and port 4848 from existing das.properties for node localhost. To use a different DAS, create a new node using create-node-ssh or create-node-config. Create the instance with the new node and correct host and port: asadmin --host das_host --port das_port create-local-instance --node node_name instance_name. Command _create-instance-filesystem executed successfully. Port Assignments for server instance in1: JMX_SYSTEM_CONNECTOR_PORT=28686 JMS_PROVIDER_PORT=27676 HTTP_LISTENER_PORT=28080 ASADMIN_LISTENER_PORT=24848 JAVA_DEBUGGER_PORT=29009 IIOP_SSL_LISTENER_PORT=23820 IIOP_LISTENER_PORT=23700 OSGI_SHELL_TELNET_PORT=26666 HTTP_SSL_LISTENER_PORT=28181 IIOP_SSL_MUTUALAUTH_PORT=23920 The instance, in1, was created on host localhost Command create-instance executed successfully. ~ 2) ~ 2) v3admin start-instance in1 Waiting for in1 to start ............... Successfully started the instance: in1 instance Location: /Users/anilam/Awork/V3/v3/dist-gf/glassfish/nodes/localhost/in1 Log File: /Users/anilam/Awork/V3/v3/dist-gf/glassfish/nodes/localhost/in1/logs/server.log Admin Port: 24848 Command start-local-instance executed successfully. The instance, in1, was started on host localhost Command start-instance executed successfully. ~ 3) ~ 3) ~ 3) v3admin deploy --target in1 automatic-timer-ejb.jar Application deployed with name automatic-timer-ejb. Cannot create tables for application automatic-timer-ejb. The expected DDL file automatic-timer-ejb_log_record_createDDL.jdbc is not available. Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20101020-r8375): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused. Error Code: 0 WARNING: Command _deploy did not complete successfully on server instance in1: org.glassfish.api.admin.CommandException: remote failure: Failed to load the application on instance in1. The application will not run properly. Please fix your application and redeploy. Failed to load the application on instance in1. The application will not run properly. Please fix your application and redeploy. Exception while preparing the app. Please see server.log for more details. : javax.naming.NamingException: Lookup failed for 'jdbc/__default' in SerialContext[targetHost=null,targetPort=null [Root exception is javax.naming.NameNotFoundException: jdbc] . Please see server.log for more details. Command deploy completed with warnings. ~ 4) ~ 4) ~ 4) ~ 4) v3admin list-components in1 automatic-timer-ejb <ejb> Command list-components executed successfully. ~ 5) ~ 5) ~ 5) ~ 5) v3admin disable --target in1 automatic-timer-ejb org.glassfish.api.admin.CommandException: remote failure: An error occurred during replication FAILURE: Command disable failed on server instance in1: org.glassfish.api.admin.CommandException: remote failure: Application with name [automatic-timer-ejb] is not deployed Command disable failed. ~ 6) ~ 6) ~ 6) ~ 6) ~ 6) ~ 6) ~ 6) v3admin list-components --long in1 NAME TYPE STATUS automatic-timer-ejb <ejb> disabled Command list-components executed successfully. ~ 7) ~ 7) ~ 7) v3admin delete-application-ref --target in1 automatic-timer-ejb org.glassfish.api.admin.CommandException: remote failure: An error occurred during replication FAILURE: Command delete-application-ref failed on server instance in1: org.glassfish.api.admin.CommandException: remote failure: Application automatic-timer-ejb is not deployed on this target [in1] Command delete-application-ref failed. ~ 8) ~ 8) ~ 8) v3admin list-components --long in1 Nothing to list. Command list-components executed successfully. ~ 9)
        Hide
        Hong Zhang added a comment -

        The initial deploy command failed on instances so partial deployment happened. I have made the disable and delete-application-ref commands to be more tolerable of the partial deployment case now.

        Show
        Hong Zhang added a comment - The initial deploy command failed on instances so partial deployment happened. I have made the disable and delete-application-ref commands to be more tolerable of the partial deployment case now.
        Hide
        lidiam added a comment -

        Verified in build b43, following steps from initial description.

        Show
        lidiam added a comment - Verified in build b43, following steps from initial description.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            lidiam
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: