Thats what I thought, but I can't add a noarg constructor to my subclass as one 
doesn't exist in the superclass - TextResponseWriter. All I have done is create 
a class that extends TextResponseWriter and implements QueryResponseWriter. The 
only method that is actually implemented is ..
 
public String getContentType(SolrQueryRequest arg0, SolrQueryResponse arg1) {
// TODO Auto-generated method stub
return CONTENT_TYPE_TEXT_UTF8;
}
 ie the class at the moment, does nothing, but it shouldn't cause an error.
 
I did realise that I was unknowingly compiling my class using a 1.4 jdk using 
maven, but have since recitfied that and the error is still there.
 
Regards,
 
Sean> From: [EMAIL PROTECTED]> To: solr-user@lucene.apache.org> Subject: Re: 
custom response writers> Date: Tue, 29 Jan 2008 10:15:26 -0500> > Can you give 
more info on the ResponseWriter you are creating? It > looks like it is finding 
the class (i.e. it is not throwing a > ClassNotFoundException) but is having 
trouble constructing it. I > believe you need a no argument constructor.> > 
-Grant> > On Jan 29, 2008, at 9:58 AM, Sean Laval wrote:> > >> > I wonder if 
anyone can help me. I am trying to create a custom > > response writer that 
better meets my needs. I am trying to return > > json data in a format required 
by dojo data components. As its json, > > ie text, I tried subclassing the 
TextResponseWriter and implementing > > the QueryResponseWriter interface, 
compiled a jar with this class, > > dropped it in the solr/lib directory and 
referenced the response > > writer in solr-config. When the jetty server starts 
it has an error > > to do with this new response writer...> > Caused by: 
java.lang.InstantiationException: > > 
com.ibm.swg.kmt.content.solr.plugin.DojoResponseWriter2> > at 
java.lang.Class.newInstance0(Unknown Source)> > at 
java.lang.Class.newInstance(Unknown Source)> > at 
org.apache.solr.core.Config.newInstance(Config.java:227)> > ... 28 more> >> > 
Does anyone have any ideas? I seem to be able to create a > > responsewriter 
from scratch with no problems but I want to use the > > base functionality in 
TextResponseWriter.> >> > Any help greatly appreciated.> >> > ps. solr 1.2 on 
jetty.> >> > Sean> >> >> > 
_________________________________________________________________> > Share what 
Santa brought you> > https://www.mycooluncool.com> > 
_________________________________________________________________
Get Hotmail on your mobile, text MSN to 63463!
http://mobile.uk.msn.com/pc/mail.aspx

Reply via email to