Win a copy of Spring Boot in Practice this week in the Spring forum!

Priyanka Sumanam

+ Follow
since Aug 17, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Priyanka Sumanam

Saw this some where.......may be this could not sure

Before (Spring 2.0 and earlier):

After (Spring 2.5):

11 years ago
Ok...thanks for explaining...possible that I got it wrong somewhere....will let you know if I have any other ideas.
11 years ago
If you set all you properties under <properties> tag in pom you will not get this problem as per the link you attached.But i didn't suggest you this a
its not feasable to lis all the properties in pom when you have many.
But both are same.It is way to let maven know about the properties you want to use acorss the application.

coming back to you question, i gues you exception is raised exactly at this lin

I am not sure what the DatabaseConfiguration constructor is doing internally .But it is trying to acces the Datasource bean which is wired in you application context as

now it is trying to get the driverClassName name.But here ${db.driver} is not replaced by the actual value at build time as it did not find the property and so it is trying to search for a driverclass with name ${db.driver} which is obviously not found.

And even if it happens at runtime , maven should know where the file is to replace the valuse. if you configure your properties under properties tag in pom it will create a for all the ones there.But if you are using you own , you should tell it so.

Any way did you try configuring it as i suggersted ealier?

11 years ago
Irrespective of, if its build time or runtime thing, there should be a way to tell maven to add those resources to be available for the project, to go and search for the ${name} values to be replaced by its values.

And ofcourse it is a buildtime thng.When you you bild you project maven replaces all ${name} properties wiht its values if they are found in the properties files that it is aware of.
If we dont configure them in pom, they go unnoticed.
11 years ago
have you configured your file in pom.xml as below

for your referencce

Please ignore if you have already don it.
11 years ago
Hi Joy,
Here is the full code. Result list is JDBC ResultSet

I have the below code which takes more than a minute to iterate through 5000 records...which is not acceptable performance

while( )
Object[] resultFields=new Object[colCount];

for(int i=1;i<=colCount;i++)


Could any one suggest something.
Thanks for the reply Rishi.I can ovverride the fetchmode on the properties directly defined on the entitiy I am querying on.But the problem here is because of the settings on a associated entity of the current entity.

I will try to explain with simple terms.

Two entities A and B.

<class name="A" table="A" >
<many-to-one name="b" column="BUFI" class="Bi" entity-name="B" lazy="proxy"/>


Definition of entity B that is associated to class A is below
<class name="B" table="B" lazy="false" entity-name="B">


associated property B is set to lazy="proxy" which is not taking effect as B is set to lazy="false" at the entity level.
Now when i am trying to load entity A, i can override fetchmode of it's own associtions which is any way set to lazy="proxy".I don't have any problem here.
The issue is cant override fetch mode of entity B,i.e set at its entity level.

Well, due to certain reasons which are part of business logic, we have to set lazy="false" for B at entity level.

Hi Rishi,

I am not getting any exception.My concern is that, it is talking awful lot of time to load a list of AOISELECTSETDETAIL objects(am using session.load()) as it is fetching the associated AOI object as well which in turn have a lot of properties set to lazy="false".I have set lazy="proxy" on definition of property AOI in AOISELECTSETDETAIL hbm file.But still that is not taking effect as the whole AOI entity is set to lazy="false" in its hbm as i highlighted below.
I done want to change the lazy setting on the associated hbm.

So the question is is there any way to avoid loading the associated object irrespective of what is set at the entity level in its hbm.

I hope this is clear enough atleast this time.

Hi allm
I have a hbm as below

<class name="" table="AOISELECTSETDETAIL" >
<id name="id" column="AOISELECTSETDETAILUFI" type="java.lang.String" unsaved-value="null" />
<many-to-one name="aoiSelectSet" column="AOISELECTSETUFI" class="" />
<many-to-one name="aoi" column="AOIUFI" class="" entity-name="Aoi" lazy="proxy"/>
<property name="aoiTargetPFI" type="java.lang.Long" />
<property name="aoiTargetDatasetId" type="java.lang.String"/>

on calling session.merge() on the above class, lazy="poxy" on AOI is not working because the the lazy="false" setting on the mapping of the corresponding class as below

<class name="" table="aoi" lazy="false" entity-name="Aoi">
<id name="id" column="aoiufi" type="java.lang.String" unsaved-value="null" />
<property name="instanceId"/>
<property name="lastUpdatedDate"/>
<property name="lastUpdatedUserId"/>



I don't want to change the lazy fetching on the assosciated class to fix it.Is there any way around to avoid loading full AOI object on accesing AOISELECTSETDETAIL.
I am using JSF with tomcat 7.0.8 .I am getting the below exception in application after the session time out instead of getting a session time out alert, and its throwing a 500 Error on screen.

10/07/2011 1:58:20 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/biosirt] threw exception [Cannot create a session after the response has been committed] with root cause
java.lang.IllegalStateException: Cannot create a session after the response has been committed
at org.apache.catalina.connector.Request.doGetSession(
at org.apache.catalina.connector.Request.getSession(
at org.apache.catalina.connector.RequestFacade.getSession(
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.getSession(
at org.apache.myfaces.application.jsp.JspStateManagerImpl.nextViewSequence(
at org.apache.myfaces.application.jsp.JspStateManagerImpl.getSerializedViewFromServletSession(
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(
at org.ajax4jsf.framework.ajax.AjaxStateManager.restoreView(
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(
at org.ajax4jsf.framework.ViewHandlerWrapper.restoreView(
at org.ajax4jsf.framework.ajax.AjaxViewHandler.restoreView(
at org.apache.shale.view.faces.ViewViewHandler.restoreView(
at org.ajax4jsf.framework.ViewHandlerWrapper.restoreView(
at org.ajax4jsf.framework.ajax.AjaxViewHandler.restoreView(
at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
at javax.faces.webapp.FacesServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.shale.faces.ShaleApplicationFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

could any one help me in sorting this out
11 years ago
Well I was preparing for SCWCD 5, but now as SCWCD 6 is out, I am planning to prepare for SCWCD 6.But I am not able to find right material for that.It would be great if any one could help in this regard.

Thanks for the explanation.I totally agree with what you said.It would be waste of effort to do so.

11 years ago
May be i can extend the Hibernates query class and overload the list() method to return List<Objec[]> and use it for special cases like this in the application.

But, is it worth doing it just for the sake of this warning?
are there any potential unforeseen problems if I leave it so?

Thanks in advance
11 years ago