- This topic has 9 replies, 3 voices, and was last updated 20 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
brunko007MemberHi ,
I’m trying debug session been business method but I got
messageClass File Editor
Source not found“There is no source file attached to the class file”
???
CAn I setup somewhere classspath to tell dubuger where is the source file?? or can I just debug only jsp???
I’m using
Jboss 3.2.3 ,eclipse 2.1.1,Win 2000Thank you
Bruno
Riyad KallaMemberBruno,
Are you trying to debug your own EJBs or are you debugging EJBs from a commercial package that you don’t have source to?When you get that error “Source not found” you should have a button on that screen to ‘attach source’ to that file… are you not seeing that?
brunko007MemberThank you for answer…
I got button ONLY when it was commercial package…so of course
I dont have source file…when it was my application, button “attached source” didnt show up,
there was only list of methods…Any suggestions?
Bruno
support-michaelKeymasterwhen it was my application, button “attached source” didnt show up, there was only list of methods…
Any suggestions?As I understand it you are hitting a breakpoint and are stepping through your codebase when the “source not found” dialog occurs. What code are you stepping into when the situation occurs? I presume it is a system/appserver jar for which no source exists anywhere in the system. If this is the case then consider stepping over such calls. If you wish to observe the inner working of a system jar then you’ll need to find and attach the source.
Riyad KallaMemberBruno,
As michael has pointed out, if you want to stop into parts of Tomcat (servlet impl or jsp impl) you will need to install the source along with it and attach it. Eclipse will find all the source for YOUR own source code without a problem (hence no option to ‘attach source’, because it already has it).If you are trying to step into a commercial app server like websphere or weblogic, then I don’t think you can as they don’t provide source code to download (That I’m aware of).
brunko007MemberHi guys,
Thanks for replay:-)…. you will need to install the source along with it and attach it
I dont understand clearly “along with it ” …should I put my source in some directory /except of one when I have created it?/what I ‘m trying to say …It is my own StockTraderBean source file.
For EJB I simple created stateless bean in src folder and deployed on the server in exploded structure.
here is my business method in stock trader bean/stateless-doesnt matter/
public String BrunoBusinessMethod() throws EJBException {
//DEBUG POINT
String InspectVar=”some_value”;
System.out.print(“Print z Bruno Bussines method “);
return “return value from Bruno Bussines method” ;}
1.bean is deployed ok
2.run the client in debug mode
3.I got: whole gray window with text: 🙄Source not found for StockTraderBean.BrunoBusinessMethod() line: 146
4. two steps with arrow on the next line
5.gotClass file editor
with button attached source but it is class from sun/of course I dont have source/
class sun.reflect.NativeMethodAccessorImpl extends sun.reflect.MethodAccessorImpl {
private java.lang.reflect.Method method;
private sun.reflect.DelegatingMethodAccessorImpl parent;
……end so on next methods
I can send you print screens if you are interested in…in word.doc
Thank you
Igor
Riyad KallaMemberAhhh Igor:
It sounds like where it is stopping has nothing to do with your class (like you said its the Sun packages). Can you reply to this and hit the “Insert” button and fill out your system information? If you are setting a break point in your EJB I believe it should be honored, but it *sounds* like it is instead stopping execution in some internal JDK class instead of your class.
DO you eventually get to your class if you keep hitting the “Step out of” button (far right on the button bar for debugging) once the debugger stops? It seems eventually it should jump into your class and then open up the file and show you where it stopped.
I don’t do EJB development so its hard for me to say what the problem might be.
brunko007MemberHi guys,thanks for all your replays…
At the mornning I started the computer and it was working 😯 /debugger /night before I was trying put source file almost *everywhere* and step by step I got it. 😆 ../reset,copy,reset,start app server,shut down app server etc…a lot of experiments but on the end is neccesery only setup classpath…
setup directory structure was like :
***********************************************************
project/src folder …for *.java files (beans)–>structure continued with package folders like-
src/com/igor/trader/ *Some*Bean.java
***********************************************************
project/class folder for *.class files(beans)–>structure continued with package folders like-
class/com/igor/trader/ *Some*Bean.class
************************************************************
remote client in different project folder let sayclient_project/src/client_test_traderbean.java
************************************************************all what is neccessery is put project/src to classpath for client so when you run debuger from client thread ,debugger(got SomeBean.class) is looking for source file SomeBean.java which should be in classpath for client thread.
(right click on the client_project ->properties->java buildpath->libraries->add class folder->click on project structure/where is your bean src/
and src file finally ,click ok–>you should get project/src folder to client classpath/it’s visible in package explorer/(anyway you should have there project /class folder already where your SomeBean.class is…) ,remote client is looking for it)
Otherways you will get window with message 🙄
“Source not found” …..what is weird I got it without “attach source” button ….. 👿
anyway it’s working now so I’m happy….. 😆
Thanks for replay….
Igor alias 8) Bruno
brunko007Memberso it’s closed:-)
Riyad KallaMemberThank you for following up with us, I”m glad its working for you now.
-
AuthorPosts