Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8480

Maven jboss-as-client POM gives Build Error



    • Steps to Reproduce:

      Add the following reference to a POM:

      Then execute "mvn eclipse:clean eclipse:eclipse"

      Add the following reference to a POM: <dependency> <groupId>org.jboss.jbossas</groupId> <artifactId>jboss-as-client</artifactId> <version></version> </dependency> Then execute "mvn eclipse:clean eclipse:eclipse"


      I have a build problem with a Maven Eclipse project to generate the Eclipse classpath when using jboss-as-client- as a dependency in my POM.

      I am building some demo applications as small proof of concepts. I was trying to migrate one of the demo applications from "Spring / JPA 2" to "EJB 3 / JPA 2".
      The "Spring / JPA 2" application could be tested standalone, but the "EJB 3 / JPA 2" application needs to be deployed in a JBoss environment that supports EJB 3 and JPA 2. I downloaded JBoss AS for this.
      To test my application, I wrote a small testcase somewhat similar to the workbook examples of the O'Reilly Enterprise JavaBeans 3.0, 5th Edition book.
      In the testcase I refer to the InitialContext to get a reference to a remote session bean to be able to use that as a service in my test.
      I have jndi.properties on the classpath with the correct properties set in the file to be able to access the JBoss AS and remote session bean like it's being used in the O'Reilly workbook client examples.

      I was getting NoClassDefFoundErrors of org.jnp.naming classes.
      When I added jnp-client to the classpath as a Maven dependency in the POM, I started getting ClassCastExceptions. The class "Reference" couldn't be cast to my own Service interface class.
      When searching on the Internet I found solutions that regarded adding jbossalll-client.jar on the classpath.
      I didn't want to add jbossall-client or the JBoss AS Server Runtime manually in Eclipse. I wanted it to be generated by the Maven POM dependencies. Otherwise I would lose the JBoss AS Server Runtime everytime I re-generated the Eclipse classpath with Maven.

      I found on the Internet that do to this, you should add "jboss-as-client.jar" as a dependency in your POM and it should be the exact same version as the application server. In this case it is jboss-
      Luckily I found the correct version of the jboss-as-client dependency of version on the JBoss Nexus Maven Repository.

      But When I execute the command "mvn eclipse:clean eclipse:eclipse", after downloading a lot of dependencies I get the following error:
      Downloading: http://jpp.realdolmen.com/nexus/content/groups/public//org/jboss/scanning/scanning-build/1.0.0.Alpha6/scanning-build-1.0.0.Alpha6.pom
      [INFO] Unable to find resource 'org.jboss.scanning:scanning-build:pom:1.0.0.Alpha6' in repository central (http://repo1.maven.org/maven2)
      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] Error building POM (may not be this project's POM).

      Project ID: null:scanning-plugins:jar:null

      Reason: Cannot find parent: org.jboss.scanning:scanning-build for project: null:scanning-plugins:jar:null for project null:scanning-plugins:jar:null

      I think something is wrong in one of the POM's that is refered to in the jboss-as-client POM.

      I'm blocked at the moment to continue my migration, because adding the JBoss 6.0 M5 AS Server Runtime manually to the Eclipse classpath leads to an error when trying to run the testcase.
      I get the following error of Eclipse itself:
      CreateProcess error=87, the parameter is incorrect
      This is apparently due to the fact that the classpath has gotten to long to be able to pass it to the javaw.exe process.

      I don't know which separate JAR's need to be added to the classpath other than jnp-client to the classpath, so I would like to be able to work with the jboss-as-client dependency.
      When running the O'Reilly EJB3 Workbook examples, with (in this case) The JBoss 4.2.3.GA Server Runtime added manually to the classpath, the client code works perfectly has access to the InitialContext and can cast the Reference objects to specific application classes.

        Gliffy Diagrams




              • Assignee:
                steveschols Steve Schols
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: