i'm trying to make a little flow with a POJO, but i always receive a message that mule can't find an entry point for my POJO. Can anyone help me?
My flow in the mule_config.xml
<file:connector name="output" outputAppend="true" />
<file:connector name="input" autoDelete="true" />
<flow name="AllMules">
<file:inbound-endpoint connector-ref="input" path="C:/Users/Raphael/Desktop/muletests/input" />
<component class="DBconnect"/>
<file:outbound-endpoint connector-ref="output" path="C:/Users/Raphael/Desktop/muletests/output" />
</flow>
the java class / POJO
public String getMDBData(String number) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String username = "x";
String password = "";
Connection con = DriverManager.getConnection( "jdbc:odbc:Testatimport1", username, password);
Statement stmt = con.createStatement();
stmt = con.createStatement();
String ausf = ("SELECT * FROM Testatimportbsp");
stmt.executeQuery(ausf);
ResultSet rs = stmt.getResultSet();
return rs.toString();
} catch (SQLException e) {
System.out.println("Wrong: " + e);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return "empty";
}
The message that returns, the server starts without any error message, but when i start the process(put a file in the directory), than the this error-message returns
INFO 2011-07-13 13:12:40,671 [input.receiver.1] org.mule.transport.file.FileMessageReceiver: Lock obtained on file: C:\Users\Raphael\Desktop\muletests\input\matrikelnr.txt
ERROR 2011-07-13 13:12:40,781 [flow.AllMules.1] org.mule.exception.DefaultServiceExceptionStrategy:
********************************************************************************
Message : Failed to find entry point for component, the following resolvers tried but failed: [
AnnotatedEntryPointResolver: Component: DBconnect@228ca8ac doesn't have any annotated methods, skipping.
MethodHeaderPropertyEntryPointResolver: The required property "method" is not set on the event
CallableEntryPointResolver: Object "DBconnect@228ca8ac" does not implement required interface "interface org.mule.api.lifecycle.Callable"
ReflectionEntryPointResolver: Could not find entry point on: "DBconnect" with arguments: "{class org.mule.transport.file.ReceiverFileInputStream}"
]
Code : MULE_ERROR-321
--------------------------------------------------------------------------------
Exception stack is:
1. Failed to find entry point for component, the following resolvers tried but failed: [
AnnotatedEntryPointResolver: Component: DBconnect@228ca8ac doesn't have any annotated methods, skipping.
MethodHeaderPropertyEntryPointResolver: The required property "method" is not set on the event
CallableEntryPointResolver: Object "DBconnect@228ca8ac" does not implement required interface "interface org.mule.api.lifecycle.Callable"
ReflectionEntryPointResolver: Could not find entry point on: "DBconnect" with arguments: "{class org.mule.transport.file.ReceiverFileInputStream}"
] (org.mule.model.resolvers.EntryPointNotFoundException)
org.mule.model.resolvers.DefaultEntryPointResolverSet:58 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/model/resolvers/EntryPointNotFoundException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.model.resolvers.EntryPointNotFoundException: Failed to find entry point for component, the following resolvers tried but failed: [
AnnotatedEntryPointResolver: Component: DBconnect@228ca8ac doesn't have any annotated methods, skipping.
MethodHeaderPropertyEntryPointResolver: The required property "method" is not set on the event
CallableEntryPointResolver: Object "DBconnect@228ca8ac" does not implement required interface "interface org.mule.api.lifecycle.Callable"
ReflectionEntryPointResolver: Could not find entry point on: "DBconnect" with arguments: "{class org.mule.transport.file.ReceiverFileInputStream}"
]
at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:58)
at org.mule.component.DefaultComponentLifecycleAdapter.invoke(DefaultComponentLifecycleAdapter.java:350)
at org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:90)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
ERROR 2011-07-13 13:12:40,781 [flow.AllMules.1] org.mule.exception.DefaultServiceExceptionStrategy: The Default Service Exception Strategy has been invoked but there is no current service on the context. Please report this to d...@mule.codehaus.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
> ReflectionEntryPointResolver: Could not find entry point on:
> "DBconnect" with arguments: "{class
> org.mule.transport.file.ReceiverFileInputStream}"
you don't have a method that takes an InputStream as parameter. Simply
put an object-to-string-transformer before your component.
-dirk
Looking at what the method does ... You may want to look into component
bindings [1] to use the JDBC transport for the select call.
-dirk
[1]
http://www.mulesoft.org/documentation/display/MULE3USER/Component+Bindings