|
||
|
|||
|
Hello techs,
Could anyone help me out to sort the below exception error. Oracle Port: 8080 Tomcat Port : 8088 HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource db.DAO.getConnection(DAO.java:38) db.DAOQuery.register(DAOQuery.java:113) actions.RegistrationAction.execute(RegistrationAct ion.java:58) org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:484) org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet .java:709) 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. The below coding might be helpful to resolve. DAO Coding: Java Code
package db;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.lang.String;
import oracle.jdbc.pool.OracleDataSource;
import java.sql.*;
import java.util.Properties;
/**
*This class used to establish the connection between JdbcDriver and DataBase.
*DataSourceName will be created through URL.Connection will be
*created successfully next data will be inserted.Suppose
*connection can not be created then Exception occured.
*
*DriverManager class -- makes a connection with a driver
*/
public class DAO
{
public static Connection con = null;
public Connection getConnection(String path)
{
Properties property;
try
{
property = new Properties();
File f=new File(path);
FileInputStream filein=new FileInputStream(f);
property.load(filein);
String systemname = property.getProperty("SYSTEMNAME");
OracleDataSource ods=new OracleDataSource();
ods.setUser("SYSTEM");
ods.setPassword("REDHAT");
ods.setURL("jdbc:oracle:oci:system@"+systemname+":8088/XE");
con=ods.getConnection();
}
catch(SQLException e)
{
System.out.println("1");
e.printStackTrace();
}
catch(Exception e)
{
e.printStackTrace();
}
return con;
}
public boolean returnConnection(Connection conn)
{
boolean status=true;
try
{
con.close();
}
catch(Exception e)
{
status=false;
}
return status;
}
}
|
| The Following User Says Thank You to Json For This Useful Post: | ||
Entrant (10-10-2009) | ||
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| updating database | gurpreetm13 | JDBC & Databases | 3 | 09-10-2009 04:43 PM |
| Oracle brought Sun | Fendaril | The Cafe | 2 | 21-06-2009 03:48 PM |
| Desktop Database Application | TCoomer | JDBC & Databases | 2 | 04-06-2009 08:51 PM |
| Connecting to Oracle from within Eclipse | kairamr | Java IDEs | 1 | 12-11-2008 09:16 PM |
| struts & database for eclipse | kirman | Java IDEs | 2 | 17-10-2008 12:26 PM |
|
100 most searched terms
Search Cloud
|
| actionlistener actionlistener in java addactionlistener addactionlister adding elements to two dimensional arraylist adding elements to two dimensional arraylist in java arraylist value into hash buffered read two integer value in java create an abstract class called shape with abstract methods+java double to integer in java double to integer java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread main java.lang.outofmemoryerror java heap space in eclipse exception in thread main java.lang.reflect.invocationtargetexception format double java get mouse position java how to convert list to map in java how to format double in java how to format doubles in java how to make a calculator in jframe using jcreator http://www.javaprogrammingforums.com/collections-generics/2688-grade-array-trouble.html http://www.javaprogrammingforums.com/object-oriented-programming/3713-limiting-decimal-places-double.html iphone java java actionlistener java double format java double to int java font attributes java format double java forum java forums java get mouse position java jbutton java program to find dimensions of a room java programming codes using astirisks java programming forums java scanner squaring numbers java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.lang.reflect.invocationtargetexception jbutton actionlistener jtable questions in java jtext bold jxl.read.biff.biffexception: unable to recognize ole stream mean value decimal double java print out five asterisks in a row as the loop programmer forum scanner char transaction using gui and 2 dimensional array code in java two dimensional arraylist in java |