jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu" <the.mindstorm.mailingl...@gmail.com>
Subject Re: corrupted root node state - jackrabbit - ERROR - failed to read node state: cafebabe-cafe-babe-cafe-babecafebabe
Date Wed, 19 Apr 2006 22:34:17 GMT
Jon, do you have any estimation about how many nodes are added to the
root path, so that you reached this error. I have been following the
discussion about this possible issue (I may be in the position of
having a quite flat hierarchy, and I want to understand what the
future may prepare to me).

many thanks in advance for any pointers,

./alex
--
.w( the_mindstorm )p.


On 4/19/06, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
> hi jon,
>
> On 4/16/06, Jon Loken <jon_loken@hotmail.com> wrote:
> > Hi Stefan,
> > Please excuse me if I am not sending this feedback to the right person.
>
> no problem, however the dev list is the 'right' place for this kind of feedback.
> i am sending this reply to the dev list as well.
>
> >
> > I've just getting started with jackrabbit (jackrabbit-core-1.0.jar). It is a
> > fantastic project.
>
> thanks, always good to hear :)
>
> >
> > I have come accross an exception that has been discussed previously on the
> > dev-list, namely 'failed to read node state:
> > cafebabe-cafe-babe-cafe-babecafebabe'
> >
> > In the process of importing 3000 xml documents using session.importXML()
> > followed by an xpath query, I first got this exception:
> >
> > ERROR - failed to write node state: cafebabe-cafe-babe-cafe-babecafebabe
> > com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for
> > column 'NODE_DATA' at row 1
> >  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
> >  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
> >  at
>
> the problem is that you're adding a large number of child nodes to the same
> node (the root node in your case) and that the size of the node exceeded
> the size limit imposed by the data type used in your db schema.
>
> the following thread discusses the same issue:
> http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/6732/focus=6732.
>
> cheers
> stefan
>
> > com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
> >  at
> > com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
> >  at
> > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1166)
> >  at
> > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1082)
> >  at
> > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1067)
> >  at
> > org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager.store(SimpleDbPersistenceManager.java:585)
> >  at
> > org.apache.jackrabbit.core.state.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
> >  at
> > org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager.store(SimpleDbPersistenceManager.java:446)
> >  at
> > org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:569)
> >  at
> > org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:692)
> >  at
> > org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:315)
> >  at
> > org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:322)
> >  at
> > org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:291)
> >  at
> > org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:257)
> >  at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1189)
> >  at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:805)
> >  at ThirdHop.insertXml(ThirdHop.java:190)
> >  at ThirdHop.go(ThirdHop.java:49)
> >  at ThirdHop.main(ThirdHop.java:29)
> > javax.jcr.ItemNotFoundException:
> > 1a663479-8060-4194-bbb5-a20612439a5c/{http://www.jcp.org/jcr/1.0}xmlcharacters
> >  at
> > org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:464)
> >  at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:320)
> >  at
> > org.apache.jackrabbit.core.ItemImpl.restoreTransientItems(ItemImpl.java:708)
> >  at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1208)
> >  at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:805)
> >  at ThirdHop.insertXml(ThirdHop.java:190)
> >  at ThirdHop.go(ThirdHop.java:49)
> >  at ThirdHop.main(ThirdHop.java:29)
> >
> > search took : 4688 ms
> > jcr:xmltext
> >
> >
> > What happens here is that the xml import stops and the xpath query takes
> > place. The above exception disappeared after I stopped using mysql "strict
> > mode".
> >
> > The next exception that occurs is when I make a new xpath query:
> >
> > ERROR - failed to read node state: cafebabe-cafe-babe-cafe-babecafebabe
> > java.io.EOFException
> > at java.io.DataInputStream.readFully(DataInputStream.java:178)
> > at java.io.DataInputStream.readFully(DataInputStream.java:152)
> > at
> > org.apache.jackrabbit.core.state.util.Serializer.deserialize(Serializer.java:156)
> > at
> > org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager.load(SimpleDbPersistenceManager.java:496)
> > at
> > org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState(SharedItemStateManager.java:857)
> > at
> > org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:784)
> > at
> > org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:207)
> > at
> > org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState(LocalItemStateManager.java:86)
> > at
> > org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(LocalItemStateManager.java:141)
> > at
> > org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:127)
> > at
> > org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:462)
> > at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:320)
> > at org.apache.jackrabbit.core.ItemManager.getRootNode(ItemManager.java:279)
> > at org.apache.jackrabbit.core.SessionImpl.getRootNode(SessionImpl.java:742)
> > at
> > org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:519)
> > at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:244)
> > at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:483)
> > at
> > org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:241)
> > at
> > org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:261)
> > at
> > org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:329)
> > at
> > org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:359)
> > at ThirdHop.go(ThirdHop.java:43)
> > at ThirdHop.main(ThirdHop.java:29)
> >
> > SimpleDbPersistenceManager:496 refers to this code:
> > Serializer.deserialize(state, in);
> > whilst Serializer.java:156 refers to this code:
> > in.readFully(uuidBytes);
> >
> > It is rather strange that all related exceptions are refering to node state:
> > cafebabe-cafe-babe-cafe-babecafebabe .
> >
> > Here is the code that inserts the xml fragments:
> >
> >  void insertXml(){
> >   try {
> >    // Import the XML file unless already imported
> >    File xmlfolder = new File("xml");
> >    File[] f = xmlfolder.listFiles();
> >    for (int i = 1; i < 3000; i++){
> >     File file = f[i];
> >     if (!root.hasNode("importxml_"+i)) {
> >      System.out.println("Importing xml... "+i+"  "+file.getAbsolutePath());
> >      // Create an unstructured node under which to import the XML
> >      Node node = root.addNode("importxml_"+i, "nt:unstructured");
> >
> >      // Import the file "test.xml" under the created node
> >      FileInputStream xml = new FileInputStream(file.getAbsolutePath());
> >      session.importXML(
> >        "/importxml_"+i, xml, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
> >      xml.close();
> >      if (i%100==99){
> >       session.save();
> >      }
> >     }
> >    }
> >    // Save the changes to the repository
> >    session.save();
> >    System.out.println("done.");
> >
> >   } catch (Exception e) {
> >    // TODO Auto-generated catch block
> >    e.printStackTrace();
> >   }
> >  }
> >
> > Doesn't the 'babe like cafe'?!
> > I will try to figure out where the problem is.
> > Regards
> > Jon
> >
>

Mime
View raw message