SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-669
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Alexandra Boyko
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

LuceneHelper.getTermFreqVector throws java.io.IOException: read past EOF

Created: 03/Jul/08 06:32 AM   Updated: 05/Jul/08 05:22 AM
Component/s: Compass::Core
Affects Version/s: 2.0.1
Fix Version/s: 2.0.2, 2.1.0 M2

File Attachments: 1. XML File Rsem.cpm.xml (0.8 kB)
2. Java Source File RsemTests.java (4 kB)

Environment: windows XP


 Description  « Hide
The issue was discussed here:

To reproduce the problem you can extend package org.compass.core.test.all.AllTests with a new test case:

public void testAllWithTermVector2() {
CompassSession session = openSession();
CompassTransaction tr = session.beginTransaction();

for(int i = 1; i < 5; i++){ Long id = new Long(i); A a = new A(); a.setId(id); a.setValue1("test1"); a.setValue2("test2"); session.save("a5", a); }

for(int i = 1; i < 5; i++){ Long id = new Long(i); A a = new A(); a.setId(id); a.setValue1("test1"); a.setValue2("test2"); session.save("a6", a); }

CompassHits hits = session.find("alias:a5");

try{
for(int i = 0; i < hits.getLength(); i++){ Resource r = hits.hit(i).getResource(); TermFreqVector termInfoVector = LuceneHelper.getTermFreqVector(session, r, CompassEnvironment.All.DEFAULT_NAME); assertNotNull(termInfoVector); }
}catch(Exception e){ fail(e.getMessage()); }


hits = session.find("alias:a6");

//ak13: the bad case is here:
try{
for(int i = 0; i < hits.getLength(); i++){ Resource r = hits.hit(i).getResource(); TermFreqVector termInfoVector = LuceneHelper.getTermFreqVector(session, r, CompassEnvironment.All.DEFAULT_NAME); assertNotNull(termInfoVector); } }
}catch(Exception e){ fail(e.getMessage()); }

tr.commit();
session.close();
}

The difference to the working test cases is that I use several resources in 2 different domains and get them using session.find(..), not session.loadResource(..)

Because I've got this problem using RSEM but unittests are based on OSEM, I created unittest for my case also (behavior is the same as for OSEM: produces the same error when I use session.find(..) and works fine if I use session.loadResource(..).



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Alexandra Boyko added a comment - 03/Jul/08 06:37 AM
unittest with RSEM, to be placed in org.compass.core.test.all

Alexandra Boyko added a comment - 03/Jul/08 06:38 AM
Sources for my case (RSEM) are attached