Arshia Bora

Greenhorn
+ Follow
since Jan 08, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Arshia Bora

You need to keep resolving the exceptions by including other librariers from Spring 3.0 for e.g. Portlet stuff. Once that is fixed, you might need commons-digester1.8.jar, commons-logging-api.jar etc. So basically go on fixing the dependencies one by one. Make sure that you download correct dependancy (& remember the same from where you downloaded this; this will help to resolve Deployment issues if any).
14 years ago
Hey Mark,
The way we had "spring-framework-2.5.5-with-dependencies", are we not going to have "spring-framework-3.0-with-dependencies" available soon?
14 years ago
This issue is resolved now after downloading the dependendend files. Hopefully we will soon have Spring 3.0 with depedant available for development. If anyone already know please share the link.
14 years ago
It is a web-mvc application. I have pasted the XML contents below. It is same as yours.

<bean id="viewResolver1" class="org.springframework.web.servlet.view.Resour ceBundleViewResolver" p:basename="views" />
<context:component-scan base-package="com.sample.web" />
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2 .TilesConfigurer" p:definitions="/WEB-INF/tiles-defs.xml" />

tiles-defs.xml contents is given below.
---------------------------------------------

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">

<tiles-definitions>

<definition name="baseLayout" template="/WEB-INF/tiles/baseLayout.jsp">
<put-attribute name="title" value="Template"/>
<put-attribute name="header" value="/WEB-INF/tiles/header.jsp"/>
<put-attribute name="menu" value="/WEB-INF/tiles/menu.jsp"/>
<put-attribute name="body" value="/WEB-INF/tiles/body.jsp"/>
<put-attribute name="footer" value="/WEB-INF/tiles/footer.jsp"/>
</definition>

<definition name="welcome" extends="baseLayout">
<put-attribute name="title" value="Welcome"/>
<put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"/>
</definition>

<definition name="friends" extends="baseLayout">
<put-attribute name="title" value="Friends"/>
<put-attribute name="body" value="/WEB-INF/jsp/friends.jsp"/>
</definition>

<definition name="office" extends="baseLayout">
<put-attribute name="title" value="Office"/>
<put-attribute name="body" value="/WEB-INF/jsp/office.jsp"/>
</definition>

</tiles-definitions>
14 years ago
Hello,
I am trying to integrate Spring 3.0 with Tiles 2.1.4 in my application. But when tomcat server is started the autowiring is failing with bean being not created. There were some Spring issues in past for Spring 2.5 & Tiles 2.1 integration, which were supposed to be addressed in Spring 3.0. But I still see this problem. Can someone provide me any help from the stacktrace below? Thanks in advance.

ERROR [main] (FrameworkServlet.java:315) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/systemmonitor-servlet.xml]: Invocation of init method failed; nested exception is org.apache.tiles.portlet.context.NotAPortletEnvironmentException: Cannot access portlet classes
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:443)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:459)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:340)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
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.deployDescriptor(HostConfig.java:630)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.tiles.portlet.context.NotAPortletEnvironmentException: Cannot access portlet classes
at org.apache.tiles.portlet.context.PortletTilesRequestContextFactory.<init>(PortletTilesRequestContextFactory.java:71)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.tiles.context.ChainedTilesRequestContextFactory.init(ChainedTilesRequestContextFactory.java:100)
at org.apache.tiles.factory.TilesContainerFactory.storeContainerDependencies(TilesContainerFactory.java:429)
at org.apache.tiles.factory.TilesContainerFactory.initializeContainer(TilesContainerFactory.java:368)
at org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(TilesContainerFactory.java:287)
at org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesContainerFactory.java:231)
at org.apache.tiles.startup.BasicTilesInitializer.createContainer(BasicTilesInitializer.java:117)
at org.apache.tiles.startup.BasicTilesInitializer.initialize(BasicTilesInitializer.java:53)
at org.springframework.web.servlet.view.tiles2.TilesConfigurer.afterPropertiesSet(TilesConfigurer.java:203)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
... 41 more
Caused by: java.lang.NoClassDefFoundError: javax/portlet/PortletRequest
at org.apache.tiles.portlet.context.PortletTilesRequestContextFactory.<init>(PortletTilesRequestContextFactory.java:66)
... 57 more
Caused by: java.lang.ClassNotFoundException: javax.portlet.PortletRequest
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 58 more
Jan 20, 2010 6:56:03 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
14 years ago
I tried this but it does not work. I tried multiple things such as overriding referenceData and updating the location list. I also tried filling this list in formBackingObject method. But nothing shows up in JSP. I would appreciate any help on this as I am struggling with this problem for last 4-5 days.
14 years ago
Hello,

I have a spring command object for my SimpleFormController. This object has few string items and few List items as attributes. I am using JSTL in my JSP page to populate the Lst box in view. I am using spring:bind tags to bind the command object attributes with view componenents. It works fine when we have all the attributes as String. But incase of List attributes, I do not see the spring binding happening correctly. This results the incorrect rendering of view with no items in the list.

I can see that the List is getting populated properly on Server side. But view is not able to display the same. Looks like the JSP code written by me is incorrect. Can someone provide hint or sample code for this scenario?

My sample JSP code is:
----------------------------




Dispatcher Servlet Content:
----------------------------------


Controller class code:
--------------------------




When I print currentCity.cityId in JSP, it shows up blank. So looks like there is problem of binding the List item userBean.location. This is what I feel? Any other clues would be appreciated.
14 years ago