-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Console configuration does not display database metadata
PostPosted: Fri Mar 26, 2010 12:39 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
My issue: when I run the Tools' reverse engineering code generator against a particular database, no code is generated, and no error is shown.

My console config also fails to display any database metadata, and this seems to correlate to the fact that reverse engineering does not work, so I've focused on that problem first. The database being used is MetaMatrix (JBoss Enterprise Data Services Platform).

I've created a cfg.xml file, and associated it with my console. I have a dialect for the database, and the jar is included in my classpath, along with the JDBC driver.

The console config appears to connect to the database successfully -- I can verify the connection in the DB. However, upon expanding the "database" tab, no tables are displayed. Using a third-party JDBC tool, I can confirm that there are plenty of tables in the DB. I can also export the same schema into a different DB (Teiid), where it works as expected.

I modified my hibernate-log4j.properties to perform trace-level logging. Surprisingly, I see no error, and the logs appear to be identical to what I get when I perform a successful reveng against, say, Oracle. I will paste the logs in a separate post here, in case they are useful.

Questions:
- Any ideas on what could be causing the problem?
- Any suggestions on the best way to further debug the problem?

I'd be willing to override the MetaDataDialect class or Strategy class if I thought that would fix the problem. My issue is that I can't even identify what is causing the problem at this point, because there's not enough information in the trace logging, and no error is thrown. Thanks for your help!


Last edited by mwalker on Fri Mar 26, 2010 12:45 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Fri Mar 26, 2010 12:44 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
Here is the trace logging output (with server names and passwords removed to protect the innocent):

2010-03-26 10:43:10,281 INFO Worker-13 org.hibernate.cfg.Configuration - configuring from file: mmx.cfg.xml
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.util.DTDEntityResolver - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.util.DTDEntityResolver - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.util.DTDEntityResolver - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.cfg.Configuration - hibernate.connection.driver_class=com.metamatrix.jdbc.MMDriver
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.cfg.Configuration - hibernate.connection.password=pwd
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.cfg.Configuration - hibernate.connection.url=jdbc:metamatrix:portfolio@mm://devl-svr-72.company.com:31000
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.cfg.Configuration - hibernate.connection.username=MetaMatrixAdmin
2010-03-26 10:43:10,281 DEBUG Worker-13 org.hibernate.cfg.Configuration - hibernate.dialect=com.metamatrix.hibernate.MetaMatrixDialect
2010-03-26 10:43:10,281 INFO Worker-13 org.hibernate.cfg.Configuration - Configured SessionFactory: null
2010-03-26 10:43:10,296 DEBUG Worker-13 org.hibernate.cfg.Configuration - properties: {java.vendor=Sun Microsystems Inc., osgi.bundles.defaultStartLevel=4, org.eclipse.debug.ui.breakpoints.toggleFactoriesUsed=false, org.osgi.supports.framework.extension=true, hibernate.connection.url=jdbc:metamatrix:portfolio@mm://devl-svr-72.company.com:31000, sun.management.compiler=HotSpot Client Compiler, eclipse.p2.profile=epp.package.jee, os.name=Windows XP, sun.boot.class.path=C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\classes, osgi.ws=win32, sun.desktop=windows, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.6.0_17-b04, osgi.instance.area=file:/C:/eclipse-workspaces/company/, user.name=Michael Walker, osgi.framework.extensions=reference:file:javax.transaction_1.1.1.v200909161740.jar,reference:file:org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar, org.osgi.framework.system.packages=javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.ws.wsaddressing,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers, eclipse.launcher=C:\eclipse\eclipse.exe, osgi.frameworkClassPath=., file:c:/eclipse/plugins/javax.transaction_1.1.1.v200909161740.jar, file:c:/eclipse/plugins/org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar, org.osgi.framework.language=en, user.language=en, org.osgi.framework.processor=x86, osgi.syspath=c:\eclipse\plugins, sun.boot.library.path=C:\Program Files\Java\jre6\bin, osgi.manifest.cache=C:\eclipse\configuration\org.eclipse.osgi\manifests, java.version=1.6.0_17, org.osgi.framework.os.name=WindowsXP, user.timezone=America/Los_Angeles, sun.arch.data.model=32, osgi.bundles=reference:file:javax.transaction_1.1.1.v200909161740.jar,reference:file:org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar,reference:file:org.eclipse.equinox.simpleconfigurator_1.0.101.R35x_v20090807-1100.jar@1:start, java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed, osgi.tracefile=C:\eclipse-workspaces\company\.metadata\trace.log, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, eclipse.application=org.eclipse.ui.ide.workbench, file.encoding.pkg=sun.io, org.osgi.framework.vendor=Eclipse, file.separator=\, java.specification.name=Java Platform API Specification, java.class.version=50.0, user.country=US, org.eclipse.equinox.launcher.splash.location=C:\eclipse\\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp, java.home=C:\Program Files\Java\jre6, osgi.os=win32, eclipse.commands=-os
win32
-ws
win32
-arch
x86
-showsplash
C:\eclipse\\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp
-launcher
C:\eclipse\eclipse.exe
-name
Eclipse
--launcher.library
C:\eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
-startup
C:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-product
org.eclipse.epp.package.jee.product
-vm
C:\Program Files\Java\jre6\bin\client\jvm.dll
, java.vm.info=mixed mode, osgi.splashLocation=C:\eclipse\\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp, os.version=5.1, osgi.arch=x86, path.separator=;, java.vm.version=14.3-b01, hibernate.connection.password=pwd, org.osgi.supports.framework.fragment=true, user.variant=, osgi.framework.shape=jar, java.awt.printerjob=sun.awt.windows.WPrinterJob, osgi.instance.area.default=file:/C:/Documents and Settings/Michael Walker/workspace/, sun.io.unicode.encoding=UnicodeLittle, org.osgi.framework.version=1.5.0, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=MetaMatrixAdmin, osgi.install.area=file:/C:/eclipse/, osgi.framework=file:/c:/eclipse/plugins/org.eclipse.osgi_3.5.1.R35x_v20090827.jar, user.home=C:\Documents and Settings\Michael Walker, org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info, osgi.bundlestore=C:\eclipse\configuration\org.eclipse.osgi\bundles, osgi.splashPath=platform:/base/plugins/org.eclipse.platform, java.specification.vendor=Sun Microsystems Inc., osgi.nl=en_US, java.library.path=C:\eclipse;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\ant\apache-ant-1.7.1\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\VDMSound, java.vendor.url=http://java.sun.com/, eclipse.startTime=1269621735703, org.osgi.framework.os.version=5.1.0, eclipse.p2.data.area=@config.dir/../p2/, hibernate.connection.driver_class=com.metamatrix.jdbc.MMDriver, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=com.metamatrix.hibernate.MetaMatrixDialect, java.runtime.name=Java(TM) SE Runtime Environment, java.class.path=C:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar, hibernate.bytecode.use_reflection_optimizer=false, osgi.requiredJavaVersion=1.5, org.eclipse.update.reconcile=false, eclipse.vm=C:\Program Files\Java\jre6\bin\client\jvm.dll, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, sun.os.patch.level=Service Pack 3, java.io.tmpdir=C:\DOCUME~1\MICHAE~1\LOCALS~1\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, eclipse.product=org.eclipse.epp.package.jee.product, eclipse.home.location=file:/C:/eclipse/, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, user.dir=C:\eclipse, org.osgi.supports.framework.requirebundle=true, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog, maven.mode.standalone=true, file.encoding=Cp1252, osgi.framework.version=3.5.1.R35x_v20090827, eclipse.buildId=M20090917-0800, eclipse.vmargs=-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
C:\Program Files\Java\jdk1.6.0_17\bin\javaw
-XX:MaxPermSize=256m
-Djava.class.path=C:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
, shutdownHookInstalled=true, java.specification.version=1.6, org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6, osgi.logfile=C:\eclipse-workspaces\company\.metadata\.log, osgi.configuration.area=file:/C:/eclipse/configuration/}
2010-03-26 10:43:10,359 DEBUG Worker-13 org.hibernate.cfg.Configuration - processing extends queue
2010-03-26 10:43:10,359 DEBUG Worker-13 org.hibernate.cfg.Configuration - processing collection mappings
2010-03-26 10:43:10,359 DEBUG Worker-13 org.hibernate.cfg.Configuration - processing native query and ResultSetMapping mappings
2010-03-26 10:43:10,359 DEBUG Worker-13 org.hibernate.cfg.Configuration - processing association property references
2010-03-26 10:43:10,359 DEBUG Worker-13 org.hibernate.cfg.Configuration - processing foreign key constraints
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.util.DTDEntityResolver - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.util.DTDEntityResolver - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.util.DTDEntityResolver - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
2010-03-26 10:43:16,593 INFO Worker-16 org.hibernate.cfg.Configuration - configuring from XML document
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.cfg.Configuration - hibernate.connection.driver_class=com.metamatrix.jdbc.MMDriver
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.cfg.Configuration - hibernate.connection.password=pwd
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.cfg.Configuration - hibernate.connection.url=jdbc:metamatrix:portfolio@mm://devl-svr-72.company.com:31000
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.cfg.Configuration - hibernate.connection.username=MetaMatrixAdmin
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.cfg.Configuration - hibernate.dialect=com.metamatrix.hibernate.MetaMatrixDialect
2010-03-26 10:43:16,593 INFO Worker-16 org.hibernate.cfg.Configuration - Configured SessionFactory: null
2010-03-26 10:43:16,593 DEBUG Worker-16 org.hibernate.cfg.Configuration - properties: {java.vendor=Sun Microsystems Inc., osgi.bundles.defaultStartLevel=4, org.eclipse.debug.ui.breakpoints.toggleFactoriesUsed=false, org.osgi.supports.framework.extension=true, hibernate.connection.url=jdbc:metamatrix:portfolio@mm://devl-svr-72.company.com:31000, sun.management.compiler=HotSpot Client Compiler, eclipse.p2.profile=epp.package.jee, os.name=Windows XP, sun.boot.class.path=C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\classes, osgi.ws=win32, sun.desktop=windows, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.6.0_17-b04, osgi.instance.area=file:/C:/eclipse-workspaces/company/, user.name=Michael Walker, osgi.framework.extensions=reference:file:javax.transaction_1.1.1.v200909161740.jar,reference:file:org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar, org.osgi.framework.system.packages=javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.ws.wsaddressing,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers, eclipse.launcher=C:\eclipse\eclipse.exe, osgi.frameworkClassPath=., file:c:/eclipse/plugins/javax.transaction_1.1.1.v200909161740.jar, file:c:/eclipse/plugins/org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar, org.osgi.framework.language=en, user.language=en, org.osgi.framework.processor=x86, osgi.syspath=c:\eclipse\plugins, sun.boot.library.path=C:\Program Files\Java\jre6\bin, osgi.manifest.cache=C:\eclipse\configuration\org.eclipse.osgi\manifests, java.version=1.6.0_17, org.osgi.framework.os.name=WindowsXP, user.timezone=America/Los_Angeles, sun.arch.data.model=32, osgi.bundles=reference:file:javax.transaction_1.1.1.v200909161740.jar,reference:file:org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar,reference:file:org.eclipse.equinox.simpleconfigurator_1.0.101.R35x_v20090807-1100.jar@1:start, java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed, osgi.tracefile=C:\eclipse-workspaces\company\.metadata\trace.log, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, eclipse.application=org.eclipse.ui.ide.workbench, file.encoding.pkg=sun.io, org.osgi.framework.vendor=Eclipse, file.separator=\, java.specification.name=Java Platform API Specification, java.class.version=50.0, user.country=US, org.eclipse.equinox.launcher.splash.location=C:\eclipse\\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp, java.home=C:\Program Files\Java\jre6, osgi.os=win32, eclipse.commands=-os
win32
-ws
win32
-arch
x86
-showsplash
C:\eclipse\\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp
-launcher
C:\eclipse\eclipse.exe
-name
Eclipse
--launcher.library
C:\eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
-startup
C:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-product
org.eclipse.epp.package.jee.product
-vm
C:\Program Files\Java\jre6\bin\client\jvm.dll
, java.vm.info=mixed mode, osgi.splashLocation=C:\eclipse\\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp, os.version=5.1, osgi.arch=x86, path.separator=;, java.vm.version=14.3-b01, hibernate.connection.password=pwd, org.osgi.supports.framework.fragment=true, user.variant=, osgi.framework.shape=jar, java.awt.printerjob=sun.awt.windows.WPrinterJob, osgi.instance.area.default=file:/C:/Documents and Settings/Michael Walker/workspace/, sun.io.unicode.encoding=UnicodeLittle, org.osgi.framework.version=1.5.0, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=MetaMatrixAdmin, osgi.install.area=file:/C:/eclipse/, osgi.framework=file:/c:/eclipse/plugins/org.eclipse.osgi_3.5.1.R35x_v20090827.jar, user.home=C:\Documents and Settings\Michael Walker, org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info, osgi.bundlestore=C:\eclipse\configuration\org.eclipse.osgi\bundles, osgi.splashPath=platform:/base/plugins/org.eclipse.platform, java.specification.vendor=Sun Microsystems Inc., osgi.nl=en_US, java.library.path=C:\eclipse;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\ant\apache-ant-1.7.1\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\VDMSound, java.vendor.url=http://java.sun.com/, eclipse.startTime=1269621735703, org.osgi.framework.os.version=5.1.0, eclipse.p2.data.area=@config.dir/../p2/, hibernate.connection.driver_class=com.metamatrix.jdbc.MMDriver, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=com.metamatrix.hibernate.MetaMatrixDialect, java.runtime.name=Java(TM) SE Runtime Environment, java.class.path=C:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar, hibernate.bytecode.use_reflection_optimizer=false, osgi.requiredJavaVersion=1.5, org.eclipse.update.reconcile=false, eclipse.vm=C:\Program Files\Java\jre6\bin\client\jvm.dll, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, sun.os.patch.level=Service Pack 3, java.io.tmpdir=C:\DOCUME~1\MICHAE~1\LOCALS~1\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, eclipse.product=org.eclipse.epp.package.jee.product, eclipse.home.location=file:/C:/eclipse/, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, user.dir=C:\eclipse, org.osgi.supports.framework.requirebundle=true, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog, maven.mode.standalone=true, file.encoding=Cp1252, osgi.framework.version=3.5.1.R35x_v20090827, eclipse.buildId=M20090917-0800, eclipse.vmargs=-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
C:\Program Files\Java\jdk1.6.0_17\bin\javaw
-XX:MaxPermSize=256m
-Djava.class.path=C:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
, shutdownHookInstalled=true, java.specification.version=1.6, org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6, osgi.logfile=C:\eclipse-workspaces\company\.metadata\.log, osgi.configuration.area=file:/C:/eclipse/configuration/}
2010-03-26 10:43:16,593 INFO Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
2010-03-26 10:43:16,593 INFO Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
2010-03-26 10:43:16,593 INFO Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
2010-03-26 10:43:16,593 INFO Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - using driver: com.metamatrix.jdbc.MMDriver at URL: jdbc:metamatrix:Portfolio@mm://devl-svr-72.company.com:31000;user=Metamatrixadmin;password=pwd
2010-03-26 10:43:16,593 INFO Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=MetaMatrixAdmin, password=pwd}
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.dialect.Dialect - Using dialect: com.metamatrix.hibernate.MetaMatrixDialect
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Scrollable result sets: disabled
2010-03-26 10:43:16,640 DEBUG Worker-16 org.hibernate.cfg.SettingsFactory - Wrap result sets: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Connection release mode: auto
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Query cache: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
2010-03-26 10:43:16,640 TRACE Worker-16 org.hibernate.exception.SQLExceptionConverterFactory - Using dialect defined converter
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Statistics: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
2010-03-26 10:43:16,640 INFO Worker-16 org.hibernate.cfg.SettingsFactory - Named query checking : enabled
2010-03-26 10:43:16,640 TRACE Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
2010-03-26 10:43:16,640 DEBUG Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
2010-03-26 10:43:16,796 DEBUG Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:metamatrix:Portfolio@mm://devl-svr-72.company.com:31000;user=Metamatrixadmin;password=pwd, Isolation Level: 8
2010-03-26 10:43:16,953 TRACE Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
2010-03-26 10:43:16,953 INFO Worker-16 org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:metamatrix:Portfolio@mm://devl-svr-72.company.com:31000;user=Metamatrixadmin;password=pwd


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Fri Mar 26, 2010 12:45 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
And here is my cfg file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.metamatrix.jdbc.MMDriver</property>
<property name="hibernate.connection.password">pwd</property>
<property name="hibernate.connection.url">jdbc:metamatrix:portfolio@mm://devl-svr-72.company.com:31000</property>
<property name="hibernate.connection.username">MetaMatrixAdmin</property>
<property name="hibernate.dialect">com.metamatrix.hibernate.MetaMatrixDialect</property>
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Fri Mar 26, 2010 1:00 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
Here is my log4j.properties in my eclipse/plugins/org.hibernate.eclipse... directory:

### This file is used to control the logging done by the hibernate tools eclipse plugins
### You can modfiy these to be more or less verbose depending on your needs

### Direct messages to Eclipse logging system (will be shown in Error Log)
log4j.appender.eclipselog=org.hibernate.eclipse.logging.PluginLogAppender
log4j.appender.eclipselog.layout=org.apache.log4j.PatternLayout
log4j.appender.eclipselog.layout.ConversionPattern=%d{ISO8601} %p %t %c - %m

### Direct messages from Eclipse loggin system to .metadata/plugins/org.hibernate.eclipse/hibernate-tools.log
log4j.appender.pluginlog=org.hibernate.eclipse.logging.PluginFileAppender
log4j.appender.pluginlog.File=hibernate-tools.log
log4j.appender.pluginlog.MaxFileSize=1MB
log4j.appender.pluginlog.MaxBackupIndex=1
log4j.appender.pluginlog.layout=org.apache.log4j.PatternLayout
log4j.appender.pluginlog.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n

### set log levels - for more verbose logging change 'info' to 'debug' ###
log4j.rootLogger=trace, eclipselog, pluginlog

log4j.logger.org.hibernate=trace

# Disable superflous PARSER errors.
log4j.logger.org.hibernate.PARSER=none

### log just the SQL
#log4j.logger.org.hibernate.SQL=debug

### log JDBC bind parameters ###
#log4j.logger.org.hibernate.type=info

### log schema export/update ###
#log4j.logger.org.hibernate.tool.hbm2ddl=debug

### log cache activity ###
#log4j.logger.org.hibernate.cache=debug

### log JDBC resource acquisition
#log4j.logger.org.hibernate.jdbc=debug

### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Tue Mar 30, 2010 5:15 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
bump


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Fri May 07, 2010 2:34 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
Thanks for the response.

MetaMatrix is not available for free download unfortunately. There is an open-source version of the product which actually works with Hibernate reveng, but the enterprise version is not working.

So, I don't think you'll be able to setup MMX locally, but I can test things on my end if you have ideas. I just can't seem to get any debugging output from Hibernate Tools. I'm using the Eclipse plugin. However, I also tried the command line approach/ant, and still got nothing indicating a failure.


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Wed May 19, 2010 8:13 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
OK, I'm not sure if this forum is active anymore, but I have a bit of time to try to debug this myself and would like a bit of advise. I've downloaded the source for hibernate tools. I took a quick look for the reveng.JDBCReader you've mentioned, but I actually don't see it in the tools code (perhaps this is part of hibernate core?).

Presumably, my next step is to somehow get tools to attempt to perform a reveng against my own hibernate.cfg.xml configuration. Then I can run in debug mode, etc and hopefully find the cause of the problem.

Can you point me in the right direction as to how to get this set up? Would I want to create a new test, or maybe reuse an existing one? Would maven be used to execute it?


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Thu May 20, 2010 9:54 am 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
Makes sense, but I'll need to setup a run configuration and provide a main class, and perhaps arguments, etc., in order to run the new Ecliipse instance with tools. What's the right way to setup the run configuration?


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Thu May 20, 2010 7:08 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
OK, I was able to find at least one issue that would explain the lack of results. In reveng.JDBCReader, it has a hard-coded assumption that JDBCMetaData.getTableTypes() will return the upper-case word "TABLE" or "VIEW":

Code:
if ( ("TABLE".equals(tableType) || "VIEW".equals(tableType)
...
  else {
                 log.debug("Ignoring table " + tableName + " of type " + tableType);
    }


However, my DB returns the "Table" and "View", which does not match the logic, and therefore, no tables are processed.

Not sure why I get no log output indicating as such when I run Hibernate tools.

If I can figure out how to rebuild Hibernate, I could change this code and see how much further it gets...so far, I'm getting errors in the build. If there's a how-to document for the build setup, please point me in the right direction, thanks.


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Mon May 24, 2010 8:08 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
As it turns out, the build was not easy for me to get working. The Hibernate Tools Core branch had references to the hibernate-3.2 directory, but this version was not compatible with the branch (as it yielded ClassNotFoundExceptions and the like). I ended up guessing that Hibernate 3.3.2 might work better, based on the build dates, and indeed it worked.

So, I changed the code in JDBCReader as mentioned below, built a new hibernate-tools.jar, and put it into my Eclipse plugins directory. Sure enough, this fixed the problem, and allows me to run the reverse engineering process successfully! I can now generate POJOs, DAOs, HBM mapping files, etc., automatically. The HQL editor works as well.

I did run into a few smaller issues:
- The Reverse Engineering XML file generator produces filters that aren't accurate for my DB. This can be fixed by manually editing the XML file.
- Schema documentation generation fails with an IndexOutOfBoundsException in DocBuilder, not sure why.
- The mapping diagram generation throws many exceptions, complaining that my custom Dialect class was not found, despite the fact that it's in my Hibernate configuration classpath and my project classpath.

In any case, I'm happy to say that this now generally works after applying this small fix.

Do you think this is something that a committer might want to include in the codebase for future use?


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Tue May 25, 2010 7:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I wonder why MetaMatrix decided to return "Table" and "View" when almost anyone else uses "TABLE" and "VIEW" as hinted by the javadocs for the method:
http://java.sun.com/j2se/1.4.2/docs/api ... ypes%28%29

But I guess "Typically" doesn't mean "has to" :)

As Vitali says, open a jira with the patch and we'll incorporate it.

With respect to build then we really should get hibernate tools moved to Maven so it could depend on Hibernate via maven artifacts instead of our old ant hack.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Tue May 25, 2010 1:56 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
vyemialyanchyk wrote:
Quote:
- Schema documentation generation fails with an IndexOutOfBoundsException in DocBuilder, not sure why.
- The mapping diagram generation throws many exceptions, complaining that my custom Dialect class was not found, despite the fact that it's in my Hibernate configuration classpath and my project classpath.

try to restart eclipse, clean, rebuild - if you get exceptions constantly,
could you please create jira issues here https://jira.jboss.org/browse/JBIDE with a stack traces or
just attach stacktraces to this topic. I'll try to check what is wrong.


After restarting/rebuilding Eclipse, the schema documentation errors went away - hurrah!

I still get the mapping diagram errors, complaining that the Dialect class is not found. Here's the stack trace:

java.lang.ClassNotFoundException: com.metamatrix.hibernate.MetaMatrixDialect
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.jboss.tools.hibernate.ui.view.OrmLabelProvider.updateColumnSqlType(OrmLabelProvider.java:163)
at org.jboss.tools.hibernate.ui.view.OrmLabelProvider.getText(OrmLabelProvider.java:115)
at org.jboss.tools.hibernate.ui.diagram.editors.parts.ShapeTreeEditPart.refreshVisuals(ShapeTreeEditPart.java:70)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:676)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.RootTreeEditPart.setContents(RootTreeEditPart.java:131)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:601)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:610)
at org.jboss.tools.hibernate.ui.diagram.editors.DiagramContentOutlinePage.setContents(DiagramContentOutlinePage.java:298)
at org.jboss.tools.hibernate.ui.diagram.editors.DiagramContentOutlinePage.initializeOutlineViewer(DiagramContentOutlinePage.java:272)
at org.jboss.tools.hibernate.ui.diagram.editors.DiagramContentOutlinePage.createControl(DiagramContentOutlinePage.java:224)
at org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:137)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:409)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:752)
at org.eclipse.ui.views.contentoutline.ContentOutline.partBroughtToTop(ContentOutline.java:212)
at org.eclipse.ui.part.PageBookView$4.partBroughtToTop(PageBookView.java:1015)
at org.eclipse.ui.internal.PartListenerList2$2.run(PartListenerList2.java:85)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55)
at org.eclipse.ui.internal.PartListenerList2.firePartBroughtToTop(PartListenerList2.java:83)
at org.eclipse.ui.internal.PartService.firePartBroughtToTop(PartService.java:212)
at org.eclipse.ui.internal.WorkbenchPagePartList.firePartBroughtToTop(WorkbenchPagePartList.java:76)
at org.eclipse.ui.internal.WorkbenchPagePartList.fireActiveEditorChanged(WorkbenchPagePartList.java:52)
at org.eclipse.ui.internal.PartList.setActiveEditor(PartList.java:162)
at org.eclipse.ui.internal.WorkbenchPage.makeActiveEditor(WorkbenchPage.java:1277)
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3524)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:614)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2869)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:439)
at org.jboss.tools.hibernate.ui.view.OpenDiagramActionDelegate.openEditor(OpenDiagramActionDelegate.java:133)
at org.jboss.tools.hibernate.ui.view.OpenDiagramActionDelegate.run(OpenDiagramActionDelegate.java:110)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)


I've confirmed that my Hibernate configuration has the MetaMatrixDialect.jar in its classpath. Is there something else I'm missing?

This is not very important to me; the diagram actually displays, we just see lots of errors in the console. In any case, let me know if you'd like more info on this one. I'll address the other questions in a separate response...


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Tue May 25, 2010 2:24 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
vyemialyanchyk wrote:
Quote:
- The Reverse Engineering XML file generator produces filters that aren't accurate for my DB. This can be fixed by manually editing the XML file.

share, what is not accurate with your DB case, have you any thoughts howto improve this?


This problem only occurs when I attempt to include/exclude all tables in a given schema. If I specify a particular table, the generated filter is correct.

When I attempt to include all tables in a given schema, this filter is generated:
Code:
<table-filter match-catalog="POC" match-schema="CDB_CIM" match-name=".*"/>

This one is incorrect -- the database actually has no catalog defined, and has exactly one schema defined, named "POC". The odd thing is that the "configure Table filters" wizard is displaying multiple schema. And it's putting the schema name in the catalog name, but only when I create a filter rule for an entire "schema".

When I attempt to include a particular table, this filter is generated:
Code:
<table-filter match-catalog=".*" match-schema="POC" match-name="CDB_CIM.GLOBAL_SIZE"/>

This filter is correct, and works as expected.

So I wonder, how is the filter wizard getting these multiple schema names from the DB?

I wrote a quick sample program to call DatabaseMetaData.getSchema, and sure enough, the database is returning just one schema via this call ("POC"). I assume the wizard is using DatabaseMetaData.getSchema to get the schema name when I add a filter for a particular table, since everything lines up in that case.

Perhaps the wizard is using a different call to get schema names initially, and whenever generating the filter for an entire "schema". If someone can help identify the code or call being used here, I can try it against MMX -- it could be a bug in MMX, or in the tools code.


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Tue May 25, 2010 2:31 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2010 11:55 am
Posts: 20
max wrote:
I wonder why MetaMatrix decided to return "Table" and "View" when almost anyone else uses "TABLE" and "VIEW" as hinted by the javadocs for the method:
http://java.sun.com/j2se/1.4.2/docs/api ... ypes%28%29

But I guess "Typically" doesn't mean "has to" :)

As Vitali says, open a jira with the patch and we'll incorporate it.


Thanks Max. Indeed, almost everyone else uses "TABLE" and "VIEW" -- even the open-source brother of MetaMatrix, Teiid. :) I don't see anything specifically in the JDBC spec that requires it to be in upper-case, though it does seem to be convention.

In any case, I've opened a JIRA and included the source code that was changed to fix the issue:
https://jira.jboss.org/browse/JBIDE-6351


Top
 Profile  
 
 Post subject: Re: Console configuration does not display database metadata
PostPosted: Wed May 26, 2010 2:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
mwalker wrote:
I wrote a quick sample program to call DatabaseMetaData.getSchema, and sure enough, the database is returning just one schema via this call ("POC"). I assume the wizard is using DatabaseMetaData.getSchema to get the schema name when I add a filter for a particular table, since everything lines up in that case.

Perhaps the wizard is using a different call to get schema names initially, and whenever generating the filter for an entire "schema". If someone can help identify the code or call being used here, I can try it against MMX -- it could be a bug in MMX, or in the tools code.


JDBCMetaDataDialect.java is where the magic happens.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.