Publishing failure - NullPointerException

An edition item is failing and I can’t figure out why. Content list contains only one item: home page (unique content type), in a template mostly made up of auto-slots. Item can be previewed but fails to publish. One line in the console log, saying basically edition failed. When testing JSR query from the content list, I get

Unexpected Exception

java.lang.NullPointerException

Please help me troubleshoot this.

Sinisa,

Can you post the JCR query?

RLJII

Made some progress; this seems to be related to folder structure. Content lists collecting all items off the root

...where jcr:path like '//Sites/Connect'

are failing. If query filters to a subfolder

...where jcr:path like '//Sites/Connect/Subfolder'

, that’s fine.
Any ideas?

This is the query:

select rx:sys_contentid, rx:sys_folderid from rx:intra_home where jcr:path like '//Sites/VCHConnect'

Got it!
Just another ugly face of my nemesis: orphaned items. (When user flushes folder without flushing folder items first. Somehow these “orphaned” items disrupt folder structure.)