Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

The method encode(String) in the type URLEncoder is not applicable for arguments (String, String)

瀏覽次數:20 次
跳到第一則未讀訊息

Bruce...@sas.com

未讀,
2007年9月25日 下午4:06:232007/9/25
收件者:
I initially got this error on WAS 6.1.0.0 and upgraded to WAS 6.1.0.11 still receive the error about the JSP not being able to compile. This is an existing product that works as is on WAS 5.1.1.2, and WAS 6.0.2.17 without any errors.

The application was not developed explicitly for WAS it also runs on WebLogic, 8.1.x, 9.2.2, Tomcat 4.1.18, and JBoss 4.0.4 and is developed in Eclipse. All of the other application servers are able to run this code without error I am very curious as to why WAS 6.1 suddenly can't run this JSP.

Information on my server
************ Start Display Current Environment ************
WebSphere Platform 6.1 [BASE 6.1.0.11 cf110734.37] running with process name fsplnxNode01Cell\fsplnxNode01\server1 and process id 31060
Host Operating System is Linux, version 2.6.9-42.ELsmp
Java version = J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20070426 (JIT enabled)
J9VM - 20070420_12448_lHdSMR
JIT - 20070419_1806_r8
GC - 200704_19, Java Compiler = j9jit23, Java VM name = IBM J9 VM
was.install.root = /opt/ibm/WebSphere/AppServer
user.install.root = /opt/ibm/WebSphere/AppServer/profiles/AppSrv01
Java Home = /opt/ibm/WebSphere/AppServer/java/jre
ws.ext.dirs = /opt/ibm/WebSphere/AppServer/java/lib:/opt/ibm/WebSphere/AppServer/profiles/AppSrv01/classes:/opt/ibm/WebSphere/AppServer/classes:/opt/ibm/WebSphere/AppServer/lib:/opt/ibm/WebSphere/AppServer/installedChannels:/opt/ibm/WebSphere/AppServer/lib/ext:/opt/ibm/WebSphere/AppServer/web/help:/opt/ibm/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = /opt/ibm/WebSphere/AppServer/profiles/AppSrv01/properties:/opt/ibm/WebSphere/AppServer/properties:/opt/ibm/WebSphere/AppServer/lib/startup.jar:/opt/ibm/WebSphere/AppServer/lib/bootstrap.jar:/opt/ibm/WebSphere/AppServer/lib/j2ee.jar:/opt/ibm/WebSphere/AppServer/lib/lmproxy.jar:/opt/ibm/WebSphere/AppServer/lib/urlprotocols.jar:/opt/ibm/WebSphere/AppServer/deploytool/itp/batchboot.jar:/opt/ibm/WebSphere/AppServer/deploytool/itp/batch2.jar:/opt/ibm/WebSphere/AppServer/java/lib/tools.jar
Java Library path = /opt/ibm/WebSphere/AppServer/java/jre/bin:/opt/ibm/WebSphere/AppServer/java/jre/bin:/opt/ibm/WebSphere/AppServer/java/jre/bin/classic:/opt/ibm/WebSphere/AppServer/java/jre/bin:/opt/ibm/WebSphere/AppServer/bin:/opt/oracle/product/10.2.0/db_1/lib:/usr/X11R6/lib:/opt/oracle/product/10.2.0/db_1/lib:/opt/oracle/product/10.2.0/db_1/lib:/usr/lib
************* End Display Current Environment *************

This is the error.

JSP Processing Error
HTTP Error Code: 500


Error Message:JSPG0049E: /customer_details.jsp failed to compile :
JSPG0091E: An error occurred at line: 42 in the file: /customer_details.jsp
JSPG0093E: Generated servlet error from file: /customer_details.jsp /opt/ibm/WebSphere/AppServer/profiles/AppSrv01/temp/fsplnxNode01/server1/Bank1_AML/bk1aml.war/_customer_5F_details.java : 302 :
The method encode(String) in the type URLEncoder is not applicable for the arguments (String, String)
JSPG0091E: An error occurred at line: 135 in the file: /customer_details.jsp
JSPG0093E: Generated servlet error from file: /customer_details.jsp /opt/ibm/WebSphere/AppServer/profiles/AppSrv01/temp/fsplnxNode01/server1/Bank1_AML/bk1aml.war/_customer_5F_details.java : 384 :
The method encode(String) in the type URLEncoder is not applicable for the arguments (String, String)
JSPG0091E: An error occurred at line: 180 in the file: /customer_details.jsp
JSPG0093E: Generated servlet error from file: /customer_details.jsp /opt/ibm/WebSphere/AppServer/profiles/AppSrv01/temp/fsplnxNode01/server1/Bank1_AML/bk1aml.war/_customer_5F_details.java : 459 :
The method encode(String) in the type URLEncoder is not applicable for the arguments (String, String)

Root Cause:com.ibm.ws.jsp.JspCoreException: JSPG0049E: /customer_details.jsp failed to compile :
JSPG0091E: An error occurred at line: 42 in the file: /customer_details.jsp
JSPG0093E: Generated servlet error from file: /customer_details.jsp /opt/ibm/WebSphere/AppServer/profiles/AppSrv01/temp/fsplnxNode01/server1/Bank1_AML/bk1aml.war/_customer_5F_details.java : 302 :
The method encode(String) in the type URLEncoder is not applicable for the arguments (String, String)JSPG0091E: An error occurred at line: 135 in the file: /customer_details.jsp
JSPG0093E: Generated servlet error from file: /customer_details.jsp /opt/ibm/WebSphere/AppServer/profiles/AppSrv01/temp/fsplnxNode01/server1/Bank1_AML/bk1aml.war/_customer_5F_details.java : 384 :
The method encode(String) in the type URLEncoder is not applicable for the arguments (String, String)JSPG0091E: An error occurred at line: 180 in the file: /customer_details.jsp
JSPG0093E: Generated servlet error from file: /customer_details.jsp /opt/ibm/WebSphere/AppServer/profiles/AppSrv01/temp/fsplnxNode01/server1/Bank1_AML/bk1aml.war/_customer_5F_details.java : 459 :
The method encode(String) in the type URLEncoder is not applicable for the arguments (String, String)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:389)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:354)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:263)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:137)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

The offending line of code (line 42) in customer_details.jsp is:

<%= URLEncoder.encode(((CustomerContent)pageContext.findAttribute ("custC")).getCustomerNumber(), "UTF-8") %>

Additional information in the error dump suggests that the "encode" method of the URLEncoder class is having a problem with the arguments passed by the jsp:

"The method encode(String) in the type URLEncoder is not applicable for the arguments (String, String)"

It appears from the message that the server is expecting a single String argument, instead of the two Strings that the jsp is passing.
This would imply that the server is using a 1.3 jdk, since the encode method has been supporting the 2 String signature since 1.4.

I also saw somewhere on the IBM WebSphere site, can't find again unfortunately, that the JSP standard supports the encode(string, string) so I am asking any help I can get on this issue.

Brian S Paskin

未讀,
2007年9月26日 凌晨1:32:582007/9/26
收件者:
Hi, unfortunately, you will have to open a PMR with IBM for assistance.

Brian

0 則新訊息