Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 81059 invoked from network); 6 Apr 2011 09:48:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2011 09:48:08 -0000 Received: (qmail 63415 invoked by uid 500); 6 Apr 2011 09:48:04 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 63360 invoked by uid 500); 6 Apr 2011 09:48:04 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 63351 invoked by uid 99); 6 Apr 2011 09:48:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 09:48:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 09:47:58 +0000 Received: from [192.168.245.129] (p549E8C62.dip0.t-ipconnect.de [84.158.140.98]) by tor.combios.es (Postfix) with ESMTPA id 4E9462260E0 for ; Wed, 6 Apr 2011 11:47:36 +0200 (CEST) Message-ID: <4D9C36B6.2060704@ice-sa.com> Date: Wed, 06 Apr 2011 11:47:34 +0200 From: =?GB2312?B?QW5kcqimIFdhcm5pZXI=?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: jsp compile error(The primitive type int of does not have a field javax) References: <4D9C17B3.8070404@ice-sa.com> In-Reply-To: Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Hello �ı���, As I failed to mention before, I am not really a java or JSP expert, so I was just guessing. The error messages which you are getting seem to suggest that the generated Java code (before compilation) contains some line breaks or other confusing characters where the compiler is not expecting them, and it is taking one of the "import" statements (like "import javax.servlet.http.HttpServletRequest;") as an attribute of a variable named "". It is all quite bizarre, and made me think that the problem may be linked to a character set issue or a wrong line-ending. Maybe there is an option to the JSP interpreter where you can actually ask to see the generated java code before compilation ? But let's see what the experts have to say.. �ı��� wrote: > Hi Andr�� Warnier, > > thanks for your reply. > it's a runtime error, jsp compiler generate the java file then compile it to > class. > i didn't the copy the java file between different systems.my system is > linux. > > could the jsp compiler cause this error? the default one is the JDT. > > Best Regards > Bryan > > > 2011/4/6 Andr�� Warnier > >> Hi, >> >> Honestly, I don't really know, and this is just a vague suspicion. >> But if the original JSP pages are on a Windows PC, and then you are copying >> them to a Unix/Linux server to run them, can the problem not be due to wrong >> line endings ? >> (Windows uses CR/LF, but Unix/Linux only LF). >> >> >> >> �ı��� wrote: >> >>> Hi, >>> >>> Is there anyone met this kind of error. please see the error stack below. >>> >>> very tricky,it doesn't always happen, we met it seldom after our server >>> run >>> for a period. >>> and the red section is not confused, i don't know what's the meaning >>> exactly. >>> i've looked into the generated java file, the lines error stack mentioned >>> are just writing "\r\n". >>> >>> tomcat version:6.0.26, JVM version:1.6. >>> >>> *org.apache.jasper.JasperException: Unable to compile class for JSP: >>> >>> An error occurred at line: 114 in the generated java file >>> The primitive type int of does not have a field javax >>> >>> An error occurred at line: 133 in the generated java file >>> The primitive type int of does not have a field javax >>> >>> An error occurred at line: 152 in the generated java file >>> The primitive type int of does not have a field javax >>> >>> An error occurred at line: 171 in the generated java file >>> The primitive type int of does not have a field javax >>> >>> Stacktrace: >>> >>> >>> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) >>> >>> >>> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) >>> >>> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439) >>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:349) >>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) >>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:314) >>> >>> >>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589) >>> >>> >>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) >>> >>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) >>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >>> >>> >>> org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:296) >>> >>> >>> org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:161) >>> >>> >>> org.apache.jsp.master_jsp._jspx_meth_c_005fimport_005f0(master_jsp.java:1382) >>> org.apache.jsp.master_jsp._jspService(master_jsp.java:256) >>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >>> >>> >>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) >>> >>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) >>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)* >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org