jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Bingley" <Phil.Bing...@tvnz.co.nz>
Subject Empty date value
Date Tue, 31 Jan 2006 21:08:06 GMT


I am just trying to get my teeth in to things and I have a problem with
a Date value in a custom node type that I have created.

My type is defined as follows

<exp = 'http://bixby/test'>
[exp:article] > mix:referenceable
- exp:title (string) = '' mandatory autocreated
- exp:created (date) mandatory
- exp:body (string) = '' autocreated
- exp:related (reference) multiple

I add content like so

Node test = content.addNode("Test Node", "exp:article");
   test.setProperty("exp:created", Calendar.getInstance());
   test.setProperty("exp:title", "Its a test title");
   test.setProperty("exp:body", "blah blah blah");

then can output the content and all is fine (using the dump() method
from the First Hops doc)

If I run the application again, having removed the code to add the node,
I get the following exception when trying to dump() the content. 

javax.jcr.ValueFormatException: empty value
at org.apache.jackrabbit.value.BaseValue.getString(BaseValue.java:207)

I have verified that the date is stored in the data (XMLPersistenceMgr)
and have tested with the Derby PM as well - same result.  So there seems
to be an issue of some sort when loading from the store I guess.
Anyone have any ideas on this one?


CAUTION: This e-mail and any attachment(s) contains information that
is intended to be read only by the named recipient(s). It may contain
information that is confidential, proprietary or the subject of legal
privilege. This information is not to be used by any other person
and/or organisation. If you are not the intended recipient, please
advise us immediately and delete this e-mail from your system. Do not
use any information contained in it.

For more information on the Television New Zealand Group, visit us
online at http://www.tvnz.co.nz
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message