Connecting java to database JDBC
I have downloaded everything i think i have needed to in order to make the connection. This includes netbeans, oracle thin driver and oracle. I am still unsure if everything is in the right place and if it works. I am able to create a database following this website [http://www.netbeans.org/kb/60/java/gui-db.html] Does this mean that everything is in the right place or is this somthing totally different because when i do it for real i will code it all myself and not use an example like this.
Right, no longer using netbeans, using JCreator as this is what i am used to. I have downloaded oracle and on reading their documentation i realised that i needed to download the client server aswell. Now it seems i can get a connection.
I ahve this code to establish a connection
package hr;
import java.sql.Connection;
import java.sql.SQLException;
import oracle.jdbc.pool.OracleDataSource;
public class connectMethod {
public connectMethod() {
String jdbcUrl = "jdbc:oracle:thin:hr/hr@localhost:1521/XE";
String userid = "username";
String password = "password";
Connection conn;
public void getDBConnection() throws SQLException {
OracleDataSource ds;
ds = new OracleDataSource();
ds.setURL(jdbcUrl);
conn = ds.getConnection(userid, password);
}Now correct me if i am wrong, but know i can go ahead creating sql methods and all i have to do is call up this method in my sql methods? What i am basically asking is if i need to call up the connectMethod() everytime i want to perform an sql action? and besides the sql code, is there anythingelse i should need to call up?
cheers
Similar Messages
-
How to connect java with database without any dsn.
is there any way to connect java with database with out creating any dsn..like we do in ado in vb by providing provider.
Sure use a type 4 driver. No DSN.
-
Help!! How To Connect Java & PostgreSQL Database
I'm final year student in comp sc. I'm doing java in my thesis.
How to get/read data from postgresql using java?
My thesis is "2 Dimensional Graph Statistics Online Viewing Using Java Applet". So i need a mechanism how to read data from postgresql database using java programming. Please Help!!Hi,
getting started you need some basics on JDBC.
Have a look at the tutorials, or look at this site (its german):
http://www.furchur.de/de/informatik/laborberichte2.htm#dbswt
Have a look at the java.sql package.
First you need to build up a connection using
java.sql.DriverManager.getConnection(...)
The parameter for the PostgreSQL you must look somewhere.
After you have a connection you can use Statements and PreparedStatements to get and set data in the database.
At the end, make sure, the connection will be closed, otherwise data can be lost.
Hope that will help you a little bit -
Connecting java to database to sqlserver
How can I connect to databse from java to sqlserver? And from where can I download it?
Hi,
Refer http://forum.java.sun.com/thread.jsp?forum=54&thread=305035
You could find many related questions answered using the forums search facility.
-Amol -
Unable to connect JAVA with Oracle
I have jdk1.6 and oracle installed on my machine but unable to connect java with database
have classes12.jar and ojdbc14.jar
my environmental variables in respect to this are :
JAVA_HOME= C:\Java\jdk1.6.0_04
JRE_HOME=C:\Java\jdk1.6.0_04
PATH=J:\oracle\ora92\lib;
J:\oracle\ora92\bin;
C:\Program Files\Oracle\jre\1.3.1\bin;
C:\Program Files\Oracle\jre\1.1.8\bin
CLASSPATH=J:\oracle\ora92\jdk\jre\bin\JdbcOdbc.dll;
J:\oracle\ora92\jdbc\lib\classes12.jar;
J:\oracle\ora92\jdbc\lib\ojdbc14.jar
The code is
import java.sql.*; public class dat1 { public static void main(String[] args)throws SQLException,ClassNotFoundException { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Class.forName("com.oracle.jdbc.OracleDriver"); } catch (ClassNotFoundException e) { System.out.println("unable to load driver"); return; } } }
the error message is
Error in thread "main" java.lang.NoClassDefFoundError
Please Help Me
Thanks For Reading
Thanks a lot in Advance For your ANSWERSmaybe if you asked nicely instead of ordering people around we might tell you.
As it is all you're going to hear is that you don't need both those jars, as they contain different versions of the same driver.
I'm not going to tell you which you need, as you should have the documentation to tell you that. But then you also should have the documentation to tell you how to set your classpath properly and you failed to read that too. -
Can't connect a servlet to a mysql database (jdbc)
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
public class LoginServletJDBC extends HttpServlet{
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException{
sendLoginForm(response,false); }
public void sendLoginForm(HttpServletResponse response,boolean error)
throws ServletException,IOException{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html><head>");
out.println("<title>Login</title>");
out.println("</head>");
out.println("<body>");
out.println("<center>");
if(error)
out.println("<b>Failed login. Please try again</b>");
out.println("<br><br>");
out.println("<h2>Login page</h2>");
out.println("<br>Please enter your username and password");
out.println("<br><br>");
out.println("<form method=post>");
out.println("<table>");
out.println("<tr>");
out.println("<td>Username : </td>");
out.println("<td><input type=text name=userName></td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>Password : </td>");
out.println("<td><input type=password name=password></td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td align=right colspan=3>");
out.println("<input type=submit value=Login></td>");
out.println("</tr>");
out.println("</table>");
out.println("</form>");
out.println("</center>");
out.println("</body></html>");
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException{
String userName = request.getParameter("userName");
String password = request.getParameter("password");
if(login(userName,password)){
RequestDispatcher rd = request.getRequestDispatcher("AnotherServlet");
rd.forward(request,response);
else{
sendLoginForm(response,true);
boolean login(String userName,String password){
try{
String url = "jdbc:mysql://localhost:3306/Users";
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection(url,"root","");
//System.out.println("got connection");
Statement s = con.createStatement();
String sql = "select userName from Users where userName='"+userName+"and password='"+password+"';";
ResultSet rs = s.executeQuery(sql);
if(rs.next()){
rs.close();
s.close();
con.close();
return true;
rs.close();
s.close();
con.close();
catch(ClassNotFoundException e){
System.out.println(e.toString());
catch(SQLException e){
System.out.println(e.toString());
catch(Exception e){
System.out.println(e.toString());
return false;
}so ...
here i'm trying to connect to Users mysql database (i use Tomcat 4.1 and mysql servers and clients 4.0.1-alpha)
where is the problem ? when i run this servlet (http://localhost:8080/example/servlet/LoginServletJDBC ) it works ;
BUT when i type an username and a password (any user&pass) my servlet doesn't connect to the database (become a infinite loop without output ; i mean no any errors and exceptions)
i try other think : i changed the database with unexisting database and the result was that i was expected (Unknow database 'unexistingdatabase' )
what i miss ?
please... can anyone help me...
thank`s in advanceThe wireless security setting that the Actiontec modem/router is using may be different...and not compatible....than the setting that the Comcast product was using.
If you think that might the case, and you have the time to troubleshoot......
Temporarily, turn off the wireless security on the Actiontec modem/router
Reset an AirPort Express back to default settings, then see if it will connect using no security and allow an Internet connection when you do the Ethernet port test in the post above again.
If the AirPort Express cannot connect correctly using no security on the wireless network.....then it is a no brainer to know that it will never connect when security is enabled. So, if the AirPort will not connect using no security, you may have an incompatibility issue between the Actiontec and Apple products.
However, if the AirPort Express connects OK with no security, then this tells you that you will need to use a different setting for security on the Actiontec...the same that the Comcast router was using before.....so the Express will have a better chance of connecting.
That setting would be something like WPA/WPA2 Personal, or the same setting stated another way would be WPA-PSK-TKIP. -
How can I connect to a database using Java Web Start?
When I run the application without Java Web Start, the program can get the driver and connect to the database. However, when I try to use this same application with Java Web Start, the program can not load the driver. Why is this happening? I am using a mySql database driver.
I assume you are trying to connect using JDBC, are did you include the jdbc jar in your resources ?
-
Connecting to Oracle database in Java using TNSNAMES.ora
I have a program that can connect to both MSSQL and Oracle databases. It works fine when a user has defined an odbc connection, however if the user only has a tnsnames.ora, I don't know how to code the program in Java to connect to the database. I can't hard-code the server name because I don't know the database up front - I need to be able to read tnsnames.ora to get the information instead. How can I get this information? So far, the object OracleDataSource seems to be getting me the closest, however I am still failing to connect.
In 10.2, JDBC-Thin supports TNSNAMES entries lookup in tnsnames.ora, resulting in a much simplified and driver type independent Oracle Net descriptor. You must set the system property oracle.net.tns_admin to the directory that contains your tnsnames.ora file.
See the Oracle JDBC 10.2 doc.
Here is a code fragment from my book (see my blog below)
java -Doracle.net.tns_admin=$ORACLE_HOME/network/admin
or:
System.setProperty("oracle.net.tns_admin", "c:\oracle\net\admin");
OracleDataSource ods = new OracleDataSource();
ods.setTNSEntryName("tns_alias");
ods.setUser("scott");
ods.setPassword("tiger");
ods.setDriverType("thin");
Connection conn = ods.getConnection();
Kuassi - blog http://db360.blogspot.com/ -
Connect applet to database using JDBC
I try to connect Applet to database, but have error:
Access denied (Java.lang.Runtime.Permission access Class In paclage.sun.jdbc.odbc)
I think the reason is the security issue, but how to implement the security issue in the code?
Help me...If you aren't using the plugin, changing the policy file for the Java Runtime Environment (JRE) won't do anything. Changing the policy file and signing the applet are two ways of granting an applet permission. I only use changing the policy file for testing purposes. I broke down and bought a certificate after I realized I would have to change the policy file on hundreds of machines, and do it again if the server changed.
You sound like you should be using the plugin. Appletviewer knows about the JRE and uses it. You need to change your HTML to use EMBED and OBJECT tags instead of APPLET tags (use HTMLConverter).
sun.jdbc.obdc.JdbcOdbcDriver is in rt.jar, which is in /Prog Files/Javasoft/JRE/1.3???/lib and is installed when the pluggin is installed (which happens automagically when using the EMBED and OBJECT tags). It was also loaded on your development machine when you installed the SDK.
You can remove the need to sign the applet to test whether this is a security problem or machine configuration problem. If you copy the .html and .class files to a directory on a machine you expect it to run on, start your browser and type 'C:\MyDirectory\MyApplet.html' in the address bar. Applets loaded locally are granted all permissions. -
How to use JDBC to connect Tomcat with database server?(Urgent!)
I try to deploy the tomcat and make it connect with databaser server.
I am using mysql connector J 3.0. I added the CLASSPATH of mysql-connector-java-3.0.7-stable-bin.jar in the tomcat.sh .
I also add the web application in server.xml.
When I start tomcat, I can see using Classpath including mysql-connector-java-3.0.7-stable-bin.jar .
But when i browse my jsp including the jdbc, wait for a while, I get a message as following: Timeout on server localhost. My web server and database server is same computer.
Could you tell me what's wrong?Did you check to see that the MySQL database was indeed up and running, and accepting connections when you started Tomcat? Did you make sure that your firewall permits connections to the database?
Timeout errors generally occur when you send a request to a server and the server does nothing with it - i.e., it doesn't respond to it in any way. Most firewalls are configured this way. If I telnet to your machine and I get "connection refused", I know your machine exists and I can try hacking into it. If I telnet and get nothing at all, then I will either assume either there's no actual machine at that address or it's unresponsive. -
Jdbc connectivity with mysql database
I created a database in mysql, but I have problems communicating with the DB in java
here is the error
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/books
at java.sql.DriverManager.getConnection(DriverManager.java:604)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at displayauthors.DisplayAuthors.main(DisplayAuthors.java:30)
java.lang.NullPointerException
at displayauthors.DisplayAuthors.main(DisplayAuthors.java:66)
BUILD SUCCESSFUL (total time: 1 second)
I edited the system variables in windowds
CLASSPATH
.;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip
CLASSPATH1 (notice the 1 at the end, I don't want to override the previous one
.,C:\Program Files (x86)\MySQL\Connector J 5.1.30\mysql-connector-java-5.1.30-bin.jar
The Hostname: localhost Port: 3306
Username: root
password: Tpswsd77? (changed for thios post)
Stored Connection: Local instance MySQL56
connection Method: Standard(TCP/IP)
HERE IS THE CODE
public class DisplayAuthors {
// database URL
static final String DATABASE_URL = "jdbc:mysql://localhost:3306/books";
// launch the application
public static void main( String args[] )
Connection connection = null; // manages connection
Statement statement = null; // query statement
ResultSet resultSet = null; // manages results
// connect to database books and query database
try
// establish connection to database
connection = DriverManager.getConnection(
// DATABASE_URL, "deitel", "deitel" );
//<editor-fold defaultstate="collapsed" desc="comment">
DATABASE_URL, "root", "Tpswsd77?" );
//</editor-fold>
// create Statement for querying database
statement = connection.createStatement();
// query database
resultSet = statement.executeQuery(
"SELECT authorID, firstName, lastName FROM authors" );
// process query results
ResultSetMetaData metaData = resultSet.getMetaData();
int numberOfColumns = metaData.getColumnCount();
System.out.println( "Authors Table of Books Database:\n" );
for ( int i = 1; i <= numberOfColumns; i++ )
System.out.printf( "%-8s\t", metaData.getColumnName( i ) );
System.out.println();
while ( resultSet.next() )
for ( int i = 1; i <= numberOfColumns; i++ )
System.out.printf( "%-8s\t", resultSet.getObject( i ) );
System.out.println();
} // end while
} // end try
catch ( SQLException sqlException )
sqlException.printStackTrace();
} // end catch
finally // ensure resultSet, statement and connection are closed
try
resultSet.close();
statement.close();
connection.close();
} // end try
catch ( Exception exception )
exception.printStackTrace();
} // end catch
} // end finally
} // end main
} // end class DisplayAuthorsI edited the system variables in windowds
CLASSPATH
.;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip
CLASSPATH1 (notice the 1 at the end, I don't want to override the previous one
.,C:\Program Files (x86)\MySQL\Connector J 5.1.30\mysql-connector-java-5.1.30-bin.jar
A few facts:
1. You NEED to have the JDBC driver jar on the Java classpath
2. You don't NEED to have the jar on the Windows classpath
3. You don't NEED to 'override' the Windows classpath - you can just append the JDBC jar to it
Just use #3 above - edit the Windows CLASSPATH environment variable and add the JDBC jar to it. At it at the start and follow it with a semicolon. Or at it at the end AFTER adding a semicolon.
Or specify the CLASSPATH on the command line when you launch Java. Use the '-cp' or '-classpath <class . . >' options. Just type 'java' at the command line to see the list of parameters that can be used. -
How to connect Java to oracle Database Express Edition?
Anyone can help me?
How to connect JAVA TO ORACLE DATABASE EXPRESS EDITION?I suggest you to read this article:
http://wiki.oracle.com/page/JDBC
Regards,
Ricky -
Connecting to MSAcess database using JDBC in JSP
Hi,
I have created an Aceess database file (C:\db1.mdb) and created a DSN=db1.
I could able to connect to the database and retrieve the information from the tables using Sun's JDBC OdBc bridge drivers.
DriverManager.getConnection("jdbc:odbc:db1").
It was working Fine in my Standalone java program.
But,when I used the database connection statements in my JSP page,it is not displaying any error message and not selecting rows from the Select statement i used in my JSP page.(The same worked in my standalone Java program).
I executed the two programs on same machine.Database is also on the same machine.
Can anyone tell me what shall i do to connect to the database(C:\db1.mdb) through JSP.
Thanks in Advance
Rao...in your code do you have any things that is suppressing your exception?? i.e. something lik
try
// do your stuff
catch(Exception e)
// do nothing??
}if so you vont get to know of any problem that happened....
also if there is an un handled exception the jsp page will sometimes come up as blank, because your print streem will be terminated abrubtly....
this will probably happen if you dont have a try - catch block at all, or if you are not handling the exception that is being thrown.... try inclosing your code in a try catch block and doing ex.priintStackTrace() in the catch block to get the exception trace on the server console....
also can you post some code for both your java client and jsp?? -
Java Stored Procedure in one database connecting to muntiple databases.
Hello,
I created a Java Stored Procedure in one database(Oracle10g) and successfully open a connection to another database(Oracle10g) using Thin JDBC Driver. I want to actually transfer CLOB data from one DB to another DB. I am concern that by opening a connection another database in Java Stored Procedure, might interfere with oracle and destabilize the instance at some point. Oracle JDBC FAQ (Link: http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#34_13) stated that Yes it could be done but then mentioned the workaround.(if it could be done why do we need a workaround!!!)
I would like to confirm whether connecting to multiple DB using JDBC Thin Driver in a Java Stored Procedure is supported by Oracle10g or not and whether it has any known issue with it.
Thanks in Advance!
Edited by: user649261 on Sep 16, 2008 8:05 PMhrishy wrote:
Thanks i have modified the title so its easy to comprehendWrite the two parts mentioned above and post if you get problems with your code.
First write code that calls the stored procedure and test that to make sure that it works.
Then write a simple webservice and test it out to make sure it works. The integration should be trivial after that. -
Cannot connect to the database. java.sql.SQLException:
Hi,
I am trying to connect to Pointbase database through an applcation written under J2EE environment. I am able to connect with other database under Pointbase. I am trying to connect using the code as follows:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("Jdbc:Odbc:study", dbUserID, dbPassword);
and I am getting the Exception as shown delow :
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: access denied (java.lang.RuntimePermission exitVM)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
root cause
java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
java.security.AccessController.checkPermission(AccessController.java:401)
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
java.lang.SecurityManager.checkExit(SecurityManager.java:736)
com.sun.enterprise.J2EESecurityManager.checkExit(J2EESecurityManager.java:70)
java.lang.Runtime.exit(Runtime.java:88)
java.lang.System.exit(System.java:715)
org.apache.jsp.login_jsp._jspService(login_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server-PE-8.0 logs.
Sun-Java-System/Application-Server-PE-8.0
Please help.
NNJThanks for the reply. I have attached the server.log herewith :
[#|2008-10-05T11:44:45.945+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.admin|_ThreadID=12;|ADM1006:Uploading the file to:[C:\Documents and Settings\Administrator\Local Settings\Temp\s1astempdomain1server-1629282413\server\study.war]|#]
[#|2008-10-05T11:44:45.955+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.admin|_ThreadID=12;|ADM1007:Uploaded the remote file at: [C:\Documents and Settings\Administrator\Local Settings\Temp\s1astempdomain1server-1629282413\server\study.war]|#]
[#|2008-10-05T11:44:46.225+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.admin|_ThreadID=12;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- undeploy web/study]|#]
[#|2008-10-05T11:44:46.686+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.admin|_ThreadID=12;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
[#|2008-10-05T11:44:47.947+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5109: EJBC - START of EJBC for [study]|#]
[#|2008-10-05T11:44:47.977+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.deployment|_ThreadID=12;|Processing beans ...|#]
[#|2008-10-05T11:44:47.987+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5110: EJBC - END of EJBC for [study]|#]
[#|2008-10-05T11:44:48.158+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.deployment|_ThreadID=12;|Total Deployment Time: 2043 msec, Total EJB Compiler Module Time: 40 msec, Portion spent EJB Compiling: 1%
Breakdown of EJBC Module Time: Total Time for EJBC: 40 msec, CMP Generation: 0 msec (0%), Java Compilation: 0 msec (0%), RMI Compilation: 0 msec (0%), JAX-RPC Generation: 0 msec (0%),
|#]
[#|2008-10-05T11:44:48.278+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.deployment|_ThreadID=12;|deployed with moduleid = study|#]
[#|2008-10-05T11:44:48.378+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.admin|_ThreadID=12;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- deploy web/study]|#]
[#|2008-10-05T11:44:48.488+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.web|_ThreadID=12;|WEB0100: Loading web module [study] in virtual server [server] at [study]|#]
[#|2008-10-05T11:44:51.202+0530|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.admin|_ThreadID=12;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
[#|2008-10-05T11:46:06.771+0530|WARNING|sun-appserver-pe8.0|javax.enterprise.system.stream.err|_ThreadID=16;|Cannot connect to the database. java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified|#]
[#|2008-10-05T11:46:06.871+0530|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.container.web|_ThreadID=16;|StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.checkExit(SecurityManager.java:736)
at com.sun.enterprise.J2EESecurityManager.checkExit(J2EESecurityManager.java:70)
at java.lang.Runtime.exit(Runtime.java:88)
at java.lang.System.exit(System.java:715)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:76)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:261)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:180)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:582)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:161)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:979)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:692)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:647)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:691)
at java.lang.Thread.run(Thread.java:534)
|#]
regards,
NNJ
Maybe you are looking for
-
Goods receipt for PO , immediate TO
Experts, We are developing a custom RF transaction GR for PO. During this process I am using BAPI_Goodsmvt_create to create the material document in the back ground.I want to create the transfer order for the material document immediately in the bag
-
How can I share a photo slideshow
How can I share a photo slideshow?
-
Opening first tab of jquery accordion when page loads
Hello, I am wondering how I would make the first tab of my accordion to open when the page loads. It is a custom accordion and therefore it is hard to find the answer online. I want this to be specific to a certain page if possible rather than univer
-
Hi - any suggestions? iWeb wont open in Lion for some reason. It gives "one hop" in my tool bar, but I cant access any new pages nor any of my old sites created therein. I also have other issues with my screensaver and Lion which I will post elsewh
-
Nex-5, PSElements 8, camera raw 6.3
So I was patient and waited for the new camera raw update. I downloaded the 6.3 version that said it was for Elements 8. When I run it, it says "not for this version" or something like that and quits. Can someone give me a link to one that actually w