Sorry about that. I was looking at the class that I was extending and didn't notice the default constructor until after your explanation. I was so deep into my brain that I didn't even see the obvious thing in front of me :).
That solved the problem and I have a working output connection now :). Pranesh Vadhirajan Expert System Software Engineer mobile +1.540.818.7516 [email protected] -----Original Message----- From: Karl Wright [mailto:[email protected]] Sent: Tuesday, September 17, 2013 2:58 PM To: dev Subject: Re: File System crawler question "org.apache.manifoldcf.core. interfaces.ManifoldCFException: No appropriate constructor for IOutputConnector implementation 'package.myimplementationclass'. Need xxx(ConfigParams)" What could be clearer than that? Your connector implementation class is expected to have a constructor that accepts one argument: ConfigParams. Karl On Tue, Sep 17, 2013 at 2:54 PM, Pranesh Vadhirajan < [email protected]> wrote: > I'm a bit lost about the build process at the moment. I've created a > jar file which contains the class the I wrote (this class extends > "org.apache.manifoldcf.agents.output.filesystem.FileOutputConnector") > and placed this jar inside the connector-lib directory (both the > /dist/connector-lib and the /framework/dist/connector-lib directories > in the top level ManifoldCF directory). After the build completes > successfully, I don't see my connector class listed inside the > connectors.xml file of either directory. When I attempt to run > ManifoldCF I see the following exception owing to my new output > connector implementation > > org.apache.manifoldcf.core.interfaces.ManifoldCFException: No > appropriate constructor for IOutputConnector implementation > 'package.myimplementationclass'. Need xxx(ConfigParams). > at > > org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.getConn > ectorN > oCheck(OutputConnectorFactory.java:164) > at > > org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.install > (Outpu > tConnectorFactory.java:50) > at > > org.apache.manifoldcf.agents.outputconnmgr.OutputConnectorManager.regi > sterCo > nnector(OutputConnectorManager.java:180) > at > > org.apache.manifoldcf.crawler.system.ManifoldCF.registerConnectors(Man > ifoldC > F.java:448) > at > > org.apache.manifoldcf.crawler.system.ManifoldCF.reregisterAllConnector > s(Mani > foldCF.java:192) > ... > Caused by: java.lang.NoSuchMethodException: > package.myimplementationclass.<init>() > at java.lang.Class.getConstructor0(Unknown Source) > at java.lang.Class.getConstructor(Unknown Source) > at > > org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.getConn > ectorN > oCheck(OutputConnectorFactory.java:140) > ... 6 more > > Can anyone please point me to what the issue is here? I am not sure > if this is a configuration issue or what constructor (other than my > own implementation class constructor which I've implemented) I have to > implement. > > Pranesh Vadhirajan > > -----Original Message----- > From: Karl Wright [mailto:[email protected]] > Sent: Tuesday, September 17, 2013 12:33 PM > To: dev > Subject: Re: File System crawler question > > Hi Pranesh, > > Your connector jar has to be available in the path in order for it to > be found. If you place your connector jar in the connector-lib > directory, it should find it. > > Karl > > > On Tue, Sep 17, 2013 at 12:27 PM, Pranesh Vadhirajan < > [email protected]> wrote: > > > Does this also require a new build? When I tried the procedure you > > mentioned, I am able to create an output connection with my > > implementation class, but I see that it is labeled "uninstalled". > > When I looked at the ManifoldCF page regarding building and > > deploying, I get the sense that I need to deploy a jar file to the "lib" > > directory and build my connector, but I'm not clear. Do I just > > create a jar file with my class and its dependencies and copy this > > jar to the lib folder in the top-level directory and do a build? > > > > I appreciate your quick responses to my questions so far. Please > > bear with me if I'm being a bit annoying with my questions. > > Thanks, > > > > Pranesh Vadhirajan > > > > -----Original Message----- > > From: Karl Wright [mailto:[email protected]] > > Sent: Tuesday, September 17, 2013 11:52 AM > > To: dev > > Subject: Re: File System crawler question > > > > You can either add your connector's class name to the connectors.xml > > file, in which case it will be registered when ManifoldCF is > > started, or you can use the command-line command for registering a connector. > > See the Programmatic Operation page for that option. > > > > Karl > > > > > > On Tue, Sep 17, 2013 at 11:47 AM, Pranesh Vadhirajan < > > [email protected]> wrote: > > > > > Hi Karl, > > > > > > Thanks for your response. I've decided to not use my file > > > monitoring approach for a more elegant solution, I think. I have > > > started to implement my own File system output connector by > > > extending the > org.apache.manifoldcf.agents.output.filesystem.FileOutputConnector class. > > > I > > > have a question about this however: Once I've created my own > > > implementation of an output connector from the above class, how > > > can I register my output connector with ManifoldCF so that jobs > > > can run properly with my own output connector implementation? > > > > > > I.e., at the moment (before implementing my own connector) when I > > > create an output connection in ManifoldCF, I use the JSON API with > > > "org.apache.manifoldcf.agents.output.filesystem.FileOutputConnector" > > > as my class name. How can I register my own class name (let's say > > > "sample_package.myfileoutputconnector", which extends > > > "org.apache.manifoldcf.agents.output.filesystem.FileOutputConnector" > > > ) with ManifoldCF, so that jobs can be defined to use my own > > > output > > connector? > > > > > > Thanks, > > > Pranesh Vadhirajan > > > > > > -----Original Message----- > > > From: Karl Wright [mailto:[email protected]] > > > Sent: Monday, September 16, 2013 5:59 PM > > > To: dev > > > Subject: Re: File System crawler question > > > > > > Hi Pranesh, > > > > > > The API basically allows you to do anything you can do in the UI. > > > In the UI you would use the Document Status report to figure out > > > what documents belongs to a given job that were in a particular > > > state, and that's exactly what you will need to do here. See the > > > "Programmatic Operation" page. > > > Here are some sections of interest: > > > > > > > > > http://manifoldcf.apache.org/release/trunk/en_US/programmatic-oper > > > at > > > io > > > n.html > > > #Queue+query+parameters > > > > > > ... and the following REST operation: > > > > > > repositoryconnectionquery/*<encoded_connection_name> > > > > > > * > > > *Karl > > > * > > > > > > > > > On Mon, Sep 16, 2013 at 5:50 PM, Pranesh Vadhirajan < > > > [email protected]> wrote: > > > > > > > Hi All, > > > > > > > > > > > > > > > > I am implementing my own java client to crawl file system > > > > resources via the ManifoldCF JSON based API. I have been able > > > > to define and run a job to crawl a file system repository and > > > > output to a file system > > > destination. > > > > > > > > > > > > > > > > The trouble I'm having currently is to be able to know which > > > > documents have been crawled via the ManifoldCF API. I have > > > > looked through the API documentation on the ManifoldCF release > > > > pages, but I'm unable to find this information. Could someone > > > > point me in the > > right direction? > > > > > > > > > > > > > > > > When I try to use java API for file system monitoring (to check > > > > on the contents of the output folder), I'm having issues with > > > > the files being locked during the execution of the job. > > > > Therefore, I need to query ManifoldCF engine to understand what > > > > documents have been changed in the output area so that I can run > > > > my file system monitoring code on a different schedule. > > > > > > > > > > > > > > > > Please let me know if I didn't explain myself well here. > > > > > > > > > > > > > > > > Thanks, > > > > Pranesh > > > > > > > > > > > > > > > > Pranesh Vadhirajan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
