Runtime Error using JDBC Driver in NetBeans IDE 6.9.1
Hello,
I receive a compiler error which reads as follows;
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
java.sql.SQLSyntaxErrorException: Schema 'DEMO' does not exist
Heres the main body of code i am trying to execute.
public class Main {
@param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
try{
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
}catch(ClassNotFoundException e){
System.out.println(e);
try{
Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/SimpleDBDemo", "demo", "demo");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM DEMO.Table1");
while (rs.next()) {
String s = rs.getString("Name");
float n = rs.getFloat("Age");
System.out.println(s " " n);
}catch(SQLException e){
System.err.println(e);
I am using NetBeans IDE and have created a database under: Services->Databases-> Java DB->SimpleDBDemo.
I have a database connection in which theres a simple table (called "TABLE1") created which contains the names and ages of two people. I am trying to access the data of these two people.
From what i can figure out i am getting a runtime error. I have downloaded a folder called "Microsoft SQL Driver 2005 JDBC Driver" which contains the "sqljdbc.jar" executable file. I copied the jar file to the library in "Program files->Sun->javadb" and then added the file to the project libraries section i.e. "Project->properties->add JAR/Folder->sqljdbc.jar" in netbeans.
I am still getting the same runtime error. Have i the sqljdbc.jar file added in the wrong place?
Any help would be greatly appreciated.
Microsoft SQL Driver 2005 JDBC Driver is not the Derby driver.
You need the correct JDBC driver for the database you are using, you can't simply grab the first one you find.
Similar Messages
-
Help me! can not using JDBC driver for MS SQL server
I can test sucess in connection, but create EJB when have follow error.
04/05/19 12:23:04 SQL error: No suitable driver
04/05/19 12:23:10 Error creating table: No suitable driver
500 Internal Server Error
java.lang.NoClassDefFoundError: oracle/jbo/html/HtmlServices
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:182)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)HI All,
I am using JDBC driver to pull data from MS SQL Server
2000 for my application Liaison Content Exchange, and
which only accepts JDBC drivers to talk to databases.
I dowloaded the driver from Microsoft website, and had
a successful installation.What do you call "a successful installation"? Where was the JAR file places?
But the application ask me for Driver Name, Class, URL, Time out and Data Source.What application do you mean? Liaison Content Exchange? I'm not familiar with that product.
By default no driver is available in the drop down combo box. After using
"com.microsoft.jdbcx.sqlserver.SQLServerDataSource" as
class and
jdbc:microsoft:sqlserver://192.168.17.2:1433; as url,
the application throw me a error which states "Unable
to instantiate an instance of the application driver"Sounds like it could be one of several things:
(1) The JDBC JAR is not in the CLASSPATH where Liaison Content Exchange expects to find it.
(2) You need to do something else to tell Liaison Content Exchange more information to define the data source.
(3) The URL might be incorrect. Only you can know if the IP address of the host is correct. You don't supply a database name - perhaps you should. Are you sure that 1433 is the correct port number? I know that's true for SQL Server 7.0, but I remember that the default was changed to something else for SQL Server 2000. Ask your database admin what port this listener is assigned to for SQL Server 2000.
(4) You might want to append ";selectmethod=cursor" to the end of your URL. (See the docs for this.)
(5) Make sure you can connect to the database with something other than Java (e.g., the M$ SQL Server client).
. I am not able to trouble shoot this problem, any one
pls help me ASAP at [email protected]
Thx.Bad idea to post an e-mail address. You're not supposed to communicate outside the forum. it's against the guidelines for using the forum. -
Hi,
I have an rpt file developed in crystal report 2008. it connects to SQL Server using ODBC(RDO) connection. I have a jsp file that needs to change the datasource to use JDBC (JNDI). The scriptlet for changing datasource is given below. I have my sqljdbc.jar in the web-inf\lib folder of my application as well as in \server\{server_name}\lib folder. when I try to run the jsp it gives me error as follows :
ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] detected an exception: Error loading JDBC driver. The class 'com.microsoft.jdbc.sqlserver.SQLServerDriver' could not be found.
at com.crystaldecisions.reports.queryengine.Connection.t1(Unknown Source)
at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.for(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.ReportHelper.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.long(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.byte(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at ....
<br>
<br>
Scriptlet :
<%
//Report can be opened from the relative location specified in the CRConfig.xml, or the report location
//tag can be removed to open the reports as Java resources or using an absolute path (absolute path not recommended
//for Web applications).
final String DBUSERNAME = "sa";
final String DBPASSWORD = "password";
final String CONNECTION_STRING = "!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=;user=;password=";
final String TRUSTEDCON = "false";
final String PREQESERVERNAME = "jdbc:microsoft:sqlserver://localhost:1433";
final String SERVERTYPE = "JDBC (JNDI)";
final String DATABASE_DLL = "crdb_jdbc.dll";
final String DATABASE = "bssc";
final String DBCLASSNAME = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
final String USEJDBC = "true";
final String DATABASE_NAME = "bssc";
final String SERVERNAME = "jdbc:microsoft:sqlserver://localhost:1433";
final String CONNECTIONURL = "jdbc:microsoft:sqlserver://localhost:1433";
final String SERVER = "localhost";
%>
<%
final Logger logger = Logger.getLogger(ReportAction.class.getName());
final String REPORT_NAME = "../reports/Krt.rpt";
try {
ReportClientDocument oReportClientDocument = new ReportClientDocument();
oReportClientDocument.open(REPORT_NAME, 0);
// Create the two connectioninfo objects to use
IConnectionInfo oldConnectionInfo = new ConnectionInfo();
IConnectionInfo newConnectionInfo = new ConnectionInfo();
// Assign the old Connection info to the reports current info
DatabaseController dbController = oReportClientDocument.getDatabaseController();
oldConnectionInfo = dbController.getConnectionInfos(null).getConnectionInfo(0);
// If this connection needed parameters, we would use this field.
Fields pFields = null;
// Create a new propertybag for the new location
PropertyBag boPropertyBag1 = new PropertyBag();
// Set new table logon properties
boPropertyBag1.put("JDBC Connection String", CONNECTION_STRING);
boPropertyBag1.put("Trusted_Connection", TRUSTEDCON);
boPropertyBag1.put("PreQEServerName", PREQESERVERNAME);
boPropertyBag1.put("Server Type", SERVERTYPE);
boPropertyBag1.put("Database DLL", DATABASE_DLL);
boPropertyBag1.put("Database", DATABASE);
boPropertyBag1.put("Database Class Name", DBCLASSNAME);
boPropertyBag1.put("Use JDBC", USEJDBC);
boPropertyBag1.put("Database Name", DATABASE_NAME);
boPropertyBag1.put("Server Name", SERVERNAME);
boPropertyBag1.put("Connection URL", CONNECTIONURL);
boPropertyBag1.put("Server", SERVER);
// Assign the properties to the connection info
newConnectionInfo.setAttributes(boPropertyBag1);
// Set the DB Username and Pwd
newConnectionInfo.setUserName(DBUSERNAME);
newConnectionInfo.setPassword(DBPASSWORD);
// The Kind of connectionInfos is SQL
newConnectionInfo.setKind(ConnectionInfoKind.SQL);
// set the parameters to replace.
// The 4 options are:
// _doNotVerifyDB
// _ignoreCurrentTableQualifiers
// _mapFieldByRowsetPosition
// _useDefault
int replaceParams = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB;
// Now replace the connections
dbController.replaceConnection(oldConnectionInfo, newConnectionInfo, pFields, replaceParams);
%>
<%
//Report can be opened from the relative location specified in the CRConfig.xml, or the report location
//tag can be removed to open the reports as Java resources or using an absolute path (absolute path not recommended
//for Web applications).
final String DBUSERNAME = "sa";
final String DBPASSWORD = "password";
final String CONNECTION_STRING = "!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=;user=;password=";
final String TRUSTEDCON = "false";
final String PREQESERVERNAME = "jdbc:microsoft:sqlserver://localhost:1433";
final String SERVERTYPE = "JDBC (JNDI)";
final String DATABASE_DLL = "crdb_jdbc.dll";
final String DATABASE = "bssc";
final String DBCLASSNAME = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
final String USEJDBC = "true";
final String DATABASE_NAME = "bssc";
final String SERVERNAME = "jdbc:microsoft:sqlserver://localhost:1433";
final String CONNECTIONURL = "jdbc:microsoft:sqlserver://localhost:1433";
final String SERVER = "localhost";
%>
<%
final Logger logger = Logger.getLogger(ReportAction.class.getName());
final String REPORT_NAME = "../reports/Krt.rpt";
try {
ReportClientDocument oReportClientDocument = new ReportClientDocument();
oReportClientDocument.open(REPORT_NAME, 0);
// Create the two connectioninfo objects to use
IConnectionInfo oldConnectionInfo = new ConnectionInfo();
IConnectionInfo newConnectionInfo = new ConnectionInfo();
// Assign the old Connection info to the reports current info
DatabaseController dbController = oReportClientDocument.getDatabaseController();
oldConnectionInfo = dbController.getConnectionInfos(null).getConnectionInfo(0);
// If this connection needed parameters, we would use this field.
Fields pFields = null;
// Create a new propertybag for the new location
PropertyBag boPropertyBag1 = new PropertyBag();
// Set new table logon properties
boPropertyBag1.put("JDBC Connection String", CONNECTION_STRING);
boPropertyBag1.put("Trusted_Connection", TRUSTEDCON);
boPropertyBag1.put("PreQEServerName", PREQESERVERNAME);
boPropertyBag1.put("Server Type", SERVERTYPE);
boPropertyBag1.put("Database DLL", DATABASE_DLL);
boPropertyBag1.put("Database", DATABASE);
boPropertyBag1.put("Database Class Name", DBCLASSNAME);
boPropertyBag1.put("Use JDBC", USEJDBC);
boPropertyBag1.put("Database Name", DATABASE_NAME);
boPropertyBag1.put("Server Name", SERVERNAME);
boPropertyBag1.put("Connection URL", CONNECTIONURL);
boPropertyBag1.put("Server", SERVER);
// Assign the properties to the connection info
newConnectionInfo.setAttributes(boPropertyBag1);
// Set the DB Username and Pwd
newConnectionInfo.setUserName(DBUSERNAME);
newConnectionInfo.setPassword(DBPASSWORD);
// The Kind of connectionInfos is SQL
newConnectionInfo.setKind(ConnectionInfoKind.SQL);
// set the parameters to replace.
// The 4 options are:
// _doNotVerifyDB
// _ignoreCurrentTableQualifiers
// _mapFieldByRowsetPosition
// _useDefault
int replaceParams = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB;
// Now replace the connections
dbController.replaceConnection(oldConnectionInfo, newConnectionInfo, pFields, replaceParams);
%>
I am not sure why it is not able to get the Driver since the required jar is there in lib folder? Am I missing something ?
Edited by: sb-onward on Jul 30, 2009 6:01 PMHi,
Make sure you have set the Classpath in CRConfig.xml for the jdbc jar.
Place the CrConfig.xml in the classes directory of your application.
Please let me know the results.
Regards,
Neeraj -
Java.sql.SQLException: Error accessing jdbc driver
Hi,
We are using WebLogic Server 7.0 as Application Server.
We now create a connection pool named regPool and
a Tx datasource named regDS.
When we get the connection from the datasource, exception occurred.
java.sql.SQLException: Error accessing jdbc driver: driverURL =
jdbc:weblogic:pool:regPool, props = {enableTwoPhaseCommit=false,
jdbcTxDataSource=true, connectionPoolID=regPool}
at
weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:323)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:377)
at weblogic.jdbc.jts.Driver.connect(Driver.java:129)
at
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
:265)
So I guess that why we can't use CMP for finding data. Here is the error when we call the finder.
javax.ejb.FinderException: Exception in findAllEmr while preparing or
executing statement: 'null'
java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
Exception = Access not allowed
java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
Exception = Access not allowed
at
weblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:694)
According to the exception message, it looks
like the connection fail between WLS and Oracle 9.2.
Here is a scenario I think you should need to know.
I change the table-name in the weblogic-cmp-rdbms-jar.xml
to a name that doesn't exist in the database.
Then, re-package the EJB, copy it to server and restart the server.
A exception occurred that says the table doesn't exist.
So, in this case, it looks like the datasource works and
connection is fine.
Any recommendation will be appreciated.
Jimmy ChangHi!
I am a default user to the databse server. I connect to the database with '\' as the username and blank passoword(I mean with Network authentication may be).When I am trying to create connection using
con = DriverManager.getConnection("jdbc:oracle:thin:@DRACINAL2:BSAJ", "/","" )
it gives me followint error
ava.sql.SQLException: Null user or password not supported in THIN driver
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
void oracle.jdbc.dbaccess.DBError.check_error(int)
oracle.jdbc.dbaccess.DBConversion oracle.jdbc.ttc7.TTC7Protocol.logon(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
void textPack.GenTextFile.main(java.lang.String[])
How should I go about it?
Thanks for your help.
-Sreekanth Varidhireddy -
Urg:Executing SQL From Java App using Jdbc Driver
Hi
I am using JDBC Driver version 9.0.1.1.0.
I am running this in Thin Client Mode
My Code Snippet Looks Like This:=
==========================================================
String url = "jdbc:oracle:thin:@localhost:1521:VpDb";
String userName = "scott";
String password = "tiger";
Connection conn = null ;
Statement st = null ;
ResultSet rs = null ;
String categoryCode="ABC";
try
conn = DriverManager.getConnection (url, userName, password);
st = conn.createStatement ();
String sqlStatement = "Select Count(*) From News Where CategoryCode=" +"\'" + categoryCode + "\'" + ";";
System.out.println(sqlStatement);
rs = st.executeQuery ( sqlStatement );
if( rs.next() )
System.out.println("Headline Exists");
else
System.out.println("No Headline Exists");
catch (SQLException e )
System.out.println();
System.out.println (" SQL ERROR IN IS_NEWS_EMPTY: " + e) ;
=========================================================
I have added the classes12.zip and nls_charset12.zip in the classpath.
Now when i run this it gives me an error saying the following error message:-
SQL ERROR IN IS_NEWS_EMPTY: java.sql.SQLException: ORA-00911: invalid character
Can anyone help me with this as to whats going wrong because the exact equivalent of my sqlStamenet runs on SQL command line but not from java code.Why??
Any Help appreciated
Thanks
MumI think it is complaining about the ";" that you add at the end of your string. You don't need to add that to the query.
-
New e-Sourcing 5.0 Install - Error checking JDBC Driver version
Hi All,
I am currently attempting to install an e-Sourcing 5.0 Patch Level E instance on a Windows system using Oracle 10.2.0.3 and WebLogic 8.1 SP4. e-Sourcing's installation and configuration complete without issue. The schema in the database is loaded with the e-Sourcing tables and data.
However, when attempting to deploy the ear file via WebLogic, I receive the following JDBC error:
Error checking JDBC Driver version. Detail: Error: found unsupported JDBC Driver name: Oracle JDBC driver version: 10.1.0.2.0.
The JDBC driver in use is from my Oracle install ..\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar
I've also tried classes12.jar for versions 9.2.0.8, 10.1.0.2, and 10.2.0.1 but always receive the same error (...driver version: 10.1.0.2.0...) message regardless of the version of driver I am using.
Error Log:
*** Starting Frictionless SRM (5.0.00 E build 08-Apr-2008.16:46) 2009-10-14 20:33:40.656 local3 DEBUG class=ConfigDatabase;server=CAGTAW804886;method=loadFromServletContext();thread=ExecuteThread: '4' for queue: 'weblogic.kernel.System' Cached weblogic.httpd.servlet.reloadCheckSecs=-1 from servlet context
2009-10-14 20:33:40.681 INFO local3 ExecuteThread: '4' for queue: 'weblogic.kernel.System' Disabling logging blackbox support
Unable to start server: unable to connect to the database: oracle [localhost:1521:orcl (SAP/SAP)]:0 reason: Error checking JDBC Driver version. Detail: Error: found unsupported JDBC Driver name: Oracle JDBC driver version: 10.1.0.2.0. Exiting.
Given that the database is loaded with the tables and data I know my instance can connect to the DB. Does anyone know why the deployment would complain that the JDBC driver is incorrect? Is there a way to disable the check and complete the server startup? Is there only a single specific driver that is acceptable for this e-Sourcing version?
Thanks,
Greg
Edited by: Greg Stewart on Oct 15, 2009 3:20 PMThe issue is still occurring.
The Supported Platform documentation indicates that the Oracle JDBC thin driver 10.2.0.1.0 is the supported driver. I have tried both the Classes12.jar and ojdbc14.jar for this version of driver.
What is odd about this error is that it always displays the same message and version #, no matter what version of driver I use.
"found unsupported JDBC Driver name: Oracle JDBC driver version: 10.1.0.2.0" (I execute setup and configuration each time I use a different driver to ensure the ear file is updated)
I have also tried using a different Driver Class path. The installation guides for 5.0 and 5.1 indicate Driver Class as oracle.jdbc.driver.OracleDriver. I have also tried oracle.jdbc.OracleDriver for a few of the versions with no success. I still receive the same error at the same point.
If anyone has run into a similar situation any suggestions or tips to resolving the issue would be appreciated.
Thanks,
Greg -
Why DatabaseMetaData.getTypeInfo () is NULL when use JDBC Driver 9.2.0.5 to connect Oracle 9.0.1.1.1 database?
In the following links
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#02_02
the segment "Which JDBC drivers support which versions of Oracle Database?" tells us that JDBC Driver 9.2.0.5 can support Oracle 9.0.1.1.1 database.
thanks!ERROR --- java.sql.SQLException: ORA-01722: 无效数字
-
My computer recently froze whilst updating Itunes, and has subsequently removed Itunes from my computer. When i have tried to reinstall the programme, i get the following error message "Invalid Drive:G:\" any ideas?
Try the following user tip:
"Invalid drive X:\" install errors -
Initialization error: Loading jdbc driver
Hi ,
In a file-XI-JDBC scenario, i am getting this error. "Initialization error: Loading jdbc driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver' failed: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver".
but i have installed/deployed third party SQL driver on J2ee server thru SDM.
Can any one sort out this problem.
Rgds
SridharHi,
try looking into the log viewer in Vsual Administrator. Usually you can find more information about the problem there.
Also try redeploying the driver again.
cheers,
naveen -
Runtime error - class not found using JDBC driver and thin client
Hi,
We are running a small Java application on a Sun server which acts as a thin client connecting to an Oracle 8i server running on a different server.
JDK version: 1.3.1_01
OS version: Solaris 7
JDBC classes file: classes12.zip
It compiles fine, but get a runtime error (the DriverManager.registerDriver method )
cruncher [40]% javac -classpath /export/home/mrscot/classes12.zip JDBCtest.java
cruncher [41]% java JDBCtest
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
at JDBCtest.main(JDBCtest.java:7)
cruncher [42]%
Program:
import java.sql.*;
import java.math.*;
class JDBCtest {
public static void main (String args []) throws SQLException {
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection(
"jdbc:oracle:thin@xxxxxxxxx:1521:xxxx", <userid>,<password>);
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery (".............");
while (rset.next ())
System.out.println (rset.getString ("......."));
rset.close();
stmt.close();
conn.close();
} catch (Exception e) {
System.out.println("Error: " + e);
Any ideas? Probably something very, very stupid I'm overlooking!
Thanks
Scotty ([email protected])Supplementary question:
Hi,
We are running a small Java application on a Sun server which acts as a thin client connecting to an Oracle 8i server running on a different server.The Oracle version is 8.1.6
Will the 'classes12.zip' for 8.1.7 work with
1.3.1 of the Java JDK, and Oracle 8i 8.16 ??
Thanks Scotty -
JDBC runtime error using data source (Oracle 9i server & Oracle 8i client)
Hi,
Wud someone help me with this? Why am I getting this run-time error?
D:\shilpa\javaprogs>java -classpath %classpath%;.; CreateMovieTables
javax.naming.NoInitialContextException: Need to specify class name in environmen
t or system property, or as an applet parameter, or in an application resource f
ile: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
40)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
a:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at CreateMovieTables.initialize(CreateMovieTables.java:18)
at CreateMovieTables.main(CreateMovieTables.java:101)
This is how I have created the data source:
public void initialize() throws SQLException, NamingException
Context initialContext = new InitialContext();
DataSource dataSource = null;
dataSource = (DataSource) initialContext.lookup("jdbc/Oracle");
connection = dataSource.getConnection();
I have set the classpath to: C:\j2sdk1.4.2_08\jre\lib where the jndi.properties file exists.
Here's the jndi file:
datasource.name=jdbc_1
datasource.url=jdbc:oracle:thin:@10.119.5.98:1521:sea77db0
datasource.classname=oracle.jdbc.driver.OracleDriver
datasource.username=tr1
datasource.password=tr1
What am I doing wrong? Cud someone help me with this? It's working fine when I don't use the data source. Maybe I am doing something wrong.
Regards,
Shipf1After reading your posts, I noticed that my eyes were bleeding...
Wud someone help me with this?
Cud someone help me with this?
Thanks. It worked. BUt, IF i wanna ...
I don't[b] wanna...
what shud i do then?
Thought I should return the favor encapsulating the essence of this writing style:
So, IF i cud, I wud, but If i don't wanna shud i anyway?
Just funnin around... Good luck on your problem though.
Darn it, my eyes are bleeding again! -
Point Database tutorial but using Derby Database in NetBeans IDE
Hi
I am getting an error when I am trying to run the EJB Entity beans BMP example "savingsaccount" in the examples folder of j2eetutorials .
I have using NEtBeans IDE + Sun APP server and the following the tutorial Netbeans + J2ee tutorials...
THe problem is the tutorial talks about a "pointdatabase" 8.1 verson and the Sun App Server I have is 8.2 which has "Derby Database".
However I made the necessary changes in the code. Siill the error is someting like this :
"ar 27, 2006 3:40:57 AM com.sun.corba.ee.spi.logging.LogWrapperBase doLog
INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specified host/port: all interfaces/1366"
Exception is caught: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: ejbCreate: Invalid argument: parameter index 1 is out of range.
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: ejbCreate: Invalid argument: parameter index 1 is out of range.
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:161)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:142)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at bank._SavingsAccountRemoteHome_DynamicStub.create(_SavingsAccountRemoteHome_DynamicStub.java)
at savingsaccountclient.Main.main(Main.java:64)
Caused by: java.rmi.RemoteException: ejbCreate: Invalid argument: parameter index 1 is out of range.
....and more...
So I am not sure whether this is some fault of the application or the database access errior...?
Someone who tried this let me know plz...
thanks
deepeshMicrosoft SQL Driver 2005 JDBC Driver is not the Derby driver.
You need the correct JDBC driver for the database you are using, you can't simply grab the first one you find. -
Oracle jdbc driver error: oracle.jdbc.driver.T4C8Oall.getNumRows
Dear All,
I encounter this error in my application when I call storedprocedure with spring helper class: StoredProcedure
and my env is as follow:
spring 2.5.6
oracle 10g
oracle jdbc driver:10.2.0.1
websphere portal 5.1
this error is occur from time to time randomly, when it happens, the only workaround is to restart the portal server..Does anyone have any idea about this error?
ERROR [Thread-Servlet.Engine.Transports : 6] 2010-04-02 03:08:02,063 AuditReportSupportManagerImpl.getAuditReportLink(24) | java.lang.NullPointerException
at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java(Compiled Code))
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:975)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4400)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:617)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:401)
at org.springframework.jdbc.core.JdbcTemplate$5.doInCallableStatement(JdbcTemplate.java:987)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:936)
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java(Compiled Code))
at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:117)
at com.hsbc.gbm.grt.raven.gui.procedure.BaseStoredProcedure.getSourceMap(BaseStoredProcedure.java:181)
at com.hsbc.gbm.grt.raven.gui.common.dao.impl.AuditReportSupportDaoImpl.getAuditReportLink(AuditReportSupportDaoImpl.java:21)
at sun.reflect.GeneratedMethodAccessor686.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java(Compiled Code))
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java(Compiled Code))
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java(Compiled Code))
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java(Compiled Code))
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy114.getAuditReportLink(Unknown Source)
at com.hsbc.gbm.grt.raven.gui.common.service.impl.AuditReportSupportManagerImpl.getAuditReportLink(AuditReportSupportManagerImpl.java:21)
at com.hsbc.gbm.grt.raven.gui.common.util.Util.auditReportLinkHelper(Util.java:711)
at com.hsbc.gbm.grt.raven.gui.collateral.web.EligColatMapSumRespPro.doProcess(EligColatMapSumRespPro.java:50)
at com.hsbc.esf.requestprocessing.impl.ResponseProcessor.process(ResponseProcessor.java:42)
at com.hsbc.esf.requestprocessing.eventmapping.impl.ProcessorEventMappingAction.execute(ProcessorEventMappingAction.java:99)
at com.hsbc.esf.requestprocessing.portlet.eventmapping.PortletSuspendEventMappingAction.execute(PortletSuspendEventMappingAction.java:147)
at com.hsbc.esf.requestprocessing.eventmapping.impl.DefaultEventMapping.process(DefaultEventMapping.java:213)
at com.hsbc.esf.requestprocessing.flow.eventmapping.FlowEventMappingHandler.doProcess(FlowEventMappingHandler.java:117)
at com.hsbc.esf.requestprocessing.flow.eventmapping.FlowEventMappingHandler.process(FlowEventMappingHandler.java:70)
at com.hsbc.esf.jsf.requestprocessing.lifecycle.portlet.impl.AbstractLifecycle.render(AbstractLifecycle.java:166)
at com.hsbc.esf.jsf.requestprocessing.eventmapping.portlet.AbstractJSFEventMappingHandler.processRender(AbstractJSFEventMappingHandler.java:315)
at com.hsbc.esf.jsf.requestprocessing.eventmapping.portlet.AbstractJSFEventMappingHandler.process(AbstractJSFEventMappingHandler.java:283)
at com.hsbc.esf.requestprocessing.eventmapping.impl.ProcessorInvokerInterceptor.preProcess(ProcessorInvokerInterceptor.java:54)
at com.hsbc.esf.requestprocessing.impl.AbstractInterceptor.process(AbstractInterceptor.java:45)
at com.hsbc.esf.requestprocessing.impl.AbstractInterceptor.process(AbstractInterceptor.java:47)
at com.hsbc.esf.requestprocessing.impl.AbstractInterceptor.process(AbstractInterceptor.java:47)
at com.hsbc.esf.requestprocessing.impl.AbstractInterceptor.process(AbstractInterceptor.java:47)
at com.hsbc.esf.requestprocessing.impl.AbstractInterceptor.process(AbstractInterceptor.java:47)
at com.hsbc.esf.requestprocessing.impl.AbstractInterceptor.process(AbstractInterceptor.java:47)
at com.hsbc.esf.requestprocessing.impl.InterceptorChain.process(InterceptorChain.java:54)
at com.hsbc.esf.requestprocessing.portlet.impl.PortletFrontController.processRenderRequest(PortletFrontController.java:213)
at com.hsbc.esf.requestprocessing.portlet.impl.PortletFrontController.doRenderService(PortletFrontController.java:121)
at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:483)
at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:453)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.render(PortletFilterChainImpl.java:144)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:131)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doPost(PortletServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:256)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:204)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:97)
at com.ibm.wps.pe.pc.std.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:110)
at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:545)
at com.ibm.wps.pe.ext.render.AbstractRenderManager.performService(AbstractRenderManager.java:251)
at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:100)
at com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:155)
at org.apache.jsp._Control._jspService(_Control.java:1933)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java(Inlined Compiled Code))
at com.ibm.wps.engine.templates.skins.Default.render(Default.java(Compiled Code))
at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java(Compiled Code))
at com.ibm.wps.composition.elements.Component.render(Component.java(Compiled Code))
at com.ibm.wps.composition.elements.Control.render(Control.java:182)
at com.ibm.wps.composition.Composition.render(Composition.java(Compiled Code))
at com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java(Compiled Code))
at com.ibm.wps.model.ModelUtil$WrappedCompositionModel.render(ModelUtil.java:832)
at org.apache.jsp._UnlayeredContainer_2D_V._jspService(_UnlayeredContainer_2D_V.java:107)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java(Inlined Compiled Code))
at com.ibm.wps.engine.templates.skins.Default.render(Default.java(Compiled Code))
at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java(Compiled Code))
at com.ibm.wps.composition.elements.Component.render(Component.java(Compiled Code))
at com.ibm.wps.composition.Composition.render(Composition.java(Compiled Code))
at com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java(Compiled Code))
at com.ibm.wps.model.ModelUtil$WrappedCompositionModel.render(ModelUtil.java:832)
at org.apache.jsp._UnlayeredContainer_2D_H._jspService(_UnlayeredContainer_2D_H.java:123)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java(Inlined Compiled Code))
at com.ibm.wps.engine.templates.skins.Default.render(Default.java(Compiled Code))
at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java(Compiled Code))
at com.ibm.wps.composition.elements.Component.render(Component.java(Compiled Code))
at com.ibm.wps.composition.Composition.render(Composition.java(Compiled Code))
at com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java(Compiled Code))
at com.ibm.wps.engine.tags2.PageRenderTag.doStartTag(PageRenderTag.java:397)
at org.apache.jsp._Home._jspService(_Home.java:135)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java(Compiled Code))
at com.ibm.wps.engine.templates.screens.Default.render(Default.java:91)
at com.ibm.wps.engine.templates.ScreenTemplate.render(ScreenTemplate.java:61)
at com.ibm.wps.engine.tags2.ScreenRenderTag.doStartTag(ScreenRenderTag.java:89)
at org.apache.jsp._Default._jspService(_Default.java:8805)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code))
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java(Compiled Code))
at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java(Compiled Code))
at com.ibm.wps.engine.templates.themes.Default.render(Default.java:103)
at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:67)
at com.ibm.wps.engine.phases.WPRenderPhase.processRendering(WPRenderPhase.java:312)
at com.ibm.wps.engine.phases.WPRenderPhase.execute(WPRenderPhase.java:135)
at com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
at com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:93)
at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:713)no one can help?
-
Error: [SQLServer JDBC Driver]Syntax error at token 0, line 0 offset 0
Hi:
I´m working with system driver at de JDBC connection in VA. When a record is inserted/updated this error is display:
NWMss SQLServer JDBC Driver Syntax error at token 0, line 0 offset 0
The record is inserted/updated but when the operation ends the exception is throw.
I Google the error but I didn´t find how to solve it.
Any idea?
Thanks a lot for your time on this post.
Rocío.Hi,
Rocío Lorena Suárez wrote:
NWMss SQLServer JDBC Driver Syntax error at token 0, line 0 offset 0
I think that you may be trying to construct an SQL query using some logic. Is that right?
I hav encountered this problem when trying these types of code - If possible please debug the code and see if there is any particular case in which the SQL string in which the command is saved becomes null.
When it is null or blank - the SQL Driver will throw such an error.
Also, if you can elaborate more on the problem - I can give you some more help.
Thanks.
p256960 -
ORA-00601 Error using JDBC, Oracle 8i on Linux
Hello,
Spatial is considering using Oracle as its database platform. I was assigned
the task of benchmarking the two platforms. So, I downloaded the latest copy
of Oracle for Linux, version 8.1.6.1.0 ( 8i Enterprise Edition Release 2 ).
I'm using RedHat 6.2, with a 2.2.14-5.0smp kernel. I ran the installer, set
up the databases, and everything seemed to be running quite nicely. I copied
a table and its data from mysql to Oracle, and wrote a java program to
benchmark the two. This java program takes command line arguments, the first
one being the connection URL, the second being the number of threads to
start, the third being the number of operations to complete for each thread.
So, if you pass it connection 35 35, it will open 35 threads, and each
thread will then execute 35 selects, inserts, and updates. These are
hard-coded queries, but they mimic the functionality currently in
production.
Oracle bombs on the update. I turned tracing on, and tried it again, with
the same result. Here's an excerpt from one of the trace files:
*** SESSION ID:(4.1) 2000-06-21 16:36:48.937
kvotenlg: epc_collect failed. EPC error: -1073751468.
CDF: /u01/app/oracle/product/8.1.6/otrace/admin/cdf/styorap0
FDF: /u01/app/oracle/product/8.1.6/otrace/admin/fdf/oracled.fdf
kvotenlg: epc_collect failed. ctx:368.
I was not able to find any information regarding this error. However, this
message ( or one very similar ) appeared in every trace file. I get the
following at the end of the pmon_xxxx.trc file:
Load Indicator not supported by OS !
*** 2000-06-21 17:42:19.122
error 601 detected in background process
And, the following in the alert_sid.log file:
Wed Jun 21 17:42:19 2000
PMON: terminating instance due to error 601
Instance terminated by PMON, pid = 3797
I made the assumption that this error was actually ORA-00601, and took a
peek on the internet for relavent information. The canned error message is
"PMON process runs into lock conflict trying to recovery processes". I found
someone who had a similar problem, who suggested setting mts_max_dispatchers
in the initsid.ora file to 1. However, this did not work.
Basically, when Oracle crashes, the java program is trying to update one
column in 1225 rows, 35 times, for 35 threads. The java exception is below.
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java)
at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java)
at
oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
at
oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java)
at ned.util.database.DBHammerThread.run(DBHammerThread.java:78)
Has anyone seen this kind of behavior before? Is this merely a
misconfiguration on my part? Help! :)
-nedSorry for the long delay in reply. I was using the thin client driver. However, when I switched to the oci8 driver, not only did I observe a 300% increase in speed, but this bizarre occurrence disappeared. I did find one issue with the oci8 driver, as follows.
In this thread program, if I created a connection in the main program before any of the threads were instantiated, and when the first thread attempted to create a connection, it would produce a segmentation fault. This behavior was very easy to replicate, and it did not matter whether or not I close the original connection. This problem was circumvented by moving the code in the "main" program to create its connection after the child threads had created theirs.
Maybe you are looking for
-
i was having problems with my phone so i went into the apple store and it turns out there was a problem with my operating systerm so i got an update in the store. I want to get my contacts and my pictures back from my old iphone but when I was in the
-
How to change color of DHTML sub menu list
Hi all, In my application i am using DHTML submenu list. But I have to change the color of the menu list which is selected currently. In interactive report how to fix the column width , because if one column has big string it's going to the right sid
-
QM Notification: task end dates not pulled through from response profile
Hello, I am experiencing a problem with the end dates of the tasks in QM notifications not pulling through (from the response profile) when tasks are determined. When I do the simulation of task determination, the gantt chart shows all the tasks toge
-
Possible iPhone bug with custom recurring day schedule? Need help.
In Microsoft Outlook I have a 64 day schedule that is set up as single all day recurring events each day. Each day of the 64 day schedule recurrs every 64 days. Day 1 recurrs every 64 days, day 2 recurrs every 64 days, etc., etc. When I synced this t
-
Firefox 5.0.1 hangs on certain pages and won't shut down - even in Task Manager
Using Windows XP Media Home Edition. Whenever I visit certain sites (today it was ktlk.com) Firefox becomes unresponsive and won't shut down - even using Task Manager. The only way to use Firefox again is to re-boot the computer. No error report.