Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.IllegalAccessError:

johnwanngMar 18 2008 — edited Mar 19 2008
Hi,

I have a small problem which you guys might be able to help me with. Here is my short JSP and I'm just trying to connect to an Oracle 10G database installed locally on my PC.
--- BEGIN ---

<%@ page import="java.sql.DriverManager,java.sql.*, java.util.*, java.net.*, oracle.jdbc.*,oracle.jsp.dbutil.*" %>

<%@ page contentType="text/html;charset=windows-1252"%>

<jsp:useBean id="name" class="oracle.jsp.jml.JmlString" scope ="request" >
<jsp:setProperty name="name" property="value" param="query" />
</jsp:useBean>

<%
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcl","oracle_user","oracle_user");
ResultSet rset = null;
OracleCallableStatement callStmt = null;
Statement stmt = null;
String userQuery = null;
String myQuery = null;
URLEncoder myEncoder;
int count=0;
int loopNum=0;
int startNum=0;
%>
--- END ---

But I kept getting the following error on the web page when I executed it. The execution stops at : Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcl","oracle_user","oracle_user");

-- ERROR ---
--- START ---
java.lang.IllegalAccessError: tried to access class oracle.jdbc.driver.OracleDriverExtension from class oracle.jdbc.driver.OracleDriver
-- END ---

The database credentials, port number are all correct and also I already had Classes12.jar,Nls_charset12.jar,JSP Runtime and Ojdbc14.jar attached to my project.

Thank you for your assistance and time spent.

Regards,
John
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2008
Added on Mar 18 2008
1 comment
1,514 views