Problem with Model Generator

183 views
Skip to first unread message

Ahmed Elemam

unread,
Aug 4, 2014, 9:22:30 AM8/4/14
to idem...@googlegroups.com
when i try to make Module with Model Generator i have this errorĀ 

12:04:06.012 Ini.loadProperties: F:\idempiere\idempiere.properties #33 [1]
12:04:06.532===========> Adempiere.startupEnvironment: No Database [1]
12:04:06.532===========> Adempiere.startupEnvironment: No Database [1]

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.compiere.db.PreparedStatementProxy.<init>(PreparedStatementProxy.java:41)
at org.compiere.db.ProxyFactory.newCPreparedStatement(ProxyFactory.java:56)
at org.compiere.util.DB.prepareStatement(DB.java:763)
at org.compiere.util.DB.prepareStatement(DB.java:732)
at org.adempiere.util.ModelInterfaceGenerator.generateSource(ModelInterfaceGenerator.java:835)
at org.adempiere.util.ModelGeneratorDialog.actionPerformed(ModelGeneratorDialog.java:135)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.compiere.db.PreparedStatementProxy.<init>(PreparedStatementProxy.java:41)
at org.compiere.db.ProxyFactory.newCPreparedStatement(ProxyFactory.java:56)
at org.compiere.util.DB.prepareStatement(DB.java:763)
at org.compiere.util.DB.prepareStatement(DB.java:732)
at org.adempiere.util.ModelClassGenerator.generateSource(ModelClassGenerator.java:913)
at org.adempiere.util.ModelGeneratorDialog.actionPerformed(ModelGeneratorDialog.java:138)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Anderson Mendes

unread,
Aug 6, 2014, 12:33:53 PM8/6/14
to idem...@googlegroups.com
The database configured in idempiere.properties apparently does not exist.Ā 

Remove the file F:\idempiere\idempiere.properties and run the ModelGenerator again, and then check the settings of the database.

Ahmed Elemam

unread,
Aug 7, 2014, 6:21:47 AM8/7/14
to idem...@googlegroups.com
Not working too

Eng | Ahmed Elemam
+2 0114 029 0281
+2 0100 029 2810


--
You received this message because you are subscribed to a topic in the Google Groups "iDempiere" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/idempiere/VbyaKZ9m4jE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/1ef34e7f-95c1-4ede-9384-1904903e43d7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Neil Gordon

unread,
Aug 12, 2014, 10:56:14 AM8/12/14
to idem...@googlegroups.com
I am not sure of Anderson's proposed solution, I have not tried it.

We experienced the same problem here on two different developer's machines.It was strange, in that it worked in the beginning, but then stopped working.

Since I did not find a solution to this problem (I had to re-materialize my workspace), and it is probably a good practice anyway, the workaround is as follows:

  • After materializing your workspace, and your workspace is stable, and you are able to run the model generator class:
  • Take a backup of your workspace.
  • In Linux, use tar to make a tar archive (find attached a useful script, for this purpose). In Windows, use robocopy, example "C\workspace\from" ""C\workspace\backup" /copyall /r:3 /w:1 /zb /e
  • If you experience this kind of error again, restore back to stable workspace.
  • I have found you need to restore back to the same folder name, but I am not sure about this.
  • Be sure to update the snapshot of your workspace on a regular basis, I have found it to be invaluable.

I would be curious to know if anyone finds the root cause of this problem, it does cause a headache.

-----
Neil Gordon
nTier Software Services
http://www.ntier.co.za
bk.tar.sh

Abdallah Alshayeb

unread,
Aug 12, 2014, 11:48:23 AM8/12/14
to idem...@googlegroups.com
Run sign.database.build

Neil Gordon

unread,
Aug 13, 2014, 1:10:19 PM8/13/14
to idem...@googlegroups.com
Thanks, I'll give it a try, if I experience the problem again.


-----
Neil Gordon
nTier Software Services
http://www.ntier.co.za

Reply all
Reply to author
Forward
0 new messages