aspose file tools*
The moose likes JSP and the fly likes Problem with simple .jsp file running on my ISP's space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with simple .jsp file running on my ISP Watch "Problem with simple .jsp file running on my ISP New topic
Author

Problem with simple .jsp file running on my ISP's space

Mallesham Karnati
Ranch Hand

Joined: May 11, 2005
Posts: 40
Hi,
I am trying to run a very simple .jsp file on my ISP's site, which is using Resin.
Here is the source code of my test.jsp file:

<html>
<head>
<title>This is a test jsp page</title>
</head>
<body>
<h1> This is my first example of JSP Page</h1>
<h2>The time is now
<%= new java.util.Date()%> </h2>
</body>
</html>

This worked fine until recently. But for the last few days I am getting the following error:

500 Servlet Exception

java.lang.NoClassDefFoundError: org/apache/commons/validator/ValidatorResources
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1647)
at java.lang.Class.getDeclaredMethods(Class.java:1131)
at java.beans.Introspector$1.run(Introspector.java:1126)
at java.security.AccessController.doPrivileged(Native Method)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1124)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:989)
at java.beans.Introspector.getBeanInfo(Introspector.java:370)
at java.beans.Introspector.getBeanInfo(Introspector.java:144)
at com.caucho.jsp.Taglib.fillTag(Taglib.java:497)
at com.caucho.jsp.Taglib.fillTagLibraryInfo(Taglib.java:445)
at com.caucho.jsp.Taglib.<init>(Taglib.java:188)
at com.caucho.jsp.Taglib.parseTld(Taglib.java:346)
at com.caucho.jsp.Taglib.loadJarTlds(Taglib.java:298)
at com.caucho.jsp.Taglib.loadAllTlds(Taglib.java:221)
at com.caucho.jsp.JspManager.getTldMap(JspManager.java:180)
at com.caucho.jsp.JspManager.createPage(JspManager.java:170)
at com.caucho.jsp.PageManager.getPage(PageManager.java:351)
at com.caucho.jsp.PageManager.getPage(PageManager.java:206)
at com.caucho.jsp.QServlet.getPage(QServlet.java:220)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:129)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:534)

Does this mean that there is some settings problem on my service providers site? Or am I missing any thing obvious? When I contacted the help desk, they advised me to compile this .jsp file on my local machine and move the .class file to the web and try. But I never had to do this kind of thing and I don't know why I am getting this error message.
Please click on this link to see the error:
http://www.itekhelpdesk.com/test.jsp

Please help me in diagnosing this problem.
Regards,
Mallesham

[ August 11, 2005: Message edited by: Mallesham Karnati ]
[ August 12, 2005: Message edited by: Bear Bibeault ]
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
The notion that you should compile your own jsp's on your local machine and post them is utterly ridiculous. Otherwise, if that is all that is in the jsp page, I have no idea what is causing this error. However, I am by no means an expert on resin. My suggestion is that you change hosting, I use KGB Internet. It is cheap and Keith will always help you out 24/7.
[ August 11, 2005: Message edited by: Kerry Wilson ]

http://www.goodercode.com
SCJP 1.4
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

However I have never worked in the resin.

But the error is obvious, ValidatorResource class used either by your application or by Resin.
And it gets currupted.
Try to reinstall resin, check or the necessary library in your classpath.

Why don't you download resin at your local machin and test it.

The other obvious error I am seeing that, you are not defining your page as a JSP page and You are also not importing java.util.Date package.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

you are not defining your page as a JSP page and You are also not importing java.util.Date package.


What do you mean "defining your page as a JSP page"? No on-page declaration is necessary.

Also, since he is using the full path to java.util.Date, no import is necessary.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mallesham Karnati
Ranch Hand

Joined: May 11, 2005
Posts: 40
Thank you all for your timely replies. The problem, according to my ISP support team, is due to a .jar file which is present in my WEB-INF folder. I don't know why that .jar file is causing the problem, but now my problem is solved.
Thanks,
Mallesham
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

Bear,
Thanks for correcting me.

Regd declaring JSP page, I mean following line:

<%@ page language="java" contentType="text/html;charset=UTF-8" %>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

While it is a good practice (one that I will admit to omitting) to add such a declaration, failing to do so will not make the JSP fail.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with simple .jsp file running on my ISP's space
 
Similar Threads
Issue with Weblogic 7.0
How to solve DynamicClassLoader exception
java. lang. NoClassDefFoundError
bean binding error
Can't get Struts to work with Resin