wood burning stoves*
The moose likes Testing and the fly likes JUnit doesn't stop on breakpoints in my Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JUnit doesn Watch "JUnit doesn New topic

JUnit doesn't stop on breakpoints in my Servlet

Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
Hi everyone,

I'm running a JUnit test on a servlet and according to logs the execution does reach my servlet but it doesn't stop at the breakpoints that I set there. It does stop at breakpoints in my test class.
Does anyone know why?

Thanks in advance.

Here's my Test class:

And here's what tomcat's log file says:

[2011-10-14 09:55:13,567] [080-Processor24] DEBUG [eu.liquix.smsservice.tmobile.DeliveryServlet ] : > process()
[2011-10-14 09:55:13,567] [080-Processor24] DEBUG [eu.liquix.smsservice.tmobile.DeliveryServlet ] : It contains [1] message(s)
[2011-10-14 09:55:13,567] [080-Processor24] ERROR [eu.liquix.smsservice.tmobile.DeliveryServlet ] : Failed to process SMS message.
java.lang.NumberFormatException: For input string: "TO"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at eu.liquix.smsservice.tmobile.DeliveryServlet.convertToASCII(DeliveryServlet.java:145)
at eu.liquix.smsservice.tmobile.DeliveryServlet.process(DeliveryServlet.java:112)
at eu.liquix.smsservice.tmobile.DeliveryServlet.doPost(DeliveryServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:637)

J2EE Architect/Developer
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
I'm debugging from MyEclipse and I started up tomcat from the command line with "mvn cargo:start", so maybe that's the problem.
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
Yep, alright, I started a remote app debug configuration and it worked.

Sorry about that, thanks anyway.
I agree. Here's the link: http://aspose.com/file-tools
subject: JUnit doesn't stop on breakpoints in my Servlet
Similar Threads
How to provide basic authetication from SOAP request to access SAP XI service
Use of HttpClient in Applet
File upload cancelation
LinkedHashMap - trying to use the method removeEldestEntry
Trying to POST an XML to php based Web Service via HTTP POST method