Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

New Project through AEM Eclipse developer tools

Avatar

Level 9

I created new project through AEM eclipse developer tools, I don't see any Activator class in the project.  I added couple of maven dependencies, somehow osgi is not resolving this

au.com.bytecode.opencsv,version=[1.0,2) -- Cannot be resolved
au.com.bytecode.opencsv.bean,version=[1.0,2) -- Cannot be resolved
com.day.cq.commons.jcr,version=[5.7,6) -- Cannot be resolved
com.day.cq.dam.api,version=[1.2,2) -- Cannot be resolved
com.day.cq.dam.commons.process,version=[1.1,2) -- Cannot be resolved
com.day.cq.tagging,version=[5.7,6) -- Cannot be resolved
org.apache.sling.api,version=[2.3,3) -- Cannot be resolved
org.apache.sling.api.request,version=[2.4,3) -- Cannot be resolved
org.apache.sling.api.resource,version=[2.5,3) -- Cannot be resolved
org.apache.sling.settings,version=[1.3,2) -- Cannot be resolved

Here are the dependecnies i have in main pom.xml

<dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.0</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.bundles</groupId>
                <artifactId>ow2-bundles-externals-opencsv</artifactId>
                <version>1.0.36</version>
            </dependency>
                <dependency>
                <groupId>com.day.cq</groupId>
                <artifactId>cq-tagging</artifactId>
                <version>5.6.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.day.cq.dam</groupId>
                <artifactId>cq-dam-commons</artifactId>
                <version>5.6.8</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.api</artifactId>
                <version>2.2.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.settings</artifactId>
                <version>1.2.2</version>
                <scope>provided</scope>
            </dependency>

Here is it in core pom.xml

<dependency>
            <groupId>org.ow2.bundles</groupId>
            <artifactId>ow2-bundles-externals-opencsv</artifactId>
        </dependency>
            <dependency>
                <groupId>com.day.cq</groupId>
                <artifactId>cq-tagging</artifactId>

            </dependency>
            <dependency>
            <groupId>com.day.cq.dam</groupId>
            <artifactId>cq-dam-commons</artifactId>
        </dependency>
            <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.settings</artifactId>
        </dependency>

1 Accepted Solution

Avatar

Correct answer by
Level 10

Try with the preview 1.0.2 version of the AEM Developer tools for Eclipse.  If still issue persist log at https://github.com/Adobe-Marketing-Cloud/aem-eclipse-developer-tools/issues

[1]   http://eclipse.adobe.com/aem/dev-tools/preview/

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

Try with the preview 1.0.2 version of the AEM Developer tools for Eclipse.  If still issue persist log at https://github.com/Adobe-Marketing-Cloud/aem-eclipse-developer-tools/issues

[1]   http://eclipse.adobe.com/aem/dev-tools/preview/

Avatar

Level 10

If you are following the AEM core documentation and getting this error - please log a ticket. We are going to do content around this in the community  team. We are going to host an Ask the Community Experts on this subject in January and put out some in depth community articles. 

Avatar

Level 9

I couldn't find that link for eclipse it is not found 404

I found similiar post related to cannot be resolved, it is suggested to add ! in <Import-Package>. As I keep adding, when I build again it shows a different package. This list is growing big.

I am not sure this is the right way to handle this issue.

    <Import-Package>!com.day.cq.commons.jcr,!com.day.cq.dam.api,
                            !com.adobe.internal.xmp.impl,
                            !com.adobe.internal.xmp.impl.xpath,
                            !com.adobe.xmp.core.impl,
                            !com.adobe.xmp.core.parser.impl,

</Import-Package>

Apart from this I see another issue

org.osgi.framework.BundleException: Unresolved constraint in bundle org.dam.mana
gement.org.dam.mgmt.it.tests [314]: Unable to resolve 314.1: missing requirement
 [314.1] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.junit.anno
tations)(version>=1.0.0)(!(version>=2.0.0)))
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:396
2)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2025)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1279)

        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStart
LevelImpl.java:304)
        at java.lang.Thread.run(Thread.java:744)

Avatar

Level 9

Although I don't get Cannot be resolved after adding those packages in import-package, but my bundle doesn't start

I do see following error in error.log

08.11.2014 10:07:13.095 *ERROR* [127.0.0.1 [1415459233079] POST /system/console/bundles/315 HTTP/1.1] cqse-httpservice %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision org.dam.management.org.dam.mgmt.core [315.1] because it exports package 'javax.servlet' and is also exposed to it from bundle revision cqse-httpservice [25.0] via the following dependency chain:

  org.dam.management.org.dam.mgmt.core [315.1]
    import: (osgi.wiring.package=javax.servlet.jsp.jstl.core)
     |
    export: osgi.wiring.package=javax.servlet.jsp.jstl.core; uses:=javax.servlet
  day-commons-jstl [115.0]
    import: (osgi.wiring.package=javax.servlet)
     |
    export: osgi.wiring.package=javax.servlet
  cqse-httpservice [25.0]) org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision org.dam.management.org.dam.mgmt.core [315.1] because it exports package 'javax.servlet' and is also exposed to it from bundle revision cqse-httpservice [25.0] via the following dependency chain:

Attached pom.xml, added jpg extension to bypass upload in forum