Applet plugin error on JSP page
I currently have an applet using the swing plugin so it's embedded between <object>
tags. When loading the JSP page in the editor the error "Attachment to a running
virtual machine failed" appears with an OK button. When I click the OK button
the entire workshop closes down. Beta Version 8.1 displayed the same error but
didn't crash. The page defaults to open in "Design View" which is where the error
occurs. Any suggestions?
Mark,
Can you upload the jsp and the applet ? Also please contact BEA Customer
Support and request that an evaluation case be open for this issue.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Mark" <[email protected]> wrote in message
news:[email protected]..
>
I currently have an applet using the swing plugin so it's embedded between<object>
tags. When loading the JSP page in the editor the error "Attachment to arunning
virtual machine failed" appears with an OK button. When I click the OKbutton
the entire workshop closes down. Beta Version 8.1 displayed the sameerror but
didn't crash. The page defaults to open in "Design View" which is wherethe error
occurs. Any suggestions?
Similar Messages
-
ClassNotFoundException when trying to access applet (jar) from a jsp page?
I have my applet in a jar file and I am specifying the applet tag in my jsp page as follows:
<applet code="website.utils.DragDropUploadApplet.class" name="DragDropApp" width="17" height="17" archive="utils.jar" codebase="." ></applet>
I tried with and without the codebase. The jar file is at the same location as the jsp page which has the above applet tag, however I get a ClassNotFoundException in the Sun Java Console in Internet Explorer. Any inputs on resolving this will be much appreciated.
Here is the error:
load: class website.utils.DragDropUploadApplet.class not found.
java.lang.ClassNotFoundException: website.utils.DragDropUploadApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
Exception in thread "Thread-12" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-website.utils.DragDropUploadApplet.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class website.utils.DragDropUploadApplet.class not found.
java.lang.ClassNotFoundException: website.utils.DragDropUploadApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
Exception in thread "Thread-13" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-website.utils.DragDropUploadApplet.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class website.utils.DragDropUploadApplet.class not found.
java.lang.ClassNotFoundException: website.utils.DragDropUploadApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
Exception in thread "Thread-14" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-website.utils.DragDropUploadApplet.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class website.utils.DragDropUploadApplet.class not found.
java.lang.ClassNotFoundException: website.utils.DragDropUploadApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
Exception in thread "Thread-15" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class website.utils.DragDropUploadApplet.class not found.
java.lang.ClassNotFoundException: website.utils.DragDropUploadApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
Exception in thread "Thread-16" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-website.utils.DragDropUploadApplet.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-website.utils.DragDropUploadApplet.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks,
MonishaHi mshah101,
This can happen if the applet is compiled using an higher version of java and the browser is pointing to an older version (even if minor version number is higher) -
[b]Error during JSP page processing[/b]
hi , i'm mech.
i have some probs with jsp. i am trying to connect jsp page with database and printing the data on the browser page. i have created DSN mm using microsoft odbc for oracle and oracle9i's driver oracle in orahome90 but it is giving yet . i have this coding and error.
------------------------jsp code--------------------------
package pagecompile.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import com.sun.server.http.pagecompile.jsp.runtime.*;
import java.beans.*;
import com.sun.server.http.pagecompile.jsp.JspException;
import java.sql.*;
public class _Connect extends HttpJspBase {
static char[][] jspxhtml_data = null;
public _Connect( ) {
private static boolean jspxinited = false;
public final void jspxinit() throws JspException {
ObjectInputStream oin = null;
int numStrings = 0;
try {
FileInputStream fin = new FileInputStream("E:\\JavaWebServer2.0\\tmpdir\\default\\pagecompile\\jsp\\pagecompile.jspConnect.dat");
oin = new ObjectInputStream(fin);
jspxhtml_data = (char[][]) oin.readObject();
} catch (Exception ex) {
throw new JspException("Unable to open data file");
} finally {
if (oin != null)
try { oin.close(); } catch (IOException ignore) { }
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
boolean jspxcleared_due_to_forward = false;
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
jspxinit();
jspxinited = true;
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
out.print(_jspx_html_data[0]);
out.print(_jspx_html_data[1]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(14,2);to=(28,2)]
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection myconn=DriverManager.getConnection("Jdbc:Odbc:mm","madhulika","madhulika");
Statement stmt = myconn.createStatement();
ResultSet myResultSet = stmt.executeQuery("Select * from peopletable");
if(myResultSet != null)
while(myResultSet.next())
int eid=myResultSet.getInt("id");
String fname=myResultSet.getString("firstname");
String lname=myResultSet.getString("lastname");
String mail=myResultSet.getString("email");
// end
out.print(_jspx_html_data[2]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(30,10);to=(30,13)]
out.print(eid);
// end
out.print(_jspx_html_data[3]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(31,10);to=(31,15)]
out.print(fname);
// end
out.print(_jspx_html_data[4]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(32,10);to=(32,15)]
out.print(lname);
// end
out.print(_jspx_html_data[5]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(33,10);to=(33,14)]
out.print(mail);
// end
out.print(_jspx_html_data[6]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(37,5);to=(43,0)]
stmt.close();
myconn.close();
// end
out.print(_jspx_html_data[7]);
} catch (Throwable t) {
if (out.getBufferSize() != 0)
out.clear();
throw new JspException("Unknown exception: ", t);
} finally {
if (!_jspx_cleared_due_to_forward)
out.flush();
_jspxFactory.releasePageContext(pageContext);
-------------------error in browser----------------------
Error during JSP page processing
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.sql.SQLException.(SQLException.java:43)
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3814)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1029)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:145)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:165)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:126)
at pagecompile.jsp._Connect._jspService(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.runServlet(JspServlet.java:469)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspServlet.java:259)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(JspServlet.java:97)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.ServletState.callService(ServletState.java:226)
at com.sun.server.ServletManager.callServletService(ServletManager.java:936)
at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423)
at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79)
at com.sun.server.http.stages.Runner.process(Runner.java:79)
at com.sun.server.ProcessingSupport.process(Compiled Code)
at com.sun.server.Service.process(Service.java:204)
at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374)
at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code)
at com.sun.server.HandlerThread.run(CompiledBacking up a moment, is there a particular reason that you're using the JDBC-ODBC bridge rather than using the Oracle JDBC driver?
Have you taken a look at the JSP sample code available on OTN? I would start by making sure you can run that.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Plugin problem in JSP page with applet
i am using applets in my jsp page. the applet works properly if the java plugin is installed. it is not working with the default jvm.
my question is
if any client who does not have java plug in, views the page the plugin should be downlaoded automaticllly.
how do i get this happen.
Need support from Applet Gurus
Cheers!!!!!!!!!!!!!!If you are using the <applet> tag, then it will not try to download the plugin. You should use the <object> and <embed> tags, which will only use the plugin, not the default JVM.
See the bottom of this page...
http://java.sun.com/products/plugin/1.3/docs/intranet.html
Only IE has a JVM built-in (and Netscape 4.x, if anyone still uses it). And in either case, that JVM is version Java 1.1.4, so it's very old. -
Hi ,
We have Oc4j standalone container at work running on Sun Solaris , but at times after a deployment we get a few JSP errors as follows :
oracle.jsp.provider.JspCompileException: Errors compiling:/opt/oc4j/j2ee/home/application-deployments/a2g/a2g/persistence/_pages/_wizards/_reconwizard/_recon__pg6.java</H3><pre>Note: sun.tools.javac.Main has been deprecated.
/opt/oc4j/j2ee/home/application-deployments/a2g/a2g/persistence/_pages/_wizards/_reconwizard/_recon__pg6.java:515: Variable str may not have been initialized.
What we usually do is delete the existing folders from the container and let it re-deploy again , after which it does work fine . But recently even deletin the folders doesnt get rid of the above mentioned error .
What could the problem . Could it be the configuration for the JSP . We have parameters setup currently .
So please let me know if anyone knows a workaound this kinda problem.
Thanx.Mark,
Can you upload the jsp and the applet ? Also please contact BEA Customer
Support and request that an evaluation case be open for this issue.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Mark" <[email protected]> wrote in message
news:[email protected]..
>
I currently have an applet using the swing plugin so it's embedded between<object>
tags. When loading the JSP page in the editor the error "Attachment to arunning
virtual machine failed" appears with an OK button. When I click the OKbutton
the entire workshop closes down. Beta Version 8.1 displayed the sameerror but
didn't crash. The page defaults to open in "Design View" which is wherethe error
occurs. Any suggestions? -
Applet loads in one jsp page and doesn't in the other
Hi,
I've got a strange problem. I've written an applet which I want to embed in a jsp page in a web application. I've created a very small web application to simplify testing the applet, and all works well in it. But when I try to embed the applet in my real web application (exactly the same way) it fails to init, firefox hangs, and in java console I get;
java.lang.ClassFormatError: Incompatible magic value 168430090 in class file pl/cardq/applet/GameApplet1
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:178)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:618)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:778)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2045)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:707)
at sun.applet.AppletPanel.run(AppletPanel.java:361)
at java.lang.Thread.run(Thread.java:619)
Any idea what that means?
Thanks in advanceOnce the print window is open, click on "PDF", in the list of options you will find "open PDF in Preview".
(I hope my translation is good because I am using French...) -
Applet not loading on jsp page
Hi there, I'm learning Java Server Pages now a days, and I wanted to place one applet on my JSP, and I have used jsp:plugin to load this applet on my jsp page, but still it is not working, any idea,
regards,
Raasi.post your jsp code and write where do you put your applet.
-
1.i create a database
2.then i create a jsp page for welcome
3.then another jsp page for view result
4.then i write code for java
here is my 1st jsp page
<html>
<head>
<title>login</title>
</head>
<body bgcolor=pink>
<form action="project.jsp" method=post>
Project id
 
; <input type="text" name="proj_id"><br><br>
Project Name <input
type="text" name="proj_name"><br><br>
Client Name
<input
type="text" name="client_name"><br><br>
Project Start Date <input type="text" name="strt_date"><br><br>
Est Project End Date <input type="text" name="est_date"><br><br>
Project Manager <input type="text"
name="proj_mgr"><br><br>
Est Effort
 
; <input type="text" name="est_effort"><br><br>
<input type="submit" name="add" value="Add" onClick=add() >
<input type="button" name="modify" value="Modify">
<input type="button" name="delete" value="Delete">
<input type="button" name="assign" value="Assign">
</form>
</body>
</html>
here my java page
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.io.*;
class base
PreparedStatement pstmt=null;
Connection con = null;
Statement stmt = null;
ResultSet rset = null;
int est_effort;
String proj_id,proj_name,client_name,strt_date,est_date,proj_mgr;
/* int est_effort;
String Project_id,Project_name,client_name,start_date,estimated_date,Project_mgr; */
void add( )
try
String driverName = "com.mysql.jdbc.Driver";
Class.forName(driverName);
String serverName = "192.168.10.5";
String mydatabase = "Trainees";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "josep";
String password = "josep";
con = DriverManager.getConnection(url, username, password);
System.out.println("Connected");
catch(Exception e)
System.err.println("Exception: " + e.getMessage());
try{
System.out.println("Before Update1");
pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values ('
"+Project_id+" ',' "+Project_name+"',' "+client_name+" ',' "+start_date+" ',' "+estimated_date+" ',' "+Project_mgr+" ',' "+est_effort+"')");
pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values
System.out.println("Before Update2");
pstmt.setString(1,proj_id);
pstmt.setString (2,proj_name);
pstmt.setString (3,client_name);
pstmt.setString (4,strt_date);
pstmt.setString (5,est_date);
pstmt.setString(6,proj_mgr);
pstmt.setInt(7,est_effort);
pstmt.executeUpdate();
System.out.println("" +pstmt );
catch(Exception e)
System.err.println("Exception: " + e.getMessage());
finally
try
if(con != null)
con.close();
catch(SQLException e)
void modify()
void delete()
void assign()
public class xx extends base
public static void main(String args[]) throws IOException
base a= new base();
a.add();
here my second jsp page
<%@ page language="java"%>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*"%>
<%@page import="ss.xx"%>
//<%@ page import="ss.xx.*"%>
<html>
<head><title>Welcome</title></head>
<body bgcolor = "LightGrey">
Welcome...
<br>
<%
xx obj=new xx();
obj.add( );
%>
<%
String Project_id = request.getParameter("proj_id");
String Project_name=request.getParameter("proj_name");
String client_name=request.getParameter("client_name");
String start_date=request.getParameter("strt_date");
String estimated_date=request.getParameter("est_date");
String Project_mgr=request.getParameter("proj_mgr");
int est_effort=Integer.parseInt(request.getParameter("est_effort"));
%>
<p><font size="6">Project id : <%= Project_id%></font></p>
<p><font size="6">Project Name : <%= Project_name%></font></p>
<p><font size="6">Client Name : <%= client_name%></font></p>
<p><font size="6">Project Start Date : <%= start_date%></font></p>
<p><font size="6">Est Project End Date : <%= estimated_date%></font></p>
<p><font size="6">Project Manager : <%= Project_mgr%></font></p>
<p><font size="6">Est Effort : <%= est_effort%></font></p>
</body>
</html>
here that second jsp page error
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 12 in the jsp file: /project.jsp
Generated servlet error:
The type base cannot be resolved. It is indirectly referenced from required .class files
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Uh, those aren't runtime errors, but just compilation errors. Googling on the error message can give a lot of results.
Learn how to write Java properly. It would also help a lot if you put all the Java logic in Java classes instead of JSPs. -
if this is not the right forum, please some one show where.
I created a EJB pack and deployed at the server. Made a java program client to test it and all is Ok. But when I try to use a jsp page to use the service, I get a java.lang.ClassCastException message.
I can get the context , the reference , but when I try to
get a reference to the bean's Home interface the error happens.
This is the line with the problem:
ServiceHome1 home =(ServiceHome1) PortableRemoteObject.narrow (ref, ServiceHome1.class);
the same line runs ok at a java program at the same machine.
I use Tomcat/Jboss and the Jboss libs are in %CATALINA_HOME%/commom/libDo you import the ServiceHome1 in your jsp page?
-
Hi...I found following error during my jsp page compilation...I am using Tomcat Server 4.1.18 as a server.
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:43: cannot resolve symbol
[javac] symbol : class LoginManager
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] LoginManager loginManager = null;
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:45: cannot resolve symbol
[javac] symbol : class LoginManager
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] loginManager = (LoginManager) pageContext.getAttribute("loginManager", PageContext.APPLICATION_SCOPE);
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:48: cannot resolve symbol
[javac] symbol : class LoginManager
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] loginManager = (LoginManager) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "LoginManager");
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:58: cannot resolve symbol
[javac] symbol : class UserCredentials
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] UserCredentials credentials = null;
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:60: cannot resolve symbol
[javac] symbol : class UserCredentials
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] credentials = (UserCredentials) pageContext.getAttribute("credentials", PageContext.SESSION_SCOPE);
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:63: cannot resolve symbol
[javac] symbol : class UserCredentials
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] credentials = (UserCredentials) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserCredentials");
[javac] ^
[javac] 6 errors
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)This is my jsp file..i have also kept all my class files in respective folder..still i have this error...i have kept my class files into /WEB-INF/
-classes
com
chintan
webapps folder
<%@ page language="java" %>
<%@ page import="com.chintan.webapps.LoginManager" %>
<%@ page import="com.chintan.webapps.UserCredentials" %>
<jsp:useBean id="loginManager" class="com.chintan.webapps.LoginManager" scope="application" />
<jsp:useBean id="credentials" class="com.chintan.webapps.UserCredentials" scope="session" />
<jsp:setProperty name="credentials" property="*" />
<html>
<head>
<title>
User Validation JSP Page
</title>
</head>
<body>
<%! String nextPage; %>
<%
if(loginManager.login(credentials)){
nextPage = "Mainmenu.jsp";
}else if(loginManager.isLoggedIn(credentials)){
nextPage = "Duplicate.jsp";
}else{
nextPage = "loginFailure.jsp";
out.println(nextPage);
%>
<jsp:forward page="<%= nextPage %>" />
</body>
</html> -
Error using JSP page in a screenflow in Oracle BPM Studio 10.3.0.0
I am trying to use a jsp page in a screenflow and i am getting the following error:
**"The task could not be successfully executed. Reason: 'fuego.web.execution.exception.InternalForwardException: UnExpected error during internal forward process.'."**
My jsp is very simple and the code is as follows:
===================================================================
<%@ page session="true"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://fuego.com/jsp/ftl" prefix="f" %>
<html>
<head>
<link href="<f:webResources relativePath='css/default.css'/>" rel="stylesheet" type="text/css">
<title></title>
</head>
<body>
<form name="form" method="post" action="<f:postResults/>">
<table>
<tr>
<td>Person Name</td>
<td><input type="text" id="personName" <f:field att="personObject.personName"/> /></td>
</tr>
<tr>
<td>Person Age</td>
<td><input type="text" id="personAge" <f:field att="personObject.personAge"/> /></td>
</tr>
<tr>
<input type="submit" name="Ok" value="Ok">
</tr>
</table>
</form>
</body>
</html>
=====================================================================
Also I have created a "person" BPM Object under Catalogue and created instance variable with the name as "personObject". I cannot understand why i am getting the above error. Please Help.When I go to the Log Viewer it gives the following error details:
UnExpected error during internal forward process.
Caused by: Could not find FuegoObject:personObject in request.
fuego.web.execution.exception.InternalForwardException: UnExpected error during internal forward process.
at fuego.web.execution.servlet.ServletExternalContext.redirectView(ServletExternalContext.java:131)
at fuegoblock.net.web.NewJspController.forward(NewJspController.java:98)
at fuegoblock.net.web.NewJspController.service(NewJspController.java:50)
at fuego.web.execution.servlet.ServletRedirector$ControllerRedirector.forward(ServletRedirector.java:197)
at fuego.web.execution.servlet.ServletRedirector.redirect(ServletRedirector.java:58)
at fuego.web.papi.TaskExecutor.processRedirect(TaskExecutor.java:224)
at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:104)
at fuego.workspace.servlet.ExecutorServlet.doAction(ExecutorServlet.java:117)
at fuego.workspace.servlet.BaseServlet.doPost(BaseServlet.java:229)
at fuego.workspace.servlet.BaseServlet.doGet(BaseServlet.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at fuego.workspace.servlet.AuthenticatedServlet.service(AuthenticatedServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:66)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:81)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:293)
at fuego.web.execution.servlet.ServletExternalContext.forwardInternal(ServletExternalContext.java:197)
at fuego.web.execution.servlet.ServletExternalContext.processAction(ServletExternalContext.java:110)
at fuego.workspace.execution.WorkspaceInteractiveExecution.dispatchComponentExecution(WorkspaceInteractiveExecution.java:98)
at fuego.web.execution.InteractiveExecution.invokePrepare(InteractiveExecution.java:351)
at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:192)
at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:223)
at fuego.web.papi.TaskExecutor.runInstanceTask(TaskExecutor.java:490)
at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:98)
at fuego.workspace.servlet.ExecutorServlet.doAction(ExecutorServlet.java:117)
at fuego.workspace.servlet.BaseServlet.doPost(BaseServlet.java:229)
at fuego.workspace.servlet.BaseServlet.doGet(BaseServlet.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at fuego.workspace.servlet.AuthenticatedServlet.service(AuthenticatedServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at fuego.web.filter.SingleThreadPerSessionFilter.doFilter(SingleThreadPerSessionFilter.java:64)
at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63)
at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at fuego.web.filter.CharsetFilter.doFilter(CharsetFilter.java:48)
at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63)
at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.servlet.ServletException: Could not find FuegoObject:personObject in request.
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
at org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:65)
at org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:778)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
at org.apache.jsp.webRoot.customJSP.showperson_jsp._jspService(showperson_jsp.java:113)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:66)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:81)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:293)
at fuego.web.execution.servlet.ServletExternalContext.redirectView(ServletExternalContext.java:128) -
Error in Jsp page - undefined type
<html>
<%@ page contentType="text/html; charset=utf-8"
import="java.io.InputStream,
java.io.IOException,
javax.xml.parsers.SAXParser,
java.lang.reflect.*,
java.io.Writer.*, java.util.*,
javax.xml.parsers.SAXParserFactory"
session="false" %>
<%
* Copyright 2002,2004,2005 The Apache Software Foundation.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
%>
<%!
* Happiness tests for axis. These look at the classpath and warn if things
* are missing. Normally addng this much code in a JSP page is mad
* but here we want to validate JSP compilation too, and have a drop-in
* page for easy re-use
* @author Steve 'configuration problems' Loughran
* @author dims
* @author Brian Ewins
* test for a class existing
* @param classname
* @return class iff present
Class classExists(String classname) {
try {
return Class.forName(classname);
} catch (ClassNotFoundException e) {
return null;
* test for resource on the classpath
* @param resource
* @return true iff present
boolean resourceExists(String resource) {
boolean found;
InputStream instream=this.getClass().getResourceAsStream(resource);
found=instream!=null;
if(instream!=null) {
try {
instream.close();
} catch (IOException e) {
return found;
* probe for a class, print an error message is missing
* @param out stream to print stuff
* @param category text like "warning" or "error"
* @param classname class to look for
* @param jarFile where this class comes from
* @param errorText extra error text
* @param homePage where to d/l the library
* @return the number of missing classes
* @throws IOException
int probeClass(JspWriter out,
String category,
String classname,
String jarFile,
String description,
String errorText,
String homePage) throws IOException {
try {
Class clazz = classExists(classname);
if(clazz == null) {
String url="";
if(homePage!=null) {
url=getMessage("seeHomepage",homePage,homePage);
out.write(getMessage("couldNotFound",category,classname,jarFile,errorText,url));
return 1;
} else {
String location = getLocation(out, clazz);
if(location == null) {
out.write("<li>"+getMessage("foundClass00",description,classname)+"</li><br>");
else {
out.write("<li>"+getMessage("foundClass01",description,classname,location)+"</li><br>");
return 0;
} catch(NoClassDefFoundError ncdfe) {
String url="";
if(homePage!=null) {
url=getMessage("seeHomepage",homePage,homePage);
out.write(getMessage("couldNotFoundDep",category, classname, errorText, url));
out.write(getMessage("theRootCause",ncdfe.getMessage(), classname));
return 1;
* get the location of a class
* @param out
* @param clazz
* @return the jar file or path where a class was found
String getLocation(JspWriter out,
Class clazz) {
try {
java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
String location = url.toString();
if(location.startsWith("jar")) {
url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
location = url.toString();
if(location.startsWith("file")) {
java.io.File file = new java.io.File(url.getFile());
return file.getAbsolutePath();
} else {
return url.toString();
} catch (Throwable t){
return getMessage("classFoundError");
* a class we need if a class is missing
* @param out stream to print stuff
* @param classname class to look for
* @param jarFile where this class comes from
* @param errorText extra error text
* @param homePage where to d/l the library
* @throws IOException when needed
* @return the number of missing libraries (0 or 1)
int needClass(JspWriter out,
String classname,
String jarFile,
String description,
String errorText,
String homePage) throws IOException {
return probeClass(out,
"<b>"+getMessage("error")+"</b>",
classname,
jarFile,
description,
errorText,
homePage);
* print warning message if a class is missing
* @param out stream to print stuff
* @param classname class to look for
* @param jarFile where this class comes from
* @param errorText extra error text
* @param homePage where to d/l the library
* @throws IOException when needed
* @return the number of missing libraries (0 or 1)
int wantClass(JspWriter out,
String classname,
String jarFile,
String description,
String errorText,
String homePage) throws IOException {
return probeClass(out,
"<b>"+getMessage("warning")+"</b>",
classname,
jarFile,
description,
errorText,
homePage);
* get servlet version string
public String getServletVersion() {
ServletContext context=getServletConfig().getServletContext();
int major = context.getMajorVersion();
int minor = context.getMinorVersion();
return Integer.toString(major) + '.' + Integer.toString(minor);
* what parser are we using.
* @return the classname of the parser
private String getParserName() {
SAXParser saxParser = getSAXParser();
if (saxParser == null) {
return getMessage("couldNotCreateParser");
// check to what is in the classname
String saxParserName = saxParser.getClass().getName();
return saxParserName;
* Create a JAXP SAXParser
* @return parser or null for trouble
private SAXParser getSAXParser() {
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
if (saxParserFactory == null) {
return null;
SAXParser saxParser = null;
try {
saxParser = saxParserFactory.newSAXParser();
} catch (Exception e) {
return saxParser;
* get the location of the parser
* @return path or null for trouble in tracking it down
private String getParserLocation(JspWriter out) {
SAXParser saxParser = getSAXParser();
if (saxParser == null) {
return null;
String location = getLocation(out,saxParser.getClass());
return location;
* Check if class implements specified interface.
* @param Class clazz
* @param String interface name
* @return boolean
private boolean implementsInterface(Class clazz, String interfaceName) {
if (clazz == null) {
return false;
Class[] interfaces = clazz.getInterfaces();
if (interfaces.length != 0) {
for (int i = 0; i < interfaces.length; i++) {
if (interfaces.getName().equals(interfaceName)) {
return true;
return false;
%>
<%@ include file="i18nLib.jsp" %>
<%
// initialize a private HttpServletRequest
setRequest(request);
// set a resouce base
setResouceBase("i18n");
%>
<head>
<title><%= getMessage("pageTitle") %></title>
</head>
<body bgcolor='#ffffff'>
<%
out.print("<h1>"+ getMessage("pageTitle") +"</h1>");
out.print("<h2>"+ getMessage("pageRole") +"</h2><p/>");
%>
<%= getLocaleChoice() %>
<%
out.print("<h3>"+ getMessage("neededComponents") +"</h3>");
%>
<UL>
<%
int needed=0,wanted=0;
* the essentials, without these Axis is not going to work
// need to check if the available version of SAAJ API meets requirements
String className = "javax.xml.soap.SOAPPart";
String interfaceName = "org.w3c.dom.Document";
Class clazz = classExists(className);
if (clazz == null || implementsInterface(clazz, interfaceName)) {
needed = needClass(out, "javax.xml.soap.SOAPMessage",
"saaj.jar",
"SAAJ API",
getMessage("criticalErrorMessage"),
"http://ws.apache.org/axis/");
} else {
String location = getLocation(out, clazz);
out.print(getMessage("invalidSAAJ",location));
out.print(getMessage("criticalErrorMessage"));
out.print(getMessage("seeHomepage","http://ws.apache.org/axis/java/install.html",getMessage("axisInstallation")));
out.print("<br>");
needed+=needClass(out, "javax.xml.rpc.Service",
"jaxrpc.jar",
"JAX-RPC API",
getMessage("criticalErrorMessage"),
"http://ws.apache.org/axis/");
needed+=needClass(out, "org.apache.axis.transport.http.AxisServlet",
"axis.jar",
"Apache-Axis",
getMessage("criticalErrorMessage"),
"http://ws.apache.org/axis/");
needed+=needClass(out, "org.apache.commons.discovery.Resource",
"commons-discovery.jar",
"Jakarta-Commons Discovery",
getMessage("criticalErrorMessage"),
"http://jakarta.apache.org/commons/discovery/");
needed+=needClass(out, "org.apache.commons.logging.Log",
"commons-logging.jar",
"Jakarta-Commons Logging",
getMessage("criticalErrorMessage"),
"http://jakarta.apache.org/commons/logging/");
needed+=needClass(out, "org.apache.log4j.Layout",
"log4j-1.2.8.jar",
"Log4j",
getMessage("uncertainErrorMessage"),
"http://jakarta.apache.org/log4j");
//should we search for a javax.wsdl file here, to hint that it needs
//to go into an approved directory? because we dont seem to need to do that.
needed+=needClass(out, "com.ibm.wsdl.factory.WSDLFactoryImpl",
"wsdl4j.jar",
"IBM's WSDL4Java",
getMessage("criticalErrorMessage"),
null);
needed+=needClass(out, "javax.xml.parsers.SAXParserFactory",
"xerces.jar",
"JAXP implementation",
getMessage("criticalErrorMessage"),
"http://xml.apache.org/xerces-j/");
needed+=needClass(out,"javax.activation.DataHandler",
"activation.jar",
"Activation API",
getMessage("criticalErrorMessage"),
"http://java.sun.com/products/javabeans/glasgow/jaf.html");
%>
</UL>
<%
out.print("<h3>"+ getMessage("optionalComponents") +"</h3>");
%>
<UL>
<%
* now the stuff we can live without
wanted+=wantClass(out,"javax.mail.internet.MimeMessage",
"mail.jar",
"Mail API",
getMessage("attachmentsError"),
"http://java.sun.com/products/javamail/");
wanted+=wantClass(out,"org.apache.xml.security.Init",
"xmlsec.jar",
"XML Security API",
getMessage("xmlSecurityError"),
"http://xml.apache.org/security/");
wanted += wantClass(out, "javax.net.ssl.SSLSocketFactory",
"jsse.jar or java1.4+ runtime",
"Java Secure Socket Extension",
getMessage("httpsError"),
"http://java.sun.com/products/jsse/");
* resources on the classpath path
/* add more libraries here */
%>
</UL>
<%
out.write("<h3>");
//is everythng we need here
if(needed==0) {
//yes, be happy
out.write(getMessage("happyResult00"));
} else {
//no, be very unhappy
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
out.write(getMessage("unhappyResult00",Integer.toString(needed)));
//now look at wanted stuff
if(wanted>0) {
out.write(getMessage("unhappyResult01",Integer.toString(wanted)));
} else {
out.write(getMessage("happyResult01"));
out.write("</h3>");
%>
<UL>
<%
//hint if anything is missing
if(needed>0 || wanted>0 ) {
out.write(getMessage("hintString"));
out.write(getMessage("noteString"));
%>
</UL>
<h2><%= getMessage("apsExamining") %></h2>
<UL>
<%
String servletVersion=getServletVersion();
String xmlParser=getParserName();
String xmlParserLocation = getParserLocation(out);
%>
<table border="1" cellpadding="10">
<tr><td>Servlet version</td><td><%= servletVersion %></td></tr>
<tr><td>XML Parser</td><td><%= xmlParser %></td></tr>
<tr><td>XML ParserLocation</td><td><%= xmlParserLocation %></td></tr>
</table>
</UL>
<% if(xmlParser.indexOf("crimson")>=0) { %>
<p>
<%= getMessage("recommendedParser") %>
</p>
<% } %>
<h2><%= getMessage("sysExamining") %></h2>
<UL>
<%
* Dump the system properties
java.util.Enumeration e=null;
try {
e= System.getProperties().propertyNames();
} catch (SecurityException se) {
if(e!=null) {
out.write("<pre>");
for (;e.hasMoreElements();) {
String key = (String) e.nextElement();
out.write(key + "=" + System.getProperty(key)+"\n");
out.write("</pre><p>");
} else {
out.write(getMessage("sysPropError"));
%>
</UL>
<hr>
<%= getMessage("apsPlatform") %>:
<%= getServletConfig().getServletContext().getServerInfo() %>
</body>
</html>
in the above jsp code i am getting errors such as "1.getMessage(String) is undefined for the type"
"2. setRequest(HttpServletRequest) is undefined for the type"
"3. getLocaleChoice() is undefined for the type"
whats wrong with the code??I would also like to mention that you posted the original message... then barely an hour later made a comment that it was still unanswered.
In my time zone, you posted at 3:32 AM and then commented at 4:35 AM. I don't know about many people here, but I am fast asleep during that time.
So please understand we are here to help you, not be your servants to fix your problems. -
hi everybody, I get this error when i try to display a jsp page:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /visualizzavini.jsp:6
3: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
4: <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
5: <%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s" %>
6: <f:loadBundle basename="it.tecnologieweb.vinispallacci.web.messages" var="msgs"/>
7: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8: <html xmlns="http://www.w3.org/1999/xhtml">
9: <head>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: No faces context?!
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
org.apache.jsp.visualizzavini_jsp._jspService(visualizzavini_jsp.java:94)
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:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: No faces context?!
org.apache.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.java:77)
org.apache.jsp.visualizzavini_jsp._jspx_meth_f_loadBundle_0(visualizzavini_jsp.java:111)
org.apache.jsp.visualizzavini_jsp._jspService(visualizzavini_jsp.java:72)
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:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)i'm new of jsf i try to find out what's wrong but i can't resolve by myself, but anyway this code works correctly on another pc ( not mine that's the matter!!)
can anyone help me?thank u allThis exception roughly means that the f:loadBundle component cannot find the FacesContext.
Look in your web.xml if the FacesServlet is defined correctly and what its url-pattern is. If it is defined correctly and its url-pattern is for example *.jsf, then you'll have to invoke the visualizzavini.jsp as visualizzavini.jsf in the browser. This way the FacesServlet will be invoked and precreate the FacesContext so that the JSF components can access the FacesContext. -
An error in jsp page useBean when i try to include the java bean package?
Hi Sir,
I am using import com.project.ShowData in java beans inorder to connect to the jsp.
The jsp code goes like this:-
<%@ page import="com.project.ShowData" %>
<jsp:useBean id="jspuser1" class="com.viman.ShowData" scope="session"/>
<jsp:setProperty name="jspuser1" property="*"/>
Here the error is showing as cannot resolve symbols in com.project.ShowData.But i have given the same in java beans like this:-
Package com.project;
//import of package goes here
public class ShowData
//code goes here
It seems that all are correct here.I have done few programs using this without any problem.But suddenly it is giving a problem like this.What is the problem here?It is quite Urgent.Thank u.
Regards,
m.ananthuGreetings,
Here the error is showing as cannot resolve symbols in com.project.ShowData.But i have given the
same in java beans like this:-Seeing the actual error would be more helpful. ;)
Regards,
m.ananthu Regards,
Tony "Vee Schade" Cook -
Hi,
I am getting Internal Servlet Error:
javax.servlet.ServletException: SQL error: ORA-01747: invalid
user.table.column, table.column, or column specification
<%@ page language="java" %>
<%@ page import="com.ora.jsp.sql.*" %>
<%@ page import="com.ora.jsp.util.*" %>
<%@ page import="sx_gr.beans.*" %>
<%@ include file="../include/timeoutCheck.jsp" %>
<%@ taglib uri="/orataglib" prefix="ora" %>
<%@ include file="../include/dataSource.jsp" %>
<% String AX=request.getParameter("AXMonth") + "-" +
request.getParameter("AXDay") + "-" +
request.getParameter("AXYear");
String pFlag = "T";
if (request.getParameter("pFlag") == null)
pFlag = "T";
%>
<ora:sqlTransaction dataSource="senddetail" >
<ora:sqlUpdate >
UPDATE Sender SET send_Id= ?,Send_Status= ?,AX= ?,
WHERE s_id= ?
<ora:sqlStringValue param="send_Id"/>
<ora:sqlStringValue param="Send_Status"/>
<ora:sqlDateValue stringValue="<%= AX %>" pattern="MON-dd-yyyy" />
</ora:sqlUpdate>
<%-- Close the transaction --%>
</ora:sqlTransaction>Can anyone help me out.?
I have the privilleges to update too.
Thanks,
AarthyTake the last comma out:
UPDATE Sender SET send_Id= ?,Send_Status= ?,AX= ?,
should be
UPDATE Sender SET send_Id= ?,Send_Status= ?,AX= ?
be sure there's a space between the bind parameter and the WHERE.
Why use an Oracle tag library when there's JSTL?
Why have database stuff in a JSP at all? Better to put it in an object and let the JSP be pure view, as it should be.
Maybe you are looking for
-
Can I write to an NTFS formatted drive on a PC Network?
I had a quick question that I am sure someone in this qualified group will be able to answer. My existing laptop PC for work is about shot, and my company has said that I could replace it with anything (Excellent!). So I'm looking at the 17'' Mac Boo
-
Display and icons shrunken after connexion to tv
After connecting my Macbook Pro to my TV (hdmi + adapter), the display and the icons would shrink on my Macbook, but as soon as I would disconnect it, it would return to my original settings (original size). Now, since the last time I connected my Ma
-
Is there a way to set a bottom t-bar to trigger when you want final motion scroll effects to take place? Or delay an object on screen before final motion? - Thanks!
-
Is it possible to get menu item checked state?
In a script I need to know the state of a menu items checked state - e.g. the View/Proof Colors menu item. Is that possible? (and of cause if it is how do I do it?) Thanks, Jack
-
Versions with unavailable original images cannot be opened,saved or printed?
It all began when my computer crashed and I had to reset it. I can see all the pictures I had saved on Aperture which I had saved on my WD passport but they can not be opened, saved or printed. My question is how can I open my picture with out the o