aspose file tools*
The moose likes Struts and the fly likes Struts  : Unable to load bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts  : Unable to load bean" Watch "Struts  : Unable to load bean" New topic
Author

Struts : Unable to load bean

Gaurav Dg
Greenhorn

Joined: Jun 27, 2009
Posts: 2
SEVERE: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/G:/Matrimony%20Project/workspace2/struts2-blank-2.1.6/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:57:150
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Unknown Source)
Caused by: Unable to load bean: typerg.apache.struts2.components.template.TemplateEngine classrg.apache.struts2.components.template.JspTemplateEngine - bean - jar:file:/G:/Matrimony%20Project/workspace2/struts2-blank-2.1.6/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:57:150
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:222)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 23 more
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/JspWriter
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getDeclaredConstructors(Unknown Source)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:212)
... 26 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.JspWriter
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 30 more
27 Jun, 2009 9:25:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
27 Jun, 2009 9:25:50 PM org.apache.catalina.core.StandardContext start


Am trying to setup tomcat 6, struts 2.1.6 and eclipse (galileo). Been a marathon unsuccessful journey till now . Am stuck up with this error since some time now.
As far as I understood a jar is not present. I tried adding the entire struts lib folder to the build path but was not successful . Any help would be greatly appreciated.
Thanks!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Loading the entire S2 lib directory is *not* a good idea; S2 plugins add behavior to webapps and introduce their own dependencies and configuration requirements.

Are you able to get a non-S2 app running? Like just deploy a JSP page w/o the S2 libraries?
Gaurav Dg
Greenhorn

Joined: Jun 27, 2009
Posts: 2
Hey David,

Thanks for the reply . Well yes, my normal application (non struts) run smooth.
Actually I got a simpler struts application running So I gave up trying to correct the wrongs in this project.. And yes, you were correct, importing the entire lib is not a good idea..

By the way, I kinda uploaded steps on my blog for other greenhorns : http://routineblabber.blogspot.com/
So incase you bump into someone similar you could re-direct them there...

Thanks again
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

None of the XML/HTML on that link is formatted in a useful way--you may want to consider using a syntax highlighter etc. I use syntaxhighlighter and it works well enough (see here for an example on blogspot).

You're also using the S2.0 DTD for a S2.1 application--probably not an issue, but something to be aware of. I don't what "weirdo" jar dependencies you're referring to.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts : Unable to load bean