Hi everyone,
I have the following class :
package org.apache.solr.handler.component;
public final class MyComponent extends SearchComponent
{
@Override
public void finishStage(final ResponseBuilder rb)
{
final NamedList<Object> shardsResult = new
SimpleOrderedMap<Object>();
for (ShardRequest sreq : rb.finished)
{
for (ShardResponse srsp : sreq.responses)
{
// DO STUFF
}
}
}
}
As ShardResponse is an inner class of ShardRequest, and my class is in
the same package (org.apache.solr.handler.component) with ShardRequest,
everything works fine when I run myself (through unit tests or compile).
But when I try to run it through a Solr server, I get :
"java.lang.IllegalAccessError: tried to access class
org.apache.solr.handler.component.ShardResponse from class
org.apache.solr.handler.component.MyComponent"
Which is normal, the class loader of MyComponent and ShardResponse are
different (MyComponent is inside the "lib/" directory).
A public scope for the ShardResponse (a class of it's own) would resolve
this issue. What do you think about it?
Thanks,
Georgios Stamatis