db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Shifman <mark.shif...@yale.edu>
Subject Problem reading model from live database
Date Wed, 11 Jan 2006 13:57:40 GMT
Hi:
I just started playing with ddlutils and I was trying to read a live 
database
and write the structure to a file (hopefully as sql to avoid dbartisan). 
1. the example from api-usage.html didn't work in my hands since

platform.readModelFromDatabase(); was not defined in version from yesterday.

2.  I tried (actually with a bunch of different readModelFromDatabase's)

	public static void writemodel (DataSource dataSource, String filename) throws Exception
	{
	    Platform platform = PlatformFactory.createNewPlatformInstance(dataSource);
	    Database db =platform.readModelFromDatabase(null,null,null,new String[] {});
	    new DatabaseIO().write( db ,filename);
	}
and got org.apache.ddlutils.DynaSqlException: java.sql.SQLException: ORA-00911: invalid character
The full stack trace is below.
My database is Oracle 9.  
What am I doing wrong? I must be missing something quite basic.
thanks in advance
mas



org.apache.ddlutils.DynaSqlException: java.sql.SQLException: ORA-00911: invalid character

	at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1472)
	at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1454)
	at org.ycmi.ypedDLL.getDLL.writemodel(getDLL.java:39)
	at org.ycmi.ypedDLL.getDLL.main(getDLL.java:24)
Caused by: java.sql.SQLException: ORA-00911: invalid character

	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
	at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
	at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:579)
	at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
	at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1094)
	at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2132)
	at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2015)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2877)
	at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:858)
	at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3671)
	at org.apache.ddlutils.platform.DatabaseMetaDataWrapper.getIndices(DatabaseMetaDataWrapper.java:190)
	at org.apache.ddlutils.platform.JdbcModelReader.readIndices(JdbcModelReader.java:840)
	at org.apache.ddlutils.platform.JdbcModelReader.readTable(JdbcModelReader.java:502)
	at org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcModelReader.java:460)
	at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:423)
	at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1465)
	... 3 more


-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shifman@yale.edu


Mime
View raw message