since ‎16-03-2021
‎16-04-2021
ashwinikhaple
Level 1
Re: Created scheduler but not able to see log output in t...
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
I am getting the below error Caused by: org.apache.sling.api.scripting.ScriptEvaluationException:at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:416) [org.apache.sling.scripting.core:2.0.56]at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184) [org.apache.sling.scripting.core:2.0.56]at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491) [org.apache.sling.scripting.core:2.0.56]a...

Views

66

Likes

0

Replies

0
Re: Created scheduler but not able to see log output in t...
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Hello @asutosh_jena, I modified service class to service name but still it is not working

Views

85

Likes

0

Replies

0
Created scheduler but not able to see log output in the project log
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Below is the code for configuring the scheduler. You can refer to the screenshot of the configuration @ObjectClassDefinition(name = "AEM: SlingSchedulerConfiguration",description = "Sling scheduler configuration")public @interface SchedulerConfig{@AttributeDefinition(name = "Cron-job expression")String scheduler_expression() default "*/10 * * * * ?";@AttributeDefinition(name = "A parameter",description = "Can be configured in /system/console/configMgr")String myParameter() default "";} @Designat...

Views

112

Likes

0

Replies

6
Trying to Pass the parameters from sightly to the slingmodel and read the values , manipulate it and display in frontend
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
I want to pass parameters text and username from sightly to sling model and display in frontend. Pls HelpSightly Code MyComponentModel.java@Model(adaptables = SlingHttpServletRequest.class)public class MyComponentModel{ @RequestAttribute @Optional public String text; @RequestAttribute @Optional public String username; @PostConstruct protected void init() { text="hello "+text; } }

Views

93

Likes

0

Replies

2
How to display JSON data through Sling Model
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
I have created a Component that has title, description, date, URL, and read the values in SlingModel then how can I display the data in the form of JSON to the frontend through the sling model?

Views

109

Likes

0

Replies

2
Re: Error while testing component's sling model
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Hi @Vijayalakshmi_S, below are dependencies written inproject pom.xml fileorg.osgiosgi.core6.0.0providedorg.osgiosgi.cmpn6.0.0providedorg.osgiosgi.annotation6.0.1providedorg.slf4jslf4j-api1.7.21providedcom.adobe.aemuber-jar6.3.2apisprovidedcom.adobe.cqcore.wcm.components.allzip2.2.0com.adobe.cqcore.wcm.components.core2.2.0providedcom.adobe.cqcore.wcm.components.extensionzip1.0.6org.apache.slingorg.apache.sling.models.api1.0.0providedjavax.servletservlet-api2.5providedjavax.servlet.jspjsp-api2.1p...

Views

55

Likes

0

Replies

0
Error while testing component's sling model
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Failure Trace:java.lang.VerifyError: class io.wcm.testing.mock.aem.context.AemContextImpl overrides final method org.apache.sling.testing.mock.sling.context.SlingContextImpl.currentResource(Lorg/apache/sling/api/resource/Resource;)Lorg/apache/sling/api/resource/Resource;at java.base/java.lang.ClassLoader.defineClass1(Native Method)at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)at java.base/j...

Views

112

Likes

0

Replies

4
Re: How Can I call a Service in Servlet
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Now, I am trying to render values returned by methods that are in MyService, So to render those in servlet what can I use? Below is MyService Methods code public interface MyService{public String getMyFirstName();public String getMyLastName();public String getMyHobby();}

Views

132

Likes

0

Replies

0
Re: How Can I call a Service in Servlet
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Hello @Rohit_Utreja Thank you for the reply. I have created servlet below how can I call MyService here?import javax.servlet.Servlet;import javax.servlet.ServletException;import org.apache.sling.api.SlingHttpServletRequest;import org.apache.sling.api.SlingHttpServletResponse;import org.apache.sling.api.servlets.HttpConstants;import org.apache.sling.api.servlets.SlingSafeMethodsServlet;import org.osgi.framework.Constants;import org.osgi.service.component.annotations.Component;@Component(service =...

Views

179

Likes

0

Replies

0
How Can I call a Service in Servlet
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
I have created a service called MyService and implemented it, I want to call it in my servlet so how can I do that? please help

Views

218

Likes

0

Replies

7
For my service Service Id is not getting Generated in my project bundle I cannot see it.
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Below is the code for my service and its implementationSimpleService.java : package com.aem.demo.core;public interface SimpleService{public String MyName();} SimpleServiceImpl.java : package com.aem.demo.core.impl;import org.apache.felix.scr.annotations.Activate;import org.apache.felix.scr.annotations.Component;import org.osgi.service.component.ComponentContext;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import com.aem.demo.core.SimpleService;@component(metatype = true, label = "Simpl...

Views

136

Likes

0

Replies

3
Re: 1. javax.jcr.InvalidItemStateException: OakState0001:...
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
It worked after I add @Optional annotation to the fields that I was Injecting in the HelloWorldModel. Thanks all

Views

98

Like

1

Replies

1
Re: 1. javax.jcr.InvalidItemStateException: OakState0001:...
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Hello @KiranVedantam1992 , I checked for the 1st error I don't think there is any problem with asset.jpg file because previously when I used it in the same project it was working fine. For the HelloWorldModel I can show the code if you want I'm not getting which attribute is missing here

Views

125

Likes

0

Replies

0
1. javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/demotraining/asset.jpg - Error while creating a Page Programatically
Avatar

ashwinikhaple

ashwinikhaple
- Adobe Experience Manager
Hello, I'm pasting the error log please let me know what's wrong here. javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/demotraining/asset.jpgat org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:238) [org.apache.jackrabbit.oak-api:1.10.2]at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:213) [org.apache.jackrabbit.oak-api:1.10.2]at org.apache.jackrabbit....

Views

177

Likes

0

Replies

6
Likes from