AEM 6.4 beta, Apache Sling JCR Resource Resolver not present

Avatar

Avatar

ralvarado88

Avatar

ralvarado88

ralvarado88

01-02-2018

Hi all

I'm trying to migrate an app so it works on AEM 6.4 beta, but I ran into the following problem:
When I install my bundle. I get the following error:

org.apache.sling.jcr.resource,version=[2.4,3) -- Cannot be resolved

Right now, I'm using version 2.9.2 of org.apache.sling.jcr.resource. Here's the pom dependency:

<dependency>

    <groupId>org.apache.sling</groupId>

    <artifactId>org.apache.sling.jcr.resource</artifactId>

    <version>2.9.2</version>

    <scope>provided</scope>

</dependency>

I checked in AEM's web console, and searched for that dependency using the dependency finder ( http://localhost:4502/system/console/depfinder ), and It turns out that package "org.apache.sling.jcr.resource" cannot be found in AEM 6.4 beta:

resource2.PNG

I checked in AEM 6.3, but I do get a result there:

resource1.PNG

It is because of this that I suspect that the problem is that this dependency is not present in AEM 6.4 beta. But still, I'm not an expert on dependencies so I'm not sure if this is the case, or if it's a problem on my project.


I'd appreciate if someone can point me in the right direction on this. Basically I want to check if the problem is related to AEM 6.4 beta dependencies.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

atulj76172708

Avatar

atulj76172708

atulj76172708

27-08-2018

Hi,

Actually these issues are due to changes in uber jar file i.e. interfaces and classes has been restructured in uber jar 6.4.

You can decompile uber jar and see the changes by yourself.

Taking an example of org.apache.sling.jcr.resource ....

org.apache.sling.jcr.resource.JcrResourceUtil is changed to com.day.cq.commons.jcr.JcrUtil

org.apache.sling.jcr.resource.JcrResourceConstants changed to org.apache.sling.jcr.resource.api.JcrResourceConstants

Links to figure out deprecated API's

https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/javadoc/de...

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/de...

Answers (24)

Answers (24)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

27-04-2018

I will update a HELPX article to AEM 6.4 that uses this data type. I will post back results.

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

01-02-2018

rijoalvi

   I just ran the 6.4 and checked your issue. For me evrything looks fine. and the bundle you referred is also present

1408562_pastedImage_0.png

Can you take a fresh jar download from Adobe Prerelease

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

27-04-2018

Been successful creating an HTL component that pulls data from the JCR using these APIs:

We will release this article next week.

Data.png

This uses Maven Arch 13. UBER 6.4, a system user, Java code,  and HTL.

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K
Jörg_Hoh
Employee

27-04-2018

The compatibility package allows you to run your AEM 6.3 application unchanged (no recompilation required) on AEM 6.4. Therfor you should not update to the 6.4 uber.jar

Jörg

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

01-02-2018

Thanks Praveen. This got resolved by renaming the folder to all small. 1408546_pastedImage_0.png

Avatar

Avatar

sindhug14537977

Avatar

sindhug14537977

sindhug14537977

28-08-2018

atulj26424737​ Thanks! It worked.!

Avatar

Avatar

sindhug14537977

Avatar

sindhug14537977

sindhug14537977

27-08-2018

i got the same issue while upgrading to 6.4.

is there a link to the above mentioned article.

Thanks!

Avatar

Avatar

atulj76172708

Avatar

atulj76172708

atulj76172708

27-04-2018

Aaah, understood.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

27-04-2018

We need a 6.4 article that uses this JAVA to pull data from the JCR and display in an HTL component:

Map<String, Object> param = new HashMap<String, Object>();

param.put(ResourceResolverFactory.SUBSERVICE, "datawrite");

ResourceResolver resolver = null;


try {

          

    //Invoke the adaptTo method to create a Session used to create a QueryManager

  resolver = resolverFactory.getServiceResourceResolver(param);

    session = resolver.adaptTo(Session.class);

Avatar

Avatar

atulj76172708

Avatar

atulj76172708

atulj76172708

27-04-2018

Thank you smacdonald2008 this information will definitely help.

I am facing this issue at package compilation time itself. (mvn clean install)

The compatibility package goes directly on the server through package manager, but I am not able to make my package ready & compatible with 6.4 after adding 6.4.0 uber jar in the pom.xml.

I am trying to follow this document.. Upgrading Code and Customizations

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K
Jörg_Hoh
Employee

27-04-2018

Check the documentation at Backward Compatibility in AEM 6.4​.

Jörg

Avatar

Avatar

atulj76172708

Avatar

atulj76172708

atulj76172708

27-04-2018

I am migrating from AEM 6.2 to AEM 6.4.

We found this error flagged into pattern detector.

category OCU.

pattern=OCU/outdated.code.usage

detector=IncompatibleExceptionDetector

message="The OSGi import: org.apache.sling.jcr.resource, due to package removal, referenced at bundle: com.leggmason.gd.core.leggmason-core might no longer be resolvable by default".

at=https://www.adobe.com/go/aem6_OCU

In OCU link it says the error can be solved with compatibility packages or with the help of alternate API's.

But there is no much information available on this thread.

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K
Jörg_Hoh
Employee

27-04-2018

A lot of this package is deprecated for quite some time. I remember that I came across a statement in the release notes of AEM. What version are you migrating from?

Jörg

Avatar

Avatar

atulj76172708

Avatar

atulj76172708

atulj76172708

27-04-2018

Facing, the same issue.

Have opened a daycare for it.

does anyone know how to solve the compilation error?  package org.apache.sling.jcr.resource does not exist.

Getting this error while updating existing's projects POM.xml to 6.4.0 uber jar & then compiling the project.

Avatar

Avatar

gregt65506620

Avatar

gregt65506620

gregt65506620

16-04-2018

I'm having the same issue with the AEM 6.4 release and I did build my project using the UBER 6.4

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

13-04-2018

Did you build your 6.4 project using the UBER 6.4?

Avatar

Avatar

paradox8071

Avatar

paradox8071

paradox8071

13-04-2018

having the same issue with recently release AEM 6.4

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.8K

Likes

1.0K

Correct Reply

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.8K

Likes

1.0K

Correct Reply

1.1K
kautuk_sahni
Community Manager

07-02-2018

   It is against NDA to post AEM 6.4 beta questions on the main forums. You should be asking these in the Beta forums (Adobe prerelease) set for it.

-Kautuk

Avatar

Avatar

ralvarado88

Avatar

ralvarado88

ralvarado88

02-02-2018

Thanks! Yes, apparently it was an issue with my jar. Thanks for your help!

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

01-02-2018

yup. Just now downloaded a new build from beta site.

Avatar

Avatar

edubey

Avatar

edubey

edubey

01-02-2018

is this the fresh instance of load18?

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

01-02-2018

Still not working login_error

Avatar

Avatar

edubey

Avatar

edubey

edubey

01-02-2018

AFAIK, there is no issue with login for load18

Though you might be hitting AEM 6.4 beta, default login is not working

Make sure you do not have any space in path to jar file else it will through an crypto exception in stderr.log

References from Windows OS

Path with spaces - C:\AEM Stuff\aem 6.4 - will not work

Path without spaces - C:\sample\aem64 - will work

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

01-02-2018

For me I am not able to login to the server itself after load18 . It is not taking admin/admin as credentials