empty/not empty EL表式の使用に関する注意
14741 ワード
HTTP Sttus 500-
type Exceptionレポート
メッセージ
description The server encountered an internal error()that prevented it from fulfilling this request.
exception
note The full stack trace of the root cause is available in the Appache Tomcat/6.0.18 logs.
今日はEL表式を使っていますが、emptyはこのようなエラーが発生していませんでした。同じコードで他の人のマシンが使いやすいので、この問題に対して反応が多いことが分かりました。jdkとtomcatのバージョンと関連しているという反応が多く、ネット上でこのスレッドを発見しました。この問題を解決しました。 (xx)とは、emptyと()の間にスペースを入れて、具体的に書き込みの緑色のフォントのレス解釈を見てください。ここで共有します。
リンク先:http://jira.codehaus.org/browse/MRM-905
Quick Search
ログIn
Access more options
Dashboards Access more options(Alt+d) Project Access more options(Alt+p) Issues Access more options(Alt+i) アルチバ MM-905 EL Expression failed with empty/not functions
ログIn
View
Details
Type:
Bug
Sttus:
Closed
Priority:
ブロッカー
Resolution:
Fixed
Affects Version/s:
1.1
Fix Version/s:
1.1.2
Component/s:
Web Interface
Labels:
ノン?ネ
Evironment:
Windows XP SP 3 FR
java(JDK)「1.6.0_07」
apphe tomcat「6.0.18」
activationn-1.1.jar
mail-1.4.jar
deby-10.1.3.1.jar
Number of atachments:
3
Description
After installing as Wiki said、as a tomcat WAR、i get parsing error in some JSP/TAG code.
Some examples:
org.apache.jasper.JasperException:/WEB-INF/jsp/components/companyLogo.jsp(22,0)「{!empty(organisationLogo)」.contint d'incorecte e(s)expressition(s):javax.el. EleException:Function':empty'not found org.apaache. jasper.JasperExcetion pt:/ WEB-INF/curresentWUrl.tag(29,0)“!emipty(acintement&ement)"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""":empty'not found
I've added logs as atachments.
The worlound is very simple: replace EL exepresions containing“empty(”with“empty(”,and“not(”with“not(”as EL expressition requires.
This is a VERY strange error since i've success ufully setup Archiva on my profesionnal server,and i got these error on on to distinct personal systems.
I'll check the professionnal/personal system differences.
Attachments
catalina.2000 8-08-10.log
10/Aug/08 1:06 PM
73 kB
local host.2000 8-08-10.local
10/Aug/08 1:06 PM
10 kB
MM-905.patch
15/Aug/08 5:08 AM
19 kB
Activity All Comments Work Log ヒットマン Activity
Maria Odea Ching added aコメント-
14/Aug/08 1:07 AM -
エディット
I couldn't replicate this on trunk(-r 685734)、with the follwing environment: uuntu linux java version「1.5.0_11」 tomcat 6.0.14 activativationn-1.1.jar,deby-105.1.jar and mail-1.4.jar
Maria Odea Ching added aコメント-
14/Aug/08 4:39 AM
I was now able to replicate this is issue when I deployed Archiva to Tomcat 6.0.18.I don't see the error in 5.5.17 and 6.0.14 though.there must be a conflit with the EL included 6.18.I'trolabthoff。
Fabrice Daugan added aコメント-
14/Aug/08 6:35 AM
はい that's what i just found during the professionnal/personal system differences.Same JDK,but 6.0.14 Tomcat version.
Roman Legat added aコメント-
14/Aug/08 10:08 AM -
エディット
Same here.My configration:Ubuntu Server 8.04 java 1.6.0_06 tomcat 6.0.18 Archiva 1.1.1 deployed as.war
Stocktrace starts with: org.apaache.jasper.JasperException:/WEB-INF/jsp/admin/repositories.jsp(53,0)“$empty(manaagdRepositories)”contains invalid expressisisition(s):javax.el. EEEle. EEEEEEleptiotion:FFtttttjajajajajajajajajajajapapactEmpmpmpmpmpopopopopopopopopopopopopopopopopopon:Edededededededededededededededededededededededededededededededededededeapton:Empler.java:40)
The suggated fix works for me.Fabrice,you made my day!I ran sudo sed-i.BAK-e"s/empty(/empty(/g)*.jsp*sudo sed-i.BAK-e"s/not(/g"*.jsp*over the jsp*folder and it works like a charm.
So the question is、is「empty(”invalid or not.The have been quite some changes in jasper between 6.0.14 and 6.0.18(http://tomcat.apache.org/tomcat-6.0-doc/changelog.html)、but i'm really not into the jsp stuff、so I couldn'tell…
Fabrice Daugan added aコメント-
14/Aug/08 12:59 PM -
エディット
Also,i think there re some comon code with Continum,since the same error(but non blocker)occurs in the header.
As said in the EL specification(simplified version)
http://java.sun.com/products/jsp/syntax/2.0/syntaxref207.html
Maria Odea Ching added aコメント-
14/Aug/08 8:20 PM -
エディット
Ok,thanks a lot for both of your help on this!Would eigther of you like or is interested to submit a patfor the fix?
Fabrice Daugan added aコメント-
15/Aug/08 5:08 AM
The patch did from the revision 686186.The root path of this patch is http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-web/archiva-webapp
Maria Odea Ching added aコメント-
17/Aug/08 8:46 PM
Thanks for the patch Fabrice!I already appied it in trunk-r 686665 and tested it with Tomcat versions 5.17,6.0.14 and 6.0.18.It works niely
type Exceptionレポート
メッセージ
description The server encountered an internal error()that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /main/index.jsp(79,6) "${not empty(LOGINNAME_OA)&¬ empty(LOGINPWD_OA)&¬ empty(ISCHECK_OA)&¬ empty(OAIP)}" contains invalid expression(s): javax.el.ELException: Function ':empty' not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1151)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:821)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Validator.validate(Validator.java:1739)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.philisense.base.MessageFilter.doFilter(MessageFilter.java:26)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
com.philisense.base.AuthenticationFilter.doFilter(AuthenticationFilter.java:105)
com.philisense.base.MessageFilter.doFilter(MessageFilter.java:26)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
note The full stack trace of the root cause is available in the Appache Tomcat/6.0.18 logs.
今日はEL表式を使っていますが、emptyはこのようなエラーが発生していませんでした。同じコードで他の人のマシンが使いやすいので、この問題に対して反応が多いことが分かりました。jdkとtomcatのバージョンと関連しているという反応が多く、ネット上でこのスレッドを発見しました。この問題を解決しました。 (xx)とは、emptyと()の間にスペースを入れて、具体的に書き込みの緑色のフォントのレス解釈を見てください。ここで共有します。
リンク先:http://jira.codehaus.org/browse/MRM-905
Quick Search
ログIn
Access more options
Dashboards Access more options(Alt+d) Project Access more options(Alt+p) Issues Access more options(Alt+i)
ログIn
View
Type:
Bug
Sttus:
Closed
Priority:
ブロッカー
Resolution:
Fixed
Affects Version/s:
1.1
Fix Version/s:
1.1.2
Component/s:
Web Interface
Labels:
ノン?ネ
Evironment:
Windows XP SP 3 FR
java(JDK)「1.6.0_07」
apphe tomcat「6.0.18」
activationn-1.1.jar
mail-1.4.jar
deby-10.1.3.1.jar
Number of atachments:
3
Description
After installing as Wiki said、as a tomcat WAR、i get parsing error in some JSP/TAG code.
Some examples:
org.apache.jasper.JasperException:/WEB-INF/jsp/components/companyLogo.jsp(22,0)「{!empty(organisationLogo)」.contint d'incorecte e(s)expressition(s):javax.el. EleException:Function':empty'not found org.apaache. jasper.JasperExcetion pt:/ WEB-INF/curresentWUrl.tag(29,0)“!emipty(acintement&ement)"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""":empty'not found
I've added logs as atachments.
The worlound is very simple: replace EL exepresions containing“empty(”with“empty(”,and“not(”with“not(”as EL expressition requires.
This is a VERY strange error since i've success ufully setup Archiva on my profesionnal server,and i got these error on on to distinct personal systems.
I'll check the professionnal/personal system differences.
Attachments
catalina.2000 8-08-10.log
10/Aug/08 1:06 PM
73 kB
local host.2000 8-08-10.local
10/Aug/08 1:06 PM
10 kB
MM-905.patch
15/Aug/08 5:08 AM
19 kB
Activity
Maria Odea Ching added aコメント-
14/Aug/08 1:07 AM -
エディット
I couldn't replicate this on trunk(-r 685734)、with the follwing environment:
Maria Odea Ching added aコメント-
14/Aug/08 4:39 AM
I was now able to replicate this is issue when I deployed Archiva to Tomcat 6.0.18.I don't see the error in 5.5.17 and 6.0.14 though.there must be a conflit with the EL included 6.18.I'trolabthoff。
Fabrice Daugan added aコメント-
14/Aug/08 6:35 AM
はい that's what i just found during the professionnal/personal system differences.Same JDK,but 6.0.14 Tomcat version.
Roman Legat added aコメント-
14/Aug/08 10:08 AM -
エディット
Same here.My configration:Ubuntu Server 8.04 java 1.6.0_06 tomcat 6.0.18 Archiva 1.1.1 deployed as.war
Stocktrace starts with: org.apaache.jasper.JasperException:/WEB-INF/jsp/admin/repositories.jsp(53,0)“$empty(manaagdRepositories)”contains invalid expressisisition(s):javax.el. EEEle. EEEEEEleptiotion:FFtttttjajajajajajajajajajajapapactEmpmpmpmpmpopopopopopopopopopopopopopopopopopon:Edededededededededededededededededededededededededededededededededededeapton:Empler.java:40)
The suggated fix works for me.Fabrice,you made my day!I ran sudo sed-i.BAK-e"s/empty(/empty(/g)*.jsp*sudo sed-i.BAK-e"s/not(/g"*.jsp*over the jsp*folder and it works like a charm.
So the question is、is「empty(”invalid or not.The have been quite some changes in jasper between 6.0.14 and 6.0.18(http://tomcat.apache.org/tomcat-6.0-doc/changelog.html)、but i'm really not into the jsp stuff、so I couldn'tell…
Fabrice Daugan added aコメント-
14/Aug/08 12:59 PM -
エディット
Also,i think there re some comon code with Continum,since the same error(but non blocker)occurs in the header.
As said in the EL specification(simplified version)
http://java.sun.com/products/jsp/syntax/2.0/syntaxref207.html
${ Expression }
Expression = {(UnaryOp Expression) | Value }
UnaryOp = {'-' | ! | not | empty }
Value = {ValuePrefix | (Value ValueSuffix) }
ValuePrefix = {Literal | '('Expression')' | ImplicitObject | Java language identifier}
ValueSuffix = { . Identifier | '['Expression']'}
Literal = {StringLiteral | null}
StringLiteral = {'[^(' | \) | \' | \\]+' | "[^(" | \) | \" | \\]+"}
If we read well the Tomcat error is right:since the grammar does not validate:empty(「hello」)but validate:empy(「hello」)Maria Odea Ching added aコメント-
14/Aug/08 8:20 PM -
エディット
Ok,thanks a lot for both of your help on this!Would eigther of you like or is interested to submit a patfor the fix?
Fabrice Daugan added aコメント-
15/Aug/08 5:08 AM
The patch did from the revision 686186.The root path of this patch is http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-web/archiva-webapp
Maria Odea Ching added aコメント-
17/Aug/08 8:46 PM
Thanks for the patch Fabrice!I already appied it in trunk-r 686665 and tested it with Tomcat versions 5.17,6.0.14 and 6.0.18.It works niely