
Questions: 19,737 //
Answers: 43,529 //
Contributing Members: 14,736
I am following the cookbook tutorial from the Connector Devkit and I am getting the Class not found exception for class com.cookbook.tutorial.service.Recipe. This happens whenever I try to use the recently created connector in another project in Anypoint Studio. I have tried to include the sdk-client jar, where that class is supposed to be independently, but no luck neither.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact 'connectorhelloworld', see +
+ below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
org.mule.module.launcher.DeploymentInitException: ClassNotFoundException: com.cookbook.tutorial.service.Recipe
at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:212) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:63) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:136) ~[mule-module-launcher-3.8.2.jar:3.8.
2]
at org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:58) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:25) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:309) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:164) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:253) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:75) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDirectoryWatcher.java:278) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:150) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:134) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:172) ~[mule-module-launcher-3.8.2.jar:3.8.2]
at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:15) ~[tooling-support-3.8.2.jar:?]
Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name 'Cookbook__Configuration': Initialization of bean failed; nested
exception is java.lang.TypeNotPresentException: Type com.cookbook.tutorial.service.Recipe not present (org.mule.api.lifecycle.InitialisationException)
(org.mule.api.config.ConfigurationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49) ~[mule-core-3.8.2.jar:3.8.2]
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) ~[mule-core-3.8.2.jar:3.8.2]
at org.mule.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:89) ~[mule-core-3.8.2.jar:3.8.2]
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:222) ~[mule-core-3.8.2.jar:3.8.2]
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:81) ~[mule-core-3.8.2.jar:3.8.2]
at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:203) ~[mule-module-launcher-3.8.2.jar:3.8.2]
... 13 more
Please help!
This is the tutorial: https://docs.mulesoft.com/anypoint-connector-devkit/v/3.8/devkit-tutorial
Feb 22, 2017 at 03:54 PM, jcastelan answered with:
This had been asked before here https://forums.mulesoft.com/questions/58323/problem-with-devkit-tutorial.html#comment-59389
Feb 24, 2017 at 10:21 AM, danish answered with:
Hi @Juan Castelan,
Class not found means come class is missing . Add this to your pom.xml
<dependencies>
<dependency>
<groupId>com.cookbook.tutorial</groupId>
<artifactId>sdk-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
Or
get the jar and paste it to \plugins\org.mule.tooling.server.3.x.x.ee_6.1.1.201609121705\mule\lib\user
More on Cookbook is here https://mulesoft.github.io/mule-cookbook-tutorial/#_import_the_cookbook
Hope this helps,
Mar 15, 2017 at 05:54 AM, hari_krishna answered with:
i think this is better one
get the jar and paste it to \plugins\org.mule.tooling.server.3.x.x.ee_6.1.1.201609121705\mule\lib\user
More on Cookbook is here https://mulesoft.github.io/mule-cookbook-tutorial/#_import_the_cookbook
Hope this helps,
Jul 14, 2017 at 12:41 PM, praveenprem07 answered with:
refer this doc once
https://mulesoft.github.io/mule-cookbook-tutorial/#_import_the_cookbook
Jul 17, 2017 at 05:59 AM, aradhanamohanty123 answered with:
You need attach some jars to it. It will help you.
Jul 18, 2017 at 05:05 AM, p27shjb answered with:
you are missing some dependency in pom.xml so please add that one,may be it will help you to resolve your issue.
Jul 18, 2017 at 05:57 AM, manvitha answered with:
Add the cookbook dependency into your pom.xml file of your project
Jul 18, 2017 at 07:01 AM, neelesh12345 answered with:
plaese add the cookbook dependencies in your pom.xml file present in your project