I'm working in an environment that runs ATG (Oracle Commerce) 11.1 on Weblogic 12c and connects to an Endeca instance. In the Weblogic log files I get a frequent IOException, which I believe has a knock-on effect on the overall stability of the site. The error is as follow:
####<24 Nov 2015 2:47:39 PM> <Error> <HTTP> <SERVER-1> <instance-1> <[ACTIVE] ExecuteThread: '116' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1448369259872> <BEA-101019> <[ServletContext#1433232248[app:ATGProduction module:store path:null spec-version:3.0]] Servlet failed with an IOException.
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:487)
at weblogic.socket.NIOSocketMuxer$NIOOutputStream.writeInternal(NIOSocketMuxer.java:1064)
at weblogic.socket.NIOSocketMuxer$NIOOutputStream.write(NIOSocketMuxer.java:983)
at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:622)
at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:587)
at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:472)
at weblogic.servlet.internal.CharsetChunkOutput.flush(CharsetChunkOutput.java:301)
at weblogic.servlet.internal.ChunkOutput$3.checkForFlush(ChunkOutput.java:727)
at weblogic.servlet.internal.CharsetChunkOutput.write(CharsetChunkOutput.java:203)
at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:153)
at weblogic.servlet.jsp.JspWriterImpl.write(JspWriterImpl.java:275)
at jsp_servlet._tags._store.__contentitem_tag._jsp__tag2(__contentitem_tag.java:321)
at jsp_servlet._tags._store.__contentitem_tag._jsp__tag1(__contentitem_tag.java:272)
at jsp_servlet._tags._store.__contentitem_tag.doTag(__contentitem_tag.java:196)
at jsp_servlet._cartridges._pageslot.__pageslot._jsp__tag6(__pageslot.java:412)
at jsp_servlet._cartridges._pageslot.__pageslot._jsp__tag5(__pageslot.java:371)
at jsp_servlet._cartridges._pageslot.__pageslot._jsp__tag2(__pageslot.java:258)
at jsp_servlet._cartridges._pageslot.__pageslot._jspService(__pageslot.java:128)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:587)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:273)
The error happens consistently in the contentitem.tag file, which is as follow:
<%# tag language="java" pageEncoding="UTF-8"%>
<%# include file="/include/taglibs.jspf" %>
<%# attribute name="contentItem" required="true" rtexprvalue="true" type="java.util.Map"%>
<dsp:getvalueof var="include" value="${contentItem['#type']}" />
<c:choose>
<c:when test="${empty contentItemKey && !empty include}">
<dsp:include page="/cartridges/${include}/${include}.jsp">
<dsp:param name="contentItem" value="${contentItem}"/>
</dsp:include>
</c:when>
<c:when test="${!empty contentItemKey}">
<c:out value="${contentItem[contentItemKey]}" escapeXml="false" />
</c:when>
</c:choose>
Would changing the ChunkSize parameter in Weblogic be of any benefit? It is still at the default 4k at the moment.
Is it a coincidence that the issue always appears in the contentitem.tag file which is how we unpack and render Endeca related content? The tag file gets called recursively by the cartridges it includes.
Any advice on how to resolve this issue, appreciated.
Update:
While not answering the question explicitly, we've made significant strides into reducing (not eliminating) the IOException once we realised that the <page-check-seconds> directive in the weblogic.xml was inadvertently set to 0 (ie. compile pages on every request). This resulted in multiple threads trying to compile the same page fragment. Stability has been greatly improved but the IOException has not been eradicated.
Related
After activating fast swap for the weblogic server in JDeveloper, I'm not able to deploy my project anymore, and I'm getting a weblogic.management.DeploymentException.
It's an Oracle ADF project and JDeveloper's version is 11g, second release.
When running it on a normal weblogic instance (keeping the default setting "servlet reload") it works.
I tried searching keywords from the log, but I can't seem to find anything.
Here is weblogic's log
<4-gen-2023 14.36.31 CET> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1672839391501' for task '2'. Error is: 'weblogic.management.DeploymentException: '
weblogic.management.DeploymentException:
at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:79)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:186)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: Could not initialize class com.bea.wls.redef.ClassRedefinerFactory
at weblogic.application.internal.flow.InitFastSwapLoaderFlow.initLoader(InitFastSwapLoaderFlow.java:70)
at weblogic.application.internal.flow.InitFastSwapLoaderFlow.prepare(InitFastSwapLoaderFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
Truncated. see log file for complete stacktrace
>
<4-gen-2023 14.36.31 CET> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'PROJECT'.>
<4-gen-2023 14.36.31 CET> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException:
at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:79)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:186)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: Could not initialize class com.bea.wls.redef.ClassRedefinerFactory
at weblogic.application.internal.flow.InitFastSwapLoaderFlow.initLoader(InitFastSwapLoaderFlow.java:70)
at weblogic.application.internal.flow.InitFastSwapLoaderFlow.prepare(InitFastSwapLoaderFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
Truncated. see log file for complete stacktrace
Where should I watch? Do you have any resources?
Sorry for not being specific, but I'm new to this. Thanks to anybody who may help!
This issue can be fixed by upgrade JDeveloper to newest version
I'm new to Adobe Air. I'm building my first app in it. It is not a Flash app. Here is my application.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/3.7">
<id>iViewDesktop</id>
<name>Patient Education</name>
<filename>Patient Education</filename>
<versionNumber>1.0.0</versionNumber>
<installFolder>patient-education</installFolder>
<initialWindow>
<title>Patient Education</title>
<content>redirect.html</content>
<description>This is an Adobe Air version of Patient Education</description>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<resizable>true</resizable>
<renderMode>direct</renderMode>
<aspectRatio>landscape</aspectRatio>
<autoOrients>true</autoOrients>
<width>1024</width>
<height>768</height>
</initialWindow>
<icon>
<image16x16>icons/pe-16x16.png</image16x16>
<image32x32>icons/pe-32x32.png</image32x32>
<image48x48>icons/pe-48x48.png</image48x48>
<image128x128>icons/pe-48x48.png</image128x128>
</icon>
</application>
All redirect.html does is redirect the user to a section of our website with Javascript. After redirection, the page comes up and it is missing all of its images. I also get this error in Terminal, over and over.
2015-11-02 09:30:34.375 adl[90787:4976353]
NSURLSession/NSURLConnection HTTP load failed
(kCFStreamErrorDomainSSL, -9824) 2015-11-02 09:30:34.414
adl[90787:4976353] CFNetwork SSLHandshake failed (-9824)
I am running SSL in my local host environment and the redirect is to https. I've found the exact same error in other posts on this site, but I am not sure how to apply their solution in Adobe Air, as their solution is for iOS. Does anyone know any Air-specific solutions for this problem?
By the way, there are also several other errors at the top of the error list:
Nov 2 09:30:16 adl[90787] <Error>: The function ‘CGFontSetShouldUseMulticache’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance.
2015-11-02 09:30:31.181 adl[90787:4976353] CFNetwork SSLHandshake failed (-9824)
2015-11-02 09:30:31.222 adl[90787:4976353] CFNetwork SSLHandshake failed (-9802)
2015-11-02 09:30:31.262 adl[90787:4976353] CFNetwork SSLHandshake failed (-9802)
2015-11-02 09:30:31.262 adl[90787:4976353] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
TypeError: Result of expression 'document.getElementById('nav-close-btn')' [null] is not an object.
at https://spear.dev/javascript/global.js?t=20150924 : 1380
I'm not sure what those errors mean. I can't find these error numbers listed in Adobe's docs. If someone could point me toward those, that would be great. Remember this is NOT a Flash application.
I feel like this has to do with either the loading of the images on the page, which don't display.
This may help someone else later. The issue was that there was a different domain in the app than the SSL domain. Even though it was an HTTPS call, Adobe was still complaining. When I removed those calls, the app worked as expected, without errors.
I'm using Visual Studio 2010 and VB.NET. My target environment is .NET Framework 4.0.
So I'm facing this problem when I'm publishing my project by using the provided Setup.exe file. After the verifying application requirement popped up, an alert popped up with text:
Cannot Continue. The application is improperly formatted. Contact the application vendor for assistance.
When I clicked on the "Detail" button, it showed me this error:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.239
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.239 (RTMGDR.030319-2300)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment URL : file:///I:/ProjectBMTRelease/ProjectBMT.application
IDENTITIES
Deployment Identity : ProjectBMT.application, Version=1.0.0.6, Culture=neutral, PublicKeyToken=7439f62500c0364d, processorArchitecture=x86
APPLICATION SUMMARY
* Installable application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of I:\ProjectBMTRelease\ProjectBMT.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
+ Exception from HRESULT: 0x80070C81
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [6/23/2012 5:21:36 PM] : Activation of I:\ProjectBMTRelease\ProjectBMT.application has started.
* [6/23/2012 5:21:36 PM] : Processing of deployment manifest has successfully completed.
* [6/23/2012 5:21:36 PM] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [6/23/2012 5:21:36 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.manifest: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Runtime.InteropServices.COMException
- Exception from HRESULT: 0x80070C81
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
I checked my project's manifest file, but I am not good enough to find any problem there. For other information, I created simple "Hello World !" application to see if it will get published well, and it did.
What is the solution?
Check the following:
Does the user have .NET 4 installed on their computer?
How are you publishing the application, are you using Visual Studio?
Are you making any changes to the deployment after publishing it?
If you are manually moving the files to the deployment location, is the structure identical to the original structure?
Try enabling detailed logging and see if that provides more information. The
article Enhanced Logging in ClickOnce Deployment shows you how to do that.
I got this very same error. The problem got resolved after I renamed my assembly name found on the first tab under application properties. It seems like having an assembly name with a space creates a manifest filename with a blank space and it seems to create problems. My application assembly name was named "Capital Manager". After I changed it to "Capital_Manager" (I replaced the space with an under score "_") the issue got resolved.
I received an error report and call stack pretty much identical to yours when attempting to run the ClickOnce installer. My findings so far may be helpful to others arriving here, so I'll post the details, but I have a feeling this same error report may be caused by a range of different problems.
The first thing I noticed was that my application manifest (the one that lists all of the files for the application + a signature hash for each) had entries for assemblies that had an invalid publicKeyToken, for example,
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="foo.exe" version="1.2.3.4" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
Further down the file instead of seeing dependentAssembly elements for assemblies some of the assemblies were listed as plain content files (file elements).
These problems certainly make the ClickOnce deployment invalid, and the cause was using a version of Mage that was compiled against an older version of .NET than the assemblies it was trying to create manifests for. When creating the application manifest Mage will attempt to read assemblies as follows:
AssemblyIdentity.FromFile(fileName);
And for Mage compiled against .NET 3.5 (CLR 2.0) trying to load a .NET 4.0 assembly results in a BadImageFormatException exception which is handled, and the fall-back behaviour is to treat these files as content files.
Does your application folder have subfolders? I got this same HRESULT just yesterday, and the root cause was that a library (EntityFramework.dll) was in both the top level and in a subfolder. (There was a MAGE warning about this, but it was not handled as an error.) I updated my script to remove EntityFramework.dll from the subfolder, and the ClickOnce is fine now.
Just another possibility - I got a similar error when adding a dpiAware to a newly created app.manifest file. ClickOnce started failing immediately.
I followed the advise here: Installing ClickOnce published DPI-aware application
So if you've been doing dpi things, maybe look there.
I programmed an application with JSF and some other fraeworks. Then I destroyed my metadata with maven and then I created a new project and imported all my classes and config files into the new project. So that I have clean metadata. The Project can be built without problems now. But when I want to start it onto tomcat I get the following exception:
com.sun.faces.config.ConfigurationException: no web.xml present
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.scanForFacesServlet(ConfigureListener.java:785)
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.<init>(ConfigureListener.java:745)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:173)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
But there is definitely a web.xml in that project. Has somebody an idea where my mistake could be? Thank you
Update
Yes I am using m2Eclipse!
My directory tree looks like:
OLD
My Servlet is there as well:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
UPDATE2
Directories (after BalusC Commend):
Here I have found a good Manual about Maven Web Projects. But unfortunately the problem stayed the same.
My directory structure looks like:
UPDATE3
Response to Pascal's comment:
mvn clean compile is successfull
mvn install throws a build error:
[INFO] Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if execut ing in update mode)
I executed those commands from windows console
Maybe the problem is something else. There is another Warning while starting the server:
27.08.2010 09:04:52 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:studentportal' did not find a matching property.
Maybe that helps?
Some pointers. Is the web.xml placed at WEB-INF/web.xml ?
From the source code, this particular exception is thrown at:
InputStream in = context.getResourceAsStream(WEB_XML_PATH);
if (in == null) {
if (context.getMajorVersion() < 3) {
throw new ConfigurationException("no web.xml present");
}
}
and it's looking for web.xml at
private static final String WEB_XML_PATH = "/WEB-INF/web.xml";
So it did not find the web.xml.
Also for some reason it's expecting Servlet 3.0 which is only available with Tomcat 7.0 - but I think the main issue should be the presence of web.xml
Finally, it will also be looking for the defined servlet in the web.xml like below
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
I started a new project and moved one part at once. After that it works. Unfortunately I have no idea where the problem was -.-
But creating a new empty project and moving all the files (except config files, I wrote them again) is a reasonable approach..
I'm creating a basic Struts2, Maven webApp and getting this error when I deploy to Tomcat 6 or Jetty. Has anyone seen this?
2010-07-29 15:33:38.801::WARN: failed struts2
Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:357)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:293)
at org.mortbay.jetty.plugin.Jetty6RunWar.execute(Jetty6RunWar.java:67)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72 - bean - jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193)
... 47 more
Using Maven...
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.1.8.1</version>
</dependency>
web.xml
<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>
Look's pretty straight forward, I don't understand why it won't load. I followed the basic tutorial. I googled for this error message, and was unable to find anything relevant.
Your problem is actually quite clear if you read the stack trace:
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the
name xwork has already been loaded by bean -
jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
- bean -
jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
You have a copy of struts2-core-2.0.11.2.jar and a copy of struts2-core-2.1.8.1.jar in your WEB-INF/lib directories. I think you should only have one of them. Do some cleanup (running a mvn clean might be enough).
PS: I have no idea why you also have stuff coming from C:/workspace/test as show be the first line:
jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
There is definitely something weird and messy with your classpath. I don't have any explanation beyond the one I gave above though.
Agree with the above answer
Check your library and classpath for the above jars and fix them
Sometimes even if the jars are not seen in the IDE, they are present int the build files, So a fix of the classpath and a CLEAN AND BUILD should resolve the problem.
I think struts2-core-2.1.8.1.jar copy or you have included this jar file some where in your webapplication so remove it and continue
Problem: The conflict occurred as 2 files of different versions are being loaded by the web container
Solution: Just go to path
C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/ of your computer and delete the struts2-core-2.0.11.2.jar file and only keep the latest one. If this type of conflict also occurs with some other file then delete that file also
After this no exception will be there.
I have also encountered this problem recently. Clean the cache and rebuild the project is not valid for my error.
I tried to delete the conflicting struts-default.xml file, but I didn't find it and the struts-default.xml file is a read-only file so I can't to modify it.
My final solution is to remove the extra Web* under Project Structure--Modules--MyFirstProject (project name), leaving only one Web and modifying Web Resource Directories as WebRoot.
It works for me! Hope I can help others.
here