This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 24443 - Duplicate class definition exception occured when debugging jsp
Summary: Duplicate class definition exception occured when debugging jsp
Status: VERIFIED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: Debugger (show other bugs)
Version: -FFJ-
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Grebac
URL:
Keywords: JDK_SPECIFIC
: 24029 26554 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-05 15:11 UTC by sva
Modified: 2004-02-04 16:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Output to localhost tab (10.71 KB, text/plain)
2002-09-12 17:38 UTC, sva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sva 2002-06-05 15:11:22 UTC
Steps to reproduce:
1. Create jsp and include another file by "include" 
directive.
2. Do not add any breakpoints and press Debug->Start menu 
item.
3. When browser will display jsp, press several times 
refresh button.

After several refreshes I can see following exception in 
debugger output window: 
==========================================================
Starting service Tomcat-Netbeans
Apache Tomcat/4.0.1
F:\j2sdk1.4.0\jre\..\bin\java  -Xdebug -Xnoagent -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=115
55 -classpath "C:\ffj-rc5\tomcat401
\bin\bootstrap.jar";"F:\j2sdk1.4.0\jre\..\lib\tools.jar" -
Dcatalina.home="C:\ffj-rc5\tomcat401" -
Dcatalina.base="f:\ffjuser\tomcat401_base" 
org.apache.catalina.startup.Bootstrap "start" 
MonitorFilter::ServletException
MonitorFilter::A web application object caused an exception
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed 
mode)
#MonitorFilter::javax.servlet.ServletException: duplicate 
class definition: org/apache/jasper/runtime/HttpJspBase
        at 
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.
service(IDEJspServlet.java:351)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoF
ilter(ApplicationFilterChain.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
        at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFil
ter(MonitorFilter.java:223)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoF
ilter(ApplicationFilterChain.java:213)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at 
org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:201)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at 
org.apache.catalina.valves.CertificatesValve.invoke
(CertificatesValve.java:246)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at 
org.netbeans.modules.web.monitor.catalina.MonitorValve.invo
ke(MonitorValve.java:142)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2344)
        at 
org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:164)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:462)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at 
org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:163)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at 
org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1011)
        at 
org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1106)
        at java.lang.Thread.run(Thread.java:536)
# Error ID: 5052455345525645255843455054494F4E0E435050001B
#
# Problematic Thread: prio=5 tid=0x0AABAE80 nid=0x9f4 
runnable 
#
==========================================================
Comment 1 sva 2002-06-05 15:12:13 UTC
This bug is well reproduced for me under W2K with FFJ4.0ea 
rc5.
Comment 2 Jan Jancura 2002-06-05 15:38:33 UTC
looks like jsp problem
Comment 3 Damian Frach 2002-06-20 15:29:14 UTC
looks like related to MonitorFilter

Can you Ana look at this?

Thanks, Damian.
Comment 4 Ana.von Klopp 2002-06-20 16:11:55 UTC
The MonitorFilter gets invoked for every access to a web 
component (JSP or Servlet). This is unlikely to be related 
to it, because the method completed and then the 
IdeJSPServlet was invoked. 

The filter is basically invoked before and also after each 
servlet/JSP is invoked. In order for this to work 
properly, I have to have a try/catch block around the 
invocation of the web resource. Therefore, the error is 
reported by the Monitor (which rethrows the error as a 
ServletException, IOException or RuntimeException based n 
the nature of the original exception). But the problem is 
that there was a duplicate definition of HttpJspBase as 
accessed from the IdeJSPServlet, so it should be assigned 
to the owner of that component. 

Ana
Comment 5 Damian Frach 2002-06-21 10:46:18 UTC
I have problems with the reproduction:
- jdk 1.4; win 2000; NB 3.4
- 2 JSPs; one is included to other
- 30 times very fast borwser reload

-> no problems; no exceptions
Comment 6 sva 2002-09-12 17:37:48 UTC
Reproduced again with S1S 4 update 1 build 020905 under 
Sparc Solaris 9.
I'll attach log.
Comment 7 sva 2002-09-12 17:38:48 UTC
Created attachment 7405 [details]
Output to localhost tab
Comment 8 Damian Frach 2002-09-13 13:09:58 UTC
 IdeJSPServlet - dupplicate class exception 
Comment 9 Jason Rush 2002-09-18 21:51:03 UTC
Since this defect existed in FFJ4.0 it is automatically qualified for
a waiver for S1S4.1.
Comment 10 Petr Jiricka 2003-01-31 15:10:37 UTC
I am not able to reproduce this issue in the current build.

If you are still able to reproduce it, please attach the 
IDE log, and describe what are the consequences of this 
bug. Will the JSP not execute ? Is the server still usable 
after this occurs ? Does everything continue to work ?

Comment 11 sva 2003-01-31 15:55:52 UTC
I try to reproduce it on SOlaris 9 & W2K with S1S 031113 
with JDK 1.4.1 b-21 and the results is:
If I several times press refresh on browser I have one of 
following results (output to process output tab):

1.
/set/jdk-builds/JDK1.4.1b21/solaris-sparc/jre/bin/java -
Xdebug -Xnoagent -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=115
55 -classpath "/home/sva/nightly/nevada-
030113.ce/tomcat404/bin/bootstrap.jar":"/set/java/jdk1.4.1/
solaris//lib/tools.jar" -
Dcatalina.home="/home/sva/nightly/nevada-
030113.ce/tomcat404" -
Dcatalina.base="/home/sva/ffjuser40ce/tomcat404_base" 
org.apache.catalina.startup.Bootstrap "start" 
Starting service Tomcat-Netbeans
Apache Tomcat/4.0.4
FATAL ERROR in native method: JDWP "util.c" (Aug 29 2002), 
line 1135: Unexpected error, error code = 113 
(JVMDI_ERROR_INTERNAL)

2. F:\j2sdk1.4.1\jre\bin\java -Xdebug -Xnoagent -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=115
55 -classpath "G:\nightly\nevada-030113.ce\tomcat404
\bin\bootstrap.jar";"F:\j2sdk1.4.1\jre\..\lib\tools.jar" -
Dcatalina.home="G:\nightly\nevada-030113.ce\tomcat404" -
Dcatalina.base="g:\ffjuser.ce\tomcat404_base" 
org.apache.catalina.startup.Bootstrap "start" 
Starting service Tomcat-Netbeans
Apache Tomcat/4.0.4
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed 
mode)
#
# Error ID: 5052455345525645255843455054494F4E0E435050001B
#
# Problematic Thread: prio=5 tid=0x0EDCA008 nid=0x30e8 
runnable 
#

And after this exception tomcat crashed.
Under Solaris 9 sometimes I have following exception 
without tomcat crash (I can refresh jsp after this 
excepion several times and then tomcat will crashed with 
one of log above)
/set/jdk-builds/JDK1.4.1b21/solaris-sparc/jre/bin/java -
Xdebug -Xnoagent -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=115
55 -classpath "/home/sva/nightly/nevada-
030113.ce/tomcat404/bin/bootstrap.jar":"/set/java/jdk1.4.1/
solaris//lib/tools.jar" -
Dcatalina.home="/home/sva/nightly/nevada-
030113.ce/tomcat404" -
Dcatalina.base="/home/sva/ffjuser40ce/tomcat404_base" 
org.apache.catalina.startup.Bootstrap "start" 
Starting service Tomcat-Netbeans
Apache Tomcat/4.0.4
MonitorFilter::ServletException
MonitorFilter::A web application object caused an exception
MonitorFilter::org.apache.jasper.JasperException
        at 
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$
JspServletWrapper.load(IDEJspServlet.java:108)
        at 
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$
JspServletWrapper.loadIfNecessary(IDEJspServlet.java:150)
        at 
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$
JspServletWrapper.service(IDEJspServlet.java:160)
        at 
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.
serviceJspFile(IDEJspServlet.java:246)
        at 
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.
service(IDEJspServlet.java:339)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoF
ilter(ApplicationFilterChain.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
        at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFil
ter(MonitorFilter.java:223)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoF
ilter(ApplicationFilterChain.java:213)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at 
org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at 
org.apache.catalina.valves.CertificatesValve.invoke
(CertificatesValve.java:246)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at 
org.netbeans.modules.web.monitor.catalina.MonitorValve.invo
ke(MonitorValve.java:142)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2347)
        at 
org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at 
org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
        at 
org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1027)
        at 
org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1125)
        at java.lang.Thread.run(Thread.java:536)


But IMHO last exception caused by bug 26420 .
I really do not know what to do with this issue. May be we 
should close it as "WFM"?
Comment 12 Petr Jiricka 2003-02-04 16:14:06 UTC
Vladimir,

I heard there are some debugger-related problems in JDK 
1.4.1. I just tried 1.4.1_01-b01 and it works fine for me. 
Could you please try it in a different version of JDK, to 
see whether this is JDK version-specific ?

Thanks
Comment 13 sva 2003-02-06 13:28:08 UTC
I can reproduce this with 1.4.1_01-b01 under W2K, build 
030113.
Result is:

F:\j2sdk1.4.1_01\jre\bin\java -Xdebug -Xnoagent -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=115
55 -classpath "G:\nightly\nevada-030113.ce\tomcat404
\bin\bootstrap.jar";"F:\j2sdk1.4.1_01
\jre\..\lib\tools.jar" -Dcatalina.home="G:\nightly\nevada-
030113.ce\tomcat404" -
Dcatalina.base="g:\ffjuser.ce\tomcat404_base" 
org.apache.catalina.startup.Bootstrap "start" 
Starting service Tomcat-Netbeans
Apache Tomcat/4.0.4
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_01-b01 mixed 
mode)
#
# Error ID: 5052455345525645255843455054494F4E0E435050001B
#
# Problematic Thread: prio=5 tid=0x0F24D268 nid=0x1d64 
runnable 
#


I use JSP file with <%@include %> directive and with <%%> 
inside.
Comment 14 Petr Jiricka 2003-02-06 13:55:00 UTC
Vladimir,

thanks for investigation. This is kind of bad news. Sorry 
for being a pain in the a$$, but could you please also try 
with JDK 1.4.0 and 1.4.2 ? I have a feeling that there 
were regressions from 1.4.0 to 1.4.1.

Thanks.
Comment 15 sva 2003-02-07 17:40:00 UTC
I can reproduce it with jdk 1.4.0 (build 1.4.0-b92).
The result is: debugger crashed with following output:
FATAL ERROR in native method: JDWP "util.c" (Feb  7 2002), 
line 1156: Unexpected error, error code = 113 
(JVMDI_ERROR_INTERNAL)

Good news:
Can't reproduce with jdk 1.4.2 (build 1.4.2-beta-b15).
Debugger do not crashed.
Comment 16 Petr Jiricka 2003-02-12 10:26:54 UTC
JDK bug 4693620 (fixed in JDK 1.4.2) is the root cause of 
this issue.
Comment 17 Petr Jiricka 2003-02-12 10:33:37 UTC
*** Issue 26554 has been marked as a duplicate of this issue. ***
Comment 18 sva 2003-02-20 11:12:54 UTC
*** Issue 24029 has been marked as a duplicate of this issue. ***
Comment 19 Patrick Keegan 2003-04-03 15:28:14 UTC
Petr, do you think this should be in the release notes? If 
so, would the following suffice?:

"When debugging a servlet, if you refresh your browser 
several times in rapid succession, an exception occurs."

Should I be more specific than that?
Comment 20 Petr Jiricka 2003-04-03 15:45:18 UTC
I would say "may occur", rather than "occurs", as this is 
random. I would also say that if that happens, restarting 
the server will help.
Comment 21 Patrick Keegan 2003-04-03 16:49:44 UTC
changed relnote to: 

Description: When debugging a servlet, if you refresh your 
browser several times in rapid succession, an exception 
may occur." 

Workaround: If the exception occurs, restart the web 
server before resuming debugging.
Comment 22 Petr Jiricka 2004-01-15 19:19:35 UTC
Reassigning to Martin - I am not sure if this is still relevant; this
is JDK specific, so still may occur on some platforms. JDK 1.4.1 is
still a supported platform.
Comment 23 zikmund 2004-01-28 12:42:59 UTC
Can't reproduce in NetBeans 3.6 dev build 200401271900
on these systems and JDKs
W2K SP2 1.4.1
W2K SP4 1.4.1_06

Marking as INVALID.

Notice:
Run in debugger and reload approximatelly 30 times on generated JSP
with  <%@include file="filename"%> and <% for (...) %> and two lines
in included file .jsf.
Comment 24 L Martinek 2004-02-04 16:44:51 UTC
verified
Comment 25 Patrick Keegan 2004-02-04 16:50:43 UTC
removing relnote keyword. BTW, should the target milestone be changed?