]
Steve Schols commented on JBAS-8480:
------------------------------------
I do not know wether or not anything has been changed to any of the related POM's of
jboss-as-client-6.0.0.20100721-M4 , but now my unit tests (after changing some code to the
EJB 3 spec) works like a charm.
The maven classpath generation doesn't give any error anymore and neither does
compiling and packaging the application with maven.
This issue can be closed on my behalf.
Maven jboss-as-client POM gives Build Error
-------------------------------------------
Key: JBAS-8480
URL:
https://jira.jboss.org/browse/JBAS-8480
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Other
Affects Versions: 6.0.0.M5
Environment: Windows XP Professional SP3, Java SE 6 SDK, Eclipse 3.6 Helios,
Maven 2.1.0
Reporter: Steve Schols
I have a build problem with a Maven Eclipse project to generate the Eclipse classpath
when using jboss-as-client-6.0.0.20100911-M5 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 6.0.0.20100911-M5 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-6.0.0.20100911-M5.
Luckily I found the correct version of the jboss-as-client dependency of version
6.0.0.20100911-M5 on the JBoss Nexus Maven Repository.
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>6.0.0.20100911-M5</version>
</dependency>
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...
[INFO] Unable to find resource
'org.jboss.scanning:scanning-build:pom:1.0.0.Alpha6' in repository central
(
http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[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.
http://eclipsecoding.wikidot.com/faq#launchError
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: