Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've started creating a custom component for inserting raw java objects into a mongodb using the morphia library. I started with the tMongoDBOutput as a base and stripped out all the code that I didn't need. After I successfully did this I tried to import some Morphia packages in my code but I keep getting this error at run time:
1. ERROR in /home/jordan/development/talend-bd/workspace/.JETEmitters/src/org/talend/designer/codegen/translators/gd/itno/TMorphiaOutputBeginJava.java (at line 9)
import org.mongodb.morphia.Datastore;
^^^^^^^^^^^
The import org.mongodb cannot be resolved
I have the necessary IMPORT lines in my tMorphiaOutput_java.xml file (The jars is in the same directory as all the component files):
<IMPORT MODULE="morphia-1.1.0-SNAPSHOT.jar" NAME="morphia-1.1.0-SNAPSHOT" REQUIRED="true"/>
And the import statement in my tMorphiaOutput_begin.javajet:
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.metadata.IMetadataTable
org.talend.designer.codegen.config.CodeGeneratorArgument
java.util.List
java.util.Map
org.mongodb.morphia.Datastore
org.mongodb.morphia.Morphia
"
%>
I've searched but these are the only things that I can find that are required to use an external jar in a custom component but I still get that very vague error.
Anyone run into this, or know what I'm missing?
1. ERROR in /home/jordan/development/talend-bd/workspace/.JETEmitters/src/org/talend/designer/codegen/translators/gd/itno/TMorphiaOutputBeginJava.java (at line 119)
org.mongodb.morphia.Morphia morphia = new org.mongodb.morphia.Morphia();
^^^^^^^^^^^
org.mongodb cannot be resolved to a type