i have added a jar in pom.xml as
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
bundle is installed but in http://localhost:4502/system/console/bundles--> imported files
i am getting issue as org.json.simple -- Cannot be resolved
because of which my bundle is not getting activated
and i am getting error in log as ServiceEvent UNREGISTERING
this is because of same reason or no i am not getting.
Solved! Go to Solution.
Views
Replies
Total Likes
org.json.simple api wont be available in Felix so dependency cont be resolved. better use following one for json org.apache.sling.commons.json.JSONObject, its part of osgi.
Views
Replies
Total Likes
org.json.simple api wont be available in Felix so dependency cont be resolved. better use following one for json org.apache.sling.commons.json.JSONObject, its part of osgi.
Views
Replies
Total Likes
Hi
Check this post:-
Link:- http://stackoverflow.com/questions/31380082/cq5-osgi-bundle-error-org-json-simple-cannot-be-resolved
//Change your maven bundle configuration
<plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.3.7</version> <configuration> <instructions> <Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency> <Embed-Transitive>true</Embed-Transitive> </instructions> </configuration> </plugin>
I hope this would be of some help to you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
mallipanchal wrote...
org.json.simple api wont be available in Felix so dependency cont be resolved. better use following one for json org.apache.sling.commons.json.JSONObject, its part of osgi.
You are correct, but we can use it as third party JAR.
See this :- https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
~kautuk
Views
Replies
Total Likes
Views
Likes
Replies