Expand my Community achievements bar.

SOLVED

6.2 Bundle Issue

Avatar

Level 3

Any Bundle I deploy to 6.2 instance is throwing this error

javax.inject,version=[0.0,1) -- Cannot be resolved

I googled and found out the possible below solution. 

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

 

So I added this config in my Core Project POM file and redployed the bundle.

<dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-atinject_1.0_spec</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> <version>1</version> </dependency>

But even after adding this config and I still get the same error. Any Possible reason what else I might be missing.

 

TIA

1 Accepted Solution

Avatar

Correct answer by
Level 10

Follow this step by step:

https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html

This will work - you can watch video too. 

View solution in original post

10 Replies

Avatar

Level 10

Its a dependency issue. See how we setup the POM files here: http://scottsdigitalcommunity.blogspot.ca/2016/07/creating-aem-html-template-language.html?m=0.  This will point you in right direction.

Avatar

Employee

Also check your order of dependencies.

Here a working example on 6.2: https://github.com/heervisscher/htl-examples

Avatar

Administrator

Hi

Helpx article :- https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html

// [AEM 6.2] ating an AEM HTML Template Language component 

Also for extra reference :- https://github.com/heervisscher/htl-examples

~kautuk



Kautuk Sahni

Avatar

Level 3

So I added these configs in the Parent POM.xml

            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>uber-jar</artifactId>
                <version>6.2.0</version>
                <classifier>obfuscated-apis</classifier>
                <scope>provided</scope>
            </dependency>
            
             <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-atinject_1.0_spec</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>

and then added then below dependencies as the first two dependencies in the Core POM xml file

        <dependency>
            <groupId>com.adobe.aem</groupId>
            <artifactId>uber-jar</artifactId>
            <classifier>obfuscated-apis</classifier>
        </dependency>
 
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-atinject_1.0_spec</artifactId>
        </dependency>

But still I am getting the same error, Not able to make it work. I am wondering what else I am doing wrong?

Avatar

Employee

Did you removed the 6.0 dependencies?

Can you compare your pom.xml with this one: https://github.com/heervisscher/htl-examples/blob/master/core/pom.xml

Avatar

Level 10

What Maven archetype did you use to create your project. Follow the article above and see if you can build that bundle. Then compare them. The article uses Feike's POM suggestions. 

Avatar

Level 3

My archetype is 10.  In fact I used the POM file which I got in my Adobe training and I added above mentioned dependencies on top of that. I don't think I have any dependencies from 6.0 version. Let me try using the complete setup from mentioned example later in the day and I will update back. 

Avatar

Correct answer by
Level 10

Follow this step by step:

https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html

This will work - you can watch video too. 

Avatar

Administrator

I request you to try installing the package in this[0] article or try this[0] article completely.

If you still face the problem, please reach out to Daycare.

[0] https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html

Package :- https://helpx.adobe.com/content/help/en/experience-manager/using/first_htl_WCMUsePojo/_jcr_content/m...

~kautuk



Kautuk Sahni

Avatar

Level 3

Even my own setup seems to be working now. I have no explanation why it was not working earlier. In fact today morning, i started following steps in the article by setting up a new project and it worked. Then i thought of checking my earlier project and even that worked .

 

Thanks a lot to all for great help.