AEM 6.5 form custom submit not resolving my service | Community
Skip to main content
amitcsknit
Level 2
Jul 20, 2020 9:43 AM UTC
Solved

AEM 6.5 form custom submit not resolving my service

I am trying to create custom submit action and calling my service from from post.POST.jsp similar to below but calling my service inplace of mail.

https://docs.adobe.com/content/help/en/experience-manager-65/forms/customize-aem-forms/custom-submit-action-form.html

 

way i am calling.  

core.service.HandleContactForm hf = sling.getService(core.service.HandleContactForm.class);

 

bundle is active but its not resolving service.

Error is : core.service.HandleContactForm cannot be resolved to a type 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SameerDhawanAccepted solution
Employee
Jul 22, 2020 1:38 PM UTC

Hi @amitcsknit ,

 

Can you please confirm if all other bundles are in "active" state. Specifically, check for AEMFD Signature bundle & AEM RM Indexer Bundle. 

 

Similar issue, I also faced at my end and it automatically resolved after making these two bundles in the "active" state by adding below properties in sling.properties

sling.bootdelegation.class.com.rsa.jsafe.provider.JsafeJCE=com.rsa.*
sling.bootdelegation.class.org.bouncycastle.jce.provider.BouncyCastleProvider=org.bouncycastle.*
 
Let me know if that makes any difference.
 
Regards
Sameer Dhawan

4 replies

amitcsknit
Level 2
Jul 22, 2020 3:13 PM UTC

bundle was active but still This was not happening because custom package was not in export list inside manifest. For testing i moved my classes to model or any preexisting package & they are getting resolved.  Now question came why it is not in export inside manifest.

Translate
SameerDhawanAccepted solution
Employee
Jul 22, 2020 1:38 PM UTC

Hi @amitcsknit ,

 

Can you please confirm if all other bundles are in "active" state. Specifically, check for AEMFD Signature bundle & AEM RM Indexer Bundle. 

 

Similar issue, I also faced at my end and it automatically resolved after making these two bundles in the "active" state by adding below properties in sling.properties

sling.bootdelegation.class.com.rsa.jsafe.provider.JsafeJCE=com.rsa.*
sling.bootdelegation.class.org.bouncycastle.jce.provider.BouncyCastleProvider=org.bouncycastle.*
 
Let me know if that makes any difference.
 
Regards
Sameer Dhawan
Translate
New Participant
Jul 20, 2020 1:13 PM UTC

Hi @amitcsknit , Could you please check on following things-

  1. Check if your service is in satisfy state in bundle.
  2. Import service and try using: HandleContactForm hf = sling.getService(HandleContactForm .class);
  3. Check error log for full stack trace of error.
  4. Try using SlingScriptHelper instead of sling to call service from jsp.

Hope this will help you out.

 

Thanks!

Translate
Level 8
Jul 20, 2020 11:30 AM UTC

Try restarting the server

Translate