'org.eclipse.core.runtime.CoreException: Module named '_auto_generated_ear_' failed to deploy
I was following this tutorial. And I followed the steps. But I am getting this error:
org.eclipse.core.runtime.CoreException: Module named '_auto_generated_ear_' failed to deploy. See Error Log view for more detail.
at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.deployAutoGenerateEarApplication(WlsJ2EEDeploymentHelper.java:806)......
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishWeblogicModules(WeblogicServerBehaviour.java:1425)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:917)
Contains: Module named '_auto_generated_ear_' failed to start.
Contains: weblogic.application.ModuleException: [HTTP:101216]Servlet: "Jersey REST Service" failed to preload on startup in Web application: "com.restful.oracle.weblogic.youtube".
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.RootResourceUriRules.<init>(RootResourceUriRules.java:99)
:com.sun.jersey.api.container.ContainerException:The ResourceConfig instance does not contain any root resource classes.
java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail.
at oracle.eclipse.tools.weblogic.server.internal.DeploymentProgressListener.watch(DeploymentProgressListener.java:189)
at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.startModule(WlsJ2EEDeploymentHelper.java:1127)
Caused by: weblogic.application.ModuleException: [HTTP:101216]Servlet: "Jersey REST Service" failed to preload on startup in Web application: "com.restful.oracle.weblogic.youtube".
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.RootResourceUriRules.<init>(RootResourceUriRules.java:99)
at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1298)
My web.xml is
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>com.restful.oracle.weblogic.youtube</display-name>
<welcome-file-list>
<welcome-file>readme.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.restful.oracle.weblogic.youtube</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>*</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
</web-app>
I have jersey 1.9.1 add to this project. I am new in rest or weblogic.
I also looked at Stackoverflow but didn't help.
Can you help me out with this? If any information do you need please post as comments.
Thanks
Solution 1:[1]
I had the same problem after adding a new servlet and removing it. The web.xml wasn't updated after removing and I needed to remove the references there to the deleted servlet. Remove this for example:
<servlet>
<description></description>
<display-name>Configuration</display-name>
<servlet-name>Configuration</servlet-name>
<servlet-class>servlets.Configuration</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Configuration</servlet-name>
<url-pattern>/Configuration</url-pattern>
</servlet-mapping>
Solution 2:[2]
I think the reason of the problem is that the deployed war file is not created properly. I strongly recommend that you should export war file by right-click->export->war and check the war file content with 7zip/winrar etc.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ronen Festinger |
Solution 2 | Erkan Erol |