Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

can u please give the JDBC program for Disconnected Architecture which uses the javax.sql package
- Sumit Chouksey
Hello. I am setting up Oracle SQLdeveloper to work with mySQL. I’ve setted up driver and login details. But have error while connecting to database An error was encountered performing the requested operation: Packet for query is too large (4739923 > 1048576). You can change this value on the server by setting the max_allowed_packet’ variable. Vendor code 0 Is there any suggestions how to fix this? I don’t have mysql server on client machine(windows 7). Only driver and sqldeveloper installed. And I don’t want to reduce max_allowed_packet size on my debian server. I’ve read this doc https://www.ccs.neu.edu/home/kathleen/classes/cs3200/connector-j.pdf But couldn’t understand how to edit this https://clip2net.com/s/jpjkq6 Thank you in advance.
- jonnyhaski
Why have you defined- ORACLE_DB_DRIVER_CLASS=oracle.jdbc.driver.OracleDriver in props file. We are not using it anywhere in our code?
- sumit
Hello Sir, I want crate a table in oracle using remote desktop connection then I want write java code for import that data from oracle to mysql in my system. Please help me to write a code for this issue. Really I don’t know how to write a code for it. Kindly, request you to help me in this code. Thnaks N LingaMoorthy Reddy
- LingaMoorthy Reddy
Hi I am using apache common dbcp 1.2.2 jar to create the database datasource in my project where database side we have upgraded the database Oracle 11.2.0.4.1 to Oracle 11.2.0.4.5. below is the my code: where 1. driver=oracle.jdbc.driver.OracleDriver 2. url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oramtbdocq.qs2x.vwg)(PORT=1560)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=mtbdocq.qs2x.vwg))) 3. initialsize=10 4. maxidle=10 5. maxactive=10 we are using ojdbc7.jar since my jdk is 1.7 **Code 1:** *Trying to make jdbc connection by using dbcp 1.2.2 jar* try{ org.apache.commons.dbcp.BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName(driver); dataSource.setUrl(url); dataSource.setUsername(username); dataSource.setPassword(password); dataSource.setInitialSize(initialsize); dataSource.setMaxIdle(maxidle); dataSource.setMaxActive(maxactive); basicDataSourceCon =dataSource.getConnection(); System.out.println(“\n basicDataSourceCon ::”+basicDataSourceCon); System.out.println(“\n\n<<<<<<>>>>>\n\n”); }catch(Exception e2){ System.out.println(“\n <<<<<<<<<<<>>>>>>>>>>>>>> ::”); e2.printStackTrace(); } **Exception:** at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at com.emc.xcp.bam.bamserver.listener.BamContextLoaderListener.jdbctestConnection(BamContextLoaderListener.java:265) at com.emc.xcp.bam.bamserver.listener.BamContextLoaderListener.contextInitialized(BamContextLoaderListener.java:92) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.sql.SQLException: Io exception: Oracle Error ORA-12650 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:257) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:389) at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:454) at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:802) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221) … 17 more **But when I am using the simple jdbc connection it is going fine.** **Code 2:** *Simple jdbc connection which is going fine.* try{ Properties props=new Properties(); props.put(“user”, username); props.put(“password”, password); props.put(“maxIdle”, maxidle); props.put(“maxActive”, maxactive); props.put(“initialSize”, initialsize); Class.forName(driver); DriverManager.getDriver(url); simplecon = DriverManager.getConnection(url,props); //DriverManager.getConnection(url,username,password); System.out.println(“\n Simple JDBC simplecon ::”+simplecon); System.out.println(“\n\n<<<<<<>>>>>\n\n”); }catch(Exception e1){ System.out.println(“\n <<<<<<<<<<<>>>>>>>>>>>>>> ::”); e1.printStackTrace(); } Any Idea? What could be the root cause. Thanks in advance.
- Ravi Kant Gaur
Listen please, I’ve read this article and an obviously it’s working perfectly. but i’ve a doubt about Connection pooling. What is the difference between this method and the method available in this link : https://www.mulesoft.com/tcat/tomcat-mysql ? Which one is better method ?
- Shifar
Could you please tell me why I am getting that type of exception when I run the program. Exception given below. package com.java.test; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DatabaseTest { public static void main(String[] args) { try { Class.forName(“oracle.jdbc.OracleDriver”); Connection con = DriverManager.getConnection(“jdbc:oracle:thin:@//localhost:1521:orcle”,“system”,“Infy1234”); System.out.println(“connected…”+con); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } ====================== Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387) at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:414) at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.infy.DatabaseTest.main(DatabaseTest.java:11)
- Bapan Dhali