Model Generator does not work in 8.2

153 views
Skip to first unread message

reua...@gmail.com

unread,
Jan 6, 2021, 9:18:50 PM1/6/21
to iDempiere
Hello Community,
After updating to version 8.2 I found that the model generator does not work anymore.
When starting the application I get the Error message:
org.osgi.framework.BundleException: Could not resolve module: org.compiere.db.oracle.provider [4]
  Unresolved requirement: Require-Bundle: org.adempiere.install; bundle-version="0.0.0"
    -> Bundle-SymbolicName: org.adempiere.install; bundle-version="8.2.0.qualifier"; singleton:="true"
       org.adempiere.install [5]
         Unresolved requirement: Import-Package: org.bouncycastle.cert; version="1.66.0" 

Is my installation corrupted or is there an issue with the new version?
Thanks for any hints and comments!

Andreas


Heng Sin Low

unread,
Jan 6, 2021, 10:07:12 PM1/6/21
to idem...@googlegroups.com
just tested and the model.generator launch configuration is broken at master branch - need to add bpkix and org.eclipse.jetty.util to the selected plugins.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/27ad7b66-d61a-4714-96db-1d017c45be23n%40googlegroups.com.

Orlando Curieles

unread,
Jan 6, 2021, 10:09:45 PM1/6/21
to iDempiere
Hi, You can use our plugin:

https://github.com/ingeint/idempiere-model-generator-plugin

 Best Regards.
   Orlando

Heng Sin Low

unread,
Jan 6, 2021, 10:35:04 PM1/6/21
to idem...@googlegroups.com
hmm .. perhaps we should consider getting that into core ..

alternatively, some kind of build script/project that creates a configurable build/installation of core + plugins will be really useful.

reua...@gmail.com

unread,
Jan 7, 2021, 1:35:46 AM1/7/21
to iDempiere
Wow, that looks nice,
I am afraid though I could not get it to run. Upon clicking the process button I get an error message: 

Failed to create new process instance for com.ingeint.process.ModelGenerator

some more issues:
The calls to ModelInterfaceGenerator.generateSource() in ModelGenerator.doIt() are lacking the columnEntityType Argument.
Before I could Pack in the 2Pack archive I had to manually add the ING entity type.

When it runs I will be happy to finally say goodbye to the standalone model generator. 
Thanks for sharing! 

Andreas

Martin Schönbeck

unread,
Jan 7, 2021, 2:57:46 AM1/7/21
to iDempiere
Hi Hengsin,

hengsin schrieb am Donnerstag, 7. Januar 2021 um 04:35:04 UTC+1:

alternatively, some kind of build script/project that creates a configurable build/installation of core + plugins will be really useful.


That would be great.

Regards,
Martin

Orlando Curieles

unread,
Jan 7, 2021, 9:51:06 AM1/7/21
to iDempiere
Hi, I Have fixed the 2Pack, thanks for report.
  
 Best Regards.
  Orlando

reua...@gmail.com

unread,
Jan 7, 2021, 2:11:44 PM1/7/21
to iDempiere
Hi Orlando,
Thanks for the fast fix! Any idea about the other issue? (wrong argument number in generate source)
Should I checkout another branch perhaps?
I have now got the process registered successfully. It was a faulty plugin installation on my side. 
Andreas

reua...@gmail.com

unread,
Jan 8, 2021, 10:06:19 AM1/8/21
to iDempiere
Hi Orlando,

I have played around a bit with the your Plugin and have added some functionality:
  • Added a dynamic valuation to the entitytype column that shows only the entitytypes that are set for the tables that correspond
    to the entered table name filter/tableID.
  • Added a button to generate the MModelClass stub. The stub will never overwrite an existing MModel class.
    To reset any changes in the class the file has to be deleted before a new stub can be generated.


If you are interested in these modifications I can send you a pull request.
We just would have to find a way to get the 2Pack archive under version control so that the package can be edited collaboratively.
Chuck has written a nice blogpost on how that can be achieved: 
https://www.chuckboecking.com/pack-pack-details-team-development-idempiere/

 Here are some further Ideas for the plugin:
  • Replace the entitytpe field reference (currently table direct) with a multiple selection grid. This would produce a comma
    separated list of selected entitytypes. This can already be handled by the existing model and interface generators.
  • Change the behavior of an empty entitytype field:
    Currently the generator replaces an empty entitytype filter with ('U','A'). This can lead to no Model created at all if none of the tables
    corresponding to the table filter have any of these eytitytypes. What should rather happen IMO is that all Models corresponding
    to the table filter are generated. If the entitytype filter should include one of the reserved entititypes the process should produce
    a warning enabling the user to cancel the process.
  • Improve the success messagebox with better information on the result. Currently the process seems to produce a success
    message when no source code has been generated at all.
  • Add a button that generates a custom IModelFactory implementation for a given tablename prefix. 
  • The code already supports a column entitytype filter list. A corresponding field could be added to the GUI. I have to admit
    though that in the old model generator I never have used that field.
Let me know what you think.

reua...@gmail.com

unread,
Jan 8, 2021, 10:42:55 AM1/8/21
to iDempiere
It seems google does not like the way I embedded the screenshot.
So here is it again:
Bildschirmfoto 2021-01-08 um 15.19.55.png
Reply all
Reply to author
Forward
0 new messages