Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

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.

share|improve this answer
    
I added those 2 to my build path and still same error?? –  user3791033 Jun 30 at 17:53
    
add full stacktrace. full eror log is required. copy paste full stacktrace from your console to your question. Click on edit question link and copy paste full stack trace there. So I can understand. –  Parth Trivedi Jun 30 at 17:56
    
I have updated the answer for you. And I am waiting for your stack trace. –  Parth Trivedi Jun 30 at 18:10
    
I can't paste it in, it's giving me this annoying error that i need to add 4 spaces to every line!!! and the Ctrl K doesnt work. –  user3791033 Jun 30 at 18:13
    
Did you add tiles-core-2.x.x.jar or use tile 2.0.6? And without error information we can not help you –  Parth Trivedi Jun 30 at 18:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.