-
1. Re: Referencing an EJB project from a dynamic web project
snjeza Oct 21, 2012 11:48 AM (in response to cstogian)Could you check .classpath in your web project?
It would need to contain a entry like the following:
<classpathentry kind="src" path="/ejbproject"/>
It is possible that the entry doesn't exist or it contains some access rules.
Could you attach your .project and .classpath files?
-
2. Re: Referencing an EJB project from a dynamic web project
cstogian Oct 21, 2012 12:55 PM (in response to snjeza)When I create a dynamic web project that belongs to the same EAR and workset as the JPA and EJB projects, I have access to the classes in my JPA project even if I don't specify a reference to the project.
If I go and specify a reference for the JPA and EJB projects from the Properties page, the .project is updated to reflect this, but the .classpath is not.
I manually edited the .classpath as you suggested, and it now works, I can use the classes of the EJB project. I can also still use the classes in my JPA project, even though there is no reference to it in the .classpath file.
Full info for my JBoss Developer Studio version:
Version: 5.0.0.GA
Build id: v20120615-1714-H213-GA
Build date: 20120615-1714
Thank you.
-
3. Re: Referencing an EJB project from a dynamic web project
cstogian Oct 21, 2012 1:26 PM (in response to snjeza)Looks like I was too hasty. Now the developer studio allows me to use the classes, but when I build I get a red x on my project (but not any of my files) if I include any reference to one of the classes in the EJB project.
And I get the following error:
JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./PassiasWeb: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./PassiasWeb: JBAS018040: Failed to start context 20:21:54,115 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./PassiasWeb" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./PassiasWeb: JBAS018040: Failed to start context"}}}}
-
4. Re: Referencing an EJB project from a dynamic web project
snjeza Oct 22, 2012 8:21 AM (in response to cstogian)What build error do you get?
This error can be seen in the Problems view.
-
5. Re: Referencing an EJB project from a dynamic web project
cstogian Oct 22, 2012 11:35 AM (in response to snjeza)I get "The project cannot be built until its prerequisite {EJB project} is built. Cleaning and building all projects is recomended."
I always do a clean build, but still get the same error.
I also altered the build class path order of the web project so the EJB project appears above the web project, but it still gives me this error.
Thanks.
-
6. Re: Referencing an EJB project from a dynamic web project
snjeza Oct 25, 2012 8:55 PM (in response to cstogian)You are getting those errors although your EJB project is built correctly?
Could you attach your projects or at least their .classpath and .project files?