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  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.