AEM Gotchya: No packages in Package Manager

I was working with a client who had a problem with no packages showing in the CRX package manager. I checked the usual suspects of not being logged in etc, but everything looked fine. When checking the error.log, I saw this line:

log:  27.06.2014 13:16:53.845 *ERROR* [127.0.0.1 [1402543013788] GET /crx/packmgr/list.jsp?_dc=1402543013769&_charset_=utf-8&includeVersions=true HTTP/1.1] com.day.crx.packmgr.impl.servlets.ListServlet Error while retrieving infos: javax.jcr.RepositoryException: Invalid path:/etc/packages/my_packages/.snapshot/My Packagename 

CRXDE Lite showed that the path /etc/packages/my_packages/.snapshot/My Packagename was indeed valid. Checking the packages installed via curl gave me the the clue to the problem:

curl -u admin:admin http://localhost:4502/crx/packmgr/service.jsp?cmd=ls

<crx version="2.4.42" user="admin" workspace="crx.default">
  <request>
    <param name="cmd" value="ls"/>
  </request>
  <response>
    <data>
      <packages>
        . . . 
        . . .
        <package>
          <group>my_packages</group>
          <name>My Packagename </name>
          <version>1.0</version>
          <downloadName>My Packagename-1.0.zip</downloadName>
          <size>8770</size>
          <created>Thu, 12 Jun 2014 15:25:33 +1000</created>
          <createdBy>admin</createdBy>
          <lastModified>Thu, 12 Jun 2014 15:25:33 +1000</lastModified>
          <lastModifiedBy>admin</lastModifiedBy>
          <lastUnpacked></lastUnpacked>
          <lastUnpackedBy>null</lastUnpackedBy>
        </package>
        . . . 
        . . . 
      </packages>
    </data>
    <status code="200">ok</status>
  </response>
</crx>

What I couldn’t see in the error log you can clearly see in the package listing – a trailing space at the end of the package name.

After ducking back into CRXDE Lite, it was easy to rename the package by editing the ‘name’ property of the vault definition located at /etc/packages/my_packages/My Packagename-1.0.zip/jcr:content/vlt:definition. Then after refreshing the packages in Package Manager, packages were displayed and all was working as expected again.

This entry was posted in AEM and tagged , . Bookmark the permalink.

4 Responses to AEM Gotchya: No packages in Package Manager

  1. Pooja says:

    Thanks a lot! This was very helpful.

  2. Nicolas says:

    Thank you very much!
    Seems like a bug in crx package manager since you can create packages with spaces in the name with the GUI. There should be at least a regex to avoid such names

  3. Many thanks. Your post put me on the right track.

    The issue with mine turned out to be a package with a colon (:) betwixt some other letters. Upon finding the package in crxde and deleting it, all was well once again.

  4. saheli@in.com says:

    Really helpful

Add a comment...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s