JDBC can connected informix_se DBMS but not to the databases
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Java & JDBC Development
Hello, I am having a problem with getting jdbc to see the DBMS's (server_se) database (login). The database login contains a table called login. Connection conn = DriverManager.getConnection ("jdbc:informix-sqli://somehost:1536:/login" + "INFORMIXSERVER=server_se;" + "user=vwfecom;" + "password=testpass;" I put the above within a 'try' and catch catch with System.out.println("Could connect to db....."); System.out.println(e); now standard I/0 produces: Could not CONNECT to DATABASE server..... java.sql.SQLException Exception occurred during event dispatching: java.lang.RuntimeException: Error occurred while connecting to database: Database not found or no system permission. at JLogin.ping(JLogin.java) at JLogin.pingDatabaseBTN_ActionPerformed(JLogin.java) at JLogin$SymAction.actionPerformed(JLogin.java) at java.awt.Button.processActionEvent(Unknown Source) at java.awt.Button.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) I have checked all db files belong to user informix and have chmod 777 just to make sure The informix server log is producing this: 2000-08-21 20:12:40.710000 sqlexec <UNKNOWN-HOST> vwfecom -X(null) 2000-08-21 20:13:21.580000 sqlexec <UNKNOWN-HOST> vwfecom -X(null) Thanks for your help Sent via Deja.com http://www.deja.com/ Before you buy.
Hi, Just having a quick look at your JDBC URL you seem to have a typo - you have an extra ":" between your port number and the database name and there is a ":" missing from between your database name (login) and the first parameter (INFORMIXSERVER). E.g. from Page 45 of the JDBC Programmers Guide: jdbc:informix-sqli://123.45.67.89:1533/testDB:INFORMIXSERVER=myserver;user=r dtest;password=test HTH ben <vwxchoy@hotmail.com> wrote in message news:8nr79n$64a$1@nnrp1.deja.com... > Hello, > > I am having a problem with getting jdbc to see the DBMS's (server_se) > database (login). The database login contains a table called login. > > Connection conn = DriverManager.getConnection > ("jdbc:informix-sqli://somehost:1536:/login" + > "INFORMIXSERVER=server_se;" + > "user=vwfecom;" + > "password=testpass;" > > I put the above within a 'try' > > and catch catch with > System.out.println("Could connect to db....."); > System.out.println(e); > > > now standard I/0 produces: > > Could not CONNECT to DATABASE server..... > java.sql.SQLException > > Exception occurred during event dispatching: > java.lang.RuntimeException: Error occurred while connecting to database: > Database not found or no system permission. > at JLogin.ping(JLogin.java) > at JLogin.pingDatabaseBTN_ActionPerformed(JLogin.java) > at JLogin$SymAction.actionPerformed(JLogin.java) > at java.awt.Button.processActionEvent(Unknown Source) > at java.awt.Button.processEvent(Unknown Source) > at java.awt.Component.dispatchEventImpl(Unknown Source) > at java.awt.Component.dispatchEvent(Unknown Source) > at java.awt.EventQueue.dispatchEvent(Unknown Source) > at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.run(Unknown Source) > I have checked all db files belong to user informix and have chmod 777 > just to make sure > > The informix server log is producing this: > > 2000-08-21 20:12:40.710000 sqlexec <UNKNOWN-HOST> vwfecom -X(null) > 2000-08-21 20:13:21.580000 sqlexec <UNKNOWN-HOST> vwfecom -X(null) > > > Thanks for your help > > > Sent via Deja.com http://www.deja.com/ > Before you buy. >
My apologies
conn = DriverManager.getConnection
("jdbc:informix-sqli://server1:1536/dbname:INFORMIXSERVER=server_se;user
=username;password=test123");
I am looking at the server log at it is producing
2000-08-21 20:12:40.710000 sqlexec <UNKNOWN-HOST> vwfecom -Xdbname
> > 2000-08-21 20:13:21.580000 sqlexec <UNKNOWN-HOST> vwfecom -Xdbname
doing a connection via dbaccess gives this:
2000-08-22 10:07:30.310000 sqlexec server1 root -X(null)
2000-08-22 10:07:31.240000 sqlexec server1 root -p(null)
the wierd thing is that if I get rid of the dbname in the url then it
throws no exceptions.
but when it comes time to stmt.executeUpdate ("database dbname;") errors
come back again.
Am I correct in using setlitcp as the listening protocol in sqlhosts. I
might be wrong in this part of the server configuration.
Thanks for your help
In article <VVbo5.1812$Gm3.679481@nnrp5-w.sbc.net>,
"Ben Wilde" <pollyben@pacbell.nospam.net> wrote:
> Hi,
>
> Just having a quick look at your JDBC URL you seem to have a typo -
you have
> an extra ":" between your port number and the database name and there
is a
> ":" missing from between your database name (login) and the first
parameter
> (INFORMIXSERVER).
>
> E.g. from Page 45 of the JDBC Programmers Guide:
>
>
jdbc:informix-sqli://123.45.67.89:1533/testDB:INFORMIXSERVER=myserver;us
er=r
> dtest;password=test
>
> HTH
>
> ben
>
> <vwxchoy@hotmail.com> wrote in message
news:8nr79n$64a$1@nnrp1.deja.com...
> > Hello,
> >
> > I am having a problem with getting jdbc to see the DBMS's
(server_se)
> > database (login). The database login contains a table called login.
> >
> > Connection conn = DriverManager.getConnection
> > ("jdbc:informix-sqli://somehost:1536:/login" +
> > "INFORMIXSERVER=server_se;" +
> > "user=vwfecom;" +
> > "password=testpass;"
> >
> > I put the above within a 'try'
> >
> > and catch catch with
> > System.out.println("Could connect to db.....");
> > System.out.println(e);
> >
> >
> > now standard I/0 produces:
> >
> > Could not CONNECT to DATABASE server.....
> > java.sql.SQLException
> >
> > Exception occurred during event dispatching:
> > java.lang.RuntimeException: Error occurred while connecting to
database:
> > Database not found or no system permission.
> > at JLogin.ping(JLogin.java)
> > at JLogin.pingDatabaseBTN_ActionPerformed(JLogin.java)
> > at JLogin$SymAction.actionPerformed(JLogin.java)
> > at java.awt.Button.processActionEvent(Unknown Source)
> > at java.awt.Button.processEvent(Unknown Source)
> > at java.awt.Component.dispatchEventImpl(Unknown Source)
> > at java.awt.Component.dispatchEvent(Unknown Source)
> > at java.awt.EventQueue.dispatchEvent(Unknown Source)
> > at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> > at java.awt.EventDispatchThread.run(Unknown Source)
> > I have checked all db files belong to user informix and have chmod
777
> > just to make sure
> >
> > The informix server log is producing this:
> >
> > 2000-08-21 20:12:40.710000 sqlexec <UNKNOWN-HOST> vwfecom -X(null)
> > 2000-08-21 20:13:21.580000 sqlexec <UNKNOWN-HOST> vwfecom -X(null)
> >
> >
> > Thanks for your help
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Here is the connect string you use:
jdbc:informix-sqli://server1:1536/dbname:INFORMIXSERVER=server_se;user=usern
ame;password=test123
What is the name of the database you are trying to connect to? Have you
actually named the database "dbname"? Here is the connect string we use:
jdbc:informix-sqli://alfred:8503/rock:INFORMIXSERVER=rock2tcp
HTH
Cheers--
Charles
vwxchoy@hotmail.com wrote in article <8nsn93$vr2$1@nnrp1.deja.com>...
> My apologies
>
> conn = DriverManager.getConnection
> ("
>
> I am looking at the server log at it is producing
>
> 2000-08-21 20:12:40.710000 sqlexec <UNKNOWN-HOST> vwfecom -Xdbname
> > > 2000-08-21 20:13:21.580000 sqlexec <UNKNOWN-HOST> vwfecom -Xdbname
>
> doing a connection via dbaccess gives this:
> 2000-08-22 10:07:30.310000 sqlexec server1 root -X(null)
> 2000-08-22 10:07:31.240000 sqlexec server1 root -p(null)
>
> the wierd thing is that if I get rid of the dbname in the url then it
> throws no exceptions.
> but when it comes time to stmt.executeUpdate ("database dbname;") errors
> come back again.
>
> Am I correct in using setlitcp as the listening protocol in sqlhosts. I
> might be wrong in this part of the server configuration.
>
> Thanks for your help
For SE you must include the full pathname of the database in the connection
string.
Jean-Guy
<charles.johnson@news.accessllc.net> a 'crit dans le message news:
01c00c31$c35a9c00$2f0a020a@pc0333...
> Here is the connect string you use:
>
>
jdbc:informix-sqli://server1:1536/dbname:INFORMIXSERVER=server_se;user=usern
> ame;password=test123
>
> What is the name of the database you are trying to connect to? Have you
> actually named the database "dbname"? Here is the connect string we use:
>
> jdbc:informix-sqli://alfred:8503/rock:INFORMIXSERVER=rock2tcp
>
> HTH
>
> Cheers--
> Charles
>
>
> vwxchoy@hotmail.com wrote in article <8nsn93$vr2$1@nnrp1.deja.com>...
> > My apologies
> >
> > conn = DriverManager.getConnection
> > ("
> >
> > I am looking at the server log at it is producing
> >
> > 2000-08-21 20:12:40.710000 sqlexec <UNKNOWN-HOST> vwfecom -Xdbname
> > > > 2000-08-21 20:13:21.580000 sqlexec <UNKNOWN-HOST> vwfecom -Xdbname
> >
> > doing a connection via dbaccess gives this:
> > 2000-08-22 10:07:30.310000 sqlexec server1 root -X(null)
> > 2000-08-22 10:07:31.240000 sqlexec server1 root -p(null)
> >
> > the wierd thing is that if I get rid of the dbname in the url then it
> > throws no exceptions.
> > but when it comes time to stmt.executeUpdate ("database dbname;") errors
> > come back again.
> >
> > Am I correct in using setlitcp as the listening protocol in sqlhosts. I
> > might be wrong in this part of the server configuration.
> >
> > Thanks for your help
>