vicky Aggarwal

Ranch Hand
+ Follow
since May 15, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vicky Aggarwal

I apologize for my mistake, i didn't mean /java/activation.
I was referring to /javax/activation package, which is part of rt.jar; which is the reason for mentioning the rt.jar.

Although i was searching for "source code of rt.jar" and was unable to find the source code for /javax/activation package.
But when i tried with /javax/activation directly i found the source code.

Can you please tell me why source code of /javax/activation package is not part of src.zip or Am i still confused ?
11 years ago
I already checked in src.zip. For e.g. src.zip doesn't include /java/activation folder.
Where can i get source code for files present in /java/activation package.
11 years ago
Hi,

can anyone help me in finding source code of rt.jar.

Thanks in advance.
11 years ago
Thank you for your reply.
I am trying the solution, but if is there any way to same thing using servlets?
11 years ago
Hi,

I have an old application, which runs on a embedded tomcat.
I want to know version of used Tomcat.
I tried "javax.servlet.ServletContext.getServerInfo" but it was not supported in used server.
Can any body help me to find out server version.

Thanks in advance.
11 years ago

Patryk Sosinski wrote:... In console type "ping cdb" to check if your system knows what ip is assigned to cdb...



Yes my system can ping that.
But your advice help me to sort my problem.
my system was not able to telnet on 1521 port.

Thanks a lot


Hi,

I am trying to connect with oracle 11.2 using odbc6.jar
below is my conenction details.

String JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver";
String JDBC_STRING = "jdbc:oracle:thin:@//CDB:1521/cdb"; // CDB is hostname
String USER_NAME = "USER";
String PASSWD = "pass;
Class.forName (JDBC_DRIVER);
conn = DriverManager.getConnection (JDBC_STRING, USER_NAME, PASSWD);


And i am facing below exeption

java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at oracle.ConnectJDBCOracle11g.main(ConnectJDBCOracle11g.java:25)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:392)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:434)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
... 7 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:150)
at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:370)
... 12 more




i am able to connect using sqlplus command

sqlplus USER/pass@//hostname/cdb


I am not able to connect using ip of system in space of hostname.

Any help is greatly appreciated.



I have solved the problem by using latest ODBC driver.

Hi

I am trying to use quartz scheduler 2.0.1 and i am getting below error when trying to run a example.
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" java.lang.AbstractMethodError: oracle.jdbc.driver.OracleConnection.getHoldability()I
at com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:106)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
I have no idea about anything happening here.
please let me know if any other infomation require.
Hi,

I will go with a simple one.
Suppose you cerate a method sum(int i, int j), which add two number.
After a while you realize that you require a method for adding 3 numbers or 4 numbers etc.
So it will make a requirement that there is lots of methods with differentnumber of argumnets and
performing same kind of functionality on these argument.
Without overloading you have to remember the name of method which is having exact set of parameter.
But using overloading makes it simple just one name with different parameter.
int sum (int i, int j) {}
int sum (int a, int b, int c) {}

I hope it will help.

P.S. aboove example can be done using varargs, but it's just to understand overloading.
12 years ago
i tried on both IE and forefox, but ots not working.

It just show me a blank div with a small cross on left top.

Still unable to run it.

please let me know in case of any information require.
12 years ago
I also tried to open game, but failed.
following error was there on web page

Java Plug-in 1.6.0_03
Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\gaurav-aggarwal


----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

load: class com.javaranch.roundup.applets.QuizApplet.class not found.
java.lang.ClassNotFoundException: com.javaranch.roundup.applets.QuizApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class com.javaranch.roundup.applets.QuizApplet.class not found.
java.lang.ClassNotFoundException: com.javaranch.roundup.applets.QuizApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class com.javaranch.roundup.applets.QuizApplet.class not found.
java.lang.ClassNotFoundException: com.javaranch.roundup.applets.QuizApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
12 years ago
Hi,

I have to perform some action in a table which shall be synchronized with multiple instances.

I created two tables first Lock and second which contains actual data. Now each instance first tries to acquire lock on Lock table by using
Select X from Lock for update.

My application is running fine, but I have a threat that if application which have lock goes down due to any error.

Will my application work or will it stuck?
If yes how to solve it and if not then how lock will be release and how such locks work?

Thanks in Advance.


Zandis Murāns wrote:If we read the words then this is true, but anyway, that was not he's asking...



I am sure i was not asking this, because i never thought of such scenarios. :D
But it always gud to know new things.

Thank you all for your inputs. :beerchug:
12 years ago
This thread is still useful .
Resolved my problem.