我有一个 JavaSE 项目,使用嵌入式 Derby/JavaDB 数据库。如何让它在可用表下显示 APP 架构中的表?
在服务下设置连接后,我可以创建/连接并手动使用 derby。效果很好。
现在我正在尝试将休眠添加到项目中,并且需要设置我的休眠配置。这是我的配置:
<?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>
reverse eng插件似乎不起作用,它运行,没有显示错误,但也显示没有可用的表。
日志文件:
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.
我唯一能想到的是模式?表格位于 APP 中。