- This topic has 2 replies, 3 voices, and was last updated 20 years, 1 month ago by Scott Anderson.
-
AuthorPosts
-
stlum9495campusMemberHi,
I’m having problems with debugging my project; mainly I keep getting the “Source not found” page in Eclipse.
I’m using Struts 1.1, so when I press my first submit, I get “source file not attached to class file MyAction.class”.
What I have done:
1. I’ve created an Enterprise Project Module, with both EJB and WEB project modules.
2. WEB_PROJECT_MODULE/WebRoot/WEB-INF/classes is in the class path of the EJB Module, and the classes directory of the EJB module is in the classpath of the Weblogic module because of a small number of dependencies(EJBFactory, Constants interface, Value objects)
3. I do all compiling through eclipse
4. I create and deploy the .ear file through my own ant build file.
5. The application runs fine when starting either via MyEclipse or through weblogic’s .bat file.
6. For the sake of trying everything, I did try to deploy via the MyEclipse deployment process as a packaged archive. However, this does not work — the EJB will not deploy as the ejb jar has not undergone “java weblogic.ejbc EJBjar” command to generate weblogic stubs.I have another project which I debug via Myeclipse and have no problems; however the difference with this project is that it is a plain ‘java project’ in eclipse rather than broken up into modules.
Other info
1. I’m using jdk131_09-b03 that comes with Weblogic 6.1 sp6. This jdk works fine with the plain eclipse java project + ejbs + j2ee + weblogic etc.
2. I’m using Eclipse 3.0.1
3. Myeclipse Genuitec Core version is 3.8.2
4. Windows 2000Thanks,
Stephen
Riyad KallaMemberStephen,
I’m looking intot his.
Scott AndersonParticipantStephen,
First, I want to poin out that:
WEB_PROJECT_MODULE/WebRoot/WEB-INF/classes is in the class path of the EJB Module
Is not really supported by the J2EE spec’d deployment model. In the spec, web projects have access to all the classes in an EJB project, due to a classloader hierarchy the container creates, but the EJB projects *cannot* see or load any classes from the web projects. Setting up your projects this way for development will cause you nothing but pain as a result. If your EJB project needs shared classes from the web project, like data classes carrying information between the two, they really need to be moved into the EJB project or into a shared library. The former is easier than the latter. The fact that it works in WebLogic 6 is likely due to a bug in WebLogic 6. I don’t believe it will work in later versions of the server. This little sidetrack is just FYI, in case you run into problems later, and isn’t the cause of your current problem.
6. For the sake of trying everything, I did try to deploy via the MyEclipse deployment process as a packaged archive. However, this does not work — the EJB will not deploy as the ejb jar has not undergone “java weblogic.ejbc EJBjar” command to generate weblogic stubs.
Correct. I don’t recall if WLS 6 can be configured to generate stubs automatically at deployment time. I thought it could, but that might have been added in WLS 7. If it can’t be, you can generate the stubs externally as source and import them into your java project if you’d like to use the MyEclipse deployer for your projects. You’ll just have to remember to regenerate the stubs, as you probably do now, when the interfaces change.
The debugging problems might be caused by using such an old JDK. Debug support is greatly improved in 1.4.1+, so if you can try running the server with a later JDK you’ll likely find that the debugging irregularities go away.
-
AuthorPosts