Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / June 2004

Tip: Looking for answers? Try searching our database.

Unable to set breakpoint in Eclipse when debugging servlet in Tomcat5

Thread view: 
Roy Varghese - 22 Jun 2004 06:15 GMT
Hello

I am trying to get remote debugging working with Tomcat 5.0.25.
Following the instructions at this site,
http://jakarta.apache.org/site/idedev-rdeclipse.html

I got Eclipse to connect to the Tomcat JVM, it properly displays
all the threads running within the JVM. But when I open my servlet
source and try to set a breakpoint, prior to invoking the servlet,
Eclipse complains with the following message:

"Breakpoint can neither be added nor removed at current text location."

I tried this at several places in the code, but no success.
If I run the same servlet as a java application w/ local debugging,
I CAN set breakpoint at the same line.

Can anyone please help me idenfity what I am missing? I did add
the directory of the java file to the Source path, but no difference.

Thx!!
Roy
Mark Townsend - 22 Jun 2004 16:31 GMT
Eclipse needs to know where your source is located.  If you have the source
located on your local machine, make sure that as part of the Eclipse
project you are using that Eclipse knows about the source.  Also, make sure
that there are debugging symbols.  How are you deploying your servlet?

> I got Eclipse to connect to the Tomcat JVM, it properly displays
> all the threads running within the JVM. But when I open my servlet
> source and try to set a breakpoint, prior to invoking the servlet,
> Eclipse complains with the following message:
>
> "Breakpoint can neither be added nor removed at current text location."
Roy Varghese - 24 Jun 2004 04:21 GMT
Mark Townsend <mtownsen@nospam.com> wrote in message
> Eclipse needs to know where your source is located.  If you have the source
> located on your local machine, make sure that as part of the Eclipse
> project you are using that Eclipse knows about the source.  Also, make sure
> that there are debugging symbols.  How are you deploying your servlet?

I have added the project to the Source tab of the Debug launcher. I am
using Ant to deploy the servlets. My build.xml has the following lines

 <property name="compile.debug"       value="true"/>

and later in the file...

 <target name="compile" depends="prepare"
  description="Compile Java sources">

   <!-- Compile Java classes as necessary -->
   <mkdir    dir="${build.home}/WEB-INF/classes"/>
   <javac srcdir="${src.home}"
         destdir="${build.home}/WEB-INF/classes"
           debug="${compile.debug}"
     deprecation="${compile.deprecation}"
        optimize="${compile.optimize}">
       <classpath refid="compile.classpath"/>
   </javac>

   <!-- Copy application resources -->
   <copy  todir="${build.home}/WEB-INF/classes">
     <fileset dir="${src.home}" excludes="**/*.java"/>
   </copy>

 </target>

How can I make sure that the source is being found? Even though the
Project is added to the Source tab, the java file is located within a
'src' subdirectory.
Thanks for your help!

Roy


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.