Hey all,
We are working with FirstSpirit version 4.2.499.
I have created a Java class:
package nl.rijksoverheid.cis.docforsearchindex;
import ...
public class DocumentsForSearchIndexExecutable implements Executable {
public Object execute(final Map<String, Object> stringObjectMap) throws ExecutionException {
return execute(stringObjectMap, new PrintWriter(System.out, true), new PrintWriter(System.err, true));
}
public Object execute(final Map<String, Object> stringObjectMap, final Writer writer, final Writer writer1) throws ExecutionException {
final Object context = stringObjectMap.get("context");
final GuiScriptContext ctx = (GuiScriptContext) context;
try {
final DocumentsForSearchIndexScript dfsi = new DocumentsForSearchIndexScript(ctx);
} catch (IOException e) {
//...
}
}
}
I also have created a module.xml:
<module>
<name>Documents for SearchIndex</name>
<version>1.0</version>
<description>FirstSpirit Test Module.</description>
<vendor>Ordina</vendor>
<components>
<public>
<name>DocumentsForSearchIndexExecutable</name>
<class>nl.rijksoverheid.cis.docforsearchindex.DocumentsForSearchIndexExecutable</class>
</public>
</components>
<resources>
<resource scope="module">lib/fs-documentforsearchindex.jar</resource>
</resources>
</module>
When installing the module all goes fine but when I try to execute the Executable from within the server I get ClassNotFoundExceptions:
Open schedule management of the project.
Add a new entry, with a script:
#! executable-class
DocumentsForSearchIndexExecutable(context) //--> results in a ClassNotFoundExceptions.
What is going wrong in this process? Can anyone tell what I am missing here?
I have checked the fsm and it has the jar in the lib directory as well as the classes in the right package structure. Also I have tried to change the scope of the resource to server but with no result.
Thanks in advance.