How to create update plug in or customization for iDempiere.

4,062 views
Skip to first unread message

Michael Gendrala

unread,
Feb 8, 2012, 7:47:27 PM2/8/12
to iDempiere
Good Day Everyone,

The question I want to ask is, how to create small updates on
iDempiere and implement the changes quickly into client + server built
through eclipse?

Currently, I have successfully setup the workspace for iDempiere and
was able to create a server and client by following the tutorials
provided by globalqss (http://www.globalqss.com/wiki/index.php/
IDempiere). I have also tried to modified the code for a callout to
try and make small changes to the program and see if the it by simply
exporting the project, similar to how customization.jar is made. This
did not work and I was only able to make it work by building another
iDempiere server. Though this way works, it would take time to set up
iDempiere every time changes are made.

Thank you.

Michael Gendrala

unread,
Feb 9, 2012, 4:12:20 AM2/9/12
to iDempiere
Hi Everyone,

These are what I have tried so far.
The changes: Only added a new callout class on a new package on
org.adempiere.base.callout

- One method I tried was to export the project as a normal jar,
similar to how the customization are made for ADempiere, and simply
replaced the corresponding plug-in in my iDempiere server build. I
tried running the server and found that there is a missing bundle
while the server is running, which is the one I have replaced with a
new one.

- The next method that I have tried is to export the project as a
plugin and the following error is what I have encountered and not sure
on what to do, since I am not yet very familiar with plug-ins:

Buildfile: /home/mike/git/idempiere2/.metadata/.plugins/
org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/
assemble.org.eclipse.pde.container.feature.*.*.*.xml does not exist
Buildfile: /home/mike/git/idempiere2/.metadata/.plugins/
org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/
assemble.org.eclipse.pde.container.feature.*.*.*.xml does not exist


Regards,

Michael

Heng Sin Low

unread,
Feb 9, 2012, 4:34:11 AM2/9/12
to idem...@googlegroups.com
Hi,

Create a new plugin project and add your new callout class there. Export the new plugin project as an OSGI bundle and you can deploy that into the adempiere-server. If your callout is added using the extension point mechanism ( see http://hengsin.googlecode.com/hg/doc/extension/IColumnCallout.html ), that's all is needed to deploy it, i.e no db changes is necessary.

Regards,
Low

Heng Sin Low

unread,
Feb 9, 2012, 4:36:32 AM2/9/12
to idem...@googlegroups.com
also, see http://www.vogella.de/articles/OSGi/article.html#OSGi_firstbundle and http://www.vogella.de/articles/OSGi/article.html#exportbundle on how to create your bundle project, export it and deploy to adempiere server using osgi console.

Michael Gendrala

unread,
Feb 10, 2012, 12:54:10 AM2/10/12
to iDempiere
Hello,

Thank you for the reply and links. I followed the steps in exporting a
new bundle and it worked. :)

Regards,
Michael

On Feb 9, 5:36 pm, Heng Sin Low <heng...@gmail.com> wrote:
> also, seehttp://www.vogella.de/articles/OSGi/article.html#OSGi_firstbundle
>  andhttp://www.vogella.de/articles/OSGi/article.html#exportbundleon how
> to create your bundle project, export it and deploy to adempiere server
> using osgi console.
>
> On Thu, Feb 9, 2012 at 5:34 PM, Heng Sin Low <heng...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Create a new plugin project and add your new callout class there. Export
> > the new plugin project as an OSGI bundle and you can deploy that into the
> > adempiere-server. If your callout is added using the extension point
> > mechanism ( see
> >http://hengsin.googlecode.com/hg/doc/extension/IColumnCallout.html),
> > that's all is needed to deploy it, i.e no db changes is necessary.
>
> > Regards,
> > Low
>

Heng Sin Low

unread,
Feb 10, 2012, 1:10:27 AM2/10/12
to idem...@googlegroups.com
Hi,

Any comments on how does this compare to the customization.jar approach ? 

Regards,
Low

Michael Gendrala

unread,
Feb 10, 2012, 1:52:47 AM2/10/12
to iDempiere
Hello,

I'm still figuring things out, so I can't really provide a proper
feedback. I want to test this further before I do.

I have questions though, on some things I have encountered. One would
be the bundle that I exported and installed on the adempiere-server,
once I have stopped the server and restarted again, the plug-in can no
longer be found and so the callout I made no longer works, and that I
have to install the plug-in once more. Is there a way to install the
plug-in permanently? And is there a way to apply the changes of the
server into the client? Because when I created a client and installed
it, connected it to the server, my callout was also not working.


Regards,
Michael.

Heng Sin Low

unread,
Feb 10, 2012, 3:37:14 AM2/10/12
to idem...@googlegroups.com
the plugin should still be there but properly not started ( you can type ss at console to check ). equinox do have the dropin folder deployment mechanism that should simplify this.

you would have to do the same the client deployment, again incorporating the dropin folder deployment mechanism would help.

I'm in the process of moving the platform to indigo ( eclipse 3.7.1 and equinox 4.3 ) and there might be new tools that would help too.

Michael Gendrala

unread,
Feb 12, 2012, 9:07:40 PM2/12/12
to iDempiere
Hello,

When I checked the plugin using the ss on the adempiere-server
console, the new plug-in I install disappears, and it does every time.
The current work around that I found to permanently install the plug-
in is to update the bundle.info as it says here in this document that
I found when you told me to try the dropin folder deployement:
http://wiki.eclipse.org/Equinox/p2/Getting_Started#Disk_layout and add
the plug-in there,

Currently this is the only way that enables me to install plugins
permanently. As for the client application, I don't see any console
with osgi server running to make the plug-in work, may I ask for steps
on how to do so? And as for the dropin folder deployment, I am
currently trying through research and testing on how to make it work.

Regards,
Michael

On Feb 10, 4:37 pm, Heng Sin Low <heng...@gmail.com> wrote:
> the plugin should still be there but properly not started ( you can type ss
> at console to check ). equinox do have the dropin folder deployment
> mechanism that should simplify this.
>
> you would have to do the same the client deployment, again incorporating
> the dropin folder deployment mechanism would help.
>
> I'm in the process of moving the platform to indigo ( eclipse 3.7.1 and
> equinox 4.3 ) and there might be new tools that would help too.
>

Michael Gendrala

unread,
Feb 13, 2012, 3:43:31 AM2/13/12
to iDempiere
Hello,

I was able to make it the plug-in work on the client build. I only
need update the bundle.info and also add the plug-in on it. Following
the format of the entries already inside. Now only need to try and
find out how to make use of the dropins folder like similar to how
eclipse using the plug-in updates.

Regards,
Michael

Daniel Tamm

unread,
Apr 11, 2012, 9:52:08 AM4/11/12
to iDempiere
I'm trying to get a custom ZK-form working by making an extension of
org.adempiere.webui.Form.

When I run ss on the osgi-console the state of the bundle with the
custom ZK-form is <<LAZY>> and the ADForm class loader can't find my
class. (I've checked that it looks for the class but it doesn't seem
to be available).

Any ideas?

Does the Extension Details ID have anything to do with this?

/Daniel

Daniel Tamm

unread,
Apr 11, 2012, 10:44:36 AM4/11/12
to iDempiere
Could it be that the plugin must be available in the webapplication
somehow?

Heng Sin Low

unread,
Apr 11, 2012, 10:47:57 AM4/11/12
to idem...@googlegroups.com
if you are running from eclipse, make sure the new bundle project is selected. Also, as en extension, the form object should be loaded from the line below instead of the ADForm classloader:

obj = Extensions.getForm(richClassName);

Regards,
Low

Daniel Tamm

unread,
Apr 11, 2012, 11:10:09 AM4/11/12
to iDempiere
Thanks Low,

This got me on track of the problem. The java-class loader of ADForm
won't work for a bundle.
However, if the Extension Details ID is set to the same as the
richClassName the form
is found :-)

Thanks!!

/Daniel

redhuan d. oon

unread,
Oct 25, 2012, 7:28:24 PM10/25/12
to idem...@googlegroups.com
MG,
To make ss work the argument of your launcher bat or .sh should have -console in it. If there is a number after that, just remove the number.

redhuan d. oon

unread,
Oct 27, 2012, 5:47:37 AM10/27/12
to idem...@googlegroups.com
There is an early tutorial that covers IColumnCallout here http://www.adempiere.com/Equinox_Integration_2/Tutorial_Plugin.

redhuan d. oon

unread,
Nov 7, 2012, 7:35:47 AM11/7/12
to idem...@googlegroups.com
Hengsin, to answer your question about comparing with customization.jar approach, my plugin works well in Eclipse. It exports the same package but modified class org.compiere.process.ImportOrder which overrides the one in org.adempiere.base if it is resolved. When i stop my plugin then iDempiere uses back the base ImportOrder. I made this work together with META-INF/2Pack.zip to bundle quite a complete plugin module.

However after exporting my plugin to my iDempiere/plugins folder, it does not show up in ss. I been googling up to p2 and hoping for an easy way to deploy.

Heng Sin Low

unread,
Nov 7, 2012, 7:41:31 AM11/7/12
to idem...@googlegroups.com
that would not work. you have to export your plugin as a p2 site ( eclipse have build in tool for that or you can use buckminster ). you can then install your bundle from your p2 site - see update.sh for example.

redhuan d. oon

unread,
Nov 10, 2012, 5:26:25 AM11/10/12
to idem...@googlegroups.com
Thanks Heng Sin, i will study and document that next. Carlos also told me to talk to you for mentoring me on documenting the case completely. So far i managed to do a plugin and testing the 2Pack attached within Eclipse IDE and its documented fully here http://t.co/eJ7yOEnD

Heng Sin Low

unread,
Nov 10, 2012, 7:11:28 AM11/10/12
to idem...@googlegroups.com
Hi Red1,

The part on using Eclipse-RegisterBuddy for process class is not the recommended approach. We should use equinox extension for that - http://hengsin.googlecode.com/hg/doc/extension/Process.html ( see org.adempiere.pipo/plugin.xml for example )


Regards,
Low

redhuan d. oon

unread,
Nov 11, 2012, 2:29:59 AM11/11/12
to idem...@googlegroups.com
Thanks Hengsin. Previously i could not make it work and then looked in the pipo's plugin.xml example and noticed i did not give it an ID. So now its solved http://red1.org/adempiere/viewtopic.php?f=29&t=1713&p=8204#p8204

redhuan d. oon

unread,
Dec 11, 2012, 4:52:18 PM12/11/12
to idem...@googlegroups.com
I did as advised, export my plugin feature to a local repo and do my own install.sh but hit some stickler. I document what works and not - red1.org/adempiere/viewtopic.php?f=29&t=1723
There seems to be some holy grail as i been googling for 2 days.


On Wednesday, 7 November 2012 20:41:32 UTC+8, hengsin wrote:

Heng Sin Low

unread,
Dec 11, 2012, 5:42:46 PM12/11/12
to idem...@googlegroups.com
It should be POS-Integration.feature.group instead of POSIntegration. 

redhuan d. oon

unread,
Dec 12, 2012, 6:58:24 AM12/12/12
to idem...@googlegroups.com
Thanks. That seems to work and persist without been overwritten by adempiere update. In the link below are more details how to install a new plugin remotely. This certainly launches iDempiere to a new height. We have achieved good decoupling management of plugins.

Anozi Mada

unread,
Jan 21, 2013, 12:05:50 AM1/21/13
to idem...@googlegroups.com
Hi Everyone,

I tried to create custom plugin using iDempiereMigrationGuide2 by red1. It works on eclipse but when I tried to deploy it to live instance I got the following error:

am@dev1:/opt/awn/idempiere-server$ ./awn-check.sh
id.co.databiz.awn.test=1.0.0.201301211100
id.co.databiz.awn.test=1.0.0.201301211102
id.co.databiz.awn.test=1.0.0.201301211103
id.co.databiz.awn.test.feature.group=1.0.0.201301211100
id.co.databiz.awn.test.feature.group=1.0.0.201301211102
id.co.databiz.awn.test.feature.group=1.0.0.201301211103
id.co.databiz.awn.test.feature.jar=1.0.0.201301211100
id.co.databiz.awn.test.feature.jar=1.0.0.201301211102
id.co.databiz.awn.test.feature.jar=1.0.0.201301211103
Operation completed in 246 ms.
am@dev1:/opt/awn/idempiere-server$ ./awn-update.sh
!SESSION 2013-01-21 11:39:43.743 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_35
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -application org.eclipse.equinox.p2.director -profile DefaultProfile -profileProperties org.eclipse.update.install.features=true -destination /opt/awn/idempiere-server -repository /opt/awn/p2awn -i id.co.databiz.awn.test.feature.group
Command-line arguments:  -application org.eclipse.equinox.p2.director -consoleLog -profile DefaultProfile -profileProperties org.eclipse.update.install.features=true -destination /opt/awn/idempiere-server -repository /opt/awn/p2awn -i id.co.databiz.awn.test.feature.group

!ENTRY org.eclipse.osgi 2 0 2013-01-21 11:39:44.732
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-21 11:39:44.732
!MESSAGE Bundle initial@reference:file:../plugins/org.eclipse.equinox.http.registry_1.1.100.v20110502.jar/ was not resolved.
!SUBENTRY 2 org.eclipse.equinox.http.registry 2 0 2013-01-21 11:39:44.732
!MESSAGE Missing imported package javax.servlet_2.3.0.
!SUBENTRY 2 org.eclipse.equinox.http.registry 2 0 2013-01-21 11:39:44.733
!MESSAGE Missing imported package javax.servlet.http_2.3.0.

!ENTRY org.eclipse.osgi 2 0 2013-01-21 11:39:44.751
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-21 11:39:44.755
!MESSAGE Bundle org.eclipse.equinox.http.registry_1.1.100.v20110502 [32] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.http.registry 2 0 2013-01-21 11:39:44.759
!MESSAGE Missing imported package javax.servlet_2.3.0.
!SUBENTRY 2 org.eclipse.equinox.http.registry 2 0 2013-01-21 11:39:44.764
!MESSAGE Missing imported package javax.servlet.http_2.3.0.

!ENTRY org.eclipse.osgi 4 0 2013-01-21 11:39:44.769
!MESSAGE Application error
!STACK 1
java.lang.IllegalArgumentException: Location must be absolute: /opt/awn/p2awn
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.checkValidLocation(AbstractRepositoryManager.java:739)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.contains(AbstractRepositoryManager.java:251)
        at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.initializeRepositories(DirectorApplication.java:510)
        at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:974)
        at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:1160)
        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:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:150)

I think it's because javax.servlet.http_2.3.0 is not resolved so I upgrade the iDempiere using
./update.sh http://jenkins.idempiere.com/job/iDempiere/ws/buckminster.output/org.adempiere.server_1.0.0-eclipse.feature/site.p2/
but the error still remains. I check on $IDEMPIERE_HOME/plugins/ and the version of javax.servlet is 3.0.0

Did I miss something?

Thanks.

Anozi Mada

unread,
Jan 21, 2013, 2:51:08 AM1/21/13
to idem...@googlegroups.com
I'm sorry it seems I forgot to put file:// before the path of repository. Now it works. :D

virat varma

unread,
Jun 18, 2018, 3:45:17 AM6/18/18
to iDempiere
Hi,
could you please any one help me.
How to add downloaded source code to eclipse ide
How to add plug-in projects to eclipse ide.



Thanks&Regards

Frank-J

unread,
Jun 20, 2018, 3:55:32 AM6/20/18
to iDempiere


Hello Virat,

there are some good explanations in the documentation of iDempiere. The abstract descriptions sometimes miss little bits.
I learned a lot recently by going through the tutorials from Jan Thielemann - for most of the turorials you also find very well done videos covering also some typical mistakes.
So here are three, e.g.:

Actually the first one can be done without source code, and gives you a good start into adopting iDempiere to companies needs. The tutorials have been created with an older version of iDempiere, so sometimes it behaves a little different. But these were mostly small items (other now better preparation in the model generator, other layout in Eclipse) but with a small knowledge and a little trial and error these can be easily solved (or ignored).

Best regards and interesting learning in the inside of iDempiere
Frank

redhuan d. oon

unread,
Jun 28, 2018, 6:50:19 PM6/28/18
to iDempiere
I have made Ninja toolset to quickly develop plugins quickly without the repetitive setup work. You can take a sample and modify from there. https://bitbucket.org/red1/org.red1.blank

Notes on Ninja http://red1.org/adempiere/viewtopic.php?f=45&t=1831&start=25. If you do not know how to start, just ask me here on in a new thread "How to use Ninja". It takes a sharp curve to learn but once mastered saves you 90% of hard work and long term low maintenance of the plugin.
Reply all
Reply to author
Forward
0 new messages