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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Connection to AEM during debug of component in Eclipse?

BjornEricsson1
Level 3
Level 3

I'm working on a custom component that I will instantiate as an activity of one of our AEM Form processes. I want to test it as thourouloy as possible before I add it to the AEM forms process. My problem is that I get this error while testing. It comes when I try to run the last result.passivate() command. Is the AEM API supposed to connect to a running AEM forms instance when I test this? If so, where is that configured on my local PC? The weird thing is that I get no error when I passivate in the test-class.

Error:

2017-jun-15 09:39:27 com.adobe.idp.Document

ALLVARLIG: DOCS001: Unexpected exception. While doing first time passivation for a document..

com.adobe.idp.DocumentError: Failed to connect to LiveCycle server via RMI. Make sure that the server is running and accessible to this client.

Code:

    public Document concat(final Document base, final Document addOn) throws IOException

    {

        InputStream isBase = base.getInputStream();

        String sBase = IOUtils.toString(isBase);

        InputStream isAddOn = addOn.getInputStream();

        String sAddOn = IOUtils.toString(isAddOn);

       

        String endLessBase =  sBase.substring(0,sBase.length()- 33);

        String preparedAddOn = sAddOn.substring(60);

       

        String sResult = endLessBase.concat(preparedAddOn);

       

        InputStream isResult = IOUtils.toInputStream(sResult, "UTF-8");

       

        Document result = new Document(isResult);

        result.passivate();

       

        return result;

    }

1 Accepted Solution
sharoon23
Correct answer by
Employee
Employee

Apart from logging internal variables, if you want to debug the code that you have written you can use remote debugging with Jboss  assuming you are using AEM forms on Jboss. Even if you are using any other application server like WAS / WebLogic, remote debugging can be enabled to debug your code

View solution in original post

3 Replies
sharoon23
Employee
Employee

Hi,

Livecycle component is supposed to be installed in the LiveCycle server for it to be tested. In the link pointed by you, a section points to how you can test your component. Please go through this as it will help you in testing your component.

BjornEricsson1
Level 3
Level 3

OK, so I can't test it before I deploy it? How do I monitor the internal variables when I test in Livecycle? Are logging the only way to debug internal variables?

sharoon23
Correct answer by
Employee
Employee

Apart from logging internal variables, if you want to debug the code that you have written you can use remote debugging with Jboss  assuming you are using AEM forms on Jboss. Even if you are using any other application server like WAS / WebLogic, remote debugging can be enabled to debug your code

View solution in original post