glassfish
  1. glassfish
  2. GLASSFISH-20281

SDK 4.0 - Connector samples (mailconnector) fails to deploy

    Details

      Description

      Following the "Building, Deploying, Running the Application" instructions that came with the Connector sample, one is not able to deploy the sample. The exact commands executed were:

      1. [test@wolfrun] $ cd $WORKSPACE/glassfish4/samples/connectors
      2. [test@wolfrun] $ mvn clean install
      3. [test@wolfrun] $ mvn cargo:start -Dglassfish.home=$WORKSPACE/glassfish4

      Step 1 and 2 work without problem. Please note that when executing "mvn install", the sample is built as follows
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Mail Enterprise Application 4.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-enforcer-plugin:1.2:enforce (enforce-maven) @ mailconnector-ear —
      [INFO]
      [INFO] — maven-enforcer-plugin:1.2:enforce (enforce-versions) @ mailconnector-ear —
      [INFO]
      [INFO] — maven-ear-plugin:2.8:generate-application-xml (default-generate-application-xml) @ mailconnector-ear —
      [INFO] Generating application.xml
      [INFO]
      [INFO] — maven-resources-plugin:2.4.3:resources (default-resources) @ mailconnector-ear —
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/src/main/resources
      [INFO]
      [INFO] — maven-ear-plugin:2.8:ear (default-ear) @ mailconnector-ear —
      [INFO] Copying artifact [ejb:org.glassfish-samples:mailconnector-mdb:4.0-SNAPSHOT] to [mailconnector-mdb.jar]
      [INFO] Copying artifact [war:org.glassfish-samples:mailconnector-web:4.0-SNAPSHOT] to [mailconnector-web.war]
      [INFO] Copying artifact [rar:org.glassfish-samples:mailconnector-ra:4.0-SNAPSHOT] to [mailconnector.rar]
      [INFO] Copy ear sources to /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear-4.0-SNAPSHOT
      [INFO] Including custom manifest file [/home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear-4.0-SNAPSHOT/META-INF/MANIFEST.MF]
      [INFO] Building jar: /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear.ear
      [INFO]
      [INFO] — maven-install-plugin:2.3.1:install (default-install) @ mailconnector-ear —
      [INFO] Installing /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear.ear to /home/agpineda/.m2/repository/org/glassfish-samples/mailconnector-ear/4.0-SNAPSHOT/mailconnector-ear-4.0-SNAPSHOT.ear
      [INFO] Installing /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/pom.xml to /home/agpineda/.m2/repository/org/glassfish-samples/mailconnector-ear/4.0-SNAPSHOT/mailconnector-ear-4.0-SNAPSHOT.pom
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] mailconnector application ......................... SUCCESS [0.975s]
      [INFO] MailConnector Resource Adapter .................... SUCCESS [2.695s]
      [INFO] Mail MDB Reciever ................................. SUCCESS [1.261s]
      [INFO] Mail Web Application .............................. SUCCESS [0.784s]
      [INFO] Mail Enterprise Application ....................... SUCCESS [0.336s]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 6.378s
      [INFO] Finished at: Wed Apr 10 20:46:54 PDT 2013
      [INFO] Final Memory: 28M/346M
      [INFO] ------------------------------------------------------------------------

      To deploy the sample, "mvn cargo:start -Dglassfish.home=$WORKSPACE/glassfish4" is executed and the following errors are seen
      [INFO] Scanning for projects...
      [WARNING]
      [WARNING] Some problems were encountered while building the effective model for org.glassfish-samples:mailconnector-ra:rar:4.0-SNAPSHOT
      [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-rar-plugin is missing. @ line 86, column 17
      [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 71, column 17
      [WARNING]
      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
      [WARNING]
      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
      [WARNING]
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Build Order:
      [INFO]
      [INFO] mailconnector application
      [INFO] MailConnector Resource Adapter
      [INFO] Mail MDB Reciever
      [INFO] Mail Web Application
      [INFO] Mail Enterprise Application
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building mailconnector application 4.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — cargo-maven2-plugin:1.3.2:start (default-cli) @ mailconnector-app —
      [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-glassfish:jar:1.3.2 for container glassfish3x
      [INFO] [talledLocalContainer] Using port 4848 for Admin.
      [INFO] [talledLocalContainer] Using port 8080 for HTTP Instance.
      [INFO] [talledLocalContainer] Using port 7676 for JMS.
      [INFO] [talledLocalContainer] Using port 3700 for IIOP.
      [INFO] [talledLocalContainer] Using port 8181 for HTTP_SSL.
      [INFO] [talledLocalContainer] Using port 3820 for IIOP_SSL.
      [INFO] [talledLocalContainer] Using port 3920 for IIOP_MUTUALAUTH.
      [INFO] [talledLocalContainer] Using port 8686 for JMX_ADMIN.
      [INFO] [talledLocalContainer] Using port 6666 for OSGI_SHELL.
      [INFO] [talledLocalContainer] Using port 9009 for JAVA_DEBUGGER.
      [INFO] [talledLocalContainer] Distinguished Name of the self-signed X.509 Server Certificate is:
      [INFO] [talledLocalContainer] [CN=wolfrun.us.oracle.com,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
      [INFO] [talledLocalContainer] Distinguished Name of the self-signed X.509 Server Certificate is:
      [INFO] [talledLocalContainer] [CN=wolfrun.us.oracle.com-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
      [INFO] [talledLocalContainer] Domain cargo-domain created.
      [INFO] [talledLocalContainer] Domain cargo-domain admin port is 4848.
      [INFO] [talledLocalContainer] Domain cargo-domain admin user is "admin".
      [INFO] [talledLocalContainer] Command create-domain executed successfully.
      [INFO] [talledLocalContainer] GlassFish 3.x starting...
      [INFO] [talledLocalContainer] Waiting for cargo-domain to start .......
      [INFO] [talledLocalContainer] Successfully started the domain : cargo-domain
      [INFO] [talledLocalContainer] domain Location: /home/agpineda/workspace/glassfish4/glassfish/domains/cargo-domain
      [INFO] [talledLocalContainer] Log File: /home/agpineda/workspace/glassfish4/glassfish/domains/cargo-domain/logs/server.log
      [INFO] [talledLocalContainer] Admin Port: 4848
      [INFO] [talledLocalContainer] Command start-domain executed successfully.
      [INFO] [talledLocalContainer] Application deployed with name cargocpc.
      [INFO] [talledLocalContainer] Command deploy executed successfully.
      [INFO] [talledLocalContainer] GlassFish 3.x started on port [8080]
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building MailConnector Resource Adapter 4.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — cargo-maven2-plugin:1.3.2:start (default-cli) @ mailconnector-ra —
      [INFO] [talledLocalContainer] Port for cargo-domain (4848) is in use. Try a different port number.
      [INFO] [talledLocalContainer] CLI130: Could not create domain, cargo-domain
      [INFO] [talledLocalContainer] Command create-domain failed.
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] mailconnector application ......................... SUCCESS [32.192s]
      [INFO] MailConnector Resource Adapter .................... FAILURE [1.596s]
      [INFO] Mail MDB Reciever ................................. SKIPPED
      [INFO] Mail Web Application .............................. SKIPPED
      [INFO] Mail Enterprise Application ....................... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 34.321s
      [INFO] Finished at: Wed Apr 10 20:50:33 PDT 2013
      [INFO] Final Memory: 8M/212M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.3.2:start (default-cli) on project mailconnector-ra: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.3.2:start failed: Failed to create a GlassFish 3.x standalone configuration: GlassFish admin command failed: asadmin exited 1 -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
      [ERROR]
      [ERROR] After correcting the problems, you can resume the build with the command
      [ERROR] mvn <goals> -rf :mailconnector-ra

        Activity

        Hide
        dapeng_hu added a comment -

        Code change has been submitted.

        Show
        dapeng_hu added a comment - Code change has been submitted.
        Hide
        Alex Pineda added a comment -

        I was able to run the sample using the mock_javamail jar file that is now included in the SDK samples distribution. All the instructions work as documented, however, there's one small minor issue. The instructions says go to "samples_install_dir/javaee7/connectors", however, the correct directory is just "samples_install_dir/connectors". Would it possible to update the document in the next build. If it's too risky, then not a problem. I'm sure any intermediate or advance user will figure this out.

        Re-opening the issue to see what can be done if anything.

        Show
        Alex Pineda added a comment - I was able to run the sample using the mock_javamail jar file that is now included in the SDK samples distribution. All the instructions work as documented, however, there's one small minor issue. The instructions says go to "samples_install_dir/javaee7/connectors", however, the correct directory is just "samples_install_dir/connectors". Would it possible to update the document in the next build. If it's too risky, then not a problem. I'm sure any intermediate or advance user will figure this out. Re-opening the issue to see what can be done if anything.
        Hide
        Alex Pineda added a comment -

        Request to see if the sample instructions can be updated to resolve an issue on the location of the sample. Not a major issue if the fix is too risky.

        Show
        Alex Pineda added a comment - Request to see if the sample instructions can be updated to resolve an issue on the location of the sample. Not a major issue if the fix is too risky.
        Hide
        dapeng_hu added a comment -

        Good catch, I am fixing it.

        Show
        dapeng_hu added a comment - Good catch, I am fixing it.
        Hide
        dapeng_hu added a comment -

        The directory error in the sample document has been fixed.

        Show
        dapeng_hu added a comment - The directory error in the sample document has been fixed.

          People

          • Assignee:
            dapeng_hu
            Reporter:
            Alex Pineda
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: