• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
>
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
naveen sakhare
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 376
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).



 
naveen sakhare
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 376
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic