Integrating sun's JdbcOdbcDriver into Websphere 5?
Hello all, i'm in the middle of migrating an application that was running on tomcat to WAS5.1. All my database connection are working except for the ones that use the JdbcOdbcDriver. As tomcat used sun's jdk I had no problems before but now that I'm tied to IBMs bundled jre I'm at a loss of what to do. I don't like it but i added Sun's rt.jar file that contains the driver class to my WAS classpath but I get some sort of initialization error:
java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
at java.sql.DriverManager.getConnection(DriverManager.java:538)
All i really want is my old odbc driver bridges to work for .txt .dbf and .csv querying. Can someone give me some suggestions on what to do? Websphere's google group hasn't seem to discuss this issue since 2003 so maybe i'm on the wrong track entirely. Here is a example of the code i'm using just incase you are curious to the means:
case Constants.MS_DBF:
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
StringBuffer dbsrc_dbf = new StringBuffer();
dbsrc_dbf.append("jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};");
dbsrc_dbf.append("UserCommitSync=Yes;Threads=3;Statistics=0;SafeTransactions=0;");
dbsrc_dbf.append("PageTimeout=5;MaxScanRows=8;MaxBufferSize=2048;FIL=dBase 5.0;");
dbsrc_dbf.append("DriverId=533;Deleted=1;DefaultDir=");
dbsrc_dbf.append(db);
connection = DriverManager.getConnection( dbsrc_dbf.toString(), "", "" );
break;
Thanks in advance for help on this. graeme.
try this if you're still having problems(think you already solvet it, anyway...)
env.put(..);
env.put(..);
System.setProperty("javax.net.ssl.trustStore",FILE_JKS_PATH);
it worked fine for me,even if it was a websphere 4.* version.
Similar Messages
-
Integrating Sun App Server with WebSphere MQ
Hi,
I am using Sun App server V8.1 . I also have a websphere MQ v5.3 installed in my system. I want to integrate this MQ with the App server.
I created a queueManager and a Queue in MQ and using the JMSAdmin console of the Mq, i created jndi lookup resources using INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
In the application server side, i created a Resource adapter using the command:
create-resource-adapter-config --property SupportsXA=true:ProviderIntegrationMode=jndi:RMPolicy=OnePerPhysicalConnection:JndiProperties=java.naming.factory.url.pkgs\\=com.ibm.mq.jms.naming,java.naming.factory.initial\\=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.provider.url\\=file\\:D\\:\\MQ:LogLevel=finest mqra
Then i deployed this resource adaptor using the command :
deploy name mqra target server "D:\Sun\AppServer\lib\addons\resourceadapters\genericjmsra\genericra.rar"
Using this resource adapter i created a connection pool, connector resource and an admin object using the commands
create-connector-connection-pool raname mqra connectiondefinition javax.jms.QueueConnectionFactory transactionsupport XATransaction property ConnectionFactoryJndiName=MQQCF mymqpool
create-connector-resource --poolname mymqpool jms/MyMqQCF
create-admin-object raname mqra restype javax.jms.Queue --property DestinationJndiName=RTQueue jms/MyMqQueue
After that, i wrote a java code to lookup these resources and put a message into the queue.
This is the snippet of my java code
InitialContext ic = new InitialContext();
QueueConnectionFactory cnxFact = (QueueConnectionFactory)ic.lookup("jms/MyMqQCF");
Queue qu = (Queue)ic.lookup("jms/MyMqQueue");
try {
QueueConnection qConn = cnxFact.createQueueConnection();
QueueSession qSess = qConn.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
QueueSender qSend = qSess.createSender(qu);
TextMessage msg = qSess.createTextMessage();
msg.setText("1");
qSend.send(msg);
qConn.close();
I am getting an exception in the line, QueueConnection qConn = cnxFact.createQueueConnection();
here is the stack trace
java.lang.ClassCastException: com.ibm.mq.jms.MQQueueConnectionFactory
at com.sun.genericra.outbound.ManagedQueueConnectionFactory.createXAConnection(ManagedQueueConnectionFactory.java:45)
at com.sun.genericra.outbound.AbstractManagedConnectionFactory.createPhysicalConnection(AbstractManagedConnectionFactory.java:127)
at com.sun.genericra.outbound.AbstractManagedConnectionFactory.createManagedConnection(AbstractManagedConnectionFactory.java:111)
at com.sun.enterprise.resource.ConnectorAllocator.createResource(ConnectorAllocator.java:90)
at com.sun.enterprise.resource.IASNonSharedResourcePool.getUnenlistedResource(IASNonSharedResourcePool.java:437)
at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResource(IASNonSharedResourcePool.java:355)
at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASNonSharedResourcePool.java:250)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:213)
at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:174)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:286)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:145)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:121)
at com.sun.genericra.outbound.ConnectionFactory.createConnection(ConnectionFactory.java:69)
at com.sun.genericra.outbound.ConnectionFactory.createQueueConnection(ConnectionFactory.java:101)
Can anybody help???bump
update:
So to avoid this problem I added spring.jar to the server classpath. that got rid of this message but then it started complaining that its missing struts2 core jar..i added that in server classpath as well...I did same for 4 other files and in the end it said 'bean for xwork has already been initialized' (because all these jars are in the application as well).
So I am stuck. if I add all jars to server classpath..it says beans have already been initialized. If I take out the jars from server classpath then it says that stuff is missing (eg. contextLoader.properties missing - orig post)
again, all this goes away when I restart the server..so i am just trying to avoid having to restart server every code change. -
How to deploy a war file into websphere appserver? error !!!
Hello expert,
I build one very simple war file, simpletest.war, using build tool 'ant', I did not have any tools available at this moment:
D:\Projects\E-form\simpletest\build>jar.exe -tvf simpletest.war
0 Fri Nov 11 12:06:52 CST 2005 META-INF/
106 Fri Nov 11 12:06:50 CST 2005 META-INF/MANIFEST.MF
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/forms/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/forms/renderform/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/
476 Fri Nov 11 11:58:20 CST 2005 Default.jsp
3045 Fri Nov 11 12:06:52 CST 2005 WEB-INF/classes/txdot/forms/renderform/GetForm.class
513415 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/dom4j-full.jar
1171931 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/etechUtils.jar
92281 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/formServer-client.jar
288752 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/j2ee.jar
32062 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/jaxrpc.jar
60047 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/resolver.jar
959368 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xercesImpl.jar
126179 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xercesSamples.jar
124724 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xml-apis.jar
124724 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xmlParserAPIs.jar
721 Fri Nov 11 11:58:28 CST 2005 WEB-INF/web.xml
And web.xml is :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>txdot.forms.renderform.GetForm</servlet-name>
<servlet-class>txdot.forms.renderform.GetForm</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>txdot.forms.renderform.GetForm</servlet-name>
<url-pattern>/GetForm</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>Default.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/renderform/error.jsp</location>
</error-page>
</web-app>
But when I try to deploy into websphere app server, it gave me one error saying corrupted files. But the same file I can run in Jboss.
Thanks a lot.
GraceYanping, we use ANT all the time to deploy to WebSphere without a problem.
Why don't you ask Natasha or John for some help. Otherwise, walk over to Walnut Street and ask at the Computer Support Center. -
How to deploy a war file into websphere appserver
Hello expert,
I build one very simple war file, simpletest.war, using build tool 'ant', I did not have any tools available at this moment:
D:\Projects\E-form\simpletest\build>jar.exe -tvf simpletest.war
0 Fri Nov 11 12:06:52 CST 2005 META-INF/
106 Fri Nov 11 12:06:50 CST 2005 META-INF/MANIFEST.MF
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/forms/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/forms/renderform/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/
476 Fri Nov 11 11:58:20 CST 2005 Default.jsp
3045 Fri Nov 11 12:06:52 CST 2005 WEB-INF/classes/txdot/forms/renderform/GetForm.class
513415 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/dom4j-full.jar
1171931 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/etechUtils.jar
92281 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/formServer-client.jar
288752 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/j2ee.jar
32062 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/jaxrpc.jar
60047 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/resolver.jar
959368 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xercesImpl.jar
126179 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xercesSamples.jar
124724 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xml-apis.jar
124724 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xmlParserAPIs.jar
721 Fri Nov 11 11:58:28 CST 2005 WEB-INF/web.xml
And web.xml is :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>txdot.forms.renderform.GetForm</servlet-name>
<servlet-class>txdot.forms.renderform.GetForm</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>txdot.forms.renderform.GetForm</servlet-name>
<url-pattern>/GetForm</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>Default.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/renderform/error.jsp</location>
</error-page>
</web-app>But when I try to deploy into websphere app server, it gave me one error saying corrupted files. But the same file I can run in Jboss.
Thanks a lot.
GraceHello,
Who are you pls? It looks like you know all of us.
Thanks for your response. Is there special format for
web.xml or just generic?
GraceYanping:
web.xml has a DTD that is readily available. You may refer to it. -
Deploy a war file into websphere appserver, Error!!
Hello expert,
I build one very simple war file, simpletest.war, using build tool 'ant', I did not have any tools available at this moment:
D:\Projects\E-form\simpletest\build>jar.exe -tvf simpletest.war
0 Fri Nov 11 12:06:52 CST 2005 META-INF/
106 Fri Nov 11 12:06:50 CST 2005 META-INF/MANIFEST.MF
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/forms/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/classes/txdot/forms/renderform/
0 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/
476 Fri Nov 11 11:58:20 CST 2005 Default.jsp
3045 Fri Nov 11 12:06:52 CST 2005 WEB-INF/classes/txdot/forms/renderform/GetForm.class
513415 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/dom4j-full.jar
1171931 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/etechUtils.jar
92281 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/formServer-client.jar
288752 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/j2ee.jar
32062 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/jaxrpc.jar
60047 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/resolver.jar
959368 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xercesImpl.jar
126179 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xercesSamples.jar
124724 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xml-apis.jar
124724 Fri Nov 11 12:06:50 CST 2005 WEB-INF/lib/xmlParserAPIs.jar
721 Fri Nov 11 11:58:28 CST 2005 WEB-INF/web.xml
And web.xml is :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>txdot.forms.renderform.GetForm</servlet-name>
<servlet-class>txdot.forms.renderform.GetForm</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>txdot.forms.renderform.GetForm</servlet-name>
<url-pattern>/GetForm</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>Default.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/renderform/error.jsp</location>
</error-page>
</web-app>But when I try to deploy into websphere app server, it gave me one error saying corrupted files. But the same file I can run in Jboss.
Thanks a lot.
GraceYanping, we use ANT all the time to deploy to WebSphere without a problem.
Why don't you ask Natasha or John for some help. Otherwise, walk over to Walnut Street and ask at the Computer Support Center. -
Query on integrating windows file server into SAP KM using WEBDAV
hi
I have sucessfully integrated windows file server into SAP KM using WEBDAV. I have query in it regarding the possible validation against the portal Database user. Can we configure such that the user comparison happens for LDAP as well as database user. Have anyone configured such a scenario?
Regards,
Ganesh NHi Ganesh,
this should work in principle.
However you would need a user in Active Directory for each user in the portal database that should connect to the file server if you are using the SSO22KerbMap Module as I assume.
In my whitepaper I have mentioned this for the internal user index_service that does only exist in the portal database.
Best regards,
André -
Couldn't complete tutorial 'Integrating EJB 3.0 into Web Dynpro ...'
Hi All,
I am trying to complete the Integrating EJB 3.0 into Web Dynpro Using the EJB Model Importer tutorial that goes with SAP NetWeaver Composition Environment 7.1 SP3 Developer Studio.
Does anyone ever completed this tutorial because I have problems completing it. The result is very important for me because I need to use this technology for my essay.
In this tutorial you create a button that calls the method StudsBean.getStudent(String). In this method the object student is created and it will be returned. In several labels the information of the returned student should be displayed. But that doesnt happen, when I push the button no error occurs but the labels are still empty. When I try to debug the Enterprise Bean and Web Dynpro application I see that the method StudsBean.getStudent(String) is called and the propertys are set and the student object is returned, but still it isnt displayed.
After discussing this with a colleague I tried to search for a solution on the SDN and of course Google. First I thought I would be a bug but I only found 2 people with the same problem. I found it remarkable because its one of the key subjects of Java EE 5 and its a tutorial displayed in the welcome page of the Developer Studio.
So do you people think its a bug in WebDynpro? Because I am sure that I followed all the steps mentioned (a colleague checked it even).
Regards,
SanderHi Sander,
I guess, it's not a bug in Web Dynpro, maybe it's a bug in the tutorial
I tried something similar, but not following the tutorial and it works. I wasn't able to call the model from the view controller and I guess that's the problem. Take the code from the init-method of the view controller and put it to the component controller's init -method and the code inside the onActionGetStudent and put it into a method you create in the component controller, too. From onActionGetStudent just call this method in the component controller with some code like this:
wdThis.wdGet<your component controller's name>.<your method's name>;
Hope this helps
Kind regards
Stefanie -
Error after Integrating of Xcelsius SWF into Enterprise Portal
Hi all,
I integrated Xcelsius SWF file into portal using Business Objects Integration Kit - iView Template. I can see dashboard in Portal. Its working fine. I have Refresh Button in the Dashboard. If I refresh the dashboard , it shows cannot access External Data. Failed to get the document information(LO26315).
How can I resolve? Help me in this regard.
I am using BOE 3.1 and LO 3.1.
Thanks & Regards,
Hemalatha JWith a Live Office connection, you would typically use the URL iView and the opendocument URL to integrate the dashboard into the Enterprise Portal. There are existing posts on this forum about opendocument and Xcelsius dashboards.
Obviously you need to make sure the dashboard refreshes fine outside of the portal, for instance from Infoview.
Then, you need to look at the cross domain constraints : have both Infoview and Enterprise Portal in the same domain or use crossdomain.xml. They are lots of posts on this forum about that too. -
ODI11g Integration Step: Insert flow into I$ Table failure: TNS: error
The project/interfaces have been working successfully for quite sometime. After a server reboot, they are all failing on the Integration step
Insert flow into I$ Table failure with:
ODI-1228: Task xxxxx(Integration) fails on the target ORACLE connection xxxxxx.
Caused By: java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified
I have verified the topology and the dblink/Data Server is what resides in the tnsnames.ora file (which also has not changed).
Any ideas what else to look at, all topology connection tests are successful.
Thank you.All connections were testing successfull. The problem ended up being with one of the database links, after the server reboot there were multiple tnsnames and the environment was not pointing to the correct one. After removing all tnsnames except for the correct, the problem was fixed.
Thank you for your response. -
Revision: 10581
Author: [email protected]
Date: 2009-09-24 17:09:59 -0700 (Thu, 24 Sep 2009)
Log Message:
Integration VAST unit tests into mediaframework unit tests
Modified Paths:
osmf/trunk/framework/MediaFrameworkFlexTest/.actionScriptProperties
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/MediaFrameworkTests.as
Added Paths:
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/VASTTestConstants.as
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/loader/
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/loader/TestVASTLoade r.as
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestDefaultVAS TMediaFileResolver.as
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTImpres sionProxyElement.as
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTMediaG enerator.as
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTTracki ngProxyElement.as
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/parser/
osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/parser/TestVASTParse r.as -
Problems with Integrating SRM, ESS/MSS into one portal 7.01
We are having major problems with integrating SRM, ESS/MSS into one portal 7.01?
Do we need to have a support portal for each.
We created test users for systems but sometimes we lose the users for no apparrent reasons. Very strange. Please advise and if you have new documentation regarding SAP Portal Authorization it will be helpful.Hi
Please search on SDN for integrating SRM, ESS/MSS in Portal.
Regards
Arun -
Urgent: integrating windows file server into ep using KM.
hi..
can somebody give me detail steps of integrating windows file server into ep using KM.
when i give password in the network path it is not accepting the password of the windows....
Good answers will be rewarded points...
bye....Hi,
You can check:
System Administration-System Configuration-KM-CM-Repository Managers-File System Repository-create a new item
Root Directory can be:
machine\sharedirectory
and in CM-Global Services-Network Paths->create a new item
in Network Path field:
machine\sharedirectory
enter your password
user: domain\user
Integrating Documents from a Windows System into KM
http://help.sap.com/saphelp_nw2004s/helpdata/en/ed/b334ea02a2704388d1d2fc3e4298ad/frameset.htm
Patricio. -
Sun.jdbc.JdbcOdbcDriver ClassNotFoundException
Hello, I'm using Eclipse, I have created a small test class as I have never used SQL before(except for some querying) and have imported the MySQL connector J .jar, and the whole folder directory (just to be sure).
I keep getting ClassNotFoundException on "sun.jdbc.JdbcOdbcDriver" which is preventing me from getting this to work.
Is the class name a typo ? or what should the code look like?
import java.sql.*;
public class Main
public static void main(String[] args)
try
Connection c = Connect.openDatabase
("jdbc:mysql://localhost/booksdb:3306", "root", "dbsd202");
Statement statement = c.createStatement();
ResultSet rs = statement.executeQuery("Select * from titles");
while (rs.next())
System.out.printf("%s\t%s\t%s\n",
rs.getObject("title"), rs.getObject(1));
catch (SQLException e)
e.printStackTrace();
class Connect
static Connection conn;
static Connection openDatabase(String url,String user,String pw)
try
Class.forName("sun.jdbc.JdbcOdbcDriver");
conn = DriverManager.getConnection(url,user,pw);
catch(Exception e)
System.out.printf("%s\n", e);
conn = null;
return conn;
}I'm not really a java expert, but as far as I know you have to install the jdbc-driver and to add the path to the driver to CLASSPATH-variable.
If that doesn't help, you shoul post you question in a java forum, e.g. this one:
http://forums.oracle.com/forums/category.jspa?categoryID=288 -
Sun.jdbc.JdbcOdbcDriver ClassNotFound
This is a double post sorry, but I must have miss-clicked the wrong forum when posting originally.
sun.jdbc.JdbcOdbcDriver ClassNotFoundException
I'm getting class not found exception and I cannot work out why, code is below.
import java.sql.*; public class Main { public static void main(String[] args) { try { Connection c = Connect.openDatabase ("jdbc:mysql://localhost/booksdb:3306", "root", "dbsd202"); Statement statement = c.createStatement(); ResultSet rs = statement.executeQuery("Select * from titles"); while (rs.next()) { System.out.printf("%s\t%s\t%s\n", rs.getObject("title"), rs.getObject(1)); } } catch (SQLException e) { e.printStackTrace(); } } } class Connect { static Connection conn; static Connection openDatabase(String url,String user,String pw) { try { Class.forName("sun.jdbc.JdbcOdbcDriver"); conn = DriverManager.getConnection(url,user,pw); } catch(Exception e) { System.out.printf("%s\n", e); conn = null; } return conn; } }Darryl Burke wrote:
G-Unit wrote:
Never mind solved.And you will share the solution with the community, won't you?
dbOf course :)
The class name cannot be found because "sun.jdbc.JdbcOdbcDriver" does not exist.
The correct class name is "sun.jdbc.odbc.JdbcOdbcDriver".
The way I found that out was actually searching through the java source code for the class, and I'm assuming that is correct as when I changed it I started getting another error: "java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/booksdb:3306
Exception in thread "main" java.lang.NullPointerException
at sql.Main.main(Main.java:26)" -
Error while Importing Integration kit Transport Requets into SAP ECC 5.0
HI ,
1. AT BO side -> I can see the many roles, but under 'role import tab' in CMC when i add any 'role' and click on update button,
system showing an error as below .
"Failed while trying to get user list using class CSecRfcRemoteUsersActGrp in method CSecSAPR3Binding::GetUsersInternal(). Error code: 3. Description: Syntax error in program /CRYSTAL/SAPLSECURITY .. "
2. After successfull installation of integration kit on windows 2008 server, i have imported the transport request into SAP ECC
5.0 When i imported open sql connectivity transport request, i got error mesage . The error message number is 8 and it came
for Generation of programs and screens. i have installed sap gui 710 ( verion : 7100.1.0.1027).
I also transported remaining transport request (infoset, row level, cluster definition, security functions) but all these request
contain similar error. Now when i try to login into sap its going dump.Is there any possibility of reverting back the transport
requests.
Pls help me to fix these issues.
Edited by: sheshikanth reddy on Apr 14, 2010 2:15 AMHi ingo,
Now i can able to transport successfully after following the order.
Thank you very much
Edited by: sheshikanth reddy on Apr 14, 2010 11:46 PM
Earlier i have imported non unicode request numbers into sap unicode system.
tats why i got error.
Now i have imported unicode request number to unicode sap system with sequence.
Edited by: sheshikanth reddy on Apr 15, 2010 12:19 AM
Maybe you are looking for
-
How can I disable a hover link in the phone view size?
Hola How can I disable a hover link in the phone view size? I got this site where I got a gallery page, the pics have a hover/link state (?) where as you click in them they will open a bigger pic. (Prettyphoto) Thanks good. What I want to do, is that
-
Prepayment Relevance LFB1-PREPAY_RELEVANT
Hi, do you know logic of field Prepayment Relevance (Vendor Master) in invoice verification? Thank you Daniela
-
Creating a ListOfValue for a MessageLovInput at runtime
Hi ! i am traying to create a Message Lov Input at runtime. The fact is that i don't want to use an external ListOfValue region, lovInput.setLovRegion(<path>, 0); i mean, i want to create it also at runtime. Does anybody has idea of how to do this? T
-
Suggestions for 4.2.2 desktop
Is there a "Suggestion" forum or URL to send ideas on how to improve the Palm Desktop software? I have 2: What happened to copy item on the calendar? I would like to copy an appointment or event so I do not have to re-re--retype the same things over
-
Mac Mini Snow Leopard Server vs Airport Extreme
My Macbook is starting to reach it's memory maximum and running slow (120Gb). Most of the memory space is taken up by videos, photos, movies, and music. I have contemplated purchasing an Airport Extremem and connecting multiple hard drives using a po