-->
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: Eclipse / NetBeans Plugin Postgres don't work
PostPosted: Sun Aug 01, 2010 2:30 pm 
Newbie

Joined: Sun Aug 01, 2010 2:21 pm
Posts: 2
hi,
I have a postgres db and i would to generate Hibernate class with Eclipse or NetBeans plugin.
in Eclipse i have the hibernate.cfg.xml like :

<?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.postgresql.Driver</property>
<property name="hibernate.connection.password">XXXXXX</property>
<property name="hibernate.connection.url">jdbc:postgresql://192.168.1.100:5432/postgres</property>
<property name="hibernate.connection.username">xxxxxxxx</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
</session-factory>
</hibernate-configuration>

and the hibernate.reveng.xml like :

<?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>
<table-filter match-schema="SIGMADB" match-name="PreFact"/>
<table-filter match-schema="SIGMADB" match-name="quaMin_dim"/>
<table-filter match-schema="SIGMADB" match-name="Mes_dim"/>
</hiberna"C:/Users/Samuele/AppData/Local/Temp/Rar$DR06.139/HibernateCriteriaQBECriteria/src/Supplier.java"te-reverse-engineering>

I have create a class named SimpleCustomReverseEngineeringStrategy for the Reverse Engineering

package sam;

import org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.TableIdentifier;

public class SimpleCustomReverseEngineeringStrategy extends DelegatingReverseEngineeringStrategy {
public SimpleCustomReverseEngineeringStrategy() {
super(null);
}

public SimpleCustomReverseEngineeringStrategy(ReverseEngineeringStrategy delegate) {
super(delegate);
}

public String columnToPropertyName(TableIdentifier table, String column) {
return super.columnToPropertyName(table, column);
}
}

but when i launch the plugin, nothin was created and i don't see any error

anybody help me?


Top
 Profile  
 
 Post subject: Re: Eclipse / NetBeans Plugin Postgres don't work
PostPosted: Mon Aug 02, 2010 1:38 pm 
Newbie

Joined: Sun Aug 01, 2010 2:21 pm
Posts: 2
vyemialyanchyk wrote:
I did not understand how you try to use Hibernate Tools Eclipse plugin? Did you install the pluging?
So you inspect - you install plugin and something should be generated after installation, automatically?
I sugest to look into the documentation: http://www.redhat.com/docs/en-US/JBoss_Developer_Studio/en/hibernatetools/html/index.html



I have install the Hibernate Tool Eclipse plugin, I have create a new Java Project and i have create from the wizard the file but when i lunch in the Event Detail of Eclipse i found

java.lang.NullPointerException
at org.eclipse.ui.internal.progress.StatusAdapterHelper.getStatusAdapter(StatusAdapterHelper.java:65)
at org.eclipse.ui.internal.progress.ProgressAnimationItem.doAction(ProgressAnimationItem.java:112)
at org.eclipse.ui.internal.progress.ProgressAnimationItem$4.widgetSelected(ProgressAnimationItem.java:327)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:369)
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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)


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.