String index out of range when compilling a file

2010-11-17 Thread rcabanas

Hello,
I'm using a server WPS which has a Admin Console that allows you to upload
java files and compile them. When doing that I get the following message:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
   
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)

root cause

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.String.substring(String.java:1937)
java.lang.String.substring(String.java:1904)
   
org.n52.wps.webadmin.ConfigUploadBean.compile(ConfigUploadBean.java:233)
   
org.n52.wps.webadmin.ConfigUploadBean.doUpload(ConfigUploadBean.java:208)
org.apache.jsp.webAdmin.index_jsp._jspService(index_jsp.java:86)
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:374)
   
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)

-- 
View this message in context: 
http://old.nabble.com/String-index-out-of-range-when-compilling-a-file-tp30236325p30236325.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: String index out of range when compilling a file

2010-11-17 Thread Mark Thomas
On 17/11/2010 08:56, rcabanas wrote:
 
 Hello,
 I'm using a server WPS which has a Admin Console that allows you to upload
 java files and compile them. When doing that I get the following message:

That's nice. I don't see a question above but I assume that your post
was trying to report what you believed was a problem with Tomcat.

The root cause of the exception is in code from org.n52:
 org.n52.wps.webadmin.ConfigUploadBean.compile(ConfigUploadBean.java:233)

You need to talk to whoever wrote/provided that code.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: String index out of range when compilling a file

2010-11-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

On 11/17/2010 3:56 AM, rcabanas wrote:
 java.lang.StringIndexOutOfBoundsException: String index out of range: -1
 java.lang.String.substring(String.java:1937)
 java.lang.String.substring(String.java:1904)
 org.n52.wps.webadmin.ConfigUploadBean.compile(ConfigUploadBean.java:233)

To add to Mark's comment: this is not a problem with JSP compilation,
it's a problem with your JSP. The compiler is working correctly, your
code is not.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzkBdcACgkQ9CaO5/Lv0PDOuQCgjuxXN93qcxEt4jGcZ/OuI6N9
4s4An0tfxOKeUUT63Kmt1jFUHvZBr3LF
=Y7Aa
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: String index out of range when compilling a file

2010-11-17 Thread Noah, Craig [USA]
Specifically, are you sure that your String is not null?

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, November 17, 2010 10:42 AM
To: Tomcat Users List
Subject: Re: String index out of range when compilling a file

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

On 11/17/2010 3:56 AM, rcabanas wrote:
 java.lang.StringIndexOutOfBoundsException: String index out of range: -1
 java.lang.String.substring(String.java:1937)
 java.lang.String.substring(String.java:1904)
 org.n52.wps.webadmin.ConfigUploadBean.compile(ConfigUploadBean.java:233)

To add to Mark's comment: this is not a problem with JSP compilation,
it's a problem with your JSP. The compiler is working correctly, your
code is not.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzkBdcACgkQ9CaO5/Lv0PDOuQCgjuxXN93qcxEt4jGcZ/OuI6N9
4s4An0tfxOKeUUT63Kmt1jFUHvZBr3LF
=Y7Aa
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



smime.p7s
Description: S/MIME cryptographic signature