-->
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.  [ 2 posts ] 
Author Message
 Post subject: Reverse Enginering of MySQL with Eclipse
PostPosted: Tue Jan 27, 2015 4:30 am 
Newbie

Joined: Tue Jan 27, 2015 4:09 am
Posts: 2
I want to develop a small prototype of a application. I have create a database on MySQL 5.6. They have only 2 tables - one reference from mastertable to childtable (It´s like a easy prototype). All tables have a Id-column.

I using the actula e(fx)clipse 4.4, Hibernate 4.3.8, Hibernate Tools 4.0.0 (Final).

I can create all the steps in the turtorials I found (create a hibernate.cfg.xml, console config and hibernate.reveng.xml)

Now I want to customize my reveng.xml. I will configure the settings of the columns. But I cant put them in the reveng.xml with the "Tables & Column"-Dialog. I use the "Add"-Button and the tables are shown and can selected. But if i press the "ok"-button the selection will not send to the xml.

What I doing wrong? Have I forget something?

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory name="">
        <property name="hibernate.bytecode.use_reflection_optimizer">false</property>
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.connection.password">password</property>
        <property name="hibernate.connection.url">jdbc:mysql://localhost/testapp</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.default_schema">testapp</property>
        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="hibernate.search.autoregister_listeners">false</property>
        <property name="hibernate.validator.apply_to_ddl">false</property>
        <mapping resource="de/mykey/congadmin/entities/Congadminkhall.hbm.xml" />
        <mapping resource="de/mykey/congadmin/entities/Congadmincongregation.hbm.xml" />
    </session-factory>
</hibernate-configuration>


Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<type-mapping>
   <sql-type jdbc-type="VARCHAR" hibernate-type="string" length="36"
      not-null="true">
   </sql-type>
   <sql-type jdbc-type="VARCHAR" hibernate-type="string" length="20"
      not-null="true">
   </sql-type>
</type-mapping>
<table-filter match-name=".*"/>
</hibernate-reverse-engineering>


Top
 Profile  
 
 Post subject: Re: Reverse Enginering of MySQL with Eclipse
PostPosted: Fri Jan 30, 2015 11:01 am 
Newbie

Joined: Tue Jan 27, 2015 4:09 am
Posts: 2
I have following errors:

Code:
Unhandled event loop exception

Code:
java.lang.NullPointerException
   at org.hibernate.eclipse.mapper.editors.reveng.TablePropertiesBlock.doAdd(TablePropertiesBlock.java:209)
   at org.hibernate.eclipse.mapper.editors.reveng.TablePropertiesBlock$1.widgetSelected(TablePropertiesBlock.java:127)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
   at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
   at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

Code:
eclipse.buildId=4.4.0.I20140606-1215
java.version=1.7.0_67
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.standard.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.standard.product


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

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.