About jdbc and axis
hello..!
I want to learn webservices using java and MySql. can anybody tell me how can I set up jdbc connection in my w/s? I am using tomcat and axis.
Thank you.
.Mohit
Axis and JDBC aren't really related technologies. Learn how to write a JDBC program. Learn how to write an Axis program. Er... that's it.
Similar Messages
-
A very surprise problem about JDBC and connection pool
I occur a very problem about JDBC and connection pool on Weblogic Platform
8.1.
There is a table in Oracle
Table
Name: t1
id varchar2(5);
content clob;
id is primary key.
If I use a connection pool to connect to Oracle,like following program:
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
con = ds.getConnection();
then following program will throw a ClassCastException
String sql = "select content from t1 where id = ?";
PreparedStatement pst = con.prepareStatement(sql);
pst.setString(1,"001");
oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
statement will throw ClassCastException
but if I use JNDI to connect to Oracle,like following program, then those
program above is ok
private String dbdriver="oracle.jdbc.driver.OracleDriver";
private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
private String username="ep";
private String password="epuser";
Class.forName(dbdriver);
conn = DriverManager.getConnection(dburl, username, password);
conn.setAutoCommit(false);
On the contrary, if I use JNDI to connect to Oracle, following program will
throw ClassCastException
weblogic.jdbc.vendor.oracle.OracleThinClob clob =
(weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
but it is fine if I use connection pool to connect to Oracle.
I am confused this problem, who can tell me why?
DanielWhen you are getting connection using datasource lookup from weblogic
connection pool, this connection is internally wrapped and hence you have to
cast it to weblogic.jdbc.vendor.oracle.OracleThinClob which you do and so it
works.
But when you get connection by loading driver straight, you are getting naked
oracle connection. In this case when you cast it to oracle.sql.Clob it works,
as you have seen in your test case.
I hope this explains what is going on with your code.
Thanks,
Mitesh
Daniel wrote:
I occur a very problem about JDBC and connection pool on Weblogic Platform
8.1.
There is a table in Oracle
Table
Name: t1
id varchar2(5);
content clob;
id is primary key.
If I use a connection pool to connect to Oracle,like following program:
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
con = ds.getConnection();
then following program will throw a ClassCastException
String sql = "select content from t1 where id = ?";
PreparedStatement pst = con.prepareStatement(sql);
pst.setString(1,"001");
oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
statement will throw ClassCastException
but if I use JNDI to connect to Oracle,like following program, then those
program above is ok
private String dbdriver="oracle.jdbc.driver.OracleDriver";
private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
private String username="ep";
private String password="epuser";
Class.forName(dbdriver);
conn = DriverManager.getConnection(dburl, username, password);
conn.setAutoCommit(false);
On the contrary, if I use JNDI to connect to Oracle, following program will
throw ClassCastException
weblogic.jdbc.vendor.oracle.OracleThinClob clob =
(weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
but it is fine if I use connection pool to connect to Oracle.
I am confused this problem, who can tell me why?
Daniel -
hi, i found this error while im generating a report
for my system, "Aging of Accounts Receivables"
hope someone might give me a hint to what should i do.
here's my StackTrace:
***Exception:
org.postgresql.util.PSQLException: The connection attempt failed because Exception: java.net.BindException: Address already in use: connect
Stack Trace:
java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at org.postgresql.core.PGStream.<init>(PGStream.java:47)
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:197)
at org.postgresql.Driver.connect(Driver.java:139)
org.postgresql.util.PSQLException: The connection attempt failed because Exception: java.net.BindException: Address already in use: connect
Stack Trace:
java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at org.postgresql.core.PGStream.<init>(PGStream.java:47)
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:197)
at org.postgresql.Driver.connect(Driver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:72)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:55)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:72)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:55)
at org.postgresql.jdbc3.Jdbc3ConnectionPool.getPooledConnection(Jdbc3ConnectionPool.java:39)
at org.postgresql.jdbc3.Jdbc3ConnectionPool.getPooledConnection(Jdbc3ConnectionPool.java:39)
at org.postgresql.jdbc2.optional.PoolingDataSource.getPooledConnection(PoolingDataSource.java:406)
at org.postgresql.jdbc2.optional.PoolingDataSource.getConnection(PoolingDataSource.java:338)
at csfwdbillingmodules.dbConnect.<init>(dbConnect.java:73)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:794)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:406)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:400)
at javax.swing.SwingWorker$1.call(SwingWorker.java:279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:319)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
End of Stack Trace
at org.postgresql.jdbc2.optional.PoolingDataSource.getPooledConnection(PoolingDataSource.java:406)
at org.postgresql.jdbc2.optional.PoolingDataSource.getConnection(PoolingDataSource.java:338)
at csfwdbillingmodules.dbConnect.<init>(dbConnect.java:73)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:794)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:406)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:400)
at javax.swing.SwingWorker$1.call(SwingWorker.java:279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:208)
at org.postgresql.Driver.connect(Driver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:72)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:55)
at org.postgresql.jdbc3.Jdbc3ConnectionPool.getPooledConnection(Jdbc3ConnectionPool.java:39)
at org.postgresql.jdbc2.optional.PoolingDataSource.getPooledConnection(PoolingDataSource.java:406)
at org.postgresql.jdbc2.optional.PoolingDataSource.getConnection(PoolingDataSource.java:338)
at csfwdbillingmodules.dbConnect.<init>(dbConnect.java:73)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:794)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:406)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:400)
at javax.swing.SwingWorker$1.call(SwingWorker.java:279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:319)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
at csfwdbillingmodules.dbConnect.query(dbConnect.java:96)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:798)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:319)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
End of Stack Trace
here's my dbConnect.class:
* dbConnect.java
* Created on November 14, 2006, 5:06 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
* @author darkoasis
package csfwdbillingmodules;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketAddress;
import java.net.SocketException;
import java.net.SocketImpl;
import java.sql.*; // All we need for JDBC
import javax.naming.NamingException;
import org.postgresql.jdbc3.Jdbc3PoolingDataSource;
public class dbConnect
extends java.lang.Object
private Socket socket;
private SocketImpl socketImpl;
private int refPosition = 0;
private Jdbc3PoolingDataSource source = new Jdbc3PoolingDataSource();
private DriverManager drvMgr;
private Connection db = null; // A connection to the database
private Statement sql; // Our statement to run queries with
private ResultSet results; // A result container
private DatabaseMetaData dbmd; // This is basically info the driver delivers
// about the DB it just connected to. I use
// it to get the DB version to confirm the
// connection in this example.
/** Creates a new instance of dbConnect */
public dbConnect()
try
this.source.setServerName("10.10.10.10");
this.source.setDatabaseName("myDB");
this.source.setUser("xxxx");
this.source.setPassword("xxxx");
this.db = this.source.getConnection();
this.socket = new Socket();
dbmd = this.db.getMetaData(); //get MetaData to confirm connection
sql = this.db.createStatement(); //create a statement that we can use later
catch (Exception ex)
System.out.println("***Exception:\n"+ex);
ex.printStackTrace();
public ResultSet query(String strSQL)
throws SQLException
this.results = this.sql.executeQuery(strSQL);
return this.results;
public void update(String strSQL)
throws SQLException
this.sql.executeUpdate(strSQL);
public void close()
throws Exception
this.db.close();
this.socket.close();
this.source.close();
public boolean isClosed()
throws SQLException
return this.db.isClosed();
i ran into some forums and found this:
Hi Graham
I'm making a bit of progress. I found a website that suggested the following
This is a problem of the used sockets with Windows NT. You can request the active sockets with the command netstat. The problem is a function of:
MaxUserPort (default 5000)
KeepAliveTime (default 120)
it suggested the workaround was connection pooling
I have run netstat to look at the number of connections when the problem occurs and waited for the timeout to reset the os back to the minimum and on each occasion my report has run
Does this sound logical?
If so
do you have any examples on connection pooling
it seems that even if i have closed my database connection it still doesn't free my port that was used, that's why i get this error
i am looking for a way to close my db connection and free its socket or port used at the same time, hope you can help,
thanks in advanceLet me modestly point you at mine: http://www.telekinesis.com.au/wipv3_6/FundamentalNetworkingInJava.A21
-
A question about JDBC and MySQL
hello dear friends,ask a question:
if in MySQL database, i have defined a clumon as TEXT data type.
when i use JDBC, i use which kind of java data type to hold TEXT,
i mean which getXXX() method i should use.
is it possible i just use getObject() and cast it to a binarystream??
thanks in advanced.use this:
declare it 1st
String x ="";
then u can now get the value of the field...
x = getString("<fieldName>");is there length limitation?
for example, i want store a String which is got from a JTextArea, i also treat it as String and insert into the column with TEXT datatype like
insert table_name (text_column) values( string_1)
this works in JSP, should work in JAVA too...
hope i helped... ^_^ -
in my Program i wrote :
public class Connect {
String stat = "Not Connected";
public void init()
try {
Context ctx= new InitialContext();
if(ctx == null)
throw new Exception("no Context");
DataSource ds =(DataSource)ctx.lookup
("java:comp/env/jdbc/BooksDB");
if(ds != null)
Connection conn= ds.getConnection();
if (conn !=null)
So, when i run this program i get the following error message:
unreachable statement:
DataSource ds =(DataSource)ctx.lookup
("java:comp/env/jdbc/BooksDB");
Can anybody pls tell me why i am getting this error and how can i solve it.throw new Exception("no Context");
rce ds =(DataSource)ctx.lookup
"java:comp/env/jdbc/BooksDB");When you throw the excpetion, the line following will be bypassed so it can never be reached! -
Question about JDBC and Oracle 10g AL32UTF8
Hey all,
Currently I have a Java program that uses lib: ojdbc14.zip. It works fine for our Oracle 10g database, but when we converted our character set to AL32UTF8, our program seems to have stopped working properly. For instance, I grab a count(*), to see how many rows an ID has in a table. Then I take that list and display and count(*) that are greater than 0. Well, my first getString works properly to generate the select count(*) statements for all the tables in the database. But then when I execute those select count(*) I can grab out the number greater than 0. That's column 1. Then the owner name is displayed in column 2. and the table name is displayed in column 3. When I do a getString(2) we only get the first letter (sometimes) of the owner of the table. Same with the table name.
For instance, before AL32UTF8
getString(2): SCOTT
getString(3): PEOPLE
After
getString(2): S
getString(3): P
Now to open my connection I use:
static Connection conn;
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection(connection_string, username, password);
And to create query I use:
Statement query_1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
Any help will be greatly appreciated. Thanks
Sincerely,
Melorkun wrote:
I was wondering whether it was a correct way :
-retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware. -
Question about jdbc and jsf datatable
hello
I was wondering whether it was a correct way :
-retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.
or
Is there any better way I can speed up retrieving data from databse ?
regardsorkun wrote:
I was wondering whether it was a correct way :
-retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware. -
Which tutorials may you suggest for JDBC and servlets?
Hello, i would to learn about JDBC and servlets.
May you please suggest me a good tutorial(e.g.post me a link) in order to study for JDBC and servlets?
e.g. How to make a servlet etc.
Thanks, in advance!I agree with PhHein, it's best to learn one technology and then the other. (Just my two cents, but start with JDBC from a simple standalone application, then when that is working, try to tackle Servlets, since you will need to also learn how to get them working in a container like Tomcat).
Here is a tutorial that has both concepts in it at the same time. Site is down now, but is usually up. http://www.roseindia.net/jdbc/jdbcconnectivity.shtml
Also, you will eventually want to download a J2EE container such as Tomcat or Jboss.
- Saish -
JDBC and FTP sender channels stop polling
Hi,
We have a great volume of sender JDBC and FTP sender channels.
For this reason there is nothing unusual to have temporary error connections.
Several months ago, with an XI 3.0 system, sender channels recover its functionality automatically when temporary error connection is solved.
But now, he have migrate to a PI 7.1 sytem, and in the same scenario and configuration, sender channel stop polling after a temporary error . In cc monitor this channels remains in green status and there were no signs of stopped interfaces.
Timeouts are correctly defined and there is no difference between channel configuration in our Xi and PI system.
How to solve this problem?
Thanks, in advance.
Carme.Thanks for your fast response, Stefan.
After writing this post, i ask the same question to our basis team and we are in the latest sp.
¿do you know if there is any note or can you provide me some additional information?
I'm not able to find any note about this issue...
Regards,
Carme. -
Adapter Limitations Of Sender JDBC and Mail Adapter
hi All,
could you tell me the limitations of JDBC and Mail Adapter .i need to document these details .
Regards
Vidya SagarHI Vidya,
If i was you, i would do a list of things that i would need about these adapters, o i would search the SAP.help documentation for a first view and later ask about this possibility. Another way is to read the SCN doubts about these adapters and you can find some problems. You should think about the PI version as well.
Regards. -
The problem: oracle jdbc thin driver doesn't see environment variable NLS_SORT
Description:
We have a lot of code written in coldfusion and now we would like to switch form CF5 to CFMX. We use oracle thin driver to connect CFMX to oracle DB.
The problem is that "order by" doesn't work as earlier. It seems that it jdbc driver couldn't make linguistic sorting, only binary. I tried with different versions, classes12.jar and ojdbc14.jar (the newest from otn).
I know that i could solve problem if use sql function nlssort but it is not acceptable for us. We couldn't change all our source code. We would like to use env variable NLS_SORT to control this behaviour.
I also wrote small standalone java program to test this directly but it doesn't see NLS_SORT. sqlplus from same shell works well.
Is it possible to set oracle jdbc thin driver to use NLS env settings (NLS_SORT)?
If yes, how? If not, what is the way to do linguistic sorting using jdbc?
Thank you,
ZeljkoZeljko,
I don't have an answer for you (sorry), but I can suggest some resources where you may find the answer (hopefully -- assuming you haven't already tried them).
The section entitled JDBC and Globalization Support in chapter 18 ("Advanced Topics") of the "Oracle9i JDBC Developer's Guide and Reference, Release 2 (9.2)".
[Note: Since I couldn't see any details in your post about which Oracle version you are using, I assumed it was 9.2. However, you can access Oracle documentation for all the latest versions from the [url=http://tahiti.oracle.com]Tahiti Web site.]
The Globalization Development Kit may be helpful.
The Java Developer Center
The Oracle JDBC FAQ
Good Luck,
Avi. -
How to use JMS with tomcat and Axis
Hello
I'm new in ii, so i'm still a little bit lost. I have been implementing web services with tomcat and Axis. However, these services are synchronous and I would like that some services were asynchronous.
I've been reading about the topic and I've found that JMS is a good solution for it. I have already downloaded JMS in my computer but now I don't know what else to do. I've been trying to run the SimpleQueueSender.java example but I get the error:
JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
But I have attached all .jar from F:\Sun\MessageQueue\lib
In addition to this, for my first webservices I used the Java2WSDL, WSDL2Java and AdminClient (axis tool) to create my web services bindings, stubs and skeletons and to deploy the web service on the server. Do I have to use them now with JMS? or now the deployment must be performed in a different way?
Thank you in advanced,The error means that you have to specify the type and location of your jndi store. You could create a jndi.properties file and put two properties in it:
java.naming.provider.url=file\\\:////var/jndi
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
for a file based jndi store. Then you have to make sure your jndi.properties file is in your CLASSPATH. Then you have to use something like imqadmin to create your jndi store and store in it your administrative objects like Queues and QueueConnectionFactories. -
Hello guys , need help with the following scenario :
ZTable as sender through Xi to db. i have never worked on this type before . Need some help in any blogs or scenarios dealing with the same . Interfacing ztable through a abap proxy.
I am also confused on the concept of client and server proxy . Please suggest
KrishnahHi Krishna,
<u><b>
CLIENT PROXY:</b></u>
A WSDL description from a UDDI server (or an Internet page) is usually used to make a service executable in the Internet and to describe the interface of this service. You require a client proxy and not a server proxy to call this service by using the Web service infrastructure.
<u><b>SERVER PROXY:</b></u>
You can only generate ABAP server proxies from a WSDL description if they originate in the Integration Repository.You can also generate server proxies for Java and client proxies for ABAP from message interfaces.
To Know more about Client and Server Proxy Please go through these links:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/86/58cd3b11571962e10000000a11402f/content.htm">Proxy Generation</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/62/8a5f3c31727d59e10000000a114084/content.htm">Implementing a Server Proxy</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/9b/821140d72dc442e10000000a1550b0/content.htm">Data Transfer Using SAP XI</a>
Also look at these Blogs which explain in detail about the Proxies.
<a href="/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy Proxy</a>
<a href="/people/siva.maranani/blog/2005/04/03/abap-server-proxies Proxies</a>
This pdf should help you...It talks about implementing the various JDBC scenarios:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78dbf9b">Step-By-Step Approach for Implementing XI Scenarios</a>
To configure your JDBC adapter you can navigater thru this link:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm">JDBC Adapter</a>
Configuring sender JDBC adapter:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm">Configuring the Sender JDBC Adapter</a>
Configuring receiver JDBC adapter:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm">Configuring the Receiver JDBC Adapter</a>
This weblog deals with a complete JDBC scenario and is ideal for beginners:
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
Regards,
abhy -
####a question about jdbc driver
A question about jdbc driver: for Oracle JDBC drivers which will not allow O/R
tools to access columns over 4 kb. This affects some of the functionality of my
application.A workaround is to use the my JDBC driver that acts as a wrapper to
ensure that columns over 4 kb read and persist properly. my JDBC driver determines
which actual driver to load based on the connection URL. If you pass in a URL
that contains the string jdbc:oracle:thin, it will know to load oracle.jdbc.driver.OracleDriver.
If the URL contains the string jdbc:db2, it will know to load COM.ibm.db2.jdbc.net.DB2Driver,
and so on.
now i have set CLASSPATH for my jdbc wapper,when I Creating and Configuring a
JDBC Connection Pool,i have to input my driver name such com.lawrence.driver.....then
i did,all
is well,then i restart my WLS,when load config.xml,some errors such as "No registered
driver accept URL:jdbc:oracle:thin:@localhost:1521:lawrence",if i set driver name
is oracle.jdbc.driver.OracleDriver,all is good,no any errors.
I find some questions like:
1.for WLS8.1 ,it is only find some registed driver?
2.why it cannot load my driver wapper when it is loading jdbc Connection Pool,but
when the WLS start is finished, i Creating and Configuring a JDBC Connection Pool
then it is right?my JDBC driver like this:
public class myDriver implements Driver {
public static String DB2_DRIVER = "COM.ibm.db2.jdbc.net.DB2Driver";
public static String DB2_URL = "jdbc:db2:";
public static String HYPERSONIC_DRIVER = "org.hsqldb.jdbcDriver";
public static String HYPERSONIC_URL = "jdbc:hsqldb:";
public static String MYSQL_DRIVER = "com.mysql.jdbc.Driver";
public static String MYSQL_URL = "jdbc:mysql:";
public static String ORACLE_DRIVER = "oracle.jdbc.driver.OracleDriver";
public static String ORACLE_URL = "jdbc:oracle:";
public static String POSTGRESQL_DRIVER = "org.postgresql.Driver";
public static String POSTGRESQL_URL = "jdbc:postgresql:";
public static String SQLSERVER_DRIVER =
"com.microsoft.jdbc.sqlserver.SQLServerDriver";
public static String SQLSERVER_URL = "jdbc:microsoft:";
public boolean acceptsURL(String url) throws SQLException {
return true;
public synchronized Connection connect(String url, Properties props)
throws SQLException {
if (_driver == null) {
Class driverClass = null;
try {
if (url.startsWith(DB2_URL)) {
driverClass = Class.forName(DB2_DRIVER);
else if (url.startsWith(HYPERSONIC_URL)) {
driverClass = Class.forName(HYPERSONIC_DRIVER);
else if (url.startsWith(MYSQL_URL)) {
driverClass = Class.forName(MYSQL_DRIVER);
else if (url.startsWith(ORACLE_URL)) {
driverClass = Class.forName(ORACLE_DRIVER);
else if (url.startsWith(POSTGRESQL_URL)) {
driverClass = Class.forName(POSTGRESQL_DRIVER);
else if (url.startsWith(SQLSERVER_URL)) {
driverClass = Class.forName(SQLSERVER_DRIVER);
_driver = (Driver)driverClass.newInstance();
catch (Exception e) {
throw new SQLException(e.getMessage());
Connection con = _driver.connect(url, props);
return new myConnection(con);
public int getMajorVersion() {
return _driver.getMajorVersion();
public int getMinorVersion() {
return _driver.getMinorVersion();
public DriverPropertyInfo[] getPropertyInfo(String url, Properties props)
throws SQLException {
return _driver.getPropertyInfo(url, props);
public boolean jdbcCompliant() {
return _driver.jdbcCompliant();
private Driver _driver; -
Hi, I am a fresher studying about JDBC. I wanted to know about the basics of JDBC. i wanted to know for what purpose JDBC is used..
hi
there r diffrent types of jdbc connection.hope u kmow jdbc is use to connect to database.if u need jdbc -mysql connection
1.download a mysql connector from apache site
2.edit .bash profile and add patf of connector to classpath
3.follow this link http://www.kitebird.com/articles/jdbc.html#TOC_1
Maybe you are looking for
-
4.7 SAPINST fails on phase 5 of 14 - services do not exist
I am installing 4.7 on Win 2003 / sql 2005 and the install - sapinst - fails on Phase 5 of 14 with messages: The specified service does exist as an installed service for saposcol and for sap<SID>_nn This is a local install and java environment variab
-
Netflix requires Microsoft Silverlight plug in to view their videos. Every time I try to load it I get the following error message...Your operating system does not support the 64-bit version of Silverlight. I have a 64bit system with Windows Vista Ho
-
Why is my battery life shorter on my ipad after downloading iOS 7.02?
Since downloading IOS 7.02 the battery life on my Ipad 2 is much shorter. Any suggestions?
-
I've seen video capture devices for connecting my iMac to a VCR. They seem to run the gamut from $20 to $200. How do I choose?
-
Linking and de-linking of Oracle tables
Hi, Does anyone know how to link and de-link Oracle database from MS Access please? (programmatically) I have made a form in MS access. For example. say there is a button when user click on in, it will insert the data from access into Oracle table. I