Jdbc error : ClassNotFoundException
I have code that is to access a Sybase database. The abbreviated code is below:
import java.io.*;
import java.sql.*;
import java.lang.*;
class connectest
public static void main(String argv[])
String url = "jdbc:sybase:Tds:155.133.288.155:5009";
String driver = "com.sybase.jdbc2.jdbc.SybDriver"
Connection con = null;
try
String imTable = "Trans";
String startDate = "02/01/2001";
String endDate = "05/20/2001";
ResultSet rs = null;
Class.forName(driver);
con = DriverManager.getConnection( url, "joe", "password" );
Statement s = con.createStatement();
s.execute( "SELECT Amount" +
"FROM Trans " +
"WHERE TradeDt = " + startDate );
while (true)
rs = s.getResultSet();
int rowcount = s.getUpdateCount();
if (rowcount != -1)
System.out.println("count = " + rowcount);
if (rs == null && rowcount == -1)
break;
s.getMoreResults();
catch (SQLException se)
System.out.println("SQL Exception: ");
System.out.println( se.getMessage() );
System.exit(1);
catch (Exception e)
System.out.println("Connection attempt to " + con + " via " + driver + " has failed.");
System.out.println(e);
System.exit(0);
The error I get is:
Connection attempt to null via"com.sybase.jdbc2.jdbc.SybDrive has failed.
java.lang.ClassNotFoundException: com.sybase.jdbc2.jdbc.SybDrive
My guess is that I must add something to the CLASSPATH so javac can use/see com.sybase.jdbc2.jdbc.SybDrive. But actually I haven't created a CLASSPATH yet because I have not needed one yet. How would I set up the CLASSPATH to resolve this error.? Or is there another solution.
Thanks,
George
Yor are right you need a jar file jconn2.jar with the classes.
How you put it in a classpath depends a bit on which environment you are using. If you are using something like the Java SDK with command line interface then you can either set an environment variable of CLASSPATH or supply it to javac, java etc. with -classpath
For values you should have . (i.e. your current directory) and the path to any directories with class files (e.g. c:\java\myutilclasses) plus explicit definition of jar files (e.g. c:\sybase\lib\jconn2.jar)
So your classpath might be:
.;c:\java\myutilclasses;c:\sybase\lib\jconn2.jar
N.B. When I last used Solaris the separator between classpath items was : whilst for Windows it's ;
If you are using an IDE, e.g. JBuilder, Forte there will probably be a window for defining classpath (maybe as osurce paths and required libraries)
Similar Messages
-
I have developed Java web application which uses Crystal Report 2013 , java 1.6 , Windows 32 bit System, All the reports are loading fine in the Following environment
Development Environment
Windows7 Professional Service pack 1 -32 bit
Java - 1.6
Internet Explorer 11
Oracle Client 10g 32 bit ODBC driver
Testing Environment
Windows Server 2008 R2 Enterprise - 64 bit
java 1.6
Internet Explorer 9
Oracle Client 11g 62 bit ODBC driver
While loading reports in the 64 bit server the error occurs
ERROR reports.reportdefinition : com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
ERROR dataengine.datasource : Failed to read next recurring database record: database row set error.
com.crystaldecisions.reports.reportdefinition.datainterface.j: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
at com.crystaldecisions.reports.reportdefinition.datainterface.q.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.m(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.l(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.ab(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.if(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.h(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.i.h(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bf.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ca.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.a9.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.m.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.m.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.void(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.aE(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
at com.erm.controller.ALMReportsController.queryDll(ALMReportsController.java:1681)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.erm.authentication.HttpSecurityFilter.doFilter(HttpSecurityFilter.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.l.bN(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.eg(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.e(Unknown Source)
at com.crystaldecisions.reports.queryengine.b2.f(Unknown Source)
at com.crystaldecisions.reports.queryengine.b2.dy(Unknown Source)
... 89 more
Caused by: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getBigDecimal(Unknown Source)A few things to note:
1) Crystal Report 2013 doe snot install any SDK. Thus the assumption is that you are using CR from teh following link:
SAP BusinessObjects - SAP Crystal Reports, Version For Eclipse Download
2) Since you are using a 64 bit connection (Oracle Client 11g 62 bit ODBC driver) you will have to make sure you are using 64 bit JVM. Otherwise, follow Dell's advice and use a 32 bit ODBC datasource.
3) On one test you are using Oracle Client 10g 32 bit ODBC driver and the other you are using Oracle Client 11g 64 bit ODBC driver. You might want to see if you can run your app using Client 11g 32 bit ODBC driver.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada -
Hi,
i am using XI7.0, Sender JDBC error is below;
when i test to connect to Oracle DB in using JAVA Code with ojdbc14.jar which was deployed into XI J2EE, i have no problem with insert update delete in using same code which was used in JDBC adapter in Configuration Time.
but JDBC Adapter on XI(JDBC2JDBC) is not running as well.
please look at the following and please guide.
JDBC Driver : oracle.jdbc.driver.OracleDriver
connection : jdbc:oracle:thin:@60.7.111.211:1577:AACC
S_SSS_MMM_JDBC_MDMALL001CU Sender Adapter v1402 for Party '', Service 'SSS_BS01_TESTBS01_D':
Configured at 12:29:23 2006-07-10
Last message processing started 12:29:55 2006-07-10
Error: Sending message '4299fec0-0fb4-11db-c508-000d604dde82' - failed with unexpected exception - proceed anyway: java.lang.ClassCastException: $Proxy222
last retry interval started 12:29:55 2006-07-10
length 10,000 secs
does anyone know how to fix it?
thanks
venjaminHi Venjamin,
Just try the follwing,
1. The Select Query in your Sender JDBC adapter. Try executing the same query on your DB client and check if it works fine and the data returned by it is of valid format?
2. Is any of the datatype being returned a CLOB or BLOB?
Regards,
Bhavesh -
Intermittent JDBC error in Enhanced Receiver Determination
Hi,
I have an interface that use Enhanced Receiver Determination in PI 7.1 EHP1.
The database is DB2 on i5/os 6.1
Sometimes message ends in error :Error when determining the receiver: Problem while determining receivers using interface mapping: Runtime exception occurred during application mapping com/sap/xi/tf/_HI01_to_ReceiverDetermination_;
But the same message with same values is successfull earlier.
This is not a design problem; the interface is working well 95% of the time.
I found some JDBC error in NWA java logs:
Error in sax handler parsing request: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [SQL0104] Token "BUSINESS_SYSTEM" was not valid. Valid tokens: FOR SKIP WITH FETCH ORDER UNION EXCEPT OPTIMIZE.
Error when calling an adapter by using the communication channel CC_RECEIVER_JDBC_PIDB2 (Party: *, Service: INTEGRATION_SERVER_PX1, Object ID: cb7ea38fb2ac3a06b12d79f5ade2bcf7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [SQL0104] Token "BUSINESS_SYSTEM" was not valid. Valid tokens: FOR SKIP WITH FETCH ORDER UNION EXCEPT OPTIMIZE.'.
Thrown:
com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [SQL0104] Token "BUSINESS_SYSTEM" was not valid. Valid tokens: FOR SKIP WITH FETCH ORDER UNION EXCEPT OPTIMIZE.'.
at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214)
at com.sap.aii.af.service.api.AdapterAccess.execute(AdapterAccess.java:283)
at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:119)
at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:76)
at com.sap.aii.mapping.lookup.DataBaseAccessor.execute(DataBaseAccessor.java:74)
at com.sap.aii.mappingtool.flib7.SelectSingle.selectSingle(SelectSingle.java:54)
at sun.reflect.GeneratedMethodAccessor607.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
Any idea? Can high volume cause the JDBC Receiver to fail?
Martinhi,
you r trying to impliment Lookup for the file adapter which is not synch in nature and hance u r not getting the responce back.
please find the link which deals with how to impliment lookup for file adapter.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/file%252blookup%252bin%252budf.
now once u get rhe runtime receiver u can perform enhanced receiver determination (write a simple UDF)
regards,
navneet. -
SQL Server 2000 Driver for JDBC - Error establishing sockets
Hi there
I am using Microsoft SQL Server 2000 Driver for JDBC to connect to SQL Sever 2000. It is just a test application to see if it would connect to the datacase successfully. But I got the following errors. I already set up the classpath and installed all SQL Server 2000 Driver for JDBC sp 3. Dont know why it still failed...can anyone help me out of this? Thanks.
When i am using simple JDBC-ODBC bridge Driver it's working fine.
For this Server Pack3 , i have checked every thing like--
TCP / IP Poart is Enable.
I am working in client machine, my MSSQLServer 2000 Placed in server Machine.
when i am giving Telnet ServerIP 1433 it's giving following response.
connecting to ServerIP ....... could not open connection to the host , on port 1433:connection Failed
My Sample Code is :--
String user="sa";
String password="imcindia";
Connection con1 = null;
CallableStatement cstmt = null;
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
con1=DriverManager.getConnection("jdbc:microsoft:sqlserver://ServerName:1433;DatabaseName=dmo1o2d",user,password);
Statement st=con1.createStatement();
st.execute("use dm0102d");
st.execute("setuser 'dm01012'");
cstmt = con1.prepareCall("{?=Call dms_ex_create_folder('ABC','18753','NB21','u')}");
cstmt.execute();
Here are Error Code :
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection refused: connect
at java.sql.DriverManager.getConnection(Unknown Source)
at TestConnection1.main(TestConnection1.java:24)
one can help me to over come this problm,
Thanks in advance.
venkathey i also have this problem i have been looking for solution for this problem for along time i tried every possible solution i tried every service pack for the SQL but it didn't connect to the port!!!
it's a network problem ur java code is correct dont worry about it.
finally i had to install MySQL and it's work fine now but if u insist on usning SQL u have to use the JDBC-ODBC Bridge it will work by :
first add data source database , follow these steps
1- go to Administrative tools
2-Data Sources(ODBC)
3-System DNS tab and add then choose SQL SERVER the last option then finish
4-write the name; Note: this name is the one that u will write in ur URL for example if u write Hello the URL will be "jdbc:odbc:Hello"
5- choose the server, its recommended to write "." or (local)
6-change the database to its an important step to choose the database that u want to use, choose northwind if u want to use it
finish
second
adding this code:
import java.sql.*;
class JdbcTest1 {
public static void main (String[] args) {
try {
// Step 1: Load the JDBC driver.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// Step 2: Establish the connection to the database.
String url = "jdbc:odbc:Hello";
Connection conn = DriverManager.getConnection(url,"user1","password");
} catch (Exception e) {
System.err.println("Got an exception! ");
System.err.println(e.getMessage());
it will work without any problems -
JDBC error in PreparedStatement using TimesTen 6.0.3
TimesTen supports this kind of sql statement
select rows 3 to 5 * from products
(it returns 2 rows started from row #3)
I want to implement this in java thru JDBC
PreparedStatement pstmt = con.prepareStatement(select rows ? to ? * from products);
pstmt.setInt(1,3);
pstmt.setInt(2,2);
However, I got a JDBC error in the PreparedStatement line
java.sql.SQLException: [TimesTen][TimesTen 6.0.3 ODBC Driver][TimesTen]TT1001: Syntax error in SQL statement before or at: "?", character position: 13 -- file "ptSqlY.y", lineno 1955, procedure "sbPtParseSql()"
Anyone encounter this kind of error before? How to solve it?
Thanks!
Wellwin
P.S. I am running this in Linux platform with JDBC driver come with TimesTen for java 1.4Hi Wellwin,
Using SELECT ROWS m to n, you cannot parameterise m or n in order to provide them at execution time. They have to be explicitly stated as literals in the statement
If you need to use this with several different values for m and n, there are a couple of options:
1) Prepare (and subsequently execute) a different prepared statement for each combination of m and n that you need. This may be fine if there are only a small number of combinations but not a good choice if there are many combinations.
2) Just use a regular SELECT (without the ROWS m TO n clause) and skip the rows in the application code.
Simon -
IDOC to JDBC :Error using JDBC
Hi Frnds,
My scenario is Idoc to JDBC scenario, I am getting the follwoing error while trying to process an idoc. Please help me in hadling this error.
Error Message:
JDBC message processing failed; reason Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'jdbc:microsoft:sqlserver://180.1.32.194:1433;DatabaseName=CZZ03;': SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
Regards,
ShivHello Shiva,
Are you installed JDBC Drivers?
Go through this links,
/people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1246926,00.html
To install JDBC driver follow the how to guide.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
Configuration of JDBC Adapter for SQL Server
JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
UserID and Password.
If the connection is not working find the correct port number.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40b92770-db81-2a10-8e91-f747188d8033
JDBC- X I - R/3 Scenario
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
Please check the driver path as mentioned below.
JDBC Driver : sun.jdbc.odbc.JdbcOdbcDriver
Connection:jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//location of DB table.mdb;
No JDBC driver required.
Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
follow this thread
Re: Problem when connecting to MS Access through JDBC Adapter.
SAP Note 850116 has details
Thanks,
Satya Kumar
Reward if it is usefulll -
I get this error when I try to connect my applet through JDBC:
Error null: Unexpected Packet. Type = 0
I have punch a hole on my firewall to allow my jdbc thin to hit
directly to oracle database.
If you have an answer for my problem, please email me at
[email protected]
Thanks a bunch,
-ed-
nullHi ,
Use following String
http://<Hostname>:<PortNo>/ftpjdbc
This can be used to check whether FTP and JDBC Drivers are properly deployed and connection can be done or not.
Select JDBC . Then :
Driver Class (fully qualified) : com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC URL : jdbc:sqlserver://255.255.255.255:8888;databasename=Dummy
USERNAME : DUMMY
PASSWORD : DUMMY
and enter valid values and then press connect
Then In response you will see connection will be established and then closed , any else response means there is some problem...
Regards
Prabhat Sharma. -
Hi all,
I try to install PTG 1.0.2 with apache server (version 1.3.9 with jserv 1.1) on windows NT. I follow install instructions and when I try to access test page (test.jsp), the page colud not be displayed, and the following error is added in the mod_jserv.log file :
(error) ajp12: Servlet Error : ClassnotFoundException : oracle.jsp.JSPservlet.
All input are welcome ?
nullHello!
I've got the same problem and I think it has something to do with the jserv.conf file.
According to the installation guide, the following line should be added:
ApJServAction .jsp /servlets/oracle.jsp.JspServlet
In the same file I have the following line:
ApJServMount /servlets /root
So /servlets is mounted on /root. I don't knoww what this /root pints to, but I think the problem is that this path does not lead to oracle.jsp.JspServlet.
Has ANYONE yet solved this problem? -
Servlet Error: ClassNotFoundException: oracle.jsp.JSPServlet
Hi,
I try to install PTG 1.0.2 with apache server (1.3.9 with jserv 1.1) on windows NT. I follow install instructions and when I try to access test page (test.jsp), the page colud not be displayed, and the following error is added in the mod_jserv.log file :
(error) ajp12: Servlet Error : ClassnotFoundException : oracle.jsp.JSPservlet.
What can I do ?
All input are welcome ?Hello!
I've got the same problem and I think it has something to do with the jserv.conf file.
According to the installation guide, the following line should be added:
ApJServAction .jsp /servlets/oracle.jsp.JspServlet
In the same file I have the following line:
ApJServMount /servlets /root
So /servlets is mounted on /root. I don't knoww what this /root pints to, but I think the problem is that this path does not lead to oracle.jsp.JspServlet.
Has ANYONE yet solved this problem? -
Ajp12: Servlet Error: ClassNotFoundException:
I get this error in the mod_jserv.log
"(ERROR) ajp12: Servlet Error: ClassNotFoundException: BONDS.MENU_BONDS.show"
This error is caused by http://www.myserver.com/servlet/BONDS.MENU_BONDS.show
which returns "The page cannot be found".
Then when I try http://www.myserver.com/pls/portal30/BONDS.MENU_BONDS.show?
it works.
I really need to have the servlet working because I lost some functionality.
Any help would great!
Thanks.I suppose you have to check your NT CLASSPATH variable. It should contain all the classpaths for JDK, JAR & ZIP files correctly.
If it doesn't mail me.
APK -
(ERROR) ajp12: Servlet Error: ClassNotFoundExcept
When i try to reach an URL http://10.20.108.3/servlets/ThreeParamsForm.htm, i receive the following error : [05/11/2002 15:27:53:211] (ERROR) ajp12: Servlet Error: ClassNotFoundException: ThreeParamsForm.htm.
Can anyone help me ?
Thanks in advanceI am assuming you are using apache/tomcat.
The url doesn't look right. Usually they look like
http://[ip address]/[web app]/servlet/[servlet name]
If you have used servlet-mapping to map ThreeParamsForm.htm to a servlet then you should be able to use
http://[ip address]/[web app]/ThreeParamsForm.htm
where [web app] is a directory under TOMCAT_HOME/webapps -
BI Publisher and TomCat JDBC error
Hey Folks,
I have BI Pulbisher up and running in a cluster mode on a Solaris box with a shared folder such as (/u01/app/BI_Publisher/xmlp) as the file path in WEB-INF\xmlp-server-congfig.xml. All my reports and XMLP configuration folders are stored in that directory (ie. Admin, DemoFiles, Reports, Tools etc..). BI Publisher is up and running under the tomcat user id.
My OBIEE directory is contained in /opt/oracle/app/OracleBI....
Now when I deployed the xmlpserver.war file and configure my connections, everything was working properly.
Now I see the following exception being thrown in the tomcat logs. This error msgs are inserted to the logs every second and it will fill up the log file in a matter of hours which makes the BI Publisher go down.
I have to erase the logs and re-cycle the tomcat server and everything is fine again, but these msgs keep filling up the logs.
How can i solve this issue of "Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'"?
Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:730)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at org.quartz.utils.PoolingConnectionProvider.getConnection(PoolingConnectionProvider.java:172)
at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:553)
at org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin(JobStoreTX.java:1321)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2338)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2369)
Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:730)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at org.quartz.utils.PoolingConnectionProvider.getConnection(PoolingConnectionProvider.java:172)
at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:553)
at org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin(JobStoreTX.java:1321)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2338)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2369)
Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:730)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at org.quartz.utils.PoolingConnectionProvider.getConnection(PoolingConnectionProvider.java:172)
at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:553)
at org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin(JobStoreTX.java:1321)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2338)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2369)
Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:730)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at org.quartz.utils.PoolingConnectionProvider.getConnection(PoolingConnectionProvider.java:172)
at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:553)
at org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin- ClusterManager: Error managing cluster: Failed to obtain DB connection from data source 'myDS': org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver', cause: oracle.jdbc.OracleDriver
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'myDS': org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver', cause: oracle.jdbc.OracleDriver [See nested exception: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver', cause: oracle.jdbc.OracleDriver]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:570)
at org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin(JobStoreTX.java:1321)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2338)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2369)setpath for the bijdbc.jarfor OBIEE and ojdbc.jar for Oracle DB file .
that should resolve this library not found error. -
Connection mysql jdbc error ?
I have program java likes this :
import java.sql.*;
public class LoadDriver {
// Define the JDBC Driver and the database connection URL
public static final String DRIVER = "com.mysql.jdbc.Driver";
public static final String URL = "jdbc:mysql://localhost/java?user=test&password=test";
public static void main(String args[]) {
Connection conn = null;
Statement select = null;
ResultSet result = null;
try {
// load the driver dynamically
Class.forName(DRIVER);
// connect to the database
conn = DriverManager.getConnection(URL);
// perform a query. first create a Statement object from the connection
select = conn.createStatement();
// next execute a query (SQL string) and return the results in a ResultSet object
result = select.executeQuery("select fname, lname from names order by lname, fname");
// print out the results
while(result.next()) {
String fname = result.getString("fname"); // note these match the columns in the
String lname = result.getString("lname"); // SELECT statement (fname, lname)
System.out.println(fname+" "+lname);
// check if there was a problem executing the SQL statement
catch (SQLException e) {
System.err.println("SQL Exception: "+e.getMessage());
System.exit(1);
// if the JDBC driver is not in the CLASSPATH
catch (ClassNotFoundException e) {
System.err.println("Class not found: "+e.getMessage());
System.exit(1);
// catch any other exceptions
catch (Exception e) {
System.err.println("Other Exception: ");
System.err.println(e.getMessage());
System.exit(1);
// You want to close the connections no matter what happens!
finally {
try {
// close the result, query, and database connection
if (result != null) result.close();
if (select != null) select.close();
if (conn != null) conn.close();
catch (SQLException e) {
// one of the new cases where it's OK to just eat exceptions or at the most log them
System.err.println("Error closing connection: "+e.getMessage());
but i get errror likes this :
D:\Program Files\Java\jdk1.5.0_03\bin>javac LoadDriver.java
D:\Program Files\Java\jdk1.5.0_03\bin>java LoadDriver
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Sign
ature
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at LoadDriver.main(LoadDriver.java:20)
D:\Program Files\Java\jdk1.5.0_03\bin>
I place mysql.jar in
- D:\Program Files\Java\jdk1.5.0_03\jre\lib\ext
- D:\Program Files\Java\jdk1.5.0_03\lib
- D:\Program Files\Java\jdk1.5.0_03\jre\lib
and i make classpath to D:\Program Files\Java\jdk1.5.0_03\bin;D:\Program Files\Java\jdk1.5.0_03\jre\lib\ext\
but it still doesn't work
What must I do ?
Thx 4 your replyHello!
I'm getting this same error message and i followed the code example as close as i could:
Thanks for any help on this!
bk
set oldpath=%PATH%
set JAVA_HOME=C:\jdk1.5.0_02
set ANT_HOME=C:\ANT\apache-ant-1.6.5
set PATH=C:\jdk1.5.0_02\bin;%ANT_HOME%\bin
set CLASSPATH=.;C:\jdk1.5.0_02\lib;C:\MYSQL\mysql-connector-java-3.1.10\src\com\;C:\MYSQL\mysql-connector-java-3.1.10\src\org\;C:\MYSQL\mysql-connector-java-3.1.10\mysql-connector-java-3.1.10-bin-g.jar;
http://www.developer.com/java/data/article.php/3417381#Critical_steps_in_using_JDBC
import java.sql.*;
public class Jdbc11 {
public static void main(String args[]){
System.out.println(
"Copyright 2004, R.G.Baldwin");
try {
Statement stmt;
//Register the JDBC driver for MySQL.
Class.forName("com.mysql.jdbc.Driver");
//Define URL of database server for
// database named mysql on the localhost
// with the default port number 3306.
String url =
"jdbc:mysql://localhost:3306/mysql";
//Get a connection to the database for a
// user named root with a blank password.
// This user is the default administrator
// having full privileges to do anything.
Connection con =
DriverManager.getConnection(
url,"root", "");
//Display URL and connection information
System.out.println("URL: " + url);
System.out.println("Connection: " + con);
//Get a Statement object
stmt = con.createStatement();
//Create the new database
stmt.executeUpdate(
"CREATE DATABASE JunkDB");
//Register a new user named auser on the
// database named JunkDB with a password
// drowssap enabling several different
// privileges.
stmt.executeUpdate(
"GRANT SELECT,INSERT,UPDATE,DELETE," +
"CREATE,DROP " +
"ON JunkDB.* TO 'auser'@'localhost' " +
"IDENTIFIED BY 'drowssap';");
con.close();
}catch( Exception e ) {
e.printStackTrace();
}//end catch
}//end main
}//end class Jdbc11
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature -
Hi,
I am working in the following scenery: FILE->XI->JDBC.
I already accomplished all of the configurations in Integration Repository, Integration Directory and System Landscape. When it went to turn the scenery described above appears the following screen enclosed. We are using the database Oracle.
Error
Receiver Adapter v1718 for Party 'DATACENTER', Service 'CCD':
Configured at 10:38:06 2005-08-02
Initialization error: Loading jdbc driver 'oracle.jdbc.driver.OracleDriver' failed: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Found in negative cache
Loader Info -
ClassLoader name: [service:com.sap.aii.adapter.jdbc.svc]
Parent loader name: [Frame ClassLoader]
References:
service:com.sap.aii.af.cpa.svc
service:com.sap.aii.af.ms.svc
service:com.sap.aii.af.svc
service:com.sap.aii.adapter.xi.svc
library:com.sap.aii.af.lib
library:com.sap.aii.messaging.runtime
library:com.sap.xi.util.misc
common:service:iiop;service:naming;service:p4;service:ts
common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:com.sap.security.core.ume.service;service:connector;service:dbpool;service:keystore;service:security;service:userstore
library:ejb20
library:sapxmltoolkit
library:com.sap.util.monitor.jarm
library:com.sap.guid
library:com.sap.tc.Logging
library:jms
Resources:
/usr/sap/XID/DVEBMGS14/j2ee/cluster/server0/bin/services/com.sap.aii.adapter.jdbc.svc/aii_adapter_jdbc_svc.jar
Loading model: {parent,local,references}
Available JDBC drivers:
No deployed JDBC Drivers found
This drive already default in database Oracle or should we download the drive and to install in the servant of the XI?
Does some note exist to be applied?
Which are the necessary steps to do the deployed of the drive?
Which are the steps to solve this problem?HI Sergio,
It seems you need to iconfigure oracle driver on the server.
go to this link:
https://websmp101.sap-ag.de/nw-howtoguides/xi
you will find this pdf:
'How To Install and Configure External Drivers for JDBC & JMS'
for additional info:
chk this thread:
Re: JDBC Adapter Conect to Oracle Database
Maybe you are looking for
-
I have set up two email accounts on my iphone4, one with tiscali, my ISP, and the other on gmail. I am able to receive emails on both accounts, and can send emails from my gmail account, but am "Unable to Send Email" from my tiscali (talktalk) accoun
-
Can i use my 2010 20" imac as an external monitor for my Power mac
can i use my 2010 20" imac as an external monitor for my Power mac? Sounded like a 'no' a couple years back, but not sure if there are any new adapters out there.
-
How i can unlook my i Phone 5 for onther Company
How i can unlook my i Phone 5 for onther Company
-
How to set a bookmarks default folder?
How can I set a default folder for bookmarks that I don't have to choose every time between "Bookmarks folder", "Bookmarks toolbar folder" and "Unsorted bookmarks" when clicking the star on the address bar?
-
Installing Itunes 7.0.1
We are trying to install a new 4G. We plug it in the computer and itunes says it needs to have "itunes 7.0.1" So we went and did that and it starts to install it but gets partway thru and stops. The dialogue box says: "Could not open key: HKEYLOCALMA