- This topic has 3 replies, 2 voices, and was last updated 14 years, 4 months ago by support-shalini.
-
AuthorPosts
-
dasonMemberI have a group of related projects organized as follows:
EJBproject ProjectOne WebProject
Within ProjectOne, I have a class called Users. I would like to use this class in WebProject.
From within MyEclipse, I can get WebProject to see class Users by adding ProjectOne as a required project.
To include ProjectOne’s Users class in WebProject, I have done the following:
MyEclipse –> Preferences –> Java Enterprise Project –> (for both EJBproject and WebProject)
Selected the option to Jar dependent Java projects, checked Jars exported from dependent Java projects, checked user library jars exported from dependent Java projects.
However, when I deploy EJBproject, either by exporting it as an EAR file or deploying it to an application server, it goes missing and I get a runtime error on missing class Users.
When I unpack the EAR file, it is not showing ProjectOne’s classes in the lib/ folder of either EJBproject or WebProject.The only way I can get this to work is to manually jar up ProjectOne and include it as a library on the build path of WebProject. I would really like this to be something dynamic that the IDE handles.
Any thoughts?
I did look through the forums to see if I could find a solution, while I did see some similar issues, nothing quite matched what I’m seeing.
Thanks,
Dave
support-shaliniMemberDave,
Can you clarify if you have enabled any project specific settings for your projects? Can you Right click on your web project and from the context menu select properties > MyEclipse > web > deployments. What are the options that are selected there?
similarly can you go to Project > properties > MyEclipse > EAR and check the options set?
dasonMemberFor the web project, here’s what is set under MyEclipse > web > deployments:
Web Project Deployment Policy:
Use workbench default settings is checked. The radio button is grayed out and “JAR and place them in the /lib director” is selectred.Library Deployment Policies:
Use workbench default settings is checked
Everything else is checked under that but grayed outFor the EJB project:
How should dependent Java projects be handled during deployment?
Use workbench settings is checked.
The Jar dependent Java projects radio button is selected and grayed out.Library Deployment Policies:
Enterprise project deployments should include:
Use workbench default settings is checked.
The two other options are grayed out and checked.Deployment Descriptor Management Policy:
Automatically update “application.xml” as needed is selected.Do you need anything else?
Thank you for your help,
Dave
support-shaliniMemberDave,
I could not replicate your issue with dependent java projects and the deployment settings that you have mentioned.
Can you list out the steps in detail, right from the project creation, to replicate your issue?
Also, can you send us the screen shots showing the deployment settings for the web, ear and ejb? -
AuthorPosts