Restful web service + common java project

Asked

Viewed 92 times

1

I have the following problem, I have a web test service created in a separate project(I) in eclipse and another java(II)(Drools) project. How do I make the two communicate being in different projects?

I’ve tried for the Build Path -> Project -> add ,but when I try to call any method of the project(II) it appears this error:

ContainerResponse mapMappableContainerException
GRAVE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NoClassDefFoundError: com/sample/DroolsTest

Someone would know how to solve?

  • java.lang.NoClassDefFoundError: com/sample/DroolsTest suggests that some JAR (probably from Drools) with this class is missing in its application. However, I don’t think your application should need that class. Can you post all of your stacktrace and the list of Jars you’re using? Also, what is the type of your Javaee server?

  • Using Maven, you could add your project as dependency. Other than that, generate a jar of your project that contains the Droolstest class and add your libs and register that jar in the classpath of your main project.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.