You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by James Thomas <ja...@linguamatics.com.INVALID> on 2019/03/12 06:13:03 UTC

How to deal with MCF server failing to start when connector class not found?

Hi,

We've been experimenting with a transformation connector and have 
decided not to use it. With its code removed from the jar that we deploy 
into MCF I find that my test MCF server will not start because there is 
some memory of the connector (MetadataToXMLTransformer) in the database.

The server shows this trace in the console at startup:

---
Successfully unregistered all domains
Successfully unregistered all output connectors
org.apache.manifoldcf.core.interfaces.ManifoldCFException: No connector 
class '...MetadataToXMLTransformer' was found.
         at 
org.apache.manifoldcf.core.interfaces.ConnectorFactory.getThisConnectorNoCheck(ConnectorFactory.java:120)
         at 
org.apache.manifoldcf.core.interfaces.ConnectorFactory.deinstallThis(ConnectorFactory.java:58)
         at 
org.apache.manifoldcf.agents.interfaces.TransformationConnectorFactory.deinstall(TransformationConnectorFactory.java:79)
         at 
org.apache.manifoldcf.agents.transformationconnmgr.TransformationConnectorManager.unregisterConnector(TransformationConnectorManager.java:210)
         at 
org.apache.manifoldcf.crawler.system.ManifoldCF.unregisterAllConnectors(ManifoldCF.java:370)
         at 
org.apache.manifoldcf.crawler.system.ManifoldCF.reregisterAllConnectors(ManifoldCF.java:157)
         at 
org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.main(ManifoldCFJettyRunner.java:239)
----

I tried the following:

* Removing the relevant entry in connectors.xml
* Deleting the instance of the connector that was visible via the MCF 
web view
* Removing references to MetadataToXMLTransformer in all of the jobs 
visible in the MCF web view
* Downloading JSON of all of my jobs and looking for references to the 
connector (there are none)
* Looking in 
https://manifoldcf.apache.org/release/release-2.12/en_US/how-to-build-and-deploy.html#file+properties 
for useful config

I am guessing that there's some historical data from jobs that were run 
using the transformation connector.

In my test environment I can simply delete the database and the problem 
goes away, but in production environment this seems like it could 
present a problem if we ever want to change a connector class after it's 
been used.

What's the recommended way of dealing with this situation?

Cheers,
James

-- 

James Thomas | Head of Testing | Linguamatics, an IQVIA company
324 Cambridge Science Park, Milton Road, CB4 0WG Cambridge, UK
Telephone number: +44 (0)1223 651910
web: www.linguamatics.com <https://www.linguamatics.com>
Twitter <https://twitter.com/linguamatics>|Linkedin 
<https://www.linkedin.com/company/93119/admin/>|Facebook 
<https://www.facebook.com/Linguamatics>|YouTube 
<https://www.youtube.com/Linguamatics>
-------------------------------------------------------------------
Winner of the Frost & Sullivan Market Leadership Award 2016, 2017 and 2018
-------------------------------------------------------------------

Linguamatics will process your personal data fairly and lawfully in 
accordance with professional standards and the Data Protection Act 2018, 
General Data Protection Regulation (EU) 2016/679 (as applicable) and any 
other applicable laws relating to the protection of personal data and 
the privacy of individuals. Further information is available in our 
privacy policy: https://www.linguamatics.com/privacy.
This email has been sent for the sole use of the intended recipient(s). 
The contents of this email and any attachments are very likely to 
contain confidential or proprietary information. If you received this 
email in error please advise the sender by reply email and immediately 
delete the message and any attachments without copying or disclosing the 
contents.
Linguamatics Limited is a company incorporated in England and Wales with 
registered number: 4248841


Re: How to deal with MCF server failing to start when connector class not found?

Posted by James Thomas <ja...@linguamatics.com.INVALID>.
On 12/03/2019 07:26, Karl Wright wrote:
> Hi James,
>
> ManifoldCF is trying to resolve a difference here between the
> connectors.xml file and what's in the database.  Basically, the proper
> order for removing a connector is as follows:
> - Take it out of connectors.xml
> - Start ManifoldCF
> - Stop ManifoldCF
> - Remove the jar you are trying to get rid of
> - Start ManifoldCF again
>
> If you've already tried to do this in a different order, you can fix things
> by just putting the jar back in the connector jar area and picking up the
> sequence.  OR, if the database instance doesn't contain anything valuable,
> you can always delete it and start over if that is faster.
>
Thank you, that sequence worked for the case I had.

James

-- 
James Thomas | Head of Testing | Linguamatics, an IQVIA company
324 Cambridge Science Park, Milton Road, CB4 0WG Cambridge, UK
Telephone number: +44 (0)1223 651910
web: www.linguamatics.com
-------------------------------------------------------------------
Winner of the Frost & Sullivan Market Leadership Award 2016, 2017 and 2018
-------------------------------------------------------------------
Linguamatics will process your personal data fairly and lawfully in accordance with professional standards and the Data Protection Act 2018, General Data Protection Regulation (EU) 2016/679 (as applicable) and any other applicable laws relating to the protection of personal data and the privacy of individuals. Further information is available in our privacy policy: https://www.linguamatics.com/privacy.
This email has been sent for the sole use of the intended recipient(s). The contents of this email and any attachments are very likely to contain confidential or proprietary information. If you received this email in error please advise the sender by reply email and immediately delete the message and any attachments without copying or disclosing the contents.
Linguamatics Limited is a company incorporated in England and Wales with registered number: 4248841


Re: How to deal with MCF server failing to start when connector class not found?

Posted by Karl Wright <da...@gmail.com>.
Hi James,

ManifoldCF is trying to resolve a difference here between the
connectors.xml file and what's in the database.  Basically, the proper
order for removing a connector is as follows:
- Take it out of connectors.xml
- Start ManifoldCF
- Stop ManifoldCF
- Remove the jar you are trying to get rid of
- Start ManifoldCF again

If you've already tried to do this in a different order, you can fix things
by just putting the jar back in the connector jar area and picking up the
sequence.  OR, if the database instance doesn't contain anything valuable,
you can always delete it and start over if that is faster.

Generally, it's never a good idea in Java to just remove classes that are
being referenced and expect good things to happen.

Karl


On Tue, Mar 12, 2019 at 2:13 AM James Thomas
<ja...@linguamatics.com.invalid> wrote:

> Hi,
>
> We've been experimenting with a transformation connector and have
> decided not to use it. With its code removed from the jar that we deploy
> into MCF I find that my test MCF server will not start because there is
> some memory of the connector (MetadataToXMLTransformer) in the database.
>
> The server shows this trace in the console at startup:
>
> ---
> Successfully unregistered all domains
> Successfully unregistered all output connectors
> org.apache.manifoldcf.core.interfaces.ManifoldCFException: No connector
> class '...MetadataToXMLTransformer' was found.
>          at
>
> org.apache.manifoldcf.core.interfaces.ConnectorFactory.getThisConnectorNoCheck(ConnectorFactory.java:120)
>          at
>
> org.apache.manifoldcf.core.interfaces.ConnectorFactory.deinstallThis(ConnectorFactory.java:58)
>          at
>
> org.apache.manifoldcf.agents.interfaces.TransformationConnectorFactory.deinstall(TransformationConnectorFactory.java:79)
>          at
>
> org.apache.manifoldcf.agents.transformationconnmgr.TransformationConnectorManager.unregisterConnector(TransformationConnectorManager.java:210)
>          at
>
> org.apache.manifoldcf.crawler.system.ManifoldCF.unregisterAllConnectors(ManifoldCF.java:370)
>          at
>
> org.apache.manifoldcf.crawler.system.ManifoldCF.reregisterAllConnectors(ManifoldCF.java:157)
>          at
>
> org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.main(ManifoldCFJettyRunner.java:239)
> ----
>
> I tried the following:
>
> * Removing the relevant entry in connectors.xml
> * Deleting the instance of the connector that was visible via the MCF
> web view
> * Removing references to MetadataToXMLTransformer in all of the jobs
> visible in the MCF web view
> * Downloading JSON of all of my jobs and looking for references to the
> connector (there are none)
> * Looking in
>
> https://manifoldcf.apache.org/release/release-2.12/en_US/how-to-build-and-deploy.html#file+properties
> for useful config
>
> I am guessing that there's some historical data from jobs that were run
> using the transformation connector.
>
> In my test environment I can simply delete the database and the problem
> goes away, but in production environment this seems like it could
> present a problem if we ever want to change a connector class after it's
> been used.
>
> What's the recommended way of dealing with this situation?
>
> Cheers,
> James
>
> --
>
> James Thomas | Head of Testing | Linguamatics, an IQVIA company
> 324 Cambridge Science Park, Milton Road, CB4 0WG Cambridge, UK
> Telephone number: +44 (0)1223 651910
> web: www.linguamatics.com <https://www.linguamatics.com>
> Twitter <https://twitter.com/linguamatics>|Linkedin
> <https://www.linkedin.com/company/93119/admin/>|Facebook
> <https://www.facebook.com/Linguamatics>|YouTube
> <https://www.youtube.com/Linguamatics>
> -------------------------------------------------------------------
> Winner of the Frost & Sullivan Market Leadership Award 2016, 2017 and 2018
> -------------------------------------------------------------------
>
> Linguamatics will process your personal data fairly and lawfully in
> accordance with professional standards and the Data Protection Act 2018,
> General Data Protection Regulation (EU) 2016/679 (as applicable) and any
> other applicable laws relating to the protection of personal data and
> the privacy of individuals. Further information is available in our
> privacy policy: https://www.linguamatics.com/privacy.
> This email has been sent for the sole use of the intended recipient(s).
> The contents of this email and any attachments are very likely to
> contain confidential or proprietary information. If you received this
> email in error please advise the sender by reply email and immediately
> delete the message and any attachments without copying or disclosing the
> contents.
> Linguamatics Limited is a company incorporated in England and Wales with
> registered number: 4248841
>
>