hi paul,

On 28.08.2009, at 14:00, Paul Skinner <[email protected]> wrote:


Hi all,

I am using the following code snippet to import nodes into the repository.

   InputStream in = new FileInputStream(importFile);
session.importXML("/", in, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
   session.save();

The import file had previously been generated using this code snippet:

   OutputStream out = new FileOutputStream(exportFile);
   session.exportSystemView("/MyPrefix:MyRoot", out, false, false);
   out.close();


My
problem is when I import nodes that were created in the repository
using mixins. Errors are recieved when I try and import them:

   "no matching property definition found"
or
"no definition found in parent node's node type for new node: no matching child node definition found"

depending
on whether the mixin added extra properties or child nodes. The export
file contains the mixins in the jcr:mixinTypes property as well as any
properties and child nodes that were added by the mixin.

has the export been done on a different system or have there been any node type modifications/manipulations in between? the error msg seems to indicate a problem related to incompatible node types.

mixin's should not cause any problems for system view xml roundtripping.

cheers
stefan



How do I import content created using mixins?

Regards
Paul
_________________________________________________________________
Windows Live Messenger: Celebrate 10 amazing years with free winks and emoticons.
http://clk.atdmt.com/UKM/go/157562755/direct/01/

Reply via email to