9 Replies Latest reply on Feb 8, 2008 9:24 PM by svadu

    Snapshot of Embedded Beta 3 available

    pmuir

      A snapshot of Embedded based on JBoss AS 5 trunk (the soon to be released AS 5 beta 3) is available here:

      http://snapshots.jboss.org/maven2/org/jboss/embedded/jboss-embedded/beta3-SNAPSHOT/jboss-embedded-beta3-SNAPSHOT-bin.zip

      The jboss-embedded-all.jar now doesn't contain org.jboss.embedded.*, you need jboss-embedded.jar for that (this structure may well change again).

      You'll need to replace your bootstrap folder with the one from this distribution - there are many many changes.

      I haven't tested this in Tomcat yet, only as a container for running integration tests in Seam.

      Feedback welcome :)

      There will probably be a beta3 release of JBoss Embedded sometime after beta3 of JBoss AS is released.

        • 1. Re: Snapshot of Embedded Beta 3 available
          vmath

          There are three big problems in this version and in beta 2 also:

          - It does not resolve the JBAS#4322 issue. So you cannot provide bootstrap configuration files in a jar.
          - One cannot specify hibernate version. Hibernate 3.2.1 is the less buggy version at that time and I must work with the one in Hibernate-all.jar, that is not acceptable for me.
          - The wrong EJBTransactionRolledbackException implementation (EJBTHREE#950) used by JBoss embedded hides real exception in the persistence layer with a maven environment.

          So, I am stuck with the alpha 8 version. I consider that jboss embedded is the best tool for EJB3 unit testing at that time. Nevertheless, I hope the next release will provide a more flexible and stable product.

          regards
          Vincent MATHON

          • 2. Re: Snapshot of Embedded Beta 3 available
            jfjames

            I have done some tests using a standalone application (which is working with beta-2) and got some troubles with this new version.

            First of all, I had to add activation.jar in the classpath otherwize a java.lang.NoClassDefFoundError: javax/activation/DataSource is thrown during bootstrap.

            Next, Hibernate doesn't find JPA named queries defined in the META-INF/orm.xml. I've got the following error message : Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.MappingException: Named query not known: accountOwner.findAll

            Strangely, Hibernate does not generate any log message whatever the log4j configuration is. This does not help to identify the issue.

            • 3. Re: Snapshot of Embedded Beta 3 available
              pmuir

               

              "vmath" wrote:
              There are three big problems in this version and in beta 2 also:

              - It does not resolve the JBAS#4322 issue. So you cannot provide bootstrap configuration files in a jar.


              This issue is being looked at - can't say fairer than that for a beta release!

              - One cannot specify hibernate version. Hibernate 3.2.1 is the less buggy version at that time and I must work with the one in Hibernate-all.jar, that is not acceptable for me.


              As with JBoss AS you can alter the libraries inside Embedded of course, but the set that are tested working by us are the ones we distribute. This is not going to to change.

              Hibernate is now at the most recent released versions.

              - The wrong EJBTransactionRolledbackException implementation (EJBTHREE#950) used by JBoss embedded hides real exception in the persistence layer with a maven environment.


              I don't see what EJBTHREE-950 has to do with exception handling, but anyway, that issue is resolved for the snapshot.

              • 4. Re: Snapshot of Embedded Beta 3 available

                Pete,

                we are just playing around with the beta3 but unfortunately we don´t really get this running. It seems as if there are some "gotchas" with the configuration while deploying and shutdown. We used the configuration-files from the jboss svn-repository, but they don´t seem to work.

                Do you have any examples configuration-files somewhere, that we can use?
                In beta2 we could use them from the downloaded-version, but as beta3 is not yet released and a lot of things seem to have changed in between, it´s a bit hard to configure the embedded JBoss correctly.

                Thanks for your help

                Thomas

                • 5. Re: Snapshot of Embedded Beta 3 available
                  cory_prowse

                  Has beta3 been pushed out to the Maven repo at JBoss?

                  I'm trying to use beta3 in a very simple and minimal test application and getting:
                  WARN 26-01 12:57:44,317 (UnifiedLoaderRepository3.java:addClassLoader:713) -Tried to add non-URLClassLoader. Ignored
                  WARN 26-01 12:57:46,078 (TxControl.java::302) -[com.arjuna.ats.arjuna.coordinator.TxControl_1] - Name of XA node not defined. Using 7f000101:a735:479a939a:0
                  ERROR 26-01 12:57:47,731 (AbstractController.java:incrementState:755) -Error installing to Start: name=DsDataSourceTemplateInfo state=Create
                  java.lang.IllegalStateException: Unsupported dsType: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup
                  at org.jboss.resource.deployers.management.DsDataSourceTemplateInfo.start(DsDataSourceTemplateInfo.java:123)

                  Would it help if I provide an archive of this Maven project somewhere?
                  The application has been made as small as possible (under 50k Zipped) and I'm happy to help get Embedded JBoss usable in Maven for testing.

                  • 6. Re: Snapshot of Embedded Beta 3 available
                    cory_prowse

                    The error I posted in the previous post was using:
                    Ubuntu Linux 7.10 (Gutsy Gibbon)
                    Java 1.5.0_11
                    Maven 2.0.8
                    with the parent pom being Seam root 2.0.0CR2

                    If I instead run the Maven test application with the parent pom being Seam root 2.0.0GA I instead get:

                    WARN 26-01 13:07:50,008 (UnifiedLoaderRepository3.java:addClassLoader:713) -Tried to add non-URLClassLoader. Ignored
                    WARN 26-01 13:07:51,979 (TxControl.java::302) -[com.arjuna.ats.arjuna.coordinator.TxControl_1] - Name of XA node not defined. Using 7f000101:8481:479a95f7:0
                    ERROR 26-01 13:07:53,626 (AbstractController.java:incrementState:755) -Error installing to Start: name=DsDataSourceTemplateInfo state=Create
                    java.lang.IllegalStateException: Unsupported dsType: org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup
                    at org.jboss.resource.deployers.management.DsDataSourceTemplateInfo.start(DsDataSourceTemplateInfo.java:123)

                    (in all cases I am using the beta3 version from the JBoss Maven Repo)

                    • 7. Re: Snapshot of Embedded Beta 3 available
                      cory_prowse

                      More information seems to have narrowed the problem down to the classloader in Embedded JBoss, specifically with how it loads the persistence.xml from multiple directories.

                      I lodged a bug against the Surefire Maven plugin and from their investigations it has revealed the possible problem.

                      The bug can be seen here:
                      http://jira.codehaus.org/browse/SUREFIRE-427

                      I attached to that bug report a test case:
                      http://jira.codehaus.org/secure/attachment/32153/SUREFIRE-427_Test.zip

                      Please read that bug report for more information, which points towards how JBoss Embedded searched for the persistence.xml file.

                      Running maven requires running "mvn -up clean test" TWICE due to a bug in Maven.

                      To remove Maven from the picture, you can run the following command line (with the relevant directory paths changed - NOTE that you need to run maven at least once so the files are places in the target directory correctly):
                      java -cp ./SUREFIRE-427_Test/target/test-classes:\
                      ./SUREFIRE-427_Test/target/classes:\
                      ${HOME}/.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar:\
                      ${HOME}/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar:\
                      ${HOME}/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar:\
                      ${HOME}/.m2/repository/org/testng/testng/5.5/testng-5.5-jdk15.jar:\
                      ${HOME}/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar:\
                      ${HOME}/.m2/repository/org/jboss/embedded/thirdparty-all/beta2/thirdparty-all-beta2.jar:\
                      ${HOME}/.m2/repository/org/hibernate/hibernate/3.2.4.sp1/hibernate-3.2.4.sp1.jar:\
                      ${HOME}/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar:\
                      ${HOME}/.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar:\
                      ${HOME}/.m2/repository/dom4j/dom4j/1.6.1-jboss/dom4j-1.6.1-jboss.jar:\
                      ${HOME}/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:\
                      ${HOME}/.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar:\
                      ${HOME}/.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar:\
                      ${HOME}/.m2/repository/javax/faces/jsf-api/1.2_04-p02/jsf-api-1.2_04-p02.jar:\
                      ${HOME}/.m2/repository/org/jboss/embedded/hibernate-all/beta2/hibernate-all-beta2.jar:\
                      ${HOME}/.m2/repository/org/jboss/seam/jboss-seam/2.0.0.GA/jboss-seam-2.0.0.GA.jar:\
                      ${HOME}/.m2/repository/jboss/javassist/3.3.ga/javassist-3.3.ga.jar:\
                      ${HOME}/.m2/repository/javax/el/el-api/1.0/el-api-1.0.jar:\
                      ${HOME}/.m2/repository/org/jboss/seam/jboss-el/2.0.0.GA/jboss-el-2.0.0.GA.jar:\
                      ${HOME}/.m2/repository/org/hibernate/hibernate-entitymanager/3.3.1.ga/hibernate-entitymanager-3.3.1.ga.jar:\
                      ${HOME}/.m2/repository/org/hibernate/hibernate-annotations/3.3.0.ga/hibernate-annotations-3.3.0.ga.jar:\
                      ${HOME}/.m2/repository/org/hibernate/hibernate-commons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar:\
                      ${HOME}/.m2/repository/org/hibernate/hibernate-validator/3.0.0.GA/hibernate-validator-3.0.0.GA.jar:\
                      ${HOME}/.m2/repository/jboss/jboss-common-core/2.0.4.GA/jboss-common-core-2.0.4.GA.jar:\
                      ${HOME}/.m2/repository/org/jboss/embedded/jboss-embedded-all/beta2/jboss-embedded-all-beta2.jar:\
                      ${HOME}/.m2/repository/org/jboss/embedded/jboss-embedded-api/beta2/jboss-embedded-api-beta2.jar:\
                      ${HOME}/.m2/repository/org/jboss/embedded/jboss-deployers/beta2/jboss-deployers-beta2.jar \
                      org.testng.TestNG -testclass au.com.prowse.cory.seammavenexample.security.userrole.UserRoleRepositoryLocalTest

                      Is there any more information I can provide?

                      • 8. Re: Snapshot of Embedded Beta 3 available
                        cory_prowse

                        Ok problem solved and it is due to Maven, Embedded JBoss is working fine.

                        Details are here:
                        http://jira.codehaus.org/browse/SUREFIRE-443

                        I have a workable solution in the form of a change in the Maven POM which fixes the classpath issue and is detailed in the above JIRA issue for Maven Surefire.

                        • 9. Re: Snapshot of Embedded Beta 3 available

                          Btw, http://jira.codehaus.org/browse/SUREFIRE-427 says it's JBoss Embeddded design specifics (but it will be a problem as more and more projects employ maven).