Author Topic: Unable to complie class for JSP error when requesting call detail  (Read 7676 times)

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
Since upgrading to version 12, we are experiencing an "Unable to compile class for JSP" error when requesting call detail (from the Ans. DT page, click on the magnifying glass).

We are using 12.5.1 and jdk1.6.0_30. I have stopped tomcat and removed the tomcat work directory.

Please find the begining of the error below, I can provide the full message if required.

Quote
"[JSP] org.apache.jasper.JasperException - -- Inner Exception -- Exception: org.apache.jasper.JasperException Error: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /qm/./qm_recordtag_list_ajx_ds.jsp Generated servlet error: /srv/www/tomcat5/base/work/Catalina/localhost/QueueMetrics/org/apache/jsp/qm/popup_005fcall_jsp.java:340: cannot find symbol symbol : method format(java.lang.String,int) location: class java.lang.String String color = String.format('%06x', lt.getI(r, colorCol)); ^ 1 error Generated servlet error: May 28, 2012 12:27:48 PM org.apache.jasper.compiler.Compiler generateClass SEVERE: Javac exception Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:497) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 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:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at ... "

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Are you sure you are running under Sun JDK 6? please have a look at the License page of QM.

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
I am sure

Quote
Java Runtime:    Version: 1.6.0_30
Vendor: Sun Microsystems Inc.
Class Version: 50.0
Java Home: /home/jdk1.6.0_30/jre

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
It's weird because the integer value should be auto-boxed to Integer as of Java 6....
Did you install Java manually?

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
Yes, we install java from jdk-6u30-linux-x64.bin

Not sure if this helps, but here is more of the message from localhost_log2012-06-05.txt

Quote
An error occurred at line: 7 in the jsp file: /qm/./qm_recordtag_list_ajx_ds.jsp
Generated servlet error:
/srv/www/tomcat5/base/work/Catalina/localhost/QueueMetrics/org/apache/jsp/qm/popup_005fcall_jsp.java:340: cannot find symbol
symbol  : method format(java.lang.String,int)
location: class java.lang.String
            String color = String.format("%06x", lt.getI(r, colorCol));
                                 ^
1 error

If I edit line 340 in qm_recordtag_list_ajx_ds.jsp abd change it to
Code: [Select]
String.color = "blue";everything works OK.

Here is the classpath
Quote
classpath=/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/classes/:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/JID3.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/QueueMetrics-12.5.1.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/loway-tpf-193p.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/mysql-connector-java-3.1.14-bin.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/redstone-xmlrpc-1.1.1.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/slf4j-api-1.6.3.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/slf4j-jdk14-1.6.3.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/xerces.jar:/srv/www/tomcat5/base/work/Catalina/localhost/QueueMetrics:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/classes/:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/JID3.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/QueueMetrics-12.5.1.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/loway-tpf-193p.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/mysql-connector-java-3.1.14-bin.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/redstone-xmlrpc-1.1.1.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/slf4j-api-1.6.3.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/slf4j-jdk14-1.6.3.jar:/srv/www/tomcat5/base/webapps/QueueMetrics/WEB-INF/lib/xerces.jar:/usr/share/tomcat5/common/classes/:/usr/share/java/xerces-j2-2.7.1.jar:/usr/share/java/xerces-j2-2.7.1.jar:/usr/share/java/jta-1.0.1.jar:/usr/share/java/jakarta-commons-collections-3.1.jar:/usr/share/java/javamail/smtp-1.3.3_01.jar:/usr/share/java/javamail/pop3-1.3.3_01.jar:/usr/share/java/jakarta-commons-collections-3.1.jar:/usr/share/java/jspapi-5.0.18.jar:/usr/share/java/servletapi5-5.0.18.jar:/usr/share/java/jakarta-commons-pool-1.2.jar:/home/jdk1.6.0_30/jre/lib/rt.jar:/usr/share/java/javamail/pop3-1.3.3_01.jar:/usr/share/java/javamail/mailapi-1.3.3_01.jar:/usr/share/java/mx4j/mx4j-jmx-1.1.1.jar:/usr/share/tomcat5/common/lib/jasper-compiler.jar:/usr/share/java/servletapi5-5.0.18.jar:/home/jdk1.6.0_30/jre/lib/rt.jar:/usr/share/java/jakarta-commons-el-1.0.jar:/usr/share/java/ant-1.6.5.jar:/usr/share/java/jta-1.0.1.jar:/usr/share/tomcat5/common/lib/naming-factory.jar:/usr/share/java/javamail/mailapi-1.3.3_01.jar:/usr/share/java/javamail/smtp-1.3.3_01.jar:/usr/share/java/jakarta-commons-dbcp-1.2.1.jar:/usr/share/java/javamail/pop3-1.3.3_01.jar:/usr/share/java/javamail/imap-1.3.3_01.jar:/usr/share/java/jakarta-commons-logging-api-1.0.4.jar:/home/jdk1.6.0_30/jre/lib/rt.jar:/usr/share/tomcat5/common/lib/jasper-runtime.jar:/usr/share/java/javamail/imap-1.3.3_01.jar:/usr/share/java/log4j-1.2.12.jar:/usr/share/java/mx4j/mx4j-jmx-1.1.1.jar:/usr/share/java/javamail/smtp-1.3.3_01.jar:/usr/share/java/jspapi-5.0.18.jar:/usr/share/java/log4j-1.2.12.jar:/usr/share/java/jaf-1.0.2.jar:/usr/share/tomcat5/common/lib/naming-resources.jar:/usr/share/java/jspapi-5.0.18.jar:/usr/share/java/ant-1.6.5.jar:/usr/share/java/javamail/mailapi-1.3.3_01.jar:/usr/share/java/jakarta-commons-logging-api-1.0.4.jar:/usr/share/java/javamail/imap-1.3.3_01.jar:/usr/share/java/javamail/imap-1.3.3_01.jar:/usr/share/java/jakarta-commons-el-1.0.jar:/usr/share/tomcat5/common/lib/naming-java.jar:/usr/share/tomcat5/common/lib/naming-common.jar:/usr/share/java/servletapi5-5.0.18.jar:/usr/share/java/jakarta-commons-pool-1.2.jar:/usr/share/java/javamail/smtp-1.3.3_01.jar:/usr/share/java/jaf-1.0.2.jar:/usr/share/java/javamail/mailapi-1.3.3_01.jar:/usr/share/java/jakarta-commons-dbcp-1.2.1.jar:/home/jdk1.6.0_30/jre/lib/rt.jar:/usr/share/java/javamail/pop3-1.3.3_01.jar:/home/jdk1.6.0_30/lib/tools.jar:/usr/share/tomcat5/bin/bootstrap.jar:/usr/share/tomcat5/bin/commons-logging-api.jar:/usr/share/java/mx4j/mx4j-tools-1.1.1.jar:/usr/share/java/mx4j/mx4j-jmx-1.1.1.jar:/usr/share/java/mx4j/mx4j-actions-1.1.1.jar:/usr/share/java/mx4j/mx4j-jmx-1.1.1.jar:/home/jdk1.6.0_30/jre/lib/ext/dnsns.jar:/home/jdk1.6.0_30/jre/lib/ext/sunpkcs11.jar:/home/jdk1.6.0_30/jre/lib/ext/sunjce_provider.jar:/home/jdk1.6.0_30/jre/lib/ext/localedata.jar

Tony

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Just because we are at it, try changing:

Code: [Select]
String color = String.format("%06x", lt.getI(r, colorCol));
to

Code: [Select]
String color = String.format("%06x", new Integer( lt.getI(r, colorCol) ) );
We do not seem to be able to reproduce the issue here....  >:(

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
Unfortunatly still fails
Code: [Select]
An error occurred at line: 7 in the jsp file: /qm/./qm_recordtag_list_ajx_ds.jsp
Generated servlet error:
/srv/www/tomcat5/base/work/Catalina/localhost/QueueMetrics/org/apache/jsp/qm/popup_005fcall_jsp.java:340: cannot find symbol
symbol  : method format(java.lang.String,java.lang.Integer)
location: class java.lang.String
            String color = String.format("%06x", new Integer(lt.getI(r, colorCol)));
                                 ^
1 error
Quote
Generated servlet error:
Jun 11, 2012 9:50:27 AM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Javac exception
Compile failed; see the compiler error output for details.
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        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:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:662)

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Try this while we are at it:

Code: [Select]
String color = String.format("%06x", new Object[]{ new Integer(lt.getI(r, colorCol)) }  );

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
That fixed it!

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Thanks - this looks like there is an issue with your Java compiler, as Java 5 should have inferred the change. Just to be on the safe side we are applying this change to the main QM app, but it's really weird.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Unable to complie class for JSP error when requesting call detail
« Reply #10 on: September 10, 2012, 10:20:48 »
That fixed it!

FYI. this is fixed in QM 12.09