run error when follow struts2 tutorial - struts2

I am starting struts2 java web application and start with initial according to below URL tutorial.
https://www.tutorialspoint.com/struts_2/struts_environment_setup.htm
I am using struts-2.5.10.1 with weblogic server in eclipse neon. When run, it has below error. Please help
<Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter. java.lang.NoClassDefFoundError: Lorg/apache/velocity/tools/view/ToolboxManager;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:93)
at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:75)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.apache.velocity.tools.view.ToolboxManager
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1026)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:987)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:608)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:540)
Truncated. see log file for complete stacktrace

Related

Weblogic not coming up inside the Dockder container

Weblogic is not coming up . It is giving following stack trace . Can any one help in solving that ?
<Jun 20, 2018 1:04:27,029 PM UTC> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: A MultiException has 4 exceptions. They are:
1. java.lang.ExceptionInInitializerError
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.rjvm.RJVMService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.protocol.ProtocolRegistrationService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.protocol.ProtocolRegistrationService
A MultiException has 4 exceptions. They are:
1. java.lang.ExceptionInInitializerError
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.rjvm.RJVMService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.protocol.ProtocolRegistrationService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.protocol.ProtocolRegistrationService
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:89)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:250)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:305)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ExceptionInInitializerError
at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:163)
at weblogic.rjvm.JVMID.setLocalID(JVMID.java:278)
at weblogic.rjvm.RJVMService.setJVMID(RJVMService.java:72)
at weblogic.rjvm.RJVMService.start(RJVMService.java:54)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NullPointerException
at weblogic.utils.net.AddressUtils$AddressMaker.getAllAddresses(AddressUtils.java:62)
at weblogic.utils.net.AddressUtils$AddressMaker.<clinit>(AddressUtils.java:45)
at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:163)
at weblogic.rjvm.JVMID.setLocalID(JVMID.java:278)
at weblogic.rjvm.RJVMService.setJVMID(RJVMService.java:72)
Truncated. see log file for complete stacktrace
>
The WebLogic Server encountered a critical failure
Reason: Assertion violated
Stopping Derby server...
Derby server stopped.
Actually there was an interface resolution problem inside the docker container which was causing this
Make sure following points for resolution :
1) Cat /etc/hosts should have entry corresponding to localhost
2) docker0 interface should be in up state

Richfaces-3.3.3.Final, JSF2.0, facelet1.1.14 with weblogic 12c

I have issue with richfaces3.3.3.Final, jsf2.0, facelet1.1.14 with weblogic 12c.
Application is deploying successfully. While loading the login page getting the following exception.
Logs:-
java.io.IOException: Error parsing [jar:file:/C:/Oracle_Home12.2.1.2/wlserver/modules/glassfish.jsf.jar!/META-INF/mojarra_ext.taglib.xml]:
at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:410)
at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:431)
at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:197)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95)
java.io.IOException: Error parsing [zip:C:/Oracle_Home12.2.1.2/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/gems_2.0/n3ib5y/lib/jsf-impl-2.0.0.jar!/META-INF/taglib/ui.taglib.xml]:
at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:410)
at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:431)
at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:197)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
Caused By: org.xml.sax.SAXException: Error Handling [zip:C:/Oracle_Home12.2.1.2/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/gems_2.0/n3ib5y/lib/jsf-impl-2.0.0.jar!/META-INF/taglib/ui.taglib.xml#41,31]
at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:376)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:137)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1599)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1877)
Note:-
I have already check the *.taglib.xml version it was 2.0, which will compatible with JSF2.0. Please help to solve.

upgarding grails 1.1.1 to 1.2.1

I am trying to upgrade my grails project from grails 1.1.1 to grails 1.2.1.
when I am trying to run my application I am getting below error message:
I am using java 1.7._09 and GGTS 3.6.4.
This is my application.properties file:
when I am trying to add tomcat 1.2.1 in my application.properties file I am getting below error:
My GGTS is using default groovy compiler 2.3. Should I need to change the groovy complier?
I have searched in Google but I didn't understand:
search result from google
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
at gant.Gant.processTargets(Gant.groovy:480)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.callPluginOrGrailsScript(GrailsScriptRunner.java:485)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeCommand(GrailsScriptRunner.java:301)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:215)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:240)
Caused by: java.lang.IllegalArgumentException: addChild: Child name 'grails-errorhandler' is not unique
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:781)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardContext.addChild(StandardContext.java:2128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:925)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:193)
at org.apache.tomcat.util.digester.Rule.end(Rule.java:229)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1140)
... 438 more
startup.ContextConfig Occurred at line 7 column 422
startup.ContextConfig Marking this application unavailable due to previous error(s)
core.StandardContext Error getConfigured
core.StandardContext Context [/BASF_bdw] startup failed due to previous errors
Server running. Browse to http://localhost:8080/BASF_bdw
plugins.DefaultGrailsPluginManager Started to scan for plugin changes in every 5000ms.
I have found duplicate servlet name in .grails/***/resource/web.xml while running the run-app command in GGTS.
<servlet>
<servlet-name>grails-errorhandler</servlet-name>
<servlet-class>org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>grails-errorhandler</servlet-name>
<servlet-class>org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet</servlet-class>
</servlet>
may I know why it is generating duplicate servlet name and how to fix this ?
The blog says that you should search for every class that extends the class Exception or a subclass of it and convert it from a groovy to a java class. However, it looks like it is not your code, but the internal Grails code that throws the exception.
Looking at your previous questions, it seems your final goal is to make your war runnable in a Java 7 Environment.
You should stick to java 6 on your upgrade-journey until you hit a Grails version that just runs on Java 7.
After every successful upgrade, compile your project with Java 6 and try to run it in a servlet container that runs on Java 7. Perhaps you'r lucky and it just works.
I'm pretty sure that this will not the last problem.
I don't know how many lines of code your project has, perhaps it's an option to reimplement the whole project in grails 3.

Struts 2.5.10.1 migration issue

Error is: "weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger"
weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1026)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:987)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:608)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:540)
Truncated. see log file for complete stacktrace
weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1026)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:987)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:608)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:540)
Truncated. see log file for complete stacktrace

java.lang.NoSuchMethodError: org.apache.tiles.TilesException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found

Getting above error when starting my struts application.
The following is the export order.
/WEB-INF/src
/WEB-INF/lib/freemarker-2.3.16.jar
/WEB-INF/lib/javassist-3.7.ga.jar
/WEB-INF/lib/ognl-3.0.jar
JRE System library[jrocket... ]
/WEB-INF/lib/commons-beanutils-1.8.0.jar
/WEB-INF/lib/commons-digester-1.8.1.jar
/WEB-INF/lib/commons-fileupload-1.2.1.jar
/WEB-INF/lib/commons-io-1.3.2.jar
/WEB-INF/lib/commons-logging-1.0.4.jar
/WEB-INF/lib/commons-logging-api-1.1.jar
/WEB-INF/lib/log4j-1.2.14.jar
/WEB-INF/lib/struts2-config-browser-plugin-2.2.1.jar
/WEB-INF/lib/struts2-core-2.2.1.jar
/WEB-INF/lib/struts2-tiles-plugin-2.2.1.jar
/WEB-INF/lib/tiles-api-2.1.2.jar
/WEB-INF/lib/tiles-compat-2.1.2.jar
/WEB-INF/lib/tiles-jsp-2.1.2.jar
/WEB-INF/lib/tiles-servlet-2.1.2.jar
/WEB-INF/lib/xwork-core-2.2.1.jar
weblogic/api.jar
json-2010.01.05.jar
/WEB-INF/lib/tiles-core-2.1.2.jar
Please help. I will be very happy
2014-06-30 13:51:39,448 INFO org.apache.tiles.context.AbstractTilesApplicationContextFactory.createFactory:72 - Initializing Tiles2 application context. . .
2014-06-30 13:51:39,458 INFO org.apache.tiles.context.AbstractTilesApplicationContextFactory.createFactory:91 - Finished initializing Tiles2 application context.
2014-06-30 13:51:39,480 INFO org.apache.tiles.factory.TilesContainerFactory.initializeContainer:362 - Initializing Tiles2 container. . .
(Ljava/lang/String;Ljava/lang/Throwable;)V not found.
java.lang.NoSuchMethodError: org.apache.tiles.TilesException: method (Ljava/lang/String;Ljava/lang/Throwable;)V not found
at org.apache.tiles.factory.NotAvailableFeatureException.(NotAvailableFeatureException.java:71)
at org.apache.tiles.portlet.context.NotAPortletEnvironmentException.(NotAPortletEnvironmentException.java:71)
at org.apache.tiles.portlet.context.PortletTilesRequestContextFactory.(PortletTilesRequestContextFactory.java:68)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Truncated. see log file for complete stacktrace
2014-06-30 13:51:39,524 INFO org.apache.tiles.servlet.context.ServletUtil.setContainer:151 - Removing TilesContext for context: weblogic.servlet.internal.WebAppServletContext
<Jun 30, 2014 1:51:39 PM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1404150699134' for task '0'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: org.apache.tiles.TilesException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found
at org.apache.tiles.factory.NotAvailableFeatureException.<init>(NotAvailableFeatureException.java:71)
at org.apache.tiles.portlet.context.NotAPortletEnvironmentException.<init>(NotAPortletEnvironmentException.java:71)
at org.apache.tiles.portlet.context.PortletTilesRequestContextFactory.<init>(PortletTilesRequestContextFactory.java:68)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Truncated. see log file for complete stacktrace
<Jun 30, 2014 1:51:39 PM EDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 7 task for the application 'inhouse_brands'.>
<Jun 30, 2014 1:51:39 PM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating start task for application 'inhouse_brands'.>
<Jun 30, 2014 1:51:39 PM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: org.apache.tiles.TilesException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found
at org.apache.tiles.factory.NotAvailableFeatureException.<init>(NotAvailableFeatureException.java:71)
at org.apache.tiles.portlet.context.NotAPortletEnvironmentException.<init>(NotAPortletEnvironmentException.java:71)
at org.apache.tiles.portlet.context.PortletTilesRequestContextFactory.<init>(PortletTilesRequestContextFactory.java:68)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Truncated. see log file for complete stacktrace
Add this jars in your WEB-INF/lib folder
commons-lang3-3.1.jar
commons-lang-2.4.jar
slf4j-api-x.x.x.jar
slf4j-log4j12-x.x.x.jar
log4j-x.x.x.jar
Most importantly this jar is not in your project, So first download it and add it to your build path.
tiles-core.2.x.x.jar
tiles-template-2.x.x.jar
tiles-portlet-2.x.x.jar
You can choose version by yourself as per your project need.e.g. commons-lang-x.x,jar. Also reply if you get error.
And if you are new user to stack overflow then I will suggest you to learn how to accept answer Please see click HERE
EDIT :
Also I would like to tell you that struts2-tiles-plugin-2.2.1.jar depends on tiles 2.0.6 not tiles 2.2.1. Well, it does not matter. But it was just for your information. You should use proper version of tiles which should be compatible with your struts. At least try once using compatible versions.
What your error says is a resource could not be used because it is not in a portlet environment.
I will suggest you to Learn portlet integration of tiles
You are missing tiles-portlet-2.x.x.jar or portlet-ext.xml file
Edit 2:
Check rt.jar in your JRE.
If you don't have it on your classpath you will not have access to any of those classes you need to use like java.lang.String or java.io.File.

Resources