You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/01/25 21:28:04 UTC
DO NOT REPLY [Bug 38389] New: - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
Summary: java.util.Arrays.Sort() crashes with AbstractMethodError
when compiled using JDT, but works OK when compiled with
ant
Product: Tomcat 5
Version: 5.5.14
Platform: Other
OS/Version: Windows 2000
Status: NEW
Severity: normal
Priority: P2
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: paul@2hv.nl
I'm actually using Tomcat 5.5.15, but I could't select it in the list. But I've
also got this problem with 5.5.12.
I've got the following awfully simple JSP:
---------------------------------------------
<%@ page import="java.util.Arrays,java.util.Comparator" %>
<%
MyClass[] list = new MyClass[2];
list[0] = new MyClass();
list[1] = new MyClass();
Arrays.sort(list,new Comparator<MyClass>()
{
public int compare(MyClass mo1, MyClass mo2)
{
return -1; // whatever
}
});
%>
<%!
public class MyClass
{
String text = "blah";
public String getText() { return text; }
}
%>
---------------------------------------------
It compiles fine, but when executed it crashes like this:
java.lang.AbstractMethodError: org.apache.jsp.error_jsp$1.compare
(Ljava/lang/Object;Ljava/lang/Object;)I
at java.util.Arrays.mergeSort(Arrays.java:1284)
at java.util.Arrays.sort(Arrays.java:1223)
at org.apache.jsp.error_jsp._jspService(org.apache.jsp.error_jsp:64)
...more...
At first I thought it's a JDK error, but when I replace Tomcat's jasper-
compiler-jdt.jar by an Ant-compiler jar, the code runs fine !!
The above code also runs fine when I replace "MyClass" by "Object" in the
Comparator definition, but this is ofcourse not what Java 5 is about :-)
I've already updated to Suns JDK 1.5.0_06, but that didn't change anything.
Any clues? Tanx!
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38389] - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
olivier_thomann@ca.ibm.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |olivier_thomann@ca.ibm.com
------- Additional Comments From olivier_thomann@ca.ibm.com 2006-01-26 16:38 -------
No problem. We might consider adding some validation in the Compiler constructor
to prevent such cases.
If you would get an exception or an error immediately before the compilation,
this would never happen. We were in a case where the compilation looks good, but
because the bridge method was not generated at runtime an AbstractMethodError is
thrown. This is not good.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=125340 for this enhancement
request against JDT/Core component.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38389] - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
pr@objektpark.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
------- Additional Comments From pr@objektpark.de 2006-01-25 21:36 -------
Have you set the correct jspServlet compiler init parameter for jdt java 5 support?
conf/web.xml
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.5</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.5</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38389] - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
paul@2hv.nl changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WORKSFORME |
------- Additional Comments From paul@2hv.nl 2006-01-25 21:41 -------
Yep, my other JSPs are filled with Java 5 specific stuff and compile/run fine.
But, just to be sure I checked the web.xml anyway: it's indeed correctly set to
sourceVM and targetVM 1.5
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38389] - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
------- Additional Comments From olivier_thomann@ca.ibm.com 2006-01-26 05:31 -------
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=125254 for explanation about
this problem.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38389] - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
pr@objektpark.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEEDINFO
------- Additional Comments From pr@objektpark.de 2006-01-25 22:03 -------
Strange, but it seams like a real JDT 3.1 bug.
Please report this to the JDT eclipse community.
Thanx
Peter
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38389] - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
------- Additional Comments From bamboo@ngs.ru 2006-06-16 11:38 -------
(Just a resolution conclusion comment.)
RESOLUTION:
This problem is fixed in Tomcat 5.5.16.
Tomcat 5.5.16 changelog:
( http://tomcat.apache.org/tomcat-5.5-doc/changelog.html )
"Jasper: 38389: Set correct JDT Compiler option to java 1.5 compliance. Patch
from Olivier Thomann and Paul Hamer (pero)"
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38389] - java.util.Arrays.Sort() crashes with AbstractMethodError when compiled using JDT, but works OK when compiled with ant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
pr@objektpark.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
------- Additional Comments From pr@objektpark.de 2006-01-26 08:00 -------
Great, I have commit the patch from Olivier.
Many thanks for your help to fix it
Peter
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org