since ‎16-08-2018
‎10-12-2019
kramer2718
Level 1
Cannot get DefaultSlingScript: null
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
Hi guys,I'm maintaining a site that I didn't write so I don't understand the purpose of all of the code. Anyway...I'm seeing a stacktrace (see end of post) in the production logs and I'd like to fix it. If I navigate to /content/com/products/cinnamon-crumb-coffee-cake-whole/jcr:content, there is no cloudservices node (hence I presume the exception), but where is it coming from? If I search the code base, see this line:in footer.htmlSo that's probably what does it, but what does that line actuall...

Views

2.4K

Likes

0

Replies

1
Re: Reenable Anonymous User While Offline
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
Hi guys. It looks to me that several of these answers are likely correct, but we found a slightly different approachcurl -u admin:admin 'http://localhost:4502/home/users/O/OPYCNCDeCOsijvtpS0J5.rw.userprops.html' --data '.&disableUser=&_charset_=utf-8' --compressed

Views

2.1K

Likes

0

Replies

0
Reenable Anonymous User While Offline
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
My colleague disabled the user "anonymous" and now the application is unusable. It appears that some services are running, but anytime you attempt to access any UI, it simply displays a Stackoverflow error. Obviously, we'd like to reenable that user but the useradmin UI doesn't work.I believe if he had deleted the user it would have automatically been recreated, but he disabled it.We've tried some different curl commands to delete or reenable the user but are getting 500 response on everything w...

Views

2.2K

Like

1

Replies

8
How do I get a selector from a Sling Resource
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
I have two Sling Models: @Model(adaptables = {SlingHttpServletRequest.class, Resource.class}, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL) public class VideoGridItem { @SlingObject private Resource resource; @SlingObject private SlingHttpServletRequest slingHttpServletRequest; @PostConstruct public void initVideoGridItem() { String[] selectors = slingHttpServletRequest.getRequestPathInfo().getSelectors(); insideGrid = selectors == null || selectors.length == 0 ? false : Arrays.s...

Views

773

Likes

0

Replies

1
Re: How do I specify an implementation using @OSGiService
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
Your answer is a cop out.You don't think it's cumbersome. I think it's cumbersome. I think most Java devs who are new to AEM would think it's cumbersome.Yes, Apache Experience Manager uses OSGi but it also has its own annotations. Apache could make things easier but it clearly doesn't think this is a priority. That's fine. Companies have priorities, but don't say that they couldn't do it.

Views

1.7K

Likes

0

Replies

0
Re: How do I specify an implementation using @OSGiService
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
Two interfaces is apparently the best use case in AEM. Unfortunately it is very cumbersome. Coming from a Java background, this is very annoying. AEM really ought to implement the standard Java interfaces (@Inject and @Named). How do I file a change request?

Views

1.8K

Likes

0

Replies

0
Re: How do I specify an implementation using @OSGiService
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
One more point is that I'd like to do this purely in code without touching the OSGi console.

Views

1.8K

Likes

0

Replies

0
Re: How do I specify an implementation using @OSGiService
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
Maybe I'm misunderstanding your reply but I don't think it answers my question. I don't have two instances of the same Java implementation. I have two different implementations. Your example uses MailServiceImpl but with two different labels allowing independent configuration. Useful, but not what I need. I have something like PopMailServiceImpl and ImapMailServiceImpl.

Views

1.7K

Likes

0

Replies

0
How do I specify an implementation using @OSGiService
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
I have two implementations of an interface. Both are OSGipublic interface MenuService {//...}and@Component( immediate = true, service = MenuService.class, name = "menuServiceImpl1")public interface MenuServiceImpl1 implements MenuService {//...}and@Component( immediate = true, service = MenuService.class, name = "menuServiceImpl2")public interface MenuServiceImpl2 implements MenuService {}I can inject an implementation using OSGiService like so:@OSGiServiceprivate MenuService menuService;But I a...

Views

3.7K

Like

1

Replies

9
How do I convert a page into a model
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
Newbie here, so go easy. Not quite sure my terminology is correct.I'm trying to get all of the instances of a given model. I have a Video component like so:@Model(adaptables = Resource.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)public class Video { private url;}I'd like to get all instances of Video models. By convention, I can put all of my video pages in one location in the JCR tree. Then I can get all the video Page objects like so: videoPages = new ArrayList<>(); all...

Views

904

Like

1

Replies

2
How do I detect that a resource failed to render and take appropriate action?
Avatar

kramer2718

kramer2718
- Adobe Experience Manager
I have a resource included as follows:In some cases, that resource is failing to load and no HTMLis being rendered. How can I detected that failure and take action?Preferably, I'd like to return the response as normal and set an HTTP header.Thanks for your help!

Views

538

Likes

0

Replies

1
Likes given to
Likes from