Skip navigation

CQ5

Currently Being Moderated

Setting Eclipse Environment: required jar file for <cq:defineTags>

Apr 27, 2012 7:53 AM

Hi,

 

I am setting up Eclipse development environment for CQ 5.4, and am facing an issue with finding the exact jar files that will parse the <cq:defineObjects>  tag. I have the followed the instructions under : http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/develop menttools/developing_with_eclipse.html

 

And I have included the  sling.scripting.jsp.taglib-2.0.6.jar  in my classpath. I get the following error : "The TagExtraInfo class for "cq:defineObjects" (com.day.cq.wcm.tags.DefineObjectsTEI) could not be instantiated".

 

Do I need any other jars to included in the classpath?

 

thanks,

pvr

 
Replies
  • Currently Being Moderated
    Apr 27, 2012 8:27 AM   in reply to pvr_power

    I think you need also to include cq-wcm-taglib-5.4.0.jar which can be found at /libs/wcm/taglib/install

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 27, 2012 10:08 AM   in reply to pvr_power

    I have found that these are the maven dependencies I need to make auto-complete and syntax highlighting work in JSPs in 5.4 (version numbers may vary based on what hotfixes you have applied. For 5.5 the version numbers significantly differnt, and you have to add the dependency on com.adobe.granite.xssprotection. 

     

        <dependency>
            <groupId>com.day.commons</groupId>
            <artifactId>day-commons-jstl</artifactId>
            <version>1.1.4</version>
        </dependency>
        <dependency>
            <groupId>com.day.cq</groupId>
            <artifactId>cq-commons</artifactId>
            <version>5.4.6</version>
        </dependency>
        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-api</artifactId>
            <version>5.4.0</version>
        </dependency>
        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-commons</artifactId>
            <version>5.4.2</version>
        </dependency>
        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-taglib</artifactId>
            <version>5.4.0</version>
        </dependency>
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
            <version>5.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
        </dependency>
         <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.api</artifactId>
            <version>2.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
            <version>2.1.0</version>       
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.5.3</version>
        </dependency>
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2013 3:59 PM   in reply to 4593029388218911

    I am trying to get this very thing working in 5.6.

     

    Using the below pom dependencies I was able to remove all of the dependency based errors from a local copy of global.jsp, however the very first tag errors out:

     

    <cq:defineObjects />

     

    DescriptionResourcePathLocationType
    The TagExtraInfo class for "cq:defineObjects" (com.day.cq.wcm.tags.DefineObjectsTEI) could not be instantiatedSimpleComponent.jsp/simplevault/bin/src/main/content/jcr_root/apps/simplevault/components /SimpleComponentline 1JSP Problem

     

    BTW this is w/ JDK 1.7 on Latest eclipse Juno using Dynamic Web Module 3.0 facet.

     

    Any help appreciated.

     

     

    included dependencies (possibly conflicting or insufficient???)

     

     



    <dependency>



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



    <artifactId>org.apache.sling.api</artifactId>



    <version>2.3.0</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



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



    <artifactId>org.apache.sling.jcr.jcr-wrapper</artifactId>



    <version>2.0.0</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



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



    <artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>



    <version>2.1.8</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>javax.servlet</groupId>



    <artifactId>jsp-api</artifactId>



    <version>2.0</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>javax.servlet</groupId>



    <artifactId>servlet-api</artifactId>



    <version>2.5</version>



    <scope>provided</scope>


    </dependency>



    <dependency>



    <groupId>com.day.cq</groupId>



    <artifactId>cq-commons</artifactId>



    <version>5.6.2</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>com.day.cq.wcm</groupId>



    <artifactId>cq-wcm-api</artifactId>



    <version>5.6.4</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>com.day.cq.wcm</groupId>



    <artifactId>cq-wcm-commons</artifactId>



    <version>5.6.2</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>com.day.commons</groupId>



    <artifactId>day-commons-jstl</artifactId>



    <version>1.1.4</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>com.day.cq.wcm</groupId>



    <artifactId>cq-wcm-taglib</artifactId>



    <version>5.6.2</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>commons-lang</groupId>



    <artifactId>commons-lang</artifactId>



    <version>2.5</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>com.adobe.granite</groupId>



    <artifactId>com.adobe.granite.xssprotection</artifactId>



    <version>5.5.22</version>



    <scope>provided</scope>


    </dependency>


    <dependency>



    <groupId>org.slf4j</groupId>



    <artifactId>slf4j-api</artifactId>



    <scope>provided</scope>


    </dependency>
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2013 6:14 PM   in reply to pvr_power

    Do you have local enviornment setup with maven plugin? then try to copy jar files in user cache (as below). (POM.xml gives project build error if it cant find these files - are you getting build errors?)

     

    If the dependencies are not stored in the local Maven repository, compiler errors appear in the pom.xml file.

    1. Deploy the CQ5 specific artifacts as defined in the pom.xml (cq-wcm-api, cq-commons and org.apache.sling.api) to the local Maven repository:
      1. In your file system, copy the the file cq-wcm-api-{version}.jar located at cq5libs/wcm (you have created those folders before) into <your-user-dir>/.m2/repository/com/day/cq/wcm/cq-wcm-api/{version} (create the folders if they don't exist).
      2. In your file system, copy the the file cq-commons-{version}.jar located at cq5libs/cq (you have created those folders before) into <your-user-dir>/.m2/repository/com/day/cq/cq-commons/{version} (create the folders if they don't exist).
      3. In your file system, copy the the file org.apache.sling.api-{version}.jar located at cq5libs/sling (you have created those folders before) into<your-user-dir>/.m2/repository/org/apache/sling/org.apache.sling.api/{ version} (create the folders if they don't exist).
      You don't need to perform this step if the three CQ5 artifacts are globally deployed for the project on a Maven repository (e.g. using Apache Archiva).
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points