thanks at all,
this is a server problem, that i not understand: whith a db-pilot (a part of
jbuilder) i can connect and run queries on db2.
With same jdbc driver and same connection properties i can not connect to
db2 with jdbc... error message is the same as in my first mail.
well, i must speak with my admin...
Nikolai
2006/8/1, Andrus Adamchik <andru..bjectstyle.org>:
>
> The first error seems to be related to the second - for whatever
> reason JDBC connection fails (and DB2 is at its best not telling why).
>
> I don't have a specific advice, as this can be any number of things
> (including permissions, etc.). Try connecting from JDBC, bypassing
> Cayenne and see if you can get more info on why it fails.
>
> Andrus
>
>
> On Aug 1, 2006, at 4:49 AM, Nikolai Raitsev wrote:
>
> > Hello all,
> >
> > I have a problem running Cayenne with DB2 UDB
> >
> > I have a following code:
> >
> > Setting connection properties:
> >
> > ///
> > DataSource dataSource = new PoolManager("com.ibm.db2.jcc.DB2Driver",
> > "jdbc:db2://sunlinuxdb2:60000/testjdb", 1, 1, "NRA", "xxx");
> > Configuration config = Configuration.getSharedConfiguration();
> > DataDomain dataDomain = config.getDomain();
> >
> > DataNode dataNode = dataDomain.getNode("DPVWNode");
> > dataNode.setDataSource(dataSource);
> >
> > ///
> >
> > Getting DataContext:
> > //
> > dataContext = DataContext.createDataContext();
> >
> > ///and now run a query:
> >
> > SelectQuery selQueryInterface = new SelectQuery("TestClass");
> > dataObjectsInInterface = new DataObjectList(dataContext.performQuery
> > (selQueryInterface));
> >
> >
> > On performQuery i get an exception:
> > INFO QueryLogger: --- will run 1 query.
> > Exception in thread "main"
> > org.objectstyle.cayenne.CayenneRuntimeException:
> > [v.1.2RC1 May 31 2006] Error detecting database type
> > at org.objectstyle.cayenne.dba.AutoAdapter.loadAdapter
> > (AutoAdapter.java
> > :196)
> > at org.objectstyle.cayenne.dba.AutoAdapter.getAdapter
> > (AutoAdapter.java
> > :166)
> > at org.objectstyle.cayenne.dba.AutoAdapter.getExtendedTypes(
> > AutoAdapter.java:276)
> > at org.objectstyle.cayenne.access.DataNode.performQueries
> > (DataNode.java
> > :282)
> > at org.objectstyle.cayenne.access.DataDomainQueryAction.runQuery(
> > DataDomainQueryAction.java:355)
> >
> > ... more exceptions
> >
> > if i set explicitely a DB2-Adapter like this:
> >
> > DataNode dataNode = dataDomain.getNode("DPVWNode");
> > dataNode.setAdapter(new org.objectstyle.cayenne.dba.db2.DB2Adapter());
> > dataNode.setDataSource(dataSource);
> >
> > i get an exception again:
> >
> > INFO QueryLogger: --- will run 1 query.
> > Exception in thread "main" INFO QueryLogger: *** error.
> > com.ibm.db2.jcc.b.SQLException
> > at com.ibm.db2.jcc.b.l.a(l.java:1469)
> > at com.ibm.db2.jcc.a.bb.h(bb.java:541)
> > at com.ibm.db2.jcc.a.bb.g(bb.java:443)
> > at com.ibm.db2.jcc.a.bb.d(bb.java:276)
> > at com.ibm.db2.jcc.a.bb.d(bb.java:90)
> > at com.ibm.db2.jcc.a.b.a(b.java:935)
> > at com.ibm.db2.jcc.a.b.a(b.java:450)
> > at com.ibm.db2.jcc.a.b.a(b.java:293)
> > at com.ibm.db2.jcc.a.b.<init>(b.java:207)
> > at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:244)
> > at org.objectstyle.cayenne.conn.DriverDataSource.getConnection(
> > DriverDataSource.java:151)
> > ..... more exceptions
> >
> > at application.run.Run.main(Run.java:167)
> > org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2RC1 May 31
> > 2006]
> > Global exception.
> > at
> > org.objectstyle.cayenne.access.DataDomainQueryAction.nextGlobalExcepti
> > on(
> > DataDomainQueryAction.java:486)
> > at org.objectstyle.cayenne.access.DataNode.performQueries
> > (DataNode.java
> > :297)
> > at org.objectstyle.cayenne.access.DataDomainQueryAction.runQuery(
> > DataDomainQueryAction.java:355)
> >
> > ...more excepions
> >
> > what is a problem here?
> >
> > i run cayenne with 4 DBMS (MySQL, DB2/As400, Oracle, SQL Server)
> > without
> > problems...
> >
> > thanks, and best regards,
> >
> > Nikolai
>
>
This archive was generated by hypermail 2.0.0 : Wed Aug 02 2006 - 03:58:15 EDT