Re: [OJB-developers] OJB with Ms Access
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-05-01 19:03:03
|
Hi Sara Sara Facchinetti wrote: > Hi, > > I tried to use ojb with Ms Access but something was wrong. > > If I put on the repository.xml the tag <jdbc.level>1.0</jdbc.level> the > application gives me the following error "[BOOT] ERROR: unknown literal: > jdbc.level > [ojb.broker.metadata.RepositoryXmlHandler] ERROR: null". Mhh, that's strange. Does your repository.dtd have entries like: <!ELEMENT JdbcConnectionDescriptor (dbms.name, jdbc.level?, ((driver.name, url.protocol, url.subprotocol, url.dbalias) | datasource.name), user.name?, user.passwd?)> and <!ELEMENT jdbc.level (#PCDATA)> If not, your DTD is corrupt. If yes, something must be wrong with your xml file. Your JdbcConnectionDescriptor should look like this: <JdbcConnectionDescriptor id="default"> <dbms.name>MsAccess</dbms.name> <jdbc.level>1.0</jdbc.level> <driver.name>sun.jdbc.odbc.JdbcOdbcDriver</driver.name> <url.protocol>jdbc</url.protocol> <url.subprotocol>odbc</url.subprotocol> <url.dbalias>OJB</url.dbalias> </JdbcConnectionDescriptor> JDBC level 1.0 is required for proper working with access. Currently there are some Junit tests that do not pass for access (BLOB and CLOB stuff) but most other things should work. HTH, Thomas > > On the other hand, if I avoid to put the jdbc.level tag and I run the > application when it tries to read from the db the error is > "java.lang.NullPointerException > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPrepar > edStatement.java:1026) > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.setChar(JdbcOdbcPreparedState > ment.java:2778) > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.setString(JdbcOdbcPreparedSta > tement.java:772)....." > > Does someone know the solution? > > Thanks > sara > > > > > > |