简体   繁体   中英

Derby + Hibernate Embedded DB Issue with Netbeans reverse eng

I have a JavaSE project, utilizing an embedded Derby/JavaDB database. How can I get it to show the tables in the APP schema under available tables?

I can create/connect to, and manually use derby after setting up a connection under services. Works great.

Now I am trying to add hibernate to the project, and need to setup my hibernate config. This is my config:

<?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">org.apache.derby.jdbc.EmbeddedDriver</property>
    <property name="hibernate.connection.url">jdbc:derby:studydata</property>
    <property name="hibernate.connection.username">user</property>
    <property name="hibernate.connection.password">pass</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.dialect">org.hibernate.dialect.DerbyDialect</property>
    <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
  </session-factory>
</hibernate-configuration>

The reverse eng plug-in does not seem to work, it runs, shows no errors, but also shows no available tables.

Log file:

INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: Initializing Custom Classloader with classpath : 
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Users/nycynik/Documents/java/db-derby-10.8.2.2-bin/lib/derby.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/antlr-2.7.6.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/asm.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/asm-attrs.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/cglib-2.1.3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/commons-collections-2.1.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/ide/modules/ext/commons-logging-1.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/dom4j-1.6.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/ehcache-1.2.3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/jdbc2_0-stdext.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/jta.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-tools.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-annotations.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-commons-annotations.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-entitymanager.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/javassist.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/ejb3-persistence.jar!/
INFO [org.netbeans.modules.hibernate.service.spi.HibernateEnvironmentImpl]: Direct Database connection established.
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: Initializing Custom Classloader with classpath : 
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Users/nycynik/Documents/java/db-derby-10.8.2.2-bin/lib/derby.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/antlr-2.7.6.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/asm.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/asm-attrs.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/cglib-2.1.3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/commons-collections-2.1.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/ide/modules/ext/commons-logging-1.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/dom4j-1.6.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/ehcache-1.2.3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/jdbc2_0-stdext.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/jta.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-tools.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-annotations.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-commons-annotations.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-entitymanager.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/javassist.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/ejb3-persistence.jar!/
INFO [org.netbeans.modules.hibernate.service.spi.HibernateEnvironmentImpl]: dbDriver loaded.
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: Initializing Custom Classloader with classpath : 
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Users/nycynik/Documents/java/db-derby-10.8.2.2-bin/lib/derby.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/antlr-2.7.6.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/asm.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/asm-attrs.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/cglib-2.1.3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/commons-collections-2.1.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/ide/modules/ext/commons-logging-1.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/dom4j-1.6.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/ehcache-1.2.3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/jdbc2_0-stdext.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/jta.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate3.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-tools.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-annotations.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-commons-annotations.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/hibernate-entitymanager.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/javassist.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/Applications/NetBeans/NetBeans%207.0.1.app/Contents/Resources/NetBeans/java/modules/ext/hibernate/ejb3-persistence.jar!/
INFO [org.netbeans.modules.hibernate.service.spi.HibernateEnvironmentImpl]: Direct Database connection established.

The only thing I could think of was the schema? The tables are located in APP.

OK - I just continued with the wizard, and it allowed me to finish without selecting a table.

Then I went ahead like nothing was wrong, and used the POJO creation wizard on the database, and, it worked.

I do not know why I was not able to select tables like I could with other databases, but either way it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM