7 Replies Latest reply on Sep 20, 2011 8:48 PM by samwun9988

    Download source code for tutorial for AS7

    samwun9988

      Hi,

       

      I want to download the source code bundle for the following example for AS7.

      Can anyone tell me where is the url for that?

       

      http://docs.jboss.org/ejb3/docs/tutorial/1.0.7/html_single/index.html#Injecting_EJB_in_Servlets

       

      Thanks

      Sam

        • 1. Re: Download source code for tutorial for AS7
          jaikiran

          The source of those tutorials is on this page http://www.jboss.org/ejb3/docs. But they haven't be tested against AS7 from a build point of view. Those tutorials were written for previous AS versions.

           

          If you want AS7 tutorials, take a look at https://docs.jboss.org/author/display/AS7/Getting+Started+Developing+Applications+Guide

          • 2. Re: Download source code for tutorial for AS7
            samwun9988

            These sample code is hard to compile.

            I followed the instruction, but still getting error.

            Is there any standalone EJB3+WAR application example for JBOSS?

             

            Thanks

            Sam

            • 3. Re: Download source code for tutorial for AS7
              jaikiran

              Sam W wrote:

               

              These sample code is hard to compile.

              I followed the instruction, but still getting error.

              Which sample code?

               

               

              Sam W wrote:

               

              Is there any standalone EJB3+WAR application example for JBOSS?

               

              Have you tried the sample AS7 applications that are mentioned in the Getting Started guide that I pointed you to?

              • 4. Re: Download source code for tutorial for AS7
                samwun9988

                Like this:

                 

                 

                sam@sam-PC /cygdrive/c/work/ejb3-tutorial/source/injection

                $ mvn clean install

                [INFO] Scanning for projects...

                Downloading: http://repo1.maven.org/maven2/org/jboss/ejb3/jboss-ejb3-tutorial-common/1.1.1/jboss-ejb3-tutorial-common-1.1.1.pom

                [ERROR] The build could not read 1 project -> [Help 1]

                [ERROR]  

                [ERROR]   The project org.jboss.ejb3:jboss-ejb3-tutorial-injection:1.1.1-SNAPSHOT (C:\work\ejb3-tutorial\source\injection\pom.xml) has 1 error

                [ERROR]     Non-resolvable parent POM: Could not find artifact org.jboss.ejb3:jboss-ejb3-tutorial-common:pom:1.1.1 in central (http://repo1.maven.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 12, column 11 -> [Help 2]

                [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/ProjectBuildingException

                [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

                 

                 

                sam@sam-PC /cygdrive/c/work/ejb3-tutorial/source/injection

                 

                 

                Thanks

                • 5. Re: Download source code for tutorial for AS7
                  jaikiran

                  Like I said, those tutorials have been developed for previous AS versions and not for AS7. Even if you get past these Maven issues, you'll surely run into various other issues during build time and you won't be able to even compile them.

                   

                  Take a look at the AS7 getting started guide which I already linked in one of my previous reply.

                  • 6. Re: Download source code for tutorial for AS7
                    samwun9988

                    Hi, I have created my own version of EJB3+WAR EAR project, and deployed successfully.

                    But I don't know how to navigate to the page.

                     

                    Here is the output from the deployment process:

                     

                     

                    01:41:43,207 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "Injection-ear.ear"

                    01:41:43,378 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "ejb3app.jar"

                    01:41:43,378 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "ejb3_webapp.war"

                    01:41:43,778 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api dependency to Injection-ear.ear

                    01:41:43,780 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) added javax.persistence.api dependency to ejb3app.jar

                    01:41:43,780 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api dependency to ejb3_webapp.war

                    01:41:43,874 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named calculator in deployment unit subdeployment "ejb3app.jar" of deployment "Injection-ear.ear" are as follows:

                     

                     

                            java:global/Injection-ear/ejb3app/calculator!ix.injection.bean.CalculatorLocal

                            java:app/ejb3app/calculator!ix.injection.bean.CalculatorLocal

                            java:module/calculator!ix.injection.bean.CalculatorLocal

                            java:global/Injection-ear/ejb3app/calculator!ix.injection.bean.CalculatorRemote

                            java:app/ejb3app/calculator!ix.injection.bean.CalculatorRemote

                            java:module/calculator!ix.injection.bean.CalculatorRemote

                     

                     

                    01:41:44,548 INFO  [org.jboss.web] (MSC service thread 1-3) registering web context: /ejb3_webapp

                    01:41:44,642 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "Injection-ear.ear"

                     

                     

                    Please refer to attachment for my example if anyone interested.

                    Thanks

                    Sam

                    • 7. Re: Download source code for tutorial for AS7
                      samwun9988

                      I don't know why the deployment is failed.

                       

                       

                      -10:32:53,121 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "Injection-ear.ear"

                      -10:32:53,208 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "ejb3app.jar"

                      10:32:53,208 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "ejb3_webapp.war"

                      10:32:53,228 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api dependency to Injection-ear.ear

                      10:32:53,229 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api dependency to ejb3app.jar

                      10:32:53,230 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api dependency to ejb3_webapp.war

                      10:32:53,242 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named calculator in deployment unit subdeployment "ejb3app.jar" of deployment "Injection-ear.ear" are as follows:

                       

                       

                              java:global/Injection-ear/ejb3app/calculator!ix.injection.bean.CalculatorLocal

                              java:app/ejb3app/calculator!ix.injection.bean.CalculatorLocal

                              java:module/calculator!ix.injection.bean.CalculatorLocal

                              java:global/Injection-ear/ejb3app/calculator!ix.injection.bean.CalculatorRemote

                              java:app/ejb3app/calculator!ix.injection.bean.CalculatorRemote

                              java:module/calculator!ix.injection.bean.CalculatorRemote

                       

                       

                       

                       

                      10:32:53,486 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "Injection-ear.ear" was rolled back with failure message Operation handler failed to complete

                      10:32:53,506 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment ejb3app.jar in 19ms

                      10:32:53,604 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment ejb3_webapp.war in 117ms

                      10:32:53,606 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment Injection-ear.ear in 120ms

                      10:32:53,607 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "Operation handler failed to complete"}}

                       

                       

                      Any idea?

                      Thanks

                      Sam