jackrabbit-users mailing list archives

Please forgive my earlier mispost - up too late last night :) Here's what I
meant to post:
----------------------------------------------------------------------------------------------
Hi everyone,
Upgrading to 1.4.1 seems to have exposed some kind of bug in my
previously-working application. When I go to create a new versionable node
in the repository, I wind up with this stack trace:
org.apache.jackrabbit.core.state.NoSuchItemStateException:
deadbeef-face-babe-cafe-babecafebabe/{http://www.jcp.org/jcr/1.0}primaryType
at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(
SharedItemStateManager.java:259)
at
org.apache.jackrabbit.core.state.LocalItemStateManager.getPropertyState(
LocalItemStateManager.java:118)
at org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(
LocalItemStateManager.java:150)
at org.apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java
:523)
at org.apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java
:503)
at
org.apache.jackrabbit.core.version.AbstractVersionManager.createVersionHistory
(AbstractVersionManager.java:308)
at org.apache.jackrabbit.core.version.VersionManagerImpl$1.run(
VersionManagerImpl.java:224)
at
org.apache.jackrabbit.core.version.VersionManagerImpl$DynamicESCFactory.doSourced
(VersionManagerImpl.java:579)
at
org.apache.jackrabbit.core.version.VersionManagerImpl.createVersionHistory(
VersionManagerImpl.java:221)
at
org.apache.jackrabbit.core.version.XAVersionManager.createVersionHistory(
XAVersionManager.java:149)
at org.apache.jackrabbit.core.ItemImpl.initVersionHistories(
ItemImpl.java:785)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1221)
at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:896)
at com.bsgalliance.storage.jackrabbit.j2ee.JackrabbitUtils.persistItem(
JackrabbitUtils.java:838)
My code is pretty simple, and always worked in the past:
final NodeImpl file = (NodeImpl) root.addNode(fileName, "nt:file");
resource = (NodeImpl) file.addNode("jcr:content", "nt:resource");
resource.addMixin(MIX_VERSIONABLE);
resource.setProperty("jcr:mimeType", filePart.getContentType());
resource.setProperty("jcr:data", filePart.getInputStream());
resource.setProperty("jcr:lastModified", lastModified);
session.save();
resource.checkin();
Anyone got a clue what I'm doing wrong?
Thanks in advance,
Marc Schriftman