Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Accessing AEM 6.2 livecycle application manager with java

James_R_Green
Level 7
Level 7

Hi,

I am attempting to connect to the livecycle part of AEM 6.2 JEE in order to update assets. But at the moment I cannot connect successfully and perform getApplications() on the application manager. Below is a snippet of the code I am using:

//Create service factory Properties
   Properties connectionProps = new Properties();

  connectionProps.setProperty("DSC_DEFAULT_SOAP_ENDPOINT", "http://192.168.56.101:8080/lc");

  connectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", "SOAP");

  connectionProps.setProperty("DSC_SERVER_TYPE", "JBoss");

  connectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator");

  connectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");

   // Create the service client factory
   ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

  ApplicationManagerClient appMgrClient = new ApplicationManagerClient(myFactory);

   //Create an application called Sample1, version 1.0 is created
   try {

// appMgrClient.createApplication("Sample1");
   List list = appMgrClient.getApplications();

  } catch (ApplicationManagerClientException e) {

  e.printStackTrace();

  }

I based this on code from ApplicationManager (AEM forms on JEE Java API Reference)

I have also tried ApplicationManager instead of ApplicationManagerClient

I get an exception when executing this code:

ALC-DSC-099-000: com.adobe.idp.applicationmanager.application.ApplicationManagerException: java.lang.NoClassDefFoundError: javax/ejb/EJBException

I have also had the below error from other tests I have performed:

ALC-DSC-099-000: com.adobe.idp.applicationmanager.application.ApplicationManagerException: java.lang.ClassNotFoundException: org.apache.axis.soap.SOAPConstants not found by com.adobe.livecycle.dsc.clientsdk.api [496]

I think I am missing dependencies but do not know which ones. Has anyone used the application manager on AEM forms 6.2 recently and has a working example?

I am particular interested in the pom files and any additional classes that needed adding.

Thanks,

James

1 Accepted Solution
James_R_Green
Correct answer by
Level 7
Level 7

I managed to work out a solution and thought I would document it here in case it helps someone else.

Instead of setting the properties for the service client factory myself like this:

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

I used the service client factory provider instead:

@Reference
ServiceClientFactoryProvider scfProvider;

...

ServiceClientFactory myFactory = scfProvider.getDefaultServiceClientFactory();

As described in the page below:

AEM 6.2 Forms Help | Connecting AEM Forms with Adobe LiveCycle

I am connecting to a remote server and had to change my Adobe LiveCycle Client SDK Configuration in configMgr to the remote IP.

After doing this it connected, but I got a different error:

ALC-DSC-099-000: java.lang.UnsupportedOperationException: Deserialization not allowed for class sun.util.calendar.ZoneInfo

To fix that I found a blog post that had the solution of adding "sun.util." to the deserializationFirewall whitelist

http://localhost:4503/system/console/configMgr/com.adobe.cq.deserfw.impl.DeserializationFirewallImpl

See the following for full details:

Deserialization error submitting forms to AEM Forms JEE | The LiveCycle & AEM Forms survival kit

It then worked.

I assume I was previously missing a setting for the service client factory, but can't be sure.

For completeness, this required the following entry in the core pom file:

<dependency>

   <groupId>com.adobe.livecycle.dsc</groupId>

   <artifactId>com.adobe.livecycle.dsc.clientsdk</artifactId>

   <version>6.2</version>

</dependency>

Thanks,

James

View solution in original post

4 Replies
smacdonald2008
Level 10
Level 10

Are you trying to run this code within AEM or on a LiveCycle Server (or what is now a LC Server)?

So i take it you want to invoke a LC process from AEM?

smacdonald2008
Level 10
Level 10

This code was once used to run on a LC server. I assume you are trying to run on on AEM J2EE for forms server?

James_R_Green
Correct answer by
Level 7
Level 7

I managed to work out a solution and thought I would document it here in case it helps someone else.

Instead of setting the properties for the service client factory myself like this:

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

I used the service client factory provider instead:

@Reference
ServiceClientFactoryProvider scfProvider;

...

ServiceClientFactory myFactory = scfProvider.getDefaultServiceClientFactory();

As described in the page below:

AEM 6.2 Forms Help | Connecting AEM Forms with Adobe LiveCycle

I am connecting to a remote server and had to change my Adobe LiveCycle Client SDK Configuration in configMgr to the remote IP.

After doing this it connected, but I got a different error:

ALC-DSC-099-000: java.lang.UnsupportedOperationException: Deserialization not allowed for class sun.util.calendar.ZoneInfo

To fix that I found a blog post that had the solution of adding "sun.util." to the deserializationFirewall whitelist

http://localhost:4503/system/console/configMgr/com.adobe.cq.deserfw.impl.DeserializationFirewallImpl

See the following for full details:

Deserialization error submitting forms to AEM Forms JEE | The LiveCycle & AEM Forms survival kit

It then worked.

I assume I was previously missing a setting for the service client factory, but can't be sure.

For completeness, this required the following entry in the core pom file:

<dependency>

   <groupId>com.adobe.livecycle.dsc</groupId>

   <artifactId>com.adobe.livecycle.dsc.clientsdk</artifactId>

   <version>6.2</version>

</dependency>

Thanks,

James

View solution in original post

James_R_Green
Level 7
Level 7

Hi

smacdonald2008

Yes that is right - I am connecting to a AEM JEE server. My title for this was a little misleading in hindsight, but I wanted to describe the area of forms that the problem was related too.

Thanks,

James