jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pamarthi, Ramakrishna" <rk.pamar...@hp.com>
Subject Date issue
Date Wed, 12 Dec 2007 10:00:36 GMT
Hi,
 
we are getting the below exception. Any one have any idea?
 
 
org.apache.jackrabbit.core.state.ItemStateException: failed to store
property state: 584c9d26-29c1-4d1a-88d9-7776a6f33f05/{}viewableuntil
 at
org.apache.jackrabbit.core.persistence.xml.XMLPersistenceManager.store(X
MLPersistenceManager.java:723)
 at
org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(
AbstractPersistenceManager.java:84)
 at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(Share
dItemStateManager.java:688)
 at
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedIte
mStateManager.java:855)
 at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemS
tateManager.java:326)
 at
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateMa
nager.java:313)
 at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemS
tateManager.java:302)
 at
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionI
temStateManager.java:306)
 at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1240)
 at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:849)
 at
com.hp.ocs.j2ee.RepositoryServlet.migrateRepositoryContentDate(Repositor
yServlet.java:357)
 at com.hp.ocs.j2ee.RepositoryServlet.init(RepositoryServlet.java:205)
 at javax.servlet.GenericServlet.init(GenericServlet.java:211)
 at org.apache.catalina.core.StandardWrapper.loadServlet(Unknown Source)
 at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
 at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown
Source)
 at org.apache.catalina.core.StandardContext.start(Unknown Source)
 at org.apache.catalina.core.ContainerBase.addChildInternal(Unknown
Source)
 at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
 at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
 at org.apache.catalina.startup.HostConfig.deployDescriptor(Unknown
Source)
 at org.apache.catalina.startup.HostConfig.deployDescriptors(Unknown
Source)
 at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
 at org.apache.catalina.startup.HostConfig.start(Unknown Source)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown
Source)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown
Source)
 at org.apache.catalina.core.ContainerBase.start(Unknown Source)
 at org.apache.catalina.core.StandardHost.start(Unknown Source)
 at org.apache.catalina.core.ContainerBase.start(Unknown Source)
 at org.apache.catalina.core.StandardEngine.start(Unknown Source)
 at org.apache.catalina.core.StandardService.start(Unknown Source)
 at org.apache.catalina.core.StandardServer.start(Unknown Source)
 at org.apache.catalina.startup.Catalina.start(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.catalina.startup.Bootstrap.start(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
Caused by: java.lang.IllegalArgumentException: DAY_OF_MONTH
 at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2315)
 at java.util.Calendar.updateTime(Calendar.java:2260)
 at java.util.Calendar.complete(Calendar.java:1305)
 at java.util.Calendar.get(Calendar.java:1088)
 at org.apache.jackrabbit.util.ISO8601.format(ISO8601.java:221)
 at
org.apache.jackrabbit.core.value.InternalValue.toString(InternalValue.ja
va:422)
 at
org.apache.jackrabbit.core.persistence.xml.XMLPersistenceManager.store(X
MLPersistenceManager.java:709)
 ... 38 more
 
 
Here is the method: anything worng in below method?
 
private void dateMigration(Session session) throws RepositoryException {
  String queryString = "//element(*, myrep:base)";
  Query q =
session.getWorkspace().getQueryManager().createQuery(queryString,
Query.XPATH);
  QueryResult qr = q.execute();
  NodeIterator nodes = qr.getNodes();
  while (nodes.hasNext()) {
       Node node = (Node) nodes.next();
       if (node.hasProperty("viewableuntil")) {
             Calendar viewableuntil =
node.getProperty("viewableuntil").getDate();
             viewableuntil.set(Calendar.DAY_OF_MONTH,
viewableuntil.get(Calendar.DAY_OF_MONTH)+1);
             node.setProperty("viewableuntil", viewableuntil);
           }
   
      }
 }
 
 

Best Regards,
RK

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message