• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use jdo schematool to find the difference in jdo.mapping and the actual database?  RSS feed

Asha Balan
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am a testing personnel. After deploying the build, I used to get a lot of jdo errors telling "kodo.jdbc.meta.MappingInfoNotFoundException: The "column" attribute/extension for field "myPackage.someColumn" is missing or names a column "some_column" in table "myTable" that does not exist. After catching the corresponding developer and correcting the error, I will get the next error related to another missing column... So to resolve this tiresome situation, wanted to use some tool which can give me such missing or modified columns in all tables of my database in a single step. My application is built with Java, uses MySQL 5.x and KODO JDO and JBoss. So read about jdo schematool and tried to use it as below. But ending in error. Can anyone help me please?

java -cp ./lib/commons-pool-1.1.jar:./lib/kodo-jdo-runtime.jar:./lib/jdo-1.0.1.jar:./lib/commons-lang-2.1.jar:./lib/commons-collections.jar:./lib/jbossall-client.jar:./lib/myApplication.ear/myCoreModule.jar:./lib/mysql-connector-java-3.0.11-stable-bin.jar:./kodo-jdo.jar:. kodo.jdbc.schema.SchemaTool -p ./kodo.properties -a add -f stdout ./jdo.jdo
160 INFO [main] kodo.jdbc.JDBC - Using dictionary class "kodo.jdbc.sql.MySQLDictionary" (MySQL 5.0.41-log ,MySQL-AB JDBC Driver mysql-connector-java-3.0.11-stable ( $Date: 2004/02/04 02:47:36 $, $Revision: $ )).
168 INFO [main] kodo.Tool - Schema tool will run on schema file "./jdo.jdo".
168 INFO [main] kodo.jdbc.Schema - Parsing metadata resource "file:/usr/local/qa/AIMS-5.1.5/./jdo.jdo".
Exception in thread "main" java.io.IOException: org.xml.sax.SAXException: file:/usr/local/qa/AIMS-5.1.5/./jdo.jdo [Location: Line: 38, C: 6]: org.xml.sax.SAXParseException: Document root element "jdo", must match DOCTYPE root "schemas".
at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:320)
at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:278)
at kodo.jdbc.schema.SchemaTool.run(SchemaTool.java:1370)
at kodo.jdbc.schema.SchemaTool.run(SchemaTool.java:1348)
at kodo.jdbc.schema.SchemaTool.main(SchemaTool.java:1298)

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!