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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

class not found exception for different framework java classes

Avatar

Level 3

Hi,

I am getting below error when i try to access the custom page created

Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.PageContext not found by <custom package> [502]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1550)

Same error is repeated for all java classes. I mean i created a component and calling java class from component jsp. I am passing currentNode, pageContext etc... from jsp to java class. There are no issues with compilation. But when i access the page with above component getting no class def found for all classes. 

Caused by: java.lang.ClassNotFoundException: javax.jcr.Node not found by <custom package> [505]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1550)

 

Appreciated for any help

1 Accepted Solution

Avatar

Correct answer by
Level 10

Verify the pom.xml import package.

View solution in original post

5 Replies

Avatar

Level 3

Forgot to mention in above post, AEM is installed in tomcat

Avatar

Correct answer by
Level 10

Verify the pom.xml import package.

Avatar

Community Advisor

Are you getting the this error when you trying to call the class from your bundle or any OOB Bundle class aswell  ?

Avatar

Level 3

Yes. I am getting it when i use the class in custom bundle. I have user node.getProperty() (in java class) which is failing. Where as when i try the same in jsp (currentNode.getProperty() is working fine)

Avatar

Level 10

Please in future - place AEM questions in the main Experience Manager forum - not Marketing Cloud - AEM ppl will see it.