incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Connectors Framework > How to Write an Output Connector
Date Thu, 21 Oct 2010 19:43:00 GMT
Space: Apache Connectors Framework (https://cwiki.apache.org/confluence/display/CONNECTORS)
Page: How to Write an Output Connector (https://cwiki.apache.org/confluence/display/CONNECTORS/How+to+Write+an+Output+Connector)

Comment edited by Farzad :
---------------------------------------------------------------------
When is the currentContext handle in BaseConnector valid? I tried to add an ID object, so
I can track the debug statements and the example wouldn't even start.

{code}
Object id = currentContext.get("id");
if (id == null) {
	currentContext.save("id", new Integer(idNum));
	idNum++;
}
{code}

Here is the error message:

Configuration file successfully read
Exception in thread "main" java.lang.ClassCastException: java.lang.NullPointerException cannot
be cast to org.apache.manifoldcf.core.interfaces.ManifoldCFException
        at org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.getConnectorNoCheck(OutputConnectorFactory.java:149)
        at org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.deinstall(OutputConnectorFactory.java:60)
        at org.apache.manifoldcf.agents.outputconnmgr.OutputConnectorManager.unregisterConnector(OutputConnectorManager.java:199)
        at org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.main(ManifoldCFJettyRunner.java:256)

Comment was previously :
---------------------------------------------------------------------
When is the currentContext handle in BaseConnector valid? I tried to add an ID object, so
I can track the debug statements and the example wouldn't even start.

Object id = currentContext.get("id");
if (id == null) {
	currentContext.save("id", new Integer(idNum));
	idNum++;
}

Here is the error message:

Configuration file successfully read
Exception in thread "main" java.lang.ClassCastException: java.lang.NullPointerException cannot
be cast to org.apache.manifoldcf.core.interfaces.ManifoldCFException
        at org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.getConnectorNoCheck(OutputConnectorFactory.java:149)
        at org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.deinstall(OutputConnectorFactory.java:60)
        at org.apache.manifoldcf.agents.outputconnmgr.OutputConnectorManager.unregisterConnector(OutputConnectorManager.java:199)
        at org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.main(ManifoldCFJettyRunner.java:256)

Change your notification preferences: https://cwiki.apache.org/confluence/users/viewnotifications.action

Mime
View raw message