Jsp give me this error javax.servlet.ServletException: oracle.jdbc.driver.O
Hi master
Sir I use orace 9i easily in java class with following code
===========
import java.sql.*;
public class ttst {
public ttst() {
public static void main (String args [])
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@fahim:1521:aamir","muhammad","mfa786");
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select accid from accbal where accid='K1101'");
System.out.println ("going for connection");
while (rset.next())
s= rset.getString("accid");
System.out.println (s);
catch(Exception e){
e.printStackTrace();
system give me right result
and when I use jsp with this code
<HTML>
<%@ page import="java.sql.*,java.util.*" %>
<% String url="jdbc:oracle:thin:@fahim:1521:aamir";
Connection con;
Statement stmt;
ResultSet rs;
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
con = DriverManager.getConnection(url,"muhammad","mfa786");
stmt=con.createStatement();
%>
<%
%>
<select name="ltpid">
<%
try{
rs= stmt.executeQuery("select accid,title from chartofacc");
while (rs.next()){
%>
<option Value=<%=rs.getString(1)%>> <%=rs.getString(2) %> </option>
<%
catch(Exception e){}
%>
</select>
<br>
TEST DONE!
</HTML>
sir I have class12.zip and class11.zip I same folder
but system give me this error
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.bistest$jsp._jspService(bistest$jsp.java:128)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:198)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.apache.jsp.bistest$jsp._jspService(bistest$jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
but jsp page not run
please give me idea how I how my oracle data in jsp page
thank
aamir
sir i post my problem but they reply me it java problem not oracle problem
*** oracle reply**********
You metioned that you use
jdbc:oracle:thin:@<ip or hostname of machine where your db is installed>: 1521:aamir , description to connect the remote database. So, I think it's not related to your tnsname.ora problem. It's only java oracle thin connection string. Please check this string, make sure the ip and database service name is right.
one more thing, use sqlplus check your tnsname.ora, if ok, then try to check jdbc and make sure the jdbc driver match to oracle server.
sir please give me idea how i show my oracle data in clinet browser
thank's
aamir
Similar Messages
-
Hi.
I've got this piece of code into a servlet:
<%@page language="java" import="java.sql.*"%>
<%
Driver DriverRecordset1 = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection Conn = DriverManager.getConnection("jdbc:oracle:thin:@myserver:1521:SID","system","manager");
When starting Tomcat, I included into startup.bat:
set CLASSPATH=%CLASSPATH%;d:\orant\jdbc\classes102.zip (it exists)
But when executing the code, I get this error message:
javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
What am I doing wrong?
Thank you very much.The whole message:
javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
at mypage_1._jspService(mypage_1.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
================
If I write only:
Class.forName("oracle.jdbc.driver.OracleDriver");
I get the same error. -
The source code I am having is
1> Login.jsp
2>LoginForm.java
3>LoginAction.java
4>web.xml
5>struts-config.xml
1>Login.jsp
<%@ page language="java"%>
<%@ page import="java.io.*"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:html>
<center><IMG SRC="E:\jboss-4.0.3SP1\server\default\deploy\TestApplication.war\image\welcome.jpg" HEIGHT=233 WIDTH=282 ALT="WELCOME TO DATAMATICS"></center>
<center><h1 style="color:blue"><hr>WELCOME TO DATAMATICS</hr></h1></center>
<h2 style="color:green">LOGIN FORM</h2>
<html:errors/>
<center>
<body>
<html:form action="/login.do" >
<table width="20%" border="0">
<td>
<tr><h4 style="color:red">USER ID:<h4></tr>
<tr><html:text property="username" size="30"/></tr>
<hr>
</td>
<td>
<tr><h4 style="color:red">PASSWORD:</h4></tr>
<tr><html:password property="password" size="30" /></tr>
<hr>
<tr><html:submit>SUBMIT </html:submit></tr><hr>
<tr><html:reset/></tr>
<tr></tr>
</td>
</table>
</body>
</html:form>
</center>
</html:html>------------------------------------------------------
2>LoginForm.java
package com.MyPack.Datamatics;
import com.MyPack.Datamatics.LoginAction;
import javax.servlet.http.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action.*;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError.*;
//import java.util.*;
//import java.io.*;
public class LoginForm extends ActionForm
private String username=null;
private String password=null;
public void setUserName(String username)
this.username=username;
public String getUserName()
return username;
public void setPassword(String password)
this.password=password;
public String getPassword()
return password;
public void reset(ActionMapping am,HttpServletRequest req)
this.username="";
this.password="";
public ActionErrors validate(ActionMapping am, HttpServletRequest req)
ActionErrors ae = new ActionErrors();
if ( (username==null) || (username.length()==0))
// ae.add("username" , new ActionMessage("errors.username.required") );
if( (password==null) || (password.length()==0))
// ae.add("password" , new ActionMessage("errors.password.required") );
return ae;
3>LoginAction.java
package com.MyPack.Datamatics;
import com.MyPack.Datamatics.LoginForm;
import javax.servlet.http.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import javax.servlet.ServletException;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
public class LoginAction extends Action
public ActionForward execute(ActionMapping am,
ActionForm af,
HttpServletRequest req,
HttpServletResponse res)throws IOException, ServletException
String target= new String("success");
if(af!=null)
LoginForm loginForm = (LoginForm)af;
String userName = loginForm.getUserName();
String password = loginForm.getPassword();
if (userName.equalsIgnoreCase("Datamatics") && password.equalsIgnoreCase("12345"))
req.setAttribute("UserName",userName);
else
target = new String("failure");
return am.findForward(target);
4>web.xml
<web-app>
<servlet>
<servlet-name>ActionServlet</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config </param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>application </param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mappings>
<servlet-name>ActionServlet</servlet-name>
<url-mapping>*.do</url-mapping>
</servlet-mappings>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app>-----------------------
5>Struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<struts-config>
<form-beans>
<form-bean name="loginForm" type="com.MyPack.Datamatics.LoginForm" />
<form-bean name="uploadForm" type="com.MyPack.Datamatics.UploadForm" />
</form-beans>
<global-forwards>
<forward name="success" path="/index.jsp"/>
</global-forwards>
<action-mappings>
<action path="/login"
type="com.MyPack.Datamatics.LoginAction"
name="loginForm"
scope="request"
input="/login.jsp">
<forward name="success" path="/upload.jsp" />
<forward name="fail" path="/index.jsp" />
</action>
<action path="/upload"
type="com.MyPack.Datamatics.UploadAction"
name="uploadForm"
scope="request"
input="/upload.jsp">
<forward name="success" path="/successUpload.jsp" />
<forward name="fail" path="/index.jsp" />
</action>
</action-mappings>
<controller
processorClass="org.apache.struts.action.RequestProcessor"/>
</struts-config>Kindly help where i am going wrong ..... I have mapped every property, even though I am getting this error
:::::::>> javax.servlet.ServletException: No getterError come from your LogonForm.
Field: username So getter must be getUsername() and not getUserName() ("N" is lower case). -
Hello All,
I am writing this simple program which connects to Oracle DB ( 10.2 ). The Java version I have is 1.5.0_13 . I do have oracle client installed. When I run the below code ...I get error
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at OraThin.main(OraThin.java:13)The code I have is :
import java.io.*;
import java.sql.*;
public class OraThin {
public static void main(String[] args) {
try {
System.out.println(System.getProperty ("java.class.path") );
Connection con=null;
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection(
"jdbc:oracle:thin:@hostname:15282:ServiceName",
"scott",
"tiger");
Statement s=con.createStatement();
s.execute("SELECT SYSDATE FROM DUAL");
s.close();
con.close();
} catch(Exception e){e.printStackTrace();}
} Please suggest as to what am I missing, I am not that well versed with Java.
Thanks in advance,
SamHello Paul,
Thanks for you suggestion. Based on it , I did add the exact jar file in the PATH environmental variable in XP.
Path=C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar;C:\oraclexe\a
pp\oracle\product\10.2.0\server\bin;C:\oracle\product\10.2.0\client_1\bin;C:\Ora
cle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\
client;C:\j2sdk1.4.2_06\bin;Even after adding the specific jar file *("C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar")* ..I am getting the exact same error. moreover, to verify this I also tried to import import oracle.jdbc.driver.*.....and now my code would not even complie and I get error *(c:\Program Files\Java\jdk1.5.0_13\bin\OraThin.java:3: package oracle.jdbc.driver*
does not exist ) . I also rebooted my machine just to make sure ...that didnt work either. Also, I changed these jar to be first in the PATH varibale ..to avoid conflict with any later .jar's classes. The code is :
import java.io.*;
import java.sql.*;
import oracle.jdbc.driver.*;
public class OraThin {
public static void main(String[] args) {
try {
System.out.println(System.getProperty ("java.class.path") );
Connection con=null;
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection(
"jdbc:oracle:thin:@hostname:15282:ServiceName",
"scott",
"tiger");
Statement s=con.createStatement();
s.execute("SELECT SYSDATE FROM DUAL");
s.close();
con.close();
} catch(Exception e){e.printStackTrace();}
}What am I missing here!! ?
Thanks again,
Sam -
Hi,
I am writing an application and am trying to open a connection to Oracle database that is on a server. I am using the following test code to check if it connects to the database.
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
String DBurl = "jdbc:oracle:thin:@local:1522:DBORA";
String user = "test";
String pwd = "test123";
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection(DBurl, user, pwd);
}On running the above program I keep on getting the following error:
Error : java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
java.lang.NullPointerException
If I open the connection using JDeveloper wizard I can see the DB. But if running the above program in the JDev, JCreator or commandline keep on getting the error. Any help is appreciated. ThanksHow do I set the path for the Oracle Driver. ThanksI dunno. You're supposed to know where that class is (what jar it lives in). You set it up in JDeveloper in the first place, so you must have known where it is. After you know that, it's up to you to figure out how JCreator projects are set up to include jars in a project (just like JDeveloper projects do). For the command-line way, you set the classpath on the command-line arguments:
java -cp (your classpath here, which must include the jars it needs) ... -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:711)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:419)
org.apache.jsp.index_jsp._jspx_meth_html_form_0(org.apache.jsp.index_jsp:139)
org.apache.jsp.index_jsp._jspx_meth_html_html_0(org.apache.jsp.index_jsp:114)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
This is my web.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//SUN Microsystem, //"
"http://java.sun.com/j2ee/dtds/web-app_2.2/dtd">
<web-app>
<!--Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!-- Resource Bundle base class -->
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<!-- Context Relative Path to the XML resource containing Struts Configuration -->
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<!-- The Debugging detail level for this servlet, which controls how much information -->
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Application Tag Library Descriptor -->
<taglib>
<taglib-uri>/WEB-INF/app.tld</taglib-uri>
<taglib-location>/WEB-INF/app.tld</taglib-location>
</taglib>
<!-- Struts Tag Lib Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app>
==================================================================================================================
This is my Struts-config.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC "-//SUN Microsystem, //"
"http://java.sun.com/j2ee/dtds/struts-config_1_0/dtd">
<struts-config>
<form-beans>
<!-- Logon Form Bean -->
<form-bean name="loginForm" type="LoginForm" />
</form-beans>
<global-forwards>
<forward name="mainmenu" path="/mainmenu.jsp" />
</global-forwards>
<action-mappings>
<!-- Process a user logon -->
<action path="/login" type="LoginAction"
name="loginForm" scope="session" input="/index.jsp">
</action>
</action-mappings>
</struts-config>
==================================================================================================================
This is my LoginForm.java file
package src;
import org.apache.struts.action.ActionForm;
public class LoginForm extends ActionForm {
private String login;
private String password;
public String getLogin() {
return login;
public void setLogin(String login) {
this.login = login;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
==================================================================================================================
This is my LoginAction.java file
package src;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.action.Action;
public class LoginAction extends Action {
public ActionForward execute( ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
return (mapping.findForward("mainmenu"));
==================================================================================================================
This is my index.jsp file
<%@ page language ="java" %>
<%@ taglib uri ="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri ="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri ="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<title> My First Struts Application! </title>
</head>
<body>
<html:form action="/login">
LOGIN : <html:text property="login" />
PASSWORD : <html:password property="password" />
<html:submit> Login </html:submit>
<html:reset> Reset </html:reset>
</html:form>
</body>
</html:html>
==================================================================================================================
and finally This is my mainmenu.jsp file
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<title>Main Menu</title>
</head>
<body>
This is the MainMenu !
</body>
</html:html>
==================================================================================================================
Kindly solve my problem........
try to run on your machine...........
I am using Tomcat 5.5.9 and my Project name is MyAppliHey guys,
Even I was frustrated for a long time with all the Struts errors for which Google returned loads of results but no particular solutions. All these solutions were all based on hit and trial and only work on some cases. Let me tell you that Struts (and most other frameworks) have a general approach to consume the actual error message and throw an exception which is light years away from the actual cause. So whats' the solution?
Enable logging.... LOG4J to be precise...
...and see that it (log4j) is configured properly. You will see the actual cause there and not on the consoles of your servers (whichever you use).
In my case, it was a host not found exception in the logs because I was sitting behind a firewall and the validator could not locate struts.apache.org
(Wish this thread had some duke dollars)
Regards,
The Correspondent
http://www.araneidae.org -
hi,
I try a simple connect to a DB 9.2.0.1
through JDBC
$javac -d /home/oracle/jdbc Applet1.java
OK
but ...
oracle@pluto:/home/oracle/jdbc$ appletviewer -J-Djava.security.policy=mypolic>
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
at mypackage.Applet1.connectToDB(Applet1.java:55)
at mypackage.Applet1.access$000(Applet1.java:17)
at mypackage.Applet1$1.actionPerformed(Applet1.java:41)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1
64)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstr
ctButton.java:1817)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonMode
.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:25
private void connectToDB(ActionEvent e) {
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver())
con = DriverManager.getConnection ("jdbc:oracle:thin:@pluto:1521:DB
9IDEV","system","manger");
empValues.setText("Connected to the Database. Fetching Values from
TOTO Tables.\n");
fetchValues();
} catch (SQLException ex) {
System.out.println("Connection Error = " + ex.toString());
I tried with:
CLASSPATH=/tools/oracle/9.2.0/jdbc/lib/classes12.jar
and ( loaded from otn for JDK 1.4 and 9.2.0.1)
CLASSPATH=/tools/oracle/9.2.0/jdbc/lib/ojdbc14.jar
What I have to put in the CLASSPATH, please ???Please don't cross post.
http://forum.java.sun.com/thread.jsp?thread=541572&forum=57&message=2625798
http://forum.java.sun.com/thread.jsp?thread=541573&forum=48&message=2625800
http://forum.java.sun.com/thread.jsp?thread=541574&forum=31&message=2625802 -
Hi everybody --
Isn't this usually an SQLException? This exception is freaking me out because I didn't used to get it. The part of the code that uses the type column has always executed just fine. I'm starting to wonder of I'm running out of memory or something weird like that.
I would have liked to post code, but I'm running the JSP from Sun ONE Studio 4, and when this particular exception occurs, I can't just click on it to take me to the offending code. I truly don't know where this exception is coming from.
Does anyone know the solution to the exception, or how to get Sun ONE to take me to the bad code? Thank you all so much!!
-Kwj.My guess is that it's in here somewhere.
From the Db class:
public String sSelectRecord =
"select corr.cid," +
"corr.rid," +
"t.type," +
"corr.dte_response_due," +
"sr1.nam_last||', '||sr1.nam_first as sender," +
"sr2.nam_last||', '||sr2.nam_first as receiver," +
"corr.subject," +
"corr.dte_sent," +
"corr.dte_recd," +
"c.cat," +
"s.subcat," +
"corr.filepath," +
"corr.hardcopy " +
"from t_corr corr, t_type t, t_sender_receiver sr1, " +
"t_sender_receiver sr2, t_cat c, t_subcat s " +
"where corr.type=t.sak_type " +
"and corr.sender=sr1.sak_sender_receiver " +
"and corr.receiver=sr2.sak_sender_receiver " +
"and corr.cat=c.sak_cat " +
"and corr.subcat=s.sak_subcat";
public ResultSet [] getAll() throws SQLException
ResultSet [] all = new ResultSet [4];
all [0] = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE).
executeQuery("select type from t_type where display=true order by type asc");
all [1] = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE).
executeQuery("select nam_last||', '||nam_first as names from t_sender_receiver where display=true order by names");
all [2] = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE).
executeQuery("select cat from t_cat where display=true order by cat asc");
all [3] = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE).
executeQuery("select subcat from t_subcat where display=true order by subcat asc");
return all;
}//getAll()
public ResultSet searchAll() throws SQLException{
return con.prepareStatement(sSelectRecord + " order by cid").executeQuery();
}//searchAllFrom the JSP:
<html><body>
<%
ResultSet [] all = d.getAll();
//print main form table
%>
<lots of html here>
<%
/******************************Search Results********************************/
if (d.getParam(request, "search").equals("Search") || recordParamVals[0].length() > 1){
//grab criteria values
for(int i=0; i < formParams.length; i++){
formParamVals[i] = d.getParam(request, formParams);
//search based on criteria
//no criteria selected -- select all from db
rsSearch = d.searchAll(); -
Oracle.jdbc.driver error using jdk1.2.2 on Win 2k
Im trying to run a jsp page that is dependent on an oricle database. However whenever I try to connect to the database over a thin line client I always get a java.lang.ClassNotFoundException error. I've gone over the path and classpath serveral time, and can't get it to work.
classpath =
C:\jdk1.2.2\lib\tools.jar;C:\Program Files\Tomcat4.0\common\lib\servlet.jar;C:\ORANT\jdbc\lib\classes102.zip;
C:\ORANT\jdbc\lib\classes111.zip;C:\jdk1.2.2\bin\java.exe;
C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2\lib\dt.jar;
path =
C:\WINNT\system32;C:\WINNT\system32;C:\jdk1.2.2\bin\java.exe;C:\ORANT\jdbc\lib;
If anyone knows how to fix this problem Id appreciate it.it doesn't say, it just gives me this error message.
javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:105)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java, Compiled Code)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java, Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java, Compiled Code)
at java.lang.Thread.run(Thread.java:472)
root cause
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java, Compiled Code)
at java.lang.Exception.(Exception.java, Compiled Code)
at java.lang.ClassNotFoundException.(ClassNotFoundException.java, Compiled Code)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java, Compiled Code)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java, Compiled Code)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java, Compiled Code)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java, Compiled Code)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java, Compiled Code)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java, Compiled Code)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:87)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java, Compiled Code)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java, Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java, Compiled Code)
at java.lang.Thread.run(Thread.java:472) -
Hi All,
I am getting this error at this step of tutorial. Please help.
To apply the workflow to the Product of the Day page:
1.Open the Product of the Day page in edit mode. If the page is still open from a previous procedure, reload it.
2. In Sidekick, click the Workflow tab and select the Product of the Day workflow. Click Start Workflow.
3. Open the Inbox page. (http://localhost:4502/libs/cq/workflow/content/inbox.html)
4. Select the Step 1 item for the Product of the Day content, and click Open.The form1 page opens.
At this step i am getting the below error.
javax.servlet.ServletException: javax.servlet.jsp.JspException: Error while executing script body.jsp
Please helpNot sure which workflow tutorial you are reffering. The stack trace in log should tell you what is exactly wrong.
-
Javax.servlet.ServletException & java.lang.NoClassDefFoundError
I am getting this javax.servlet.ServletException & java.lang.NoClassDefFoundError
exceptions while running jsp in .netbeans.
Iwas able to compile and run jsp pgms , but i am getting this error when i use jsp:useBean.I think the java class created is not in the proper path..netbeans is using tomcat server.The ide put the jsp's in the proper path. but it is not putting the java class i created with setter and getter methods.I also set the classpath. but din't work
I t is eating up my time!Pl. suggest me a solution!
Directory structure is :source file
c:/windows/.netbeans/3.5/samples/jsp
I guess the ide is putting all the class files(jsp) in
C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
so i copied the userData.class from source dir to the above directory.
and i also did the
set CLASSPATH= C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
in dos prompt
pl. find the code below.
Html:
<HTML>
<HEAD>
<TITLE>getData</TITLE>
</HEAD>
<BODY>
<form method = post action="saveData.jsp">
What's your Name : <input type=text name =username size=10>
<br>
What's Age : <input type=text name=age size=10>
<br>
What's ur email id : <input type=text name=email size=10>
<input type=submit>
</FORM>
</BODY>
</HTML>
SaveData.jsp
<jsp:useBean id="user" class="JSP.userData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<html>
<head><title>using bean</title></head>
<body>
--Continue
Thank u
</body>
</html>
userData.java
* userData.java
* Created on February 12, 2004, 1:06 PM
package JSP;
* @author amano
public class userData {
String userName;
int age;
String email;
/** Creates a new instance of userData */
public userData()
public void setUsername(String str)
userName=str;
public void setAge(int str)
age=str;
public void setEmail(String str)
email=str;
public String getUsername()
return userName;
public int getAge()
return age;
public String getEmail()
return email;when i click on the submit button i get the following error msg.
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
javax.servlet.ServletException: JSP/user_data
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:349)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NoClassDefFoundError: JSP/user_data
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.load(IDEJspServlet.java:106)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.loadIfNecessary(IDEJspServlet.java:150)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:160)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534) -
Javax.servlet.ServletException: Cannot create bean of class
People,
HELP!! I am getting desperate!!!
I am a newbie when it comes to TOMCAT, but i have been using Blazix before.
My current system is using APACHE/TOMCAT on a Solaris machine and I keep hitting the same problem. I have gone through the archives but the only thing it states is to check the directory which i have done.
I keep getting:
Error 500
Internal Error
javax.servlet.ServletException: Cannot create bean of class MyClass
The code used to work on the Blazix server so i am assuming it is something to do with a config parameter somewhere - but i do not know where. I have checked the directory/package structure and they seem to work. It even serves it when they are html pages not jsp, but obviously wont use the bean. :(
I can post code if necessary.
Please help
SteveThe FormData.class file is in examples/WEB-INF/classes/ directory.
Is this wrong? then should it be in a package called examples.steve???
<TITLE> Poc </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="Mozilla/4.61 [en] (WinNT; I) [Netscape]">
<META NAME="Author" CONTENT="Steve Brodie">
<META NAME="Proof of Concept order entry system" CONTENT="">
<META NAME="PROOF OF CONCEPT ORDER ENTRY SYSTEM " CONTENT="">
</HEAD>
<%@ page import="steve.FormData" %>
<jsp:useBean id="user" class="steve.FormData"/>
<jsp:setProperty name="user" property="*"/>
<FORM METHOD=POST ACTION="SaveDetails.jsp">
<CENTER>
<H1>
POC CNS demo <BR>
POC Order Entry System <BR></H1>
<H2><CENTER>PROOF OF CONCEPT ORDER ENTRY SYSTEM <BR>
in order to illustrate the use of an new product<BR></H1>
</CENTER>
<BODY>
Please enter the following details: <BR>
Second name <INPUT TYPE=TEXT NAME=secondName SIZE=20><BR>
First name <INPUT TYPE=TEXT NAME=firstName SIZE=20><BR>
Address <INPUT TYPE=TEXT NAME=address1 SIZE=20><BR>
Address <INPUT TYPE=TEXT NAME=address2 SIZE=20><BR>
Post Code <INPUT TYPE=TEXT NAME=postCode SIZE=10><BR>
Phone NO. <INPUT TYPE=TEXT NAME=phone SIZE=10><BR>
<BR>
Credit Card<INPUT TYPE=TEXT NAME=credit SIZE=15><BR>
<BR>
Quality of Service:
<SELECT TYPE=TEXT NAME="QoS">
<OPTION SELECTED TYPE=TEXT NAME=Gold>Gold <BR>
<OPTION TYPE=TEXT NAME=Silver>Silver <BR>
<OPTION TYPE=TEXT NAME=Bronze>Bronze <BR>
</SELECT>
<BR>
<BR>
<INPUT TYPE=RESET>
<P><INPUT TYPE=SUBMIT>
<BR>
<BR>
<IMG SRC=../images/Cisco.gif>
</FORM>
</BODY>
</HTML>
package steve;
* @author Steven Brodie
* @date
* @version 0.0
import java.io.*;
import java.lang.*;
import java.util.*;
public class FormData {
String secondName = null;
String firstName = null;
String address1 = null;
String address2 = null;
String postCode = null;
int credit = 0;
int phone = 0;
String qos = null;
String file = "out";
String filex = "xout";
PrintWriter pout = null;
PrintWriter xout = null;
FormData() {
try {
pout = new PrintWriter(new BufferedWriter(new FileWriter(file + ".txt")));
xout = new PrintWriter(new BufferedWriter(new FileWriter(filex + ".xml")));
xout.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
xout.println("<OrderEntry xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
xout.println("xsi:noNamespaceSchemaLocation=\"http://machine2.com:8080/xml/xsd/OrderEntry.xsd\">");
} catch (IOException ioe) {
System.err.println("DataFileWriter error ioe on init");
ioe.printStackTrace();
System.exit(1);
public void setFirstName( String value ) {
firstName = value;
System.out.println(firstName);
pout.println(firstName);
xout.println("<firstname value= \"" + firstName + "\"/>");
public void setSecondName( String value ) {
secondName = value;
System.out.println(secondName);
pout.println(secondName);
xout.println("<secondname value= \"" + secondName + "\"/>");
public void setAddress1( String value ) {
address1 = value;
System.out.println(address1);
pout.println(address1);
xout.println("<address1 value= \"" + address1 + "\"/>");
public void setAddress2( String value ) {
address2 = value;
System.out.println(address2);
pout.println(address2);
xout.println("<address2 value= \"" + address2 + "\"/>");
public void setPostCode( String value ) {
postCode = value;
System.out.println(postCode);
pout.println(postCode);
xout.println("<postCode value= \"" + postCode + "\"/>");
public void setCredit( int value ) {
credit = value;
System.out.println(credit);
pout.println(credit);
xout.println("<creditCard value= \"" + credit + "\"/>");
public void setPhone( int value) {
phone = value;
System.out.println("0" + phone);
pout.println("0" + phone);
xout.println("<phoneNo value= \"0" + phone + "\"/>");
public void setQoS( String value ) {
qos = value;
System.out.println(qos);
pout.println(qos);
xout.println("<QoS value= \"" + qos + "\"/>");
xout.println("</OrderEntry>");
pout.flush();
pout.close();
xout.flush();
xout.close();
public String getFirstName() {
return firstName;
public String getSecondName() {
return secondName;
public String getAddress1() {
return address1;
public String getAddress2() {
return address2;
public String getPostCode() {
return postCode;
public int getCredit() {
return credit;
public int getPhone() {
return phone;
public String getQoS() {
return qos; -
Javax.servlet.ServletException: exception raised while creating Advisor
I am adding some personalization to a jsp in portal 7.0 which worked fine in 4.0.
I am importing the pz.tld and using the pz:div tag '<pz:div rule="admin">'. We
have 'admin' set up as a segment in the EBCC just like in 4.0. When the jsp compiles,
I get a 'javax.servlet.servletexception: exception raised while creating advisor'
exception.
I'm just really unfamiliar with the Advisor and am not sure where to start. Any
help would be much appreciated.It appears this error might occur on JNDI lookup failure. If you do a
diff between the web.xml and weblogic.xml files between 4.0 and 7.0 in
your webapp's web-inf directory what differences do you find? Are the
ejb-ref and ejb-reference entries for the Advisor and other EJB's present?
Is the ejbadvisor.jar deployed in your application? Is it present in
the application directory? Is there a ejb component entry in config.xml?
Is there a module entry in application.xml?
If you find that this is not the right direction to look for the problem
please post the full stack trace and a pz:div code snippet.
-- Jim
chris wrote:
I am adding some personalization to a jsp in portal 7.0 which worked fine in 4.0.
I am importing the pz.tld and using the pz:div tag '<pz:div rule="admin">'. We
have 'admin' set up as a segment in the EBCC just like in 4.0. When the jsp compiles,
I get a 'javax.servlet.servletexception: exception raised while creating advisor'
exception.
I'm just really unfamiliar with the Advisor and am not sure where to start. Any
help would be much appreciated. -
Initially, when I clicked on my JSPs, everything was fine. I was able to retrieve data successfully from all the JSPs. However, after much clicking through the JSPs. I was not able to access the JSPs and the Internal Servlet Error was shown.
Below is my Tomcat.log:
Context log: path="/Aedge" Error in jsp service() : Connection reset by peer: socket write error
javax.servlet.ServletException: Connection reset by peer: socket write error
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:375)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163)
at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)
Context log: path="/Aedge" <b>Internal Servlet Error:</b><br>.....
What is the problem here? How can I solve this as I had to restart my Tomcat once a while due to this problem.ok.. I have db classes where all my sql statements methods are being displayed.. In each db class, there will be a getInstance() method to create the connection. Below is one of my db class.. How to I modified the things you had mentioned in my codes..
package aedgeSoft.access;
import aedgeSoft.business.*;
import java.sql.*;
import java.util.*;
import java.util.Date;
import java.io.*;
public class DBMemberType
private Connection con;
private static DBMemberType instance = null;
public static DBMemberType getInstance()
try
if(instance==null)
instance = new DBMemberType();
catch(SQLException e)
System.out.println("Problems with loading database in DBMemberType");
catch(ClassNotFoundException e)
System.out.println("Problems with loading db driver in DBMemberType");
finally
return instance;
private DBMemberType() throws SQLException, ClassNotFoundException
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;user=username;password=password;DatabaseName=db");
catch(InstantiationException e)
e.printStackTrace();
catch(IllegalAccessException e)
e.printStackTrace();
//add memberType
public boolean addMemberType(MemberType mt)
.......... -
Javax.servlet.ServletException: Illegal to flush within a custom tag
Hi ,
I am developing a sample application for JSF , Tiles and Spring when i uses JSF with tiles i am getting the error
javax.servlet.ServletException: Illegal to flush within a custom tag
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.pages.main_jsp._jspService(main_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
Here is the My master tiles layout file
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<HTML>
<HEAD>
<TITLE><tiles:getAsString name="title"/></TITLE>
</HEAD>
<BODY>
<TABLE border="0" width="100%" cellspacing="5">
<TR>
<TD colspan="2"><tiles:insert attribute="header" flush="false" /></TD>
</TR>
<TR>
<TD width="140" valign="top">
<tiles:insert attribute='menu' flush="false"/>
</TD>
<TD valign="top" align="left">
<tiles:insert attribute='body' flush="false"/>
</TD>
</TR>
<TR>
<TD colspan="2">
<tiles:insert attribute="footer" flush="false"/>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
and here is the main.jsf
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<tiles:insert page="/pages/template.jsp" flush="false" >
<tiles:put name="title" value="Hello World" />
<tiles:put name="header" value="/pages/header.jsp" />
<tiles:put name="body" type="string">
<f:view>
<h:form id="catalogMenu">
<table border="1" align ="center" >
<tr>
<td><a href="<img src="../images/image1.gif"><br>Struts in Action<br><a href="Add to Cart $39.00</td>
<td><a href=" <img src="../images/image2.gif"><br>Juint in Action<br><a href="Add to Cart $35.00</td>
</tr>
<tr>
<td><a href="<img src="../images/image3.gif"><br>Hibernate in Action<br><a href="Add to Cart $50.00</td>
<td> <a href="<img src="../images/image4.gif"><br>Spring in Action<br><a href="Add to Cart $54.00</td>
</tr>
</table>
</h:form>
</f:view>
</tiles:put>
</tiles:insert>
can any body please suggest why i this exception is comingWhat worked for me was to add a flush="false" to each of the <tiles:insert tags in my layout page.
I'm using this with JSF so it may be different for you:
... Layout stuff ...
<tiles:insert attribute="body" flush="false" />
... More layout stuff, including more inserts with the flush="false" ....
Maybe you are looking for
-
OIM Installation over Weblogic application server - Login Exception
Hello there, I installed OIM 9.1.0.1 on Weblogic 10.3 with DB 10.2.0.1. I am not able to login into the Administrator web console. And I am getting this following error as stated by the logs below with DEBUG level. I have used sun jdk provided in the
-
Hi All is it possible to have the the discount entered in marketing documents lines be displayed in the journal entry? Rgds Bongani
-
Installing Photoshop CS5 requires Adobe AIR to be installed
Hey Guys (I'm new so sorry if I do anything wrong here), I just installed Windows 8, and while it was very confusing I accidently deleted all of my programmes (I got confused with what the Reset Tab was) and when I went to go and install Photoshop Tr
-
Trouble connecting playbook to windows PC when using AVG Internet Security and USB cable ?
I have spent ages trying to get my PC (windows 7 64bit ) to talk to the Playbook. I found the following: Windows device manager sees the playbook and will let me back up and restore but not to see the files on the Playbook. Desktop software says prob
-
For months now I have been trying to update iTunes. I continually get this msg There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.