abhijeet srivastava

Greenhorn
+ Follow
since Aug 22, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by abhijeet srivastava

I am using mysql connector/j mysql-connector-java-3.0.17-ga-bin.jar
Is it only for windows?
There is no problem in connnection on command line. I have also disabled firewall. still same problem.
I try to connect mysql using mysql connector 3.0.17 through jdbc by following code :
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root12");

when i run this program i got the following error:
java.sql.SQLException:error during query Unexpected Exception:java.lang. ArrayindexOutofBoundException message given :35

while my driver is loaded but problem occur in getConnection method.
same code is running on windows system but not in the linux plateform.
still i dont know how to solve this problem

Please help me.
Hi all!

I am trying to connect MySql using connector mysql-connector-java-3.0.17-ga-bin.jar. Driver is loaded but it is
not getting connected. Though in Windows it works fine but give problem in linux fedora 6. I am using connection string

jdbc:mysql://localhost:3306/test

with username and password. It shows following error-

SQLException:java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.SocketException: java.net.ConnectException: Connection refused

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:143)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:225)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1805)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Check.main(Check.java:27)


** END NESTED EXCEPTION **


Whats wrong?
Thanks. Its working on giving full application file path like-

http://localhost:8080/Test/Hello.jsp

but its not showing home page of tomcat on giving-

http://localhost:8080

before running tomcat in eclipse it was showing.
but now nor external tomcat home page is running nor eclipse's internal though on giving full path of file of any application it is perfectly fine.

where to configure for showing tomcat home page?
14 years ago
Hi all!

I have tomcat5.5,eclipse3.3 Europa and linux fedora 6. I have configured my application and set server as tomcat. Still when I am giving url http://localhost:8080 it is not working and showing error-

HTTP Status 404 - /

type Status report

message /

description The requested resource (/) is not available.
Apache Tomcat/5.5.25


whats wrong?
14 years ago
Hi all!

I have Fedora 6 and apache-tomcat-5.5.25 installed in /usr/local. and jdk1.5.0_09 in same /usr/local. I have set jdk path in etc/profile and is showing correctly.
I have set JAVA_HOME as /usr/local/jdk1.5.0_09.

but when I am starting tomcat by command-
su - tomcat -c /usr/local/apache-tomcat-5.5.25/bin/startup.sh

it is showing following error-
Using CATALINA_BASE: /usr/local/apache-tomcat-5.5.25
Using CATALINA_HOME: /usr/local/apache-tomcat-5.5.25
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.25/temp
Using JRE_HOME: /usr/local/jdk1.5.0_09
touch: cannot touch `/usr/local/apache-tomcat-5.5.25/logs/catalina.out': Permission denied
/usr/local/apache-tomcat-5.5.25/bin/catalina.sh: line 273: /usr/local/apache-tomcat-5.5.25/logs/catalina.out: Permission denied

Whats wrong??
14 years ago
Hi all!

I have Fedora 6 and apache-tomcat-5.5.25 installed in /usr/local. and jdk1.5.0_09 in same /usr/local. I have set jdk path in etc/profile and is showing correctly.
I have set JAVA_HOME as /usr/local/jdk1.5.0_09.

but when I am starting tomcat by command-
su - tomcat -c /usr/local/apache-tomcat-5.5.25/bin/startup.sh

it is showing following error-
Using CATALINA_BASE: /usr/local/apache-tomcat-5.5.25
Using CATALINA_HOME: /usr/local/apache-tomcat-5.5.25
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.25/temp
Using JRE_HOME: /usr/local/jdk1.5.0_09
touch: cannot touch `/usr/local/apache-tomcat-5.5.25/logs/catalina.out': Permission denied
/usr/local/apache-tomcat-5.5.25/bin/catalina.sh: line 273: /usr/local/apache-tomcat-5.5.25/logs/catalina.out: Permission denied

Whats wrong??
14 years ago
Hi all!

I have Fedora 6 and apache-tomcat-5.5.25 installed in /usr/local. and jdk1.5.0_09 in same /usr/local. I have set jdk path in etc/profile and is showing correctly.
I have set JAVA_HOME as /usr/local/jdk1.5.0_09.

but when I am starting tomcat by command-
su - tomcat -c /usr/local/apache-tomcat-5.5.25/bin/startup.sh

it is showing following error-
Using CATALINA_BASE: /usr/local/apache-tomcat-5.5.25
Using CATALINA_HOME: /usr/local/apache-tomcat-5.5.25
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.25/temp
Using JRE_HOME: /usr/local/jdk1.5.0_09
touch: cannot touch `/usr/local/apache-tomcat-5.5.25/logs/catalina.out': Permission denied
/usr/local/apache-tomcat-5.5.25/bin/catalina.sh: line 273: /usr/local/apache-tomcat-5.5.25/logs/catalina.out: Permission denied

Whats wrong??
14 years ago
Ya i Checked but still not working. I have doubt in SID and user password.How can i know what is SID value (where it get stored in oracle directory). is scott and tiger are correct?
java.sql.SQLException: Invalid Oracle URL specified
Hi all!

I am using jdk1.6 and oracle 9i. My jdbc driver is classes111.jar. Though this is getting loaded but i am not able to connect my application with database. Connection string is-

Connection conn = DriverManager.getConnection("jdbc:oracle:thin@localhost:1521:<SID name>","scott","tiger");

It is throwing SQLException.

Whats wrong??
Hi all!

I have a jsp on which I give some inputs. It passes to a servlet on subitting it. In Servlet all input information gets entered in database table. At front end it should prompt a message on same jsp page that data has been entered and if user wants more entry then he should able to enter next record on same jsp page else redirect to different page.

Thanks.
14 years ago
Hi all!

How is that possible to upload image in database table by selecting image file in FileChooser.I want to upload imgage file, not its name.

Thanks.
14 years ago
Hi all!!



I have a jsp page on which there are two selection lists. One is for publisher names list and second is for journal names list corresponding to publisher selected in first selection list.



When publisher name is selected in first selection list then all journal names should be listed in second selection list. it requires fetching rows in database.





ie; action is onChange of first selection list ie; javascript and database is of scriptlet part.



how to do that??

I know that scriptlet can't be used in javascript. and it is possible by submitting this form. but i don't want to submit this form.



Please help me out.



Thanks