aspose file tools*
The moose likes Struts and the fly likes Unable to clean the weblogic server --getting SEVERE: Dispatcher initialization failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unable to clean the weblogic server --getting SEVERE: Dispatcher initialization failed" Watch "Unable to clean the weblogic server --getting SEVERE: Dispatcher initialization failed" New topic
Author

Unable to clean the weblogic server --getting SEVERE: Dispatcher initialization failed

naveen sakhare
Greenhorn

Joined: Dec 16, 2013
Posts: 17
I am new to struts2.I am using Rational Software Architect with weblogic 11g.

Here is my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>struts2</display-name>
<welcome-file-list>
<welcome-file>index.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>

<filter>

<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>


Here is my strut2.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default">
<action name="getTutorial" class="org.naveen.action.TutorialAction">
<result name="success">/Success.jsp</result>
</action>
</package>
</struts>

and I am using following libraries

commons-logging-1.1.3.jar
freemarker-2.3.19.jar
ognl-3.0.6.jar
struts2-core-2.3.16.jar
commons-lang3-3.1.jar
commons-fileupload-1.3.jar
javaassist-3.11.0.GA.jar
commons-io-2.2.jar
commons.logging-api-1.1.jar
xwork-core-2.3.16.jar

This is the log.Please help



Dec 16, 2013 5:31:19 PM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts-default.xml]
Dec 16, 2013 5:31:19 PM org.apache.struts2.dispatcher.Dispatcher error
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:332)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:98)
at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:59)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1867)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:143)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 43 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - zip:C:/Naveen/studies/struts-2.3.16/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72 - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:229)
... 46 more
<Dec 16, 2013 5:31:19 PM EST> <Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.
Unable to load configuration. - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:332)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
Truncated. see log file for complete stacktrace

Caused By: Unable to load configuration. - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
Truncated. see log file for complete stacktrace

Caused By: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
Truncated. see log file for complete stacktrace

Caused By: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - zip:C:/Naveen/studies/struts-2.3.16/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72 - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:229)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
Truncated. see log file for complete stacktrace
>
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8867
    
    8

naveen sakhare wrote:
Caused By: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean


This error is usually caused by having more than one version of the same JAR file in the classpath.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
naveen sakhare
Greenhorn

Joined: Dec 16, 2013
Posts: 17
I am not sure of this.I used apache server its working fine but for web logic server I am facing this issue.

Thanks for the suggestions I will take a look
German Gonzalez-Morris
Ranch Hand

Joined: Nov 16, 2009
Posts: 164

It seems to be more related to WebLogic Server.
perhaps, you need to implement a classloader filtering and/or as mentioned Joe, there is a duplicated jar :

Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - zip:C:/Naveen/studies/struts-2.3.16/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72 - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72

You have the same struts2-core-2.3.16.jar in two different places.

Does it work in Tomcat ?
(It cannot be Apache webserver).




http://devwebcl.blogspot.com/
naveen sakhare
Greenhorn

Joined: Dec 16, 2013
Posts: 17
German Gonzalez-Morris wrote:It seems to be more related to WebLogic Server.
perhaps, you need to implement a classloader filtering and/or as mentioned Joe, there is a duplicated jar :

Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - zip:C:/Naveen/studies/struts-2.3.16/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72 - bean - zip:C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72

You have the same struts2-core-2.3.16.jar in two different places.

Does it work in Tomcat ?
(It cannot be Apache webserver).





Yes its working on Tomcat perfectly. I checked the jar location C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar.Its having the same jar.But the problem here is the jar is placed in this location automatically once i did the clean and I did added the jar in the libraries.So there are 2 jars with the same struts2-core-2.3.16.jar versions.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8867
    
    8

German Gonzalez-Morris wrote:
Does it work in Tomcat ?
(It cannot be Apache webserver).


Yea, that had me going Apache is a web server. Tomcat is a partial JEE container overseen by the Apache Software Foundation. Since it is possible to host JEE applications with Apache using Resin or JServ you have to be very specific about what you are doing.
This sounds like a deployment problem. How are you packaging and deploying your web app? Did you put your lib directory in the server classpath?
I prefer to use the procedure lined out in the Tomcat Application Developer's Guide to create my applications. By using a standard application layout and a repeatable build process it is a lot easier to debug and get help from others.
German Gonzalez-Morris
Ranch Hand

Joined: Nov 16, 2009
Posts: 164

naveen sakhare wrote:Yes its working on Tomcat perfectly. I checked the jar location C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar.Its having the same jar.But the problem here is the jar is placed in this location automatically once i did the clean and I did added the jar in the libraries.So there are 2 jars with the same struts2-core-2.3.16.jar versions.


The jar at: C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar
it is inside of your ear/war file that is being deployed automatically to WLS.

My concern is about: C:/Naveen/studies/struts-2.3.16/lib/struts2-core-2.3.16.jar
This jar file is the one that you may remove.
Have you tried that ?
naveen sakhare
Greenhorn

Joined: Dec 16, 2013
Posts: 17
German Gonzalez-Morris wrote:
naveen sakhare wrote:Yes its working on Tomcat perfectly. I checked the jar location C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar.Its having the same jar.But the problem here is the jar is placed in this location automatically once i did the clean and I did added the jar in the libraries.So there are 2 jars with the same struts2-core-2.3.16.jar versions.


The jar at: C:/Oracle/Middleware/OH_11gR1/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/zc22d5/war/WEB-INF/lib/struts2-core-2.3.16.jar
it is inside of your ear/war file that is being deployed automatically to WLS.

My concern is about: C:/Naveen/studies/struts-2.3.16/lib/struts2-core-2.3.16.jar
This jar file is the one that you may remove.
Have you tried that ?


Yes I tried But this is causing some error again.I am in a hurry I will post the error once I get back to home.

Thanks
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8867
    
    8

German Gonzalez-Morris wrote:
My concern is about: C:/Naveen/studies/struts-2.3.16/lib/struts2-core-2.3.16.jar
This jar file is the one that you may remove.


I think it's more important to determine WHY that JAR file is included. My suspicion is that Naveen has included his Struts distribution LIB directory in the server classpath. This can lead to bigger problems than the one we are dealing with now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to clean the weblogic server --getting SEVERE: Dispatcher initialization failed