Aaron H. Kim Fearless Integration Maniac

EntryPointNotFoundException - Failed to find entry point for component

2017-02-13
Aaron Kim

Issue

This error occurred while I was testing how to work with Java component.

With a very simple Java class

package com.org;

public class Greeting {
	
	public String sayHi()
	{
		return "Hello Mule";
	}
}

But when I ran the mule application and process GET request, it ended up with following error.

org.mule.model.resolvers.EntryPointNotFoundException: Failed to find entry point for component, the following resolvers tried but failed: [CallableEntryPointResolver: Object "com.org.Greeting@2bcaba60" does not implement required interface "interface org.mule.api.lifecycle.Callable" MethodHeaderPropertyEntryPointResolver: The required property "method" is not set on the event ReflectionEntryPointResolver: Could not find entry point on: "com.org.Greeting" with arguments: "{}" AnnotatedEntryPointResolver: Component: com.org.Greeting@2bcaba60 doesn't have any annotated methods, skipping.]. Component that caused exception is: DefaultJavaComponent{hellomuleFlow.component.17680342}.

Solution

From Configuration Xml, I have updated following

<component class="com.org.Greeting" doc:name="Java"/>

with

<component class="com.org.Greeting" doc:name="Java">
	<method-entry-point-resolver>
		<include-entry-point method="sayHi"/>
	</method-entry-point-resolver>
</component>

and it resolves the issue.

References


Comments