LiveCycle ES4 Custom Component Creation

Note: topic is unrelated to AEM and based on another Adobe technology, LiveCycle.

Adobe provides much documentation on LiveCycle ES4 component creation.  Unfortunately, that documentation is a site-copy from the ES2.5 instructions and, as of the time of this post’s publication, has not been updated to account for ES4 changes.  Therefore, much of it is obsolete and many links and downloads are no longer functional.  In this post, I’ll try to bridge the gap between the outdated documentation and the necessary changes required to create and deploy custom components on ES4.

Tools:

Adobe seems to no longer publish a LiveCycle component development plugin for Eclipse.  Even finding the ES2.5 version of the plugin is difficult.  Installing it is harder, since many of the libraries and dependencies are missing or had version changes.  My steps included finding old versions of these files on coworker’s hard drives and manually modifying the jars and their metadata before repackaging.  Describing the process is painful, so here’s the full Eclipse instance of the LiveCycle ES2.5 Component Developer plugin:

And if you’re just interested in just the plugin itself, which Adobe’s documentation inexplicably refers to as adobe-tools.zip and incorrectly claims it’s located within the LiveCycle workbench install directly (it’s absent from 3.5 or 4.0), here’s that file:

You may have more luck with my modified version, which works around a dependency error caused by some changes in the beta version of Eclipse that their plugin used.  The error reads: Cannot complete the install because one or more required items could not be found.  With details of the missing constraint pointing to: ‘bundle org.junit4.0.0.0’.

Eclipse Plugin Install Error

Fixing it requires diving into the jar, opening another jar inside that, then tweaking its MANIFEST.MF to swap org.junit4 references with org.junit.  Or you can try the version I already modified in this manner.

Some other finagling was required, so if you test this, please add a comment to this post with the results.  In the interest of saving time, I recommend anyone using Windows to just use the full eclipse zip file linked above.

Building a Project:

Because the Eclipse plugin is for ES2.5, some changes need to be made to support ES4 deployment.  The ANT build script does work out of the box, but requires tweaks to be compatible with ES4.  First, make sure it’s building with JDK 1.6 and not 1.7.  Otherwise installing, patching, or starting the the component might yield some nondescript errors:

  • Invalid jar file
  • patch of component com.foo.Component failed
  • RuntimeException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterLocal.doBMT(com.adobe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException:
    ALC-DSC-099-000: com.adobe.idp.dsc.DSCRuntimeException: java.lang.NullPointerException

Here’s where to check and change that version:

 Eclipse Ant JDK Version

Classpath Considerations :

When creating a new Adobe LiveCycle component project, the “Add jars to this project” checkbox enabled us to include required jars.  They then are included in the classpath and packaged along with the component.  Note that if you’re upgrading from a previous version a component, a few third-party jars have changed.  Two tips to deal with these:

  • Be sure everything enumerated in the component.xml file <class-path> property is valid and still exists.
  • Any jars that need to be included in your component jar should be copied at root level (as described here).

The needed files can be enumerated in the build.xml file explicitly, then copied to the jar and exported to the component.xml classpath.  Here’s an example of some snippets you can add to preform the former.

Example:

If you don’t include these classpath-referenced library jars in the component jar, here’s an example server log you’ll see:

WARN  [com.adobe.idp.dsc.management.impl.ComponentClassLoaderSource] (http-11.22.33.44-8080-1) Jar file: log4j.jar does not exist in component: com.mycomponent.Foo.1.0

An error loading them because of this will look something like the following:

ERROR [com.adobe.workflow.AWS] (WorkManager(2)-28) An exception was thrown with name java.lang.NoClassDefFoundError message:org/apache/commons/discovery/tools/DiscoverSingleton while invoking service FooService and operation fooOperation and no fault routes were found to be configured.
...
WARN  [com.adobe.workflow.AWS] (WorkManager(2)-28) java.lang.NoClassDefFoundError: org/apache/commons/discovery/tools/DiscoverSingleton
...
Caused by: java.lang.ClassNotFoundException: WorkManager(2)-28Class name org.apache.commons.discovery.tools.DiscoverSingleton from package org.apache.commons.discovery.tools not found.
...
ERROR [com.adobe.workflow.AWS] (WorkManager(2)-28) An exception was thrown with name java.lang.NoClassDefFoundError message:org/apache/commons/discovery/tools/DiscoverSingleton while invoking service /FOO/1.0/FooBar.process(asset path: FooBar.process) and operation invoke and no fault routes were found to be configured.

When this happens, make sure the referenced jars are included in the component jar.  The above error in particular is referring to the missing commons-discovery.jar library.  This wasn’t explicitly included in previous versions.  Another jar to note when upgrading components from earlier versions is jaxen-1.1.1.jar, which was changed from jaxen-1.1-beta-9.jar.

With these changes and considerations, Adobe’s official documentation should provide the rest needed for custom component creation.  If I missed anything, please be sure to leave a comment.

4 thoughts on “LiveCycle ES4 Custom Component Creation

  1. Uliver

    Hi Nick,
    thannk you very much for the work for integrating the LC Component Tool into newer Eclipse Versions.

    I’ve tried to integrate your “lcwcdtool_p1_050710_2.zip” package into Eclipse Neon 4.6.6.

    But at the end of the install routine i get the following error message:

    Cannot complete the install because one or more required items could not be found.
    Software currently installed: Adobe Component Development Tool 9.5.0 (com.adobe.livecycle.cde.feature.group 9.5.0)
    Missing requirement: Dsc Plug-in 9.5.0.v201005062331 (com.adobe.livecycle.workbench.dsc 9.5.0.v201005062331) requires ‘bundle org.junit4 0.0.0’ but it could not be found
    Cannot satisfy dependency:
    From: Adobe Component Development Tool 9.5.0 (com.adobe.livecycle.cde.feature.group 9.5.0)
    To: com.adobe.livecycle.workbench.dsc [9.5.0.v201005062331]
    OK

    Any idea how to fix this?

    Thanks

    Reply
    1. Nick Matelli Post author

      Thank you for pointing this out. The jar file needs an update. It was built 3 years ago specifically for the latest version of Eclipse back then. Now the dependencies don’t match up, so you have two options:

      1) Use the old version of Eclipse -OR-
      2) Re-build the jar file in the way this post describes— by swapping out and including dependencies.

      #2 requires a tedious process of trial-and-error that might ultimately fail because the tool has become too outdated. But if you do get it working, I’d love to post it here.

      Reply

Leave a Reply to Uliver Cancel reply

Your email address will not be published. Required fields are marked *