Author Login
Post Reply
user Digest 5 Jun 2008 16:33:42 -0000 Issue 8073
Topics (messages 187286 through 187306):
Re: Cannot retrieve ActionForward named...
187286 by: Dave Newton
187288 by: JG Flowers
187292 by: JG Flowers
187294 by: Antonio Petrelli
187297 by: JG Flowers
Re: Extending Struts 2 controls
187287 by: Dave Newton
Re: <S:RESET> not working after validation error
187289 by: Laurie Harper
Re: splitting on a period ? <- please ignore
187290 by: Holger Stratmann
Single user Login
187291 by: Prashant Saraf
187293 by: Jim Kiley
187295 by: Prashant Saraf
Re: Is there such a thing as flash in S2?
187296 by: Guillaume Bilodeau
dynamically view templates
187298 by: Kibo
187299 by: Musachy Barroso
187300 by: Dave Newton
[Struts 2] Iterator usage
187301 by: Milan Milanovic
187303 by: Milan Milanovic
Re: File download problem in IE7 (struts 2) [SOLVED]
187302 by: Gustavo Felisberto
Re: Internationalization and EL
187304 by: Ralf Fischer
detached object cannot be persisted exception again
187305 by: Arun
Re: Display tag and AJAX
187306 by: Márcio Gurgel
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_187286.ezm (zipped)--- On Thu, 6/5/08, JG Flowers <Jeremy_G_Flowers@(protected):
> I've been trying to learn Struts [...]
Just out of curiosity, why are you starting with Struts 1 at this point?
Dave

Attachment:
user_187288.ezm (zipped)
Because it's probably still the most widely used Web Framework still. So I
figured I'd hit this one first.
I've got books on Struts 2, JSF and Wicket on my bookshelf to read next!
newton.dave wrote:
>
> --- On Thu, 6/5/08, JG Flowers <Jeremy_G_Flowers@(protected):
>> I've been trying to learn Struts [...]
>
> Just out of curiosity, why are you starting with Struts 1 at this point?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187292.ezm (zipped)
Hi again Antonio,
1) Tiles PMC member? What does PMC stand for? A contributor to Tiles or is
PMC some kind of Tiles spin off?
2) I discovered this problem and took a look at the code, and fixed on my
side.
Hopefully you won't have to do it many times, but sometimes it helps.
Uh?
Should my code have worked then?
Is there a bug in Tiles/Struts integration then? If you've fixed this how
can I get latest build?
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187294.ezm (zipped)2008/6/5 JG Flowers <Jeremy_G_Flowers@(protected)>:
> 1) Tiles PMC member? What does PMC stand for? A contributor to Tiles or is
> PMC some kind of Tiles spin off?
PMC=Project Management Committee. I am both a committer and I have the
power to decide the future of Tiles (yeah I've got the power! :-D )
> 2) I discovered this problem and took a look at the code, and fixed on my
> side.
> Hopefully you won't have to do it many times, but sometimes it helps.
> Uh?
> Should my code have worked then?
> Is there a bug in Tiles/Struts integration then?
Possibly it's a bug, though I did not try to find out.
> If you've fixed this how can I get latest build?
I don't think it's fixed. However you can check the latest version
checking out the Subversion repository:
http://svn.apache.org/repos/asf/struts/struts1/trunk/
Anyway check it in JIRA if the bug has been already filed:
https://issues.apache.org/struts/
If not, file a new bug report and, if you can, post a patch.
Ciao
Antonio

Attachment:
user_187297.ezm (zipped)
This is really bizarre.
I'd tried changing the html link to "forward" after initial "action" version
didn't work. Then changed it back, created a war and deployed in Tomcat
again. Suddenly everything works.
I'm wondering if Tomcat had some sort of ghost image of prior deployment
that had exactly same war named miniHr.war.
My guess is the "work" folder that didn't get purged on redeployment perhaps
and as a consequence first time I deployed the tiles version, the non-tiles
version was still lingering around from the prior deployment..
Darn it!
Antonio Petrelli-3 wrote:
>
> 2008/6/5 JG Flowers <Jeremy_G_Flowers@(protected)>:
>> 1) Tiles PMC member? What does PMC stand for? A contributor to Tiles or
>> is
>> PMC some kind of Tiles spin off?
>
> PMC=Project Management Committee. I am both a committer and I have the
> power to decide the future of Tiles (yeah I've got the power! :-D )
>
>> 2) I discovered this problem and took a look at the code, and fixed on my
>> side.
>> Hopefully you won't have to do it many times, but sometimes it helps.
>> Uh?
>> Should my code have worked then?
>> Is there a bug in Tiles/Struts integration then?
>
> Possibly it's a bug, though I did not try to find out.
>
>> If you've fixed this how can I get latest build?
>
> I don't think it's fixed. However you can check the latest version
> checking out the Subversion repository:
> http://svn.apache.org/repos/asf/struts/struts1/trunk/
> Anyway check it in JIRA if the bug has been already filed:
> https://issues.apache.org/struts/
> If not, file a new bug report and, if you can, post a patch.
>
> Ciao
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187287.ezm (zipped)--- On Thu, 6/5/08, Narayana S <narayanasgs1@(protected):
> in my application, i have a requirement of implementing field
> level customization, like locking the field, hiding the field
> etc.. to achieve this i am planning to extends "struts-tags"
> tag library functionality. can any one give any idea of how
> to do this?
I'm not sure what you're asking.
To extend the S2 tags themselves you might need to do any or all of the following, depending on your needs:
* add tag attributes to the component and tag classes
* add additional Java code
* regenerate TLD
* modify FreeMarker templates
Some might be easier to extend than others.
Dave

Attachment:
user_187289.ezm (zipped)StrutsUser wrote:
> Hi,
> I am having a situation where the <s:reset> tag does not work. I am doing
> some client side validation using javascript and server side valdiations in
> the 'validate()' method of my action class.
> When client side validation fails and I click the reset button, the data
> gets cleared.
> But when the validation fails in the 'validate()' method and I click the
> reset button the data is not getting cleared. I don't know if this is a
> known issue.
> Could anyone please help me out.
That's expected behaviour; it's what the HTML 'reset' input type does.
Reset will reset the form inputs to the values they had when the page
was loaded. If you want a different behaviour, you will need to
implement it yourself (either client-side with JavaScript, server-side
(using a submit button instead of a reset), or some combination of both.
L.

Attachment:
user_187290.ezm (zipped)Vinny wrote:
> Sorry,
> I sent this to the wrong "user" list.
Yes you did - and that's why I know a lot of Java and only a little Groovy.
(and cannot see if anybody has answered your question)
Anyway, this should be the same in Java and Groovy: String.split uses a
REGULAR EXPRESSION to split.
A period (.) is a wildcard for "any character" and therefore regards
every character as a separator with "nothing in between" :-)
You must escape the period, it should work with split("\\.")
Good luck!
>
> On Wed, Jun 4, 2008 at 11:06 PM, Vinny <xaymaca@(protected):
>> OK, this one baffles me :)
>>
>> "file.txt".split(".") produces an empty array ?
>>
>>
>>
>>
>>
>> testing it on the groovysh, (trying to that more often before posting
>> on the list) :
>>
>>
>> groovy:000> mysplit = "file.txt".split(".")
>> ===> [Ljava.lang.String;@(protected)
>> groovy:000> mysplit.size()
>> ===> 0
>> groovy:000> println mysplit
>> {}
>> ===> null
>>
>> Thanks in advance.
>>
>> --
>> The future is here. It's just not widely distributed yet.
>> -William Gibson
>>
>
>
>

Attachment:
user_187291.ezm (zipped)Hi,
I want to know how to do single user login, that is user should not
login form multiple location at the same time.
Regards,
Prashant Saraf

Attachment:
user_187293.ezm (zipped)This really depends on how you are currently managing authentication. How
are you currently managing authentication?
On Thu, Jun 5, 2008 at 9:33 AM, Prashant Saraf <psaraf@(protected):
> Hi,
>
> I want to know how to do single user login, that is user should not
> login form multiple location at the same time.
>
> Regards,
>
> Prashant Saraf
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment:
user_187295.ezm (zipped)Hi ,
I am managing it by DB check. My Helper class is checking either user
is valid or not with DB.
Regards
PS.
-----Original Message-----
From: Jim Kiley [mailto:jhkiley@(protected)]
Sent: Thursday, June 05, 2008 7:10 PM
To: Struts Users Mailing List
Subject: Re: Single user Login
This really depends on how you are currently managing authentication.
How
are you currently managing authentication?
On Thu, Jun 5, 2008 at 9:33 AM, Prashant Saraf <psaraf@(protected):
> Hi,
>
> I want to know how to do single user login, that is user should not
> login form multiple location at the same time.
>
> Regards,
>
> Prashant Saraf
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment:
user_187296.ezm (zipped)Great! I'm glad it worked fine. I'll merge your documentation additions as
soon as I have a moment, thanks for providing them.
I like your idea of generating multiple flash map IDs, it seems like a good
solution would make the implementation more flexible. Feel free to modify
the code and upload it here - again if I have some time I'll try to have a
look at it also.
As for setting a timeout value on the flash map, the idea's interesting but
I think it would only delay the problem. Sure putting a 60-second delay on
the map would allow it to survive to quick refreshes, but it wouldn't solve
the case when a user returns to this page later using the back button; plus
it would be possible to clog the session with long-lived flash maps if not
used correctly. On the other hand, maybe it would solve enough cases to
motivate adding this functionality; plus giving a choice to the developer
can be a good thing. Maybe the Struts2 seniors would like to give their
opinion on this?
To implement this I'd have the result add a timestamp to the map and the
interceptor check for the timestamp's validity instead of starting a timer
though, it would be much lighter.
Cheers,
GB
kenk wrote:
>
> GB,
>
> I've finished implementing my use case using your FlashInterceptor and
> FlashResult -- it worked perfectly and I didn't need to change anything in
> your code. :clap:
>
> But it did take me a while to achieve success, mainly owing to my newness
> to Struts 2 and the difficulty I've had following the S2 documentation.
> So having said that, I have uploaded some revisions to your JavaDocs, in
> hopes that they will help other newbies dealing with the whole flash scope
> issue, perhaps you can add these.
>
> The main feedback item I have on the code is the hard-coded "__flashMap"
> key on the session -- this limits you to one flash scope at a time. How
> about having the FlashResult generate a random key value ( i.e.
> __flashMap_xxxxx ), send this as a request parameter, have the
> FlashInterceptor detect this value and use it to access the map. Poof!
> No more issue with multiple browser windows open.
>
> For the refresh issue, have an optional configuration parameter on the
> FlashInterceptor called "flashMapTimeout", defaulting to 60 seconds.
> Instead of immediately removing the flash map from the session, start a
>
java.util.Timer and remove it later. Poof! Now the refresh works (until
> the timeout occurs).
>
> Thanks again for making your code available!
> Ken
>
> http://www.nabble.com/file/p17659710/JavaDocAdditions.txt
> JavaDocAdditions.txt
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187298.ezm (zipped)
Hi Conference
I use Struts 2 and freemarker:
<action name="test" class="com.acme.TestAction">
<result name="success" type="freemarker">success.ftl</result>
</action>
but
I need load freemarker template dynamically. For example:
In page is selectBox (<select>) with items:
- template1
- tempalte 2
- template 3
When user click in item template1, I want to return him view, which use
template1.
When user click in item tempate2, I want to return him view, which use
tempate2.
etc.
I need help how to do. I need not exactly code way, only help how can i do
it.
Thank for help very much.
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187299.ezm (zipped)You can use OGNL in the result like this:
<action name="test" class="com.acme.TestAction">
<result name="success" type="freemarker">${template}</result>
</action>
then you can have a getTemplate() method in your action that returns
the right template.
musachy
On Thu, Jun 5, 2008 at 10:18 AM, Kibo <tomasjurman@(protected):
>
> Hi Conference
>
> I use Struts 2 and freemarker:
>
> <action name="test" class="com.acme.TestAction">
> <result name="success" type="freemarker">success.ftl</result>
> </action>
>
> but
> I need load freemarker template dynamically. For example:
> In page is selectBox (<select>) with items:
> - template1
> - tempalte 2
> - template 3
> When user click in item template1, I want to return him view, which use
> template1.
> When user click in item tempate2, I want to return him view, which use
> tempate2.
> etc.
>
> I need help how to do. I need not exactly code way, only help how can i do
> it.
>
> Thank for help very much.
>
>
> -----
> Tomas Jurman
> Czech Republic
> --
> View this message in context: http://www.nabble.com/dynamically-view-templates-tp17670937p17670937.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_187300.ezm (zipped)--- On Thu, 6/5/08, Kibo <tomasjurman@(protected):
> [specifying template based on form value]
You can use OGNL in your configuration.
http://struts.apache.org/2.0.11.1/docs/parameters-in-configuration-results.html
Dave

Attachment:
user_187301.ezm (zipped)Hi,
I have one question regarding iterator. I have one simple list that contain three values:
List { id, value, date } and I'm iterating through this list. And I want to show in my list a sum for value for every day at the last row that contain that date, like this:
id value date sum
----------------------------------------------------------
1 10 20.5.2008
2 15 20.5.2008
3 15 20.5.2008 40
4 12 21.5.2008
5 15 21.5.2008 27
6 12 22.5.2008
...
I'm now have done all iterating except this sum column. Do you have any ideas how efficent can I do this ?
--
Thx, Milan Milanovic

Attachment:
user_187303.ezm (zipped)Hi,
I have one question regarding iterator. I have one simple list that contain three values:
List
{ id, value, date } and I'm iterating through this list. And I want to
show in my list a sum for value for every day at the last row that
contain that date, like this:
id__value___date_______sum
----------------------------------------------------------
1__10_____20.5.2008
2__15_____20.5.2008
3__15_____20.5.2008___40
4__12_____21.5.2008
5__15_____21.5.2008___27
6__12_____22.5.2008
...
I'm now have done all iterating except this sum column. Do you have any ideas how efficent can I do this ?
--
Thx, Milan Milanovic
--- On Thu, 6/5/08, Milan Milanovic <milanmilanovich@(protected):
From: Milan Milanovic <milanmilanovich@(protected);
Subject: [Struts 2] Iterator usage
To: user@(protected)
Date: Thursday, June 5, 2008, 7:36 AM
Hi,
I have one question regarding iterator. I have one simple list that contain
three values:
List { id, value, date } and I'm iterating through this list. And I want to
show in my list a sum for value for every day at the last row that contain that
date, like this:
id&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp;
date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sum
----------------------------------------------------------
1&nbsp;&nbsp;&nbsp;
10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20.5.2008
2&nbsp;&nbsp;&nbsp; 15
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20.5.2008
3&nbsp;&nbsp;&nbsp;
15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20.5.2008&nbsp;&nbsp;&nbsp; 40
4&nbsp;&nbsp;&nbsp;
12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
21.5.2008
5&nbsp;&nbsp;&nbsp; 15
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
21.5.2008&nbsp;&nbsp;&nbsp; 27
6&nbsp;&nbsp;&nbsp;
12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
22.5.2008
...
I'm now have done all iterating except this sum column. Do you have any
ideas how efficent can I do this ?
--
Thx, Milan Milanovic

Attachment:
user_187302.ezm (zipped)In the documentation[1] for the Stream result type we have a:
<param name="contentDisposition">filename="contacts.xls"</param>
This was causing the problem. A simple change to:
<param name="contentDisposition">attachment;filename="contacts.xls"</param>
solved the issue.
Hope this may help someone out there
Gustavo
[1] http://struts.apache.org/2.0.11.1/docs/stream-result.html
Gustavo Felisberto escreveu:
> Hello ALL,
>
> I'm generating an Excel file in runtime and sending it to the
> client.I'm using struts 2.0.11.
> In struts.xml I have:
>
> <action name="ExportExcelFile" class="my.Class">
> <result name="success" type="stream">
> <param name="contentType">application/vnd.ms-excel</param>
> <param name="inputName">excelInputStream</param>
> <param name="contentDisposition">filename="contacts.xls"</param>
> <param name="bufferSize">4096</param>
> </result>
> </action>
>
> In the class I have:
> public InputStream getExcelInputStream() {
> return new ByteArrayInputStream(exportExcelFile().toByteArray());
> }
> private ByteArrayOutputStream exportExcelFile() {
> ByteArrayOutputStream bos = new ByteArrayOutputStream();
> try {
> WritableWorkbook workbook = Workbook.createWorkbook(bos);
> WritableSheet sheet = workbook.createSheet("Contactos", 0);
> WritableCellFormat textFormat = new
> WritableCellFormat(NumberFormats.TEXT);
>
> //ADD STUFF TO SHEET
>
> workbook.write();
> workbook.close();
> } catch (RowsExceededException e) {
> } catch (WriteException e) {
> } catch (IOException e) {
> }
> return bos;
> }
>
> If I use IE7 and I choose to save the file to disk and then open it
> with Excel 2007 all works ok. If I choose to open the file instead of
> saving it I get:
> 1 - an error in Tomcat: ERROR [http-8080-Processor21]
> (CommonsLogger.java:24) - Can not find a
java.io.InputStream with the
> name [excelInputStream] in the invocation stack. Check the <param
> name="inputName"> tag specified for this action.
>
> 2- A message from excel saying that the file I'm trying to open
> ExportExcelFile (and not the real name of the file) is in a diferent
> format than the extension. If i choose to open it the file is ok
>
> 3- IE7 hard locks until I say yes/no in excel to open the file
>
> I'm accessing tomcat via HTTP
>
> Any help will be much appreciated.
>
--
Gustavo Felisberto.
WIT-Software, Lda
Coimbra (Portugal), San Jose (California)
Phone: +351239801030
Web: http://www.wit-software.com

Attachment:
signature.asc (zipped)
Attachment:
user_187304.ezm (zipped)Hi,
when you have the translations in a resource bundle, as you have now
with your package.properties, you cannot simply get the translations
from the stack, but have to invoke the getText method from you
TextProvider.
The TextProvider interface usually is implemented by your action as
soon as you extend ActionSupport. If it doesn't yet, you'll have to
change this, or place a text provider on the stack yourself.
Then just use an expression like %{getText(displayName)}.
Bye,
-Ralf
On Thu, Jun 5, 2008 at 10:56 AM, Matthieu MARC
<matthieu.marc@(protected):
> Hi everybody,
>
> I'm trying to play with internationalization but I have a small problem.
> Here is my code :
>
> <s:iterator value="week.semaine">
>
> <s:label labelposition="top" value="%{displayName}" />
>
> <s:select name="week.semaine[%{index}].am" onchange="countHour();"
> id="am%{index}" key="timetable.morning" list="heures" value="%{am}" />
>
> <s:select name="week.semaine[%{index}].pm" onchange="countHour();"
> id="pm%{index}" key="timetable.afternoon" list="heures" value="%{pm}" />
>
> </s:iterator>
>
>
> My problem is in the label. %{displayName} return monday, tuesday,
> wednesday.... and I want to translate the label value.
>
> I tried :
>
>
> key="%{displayName}"
>
> key="timetable.%{displayName}"
>
>
> I wrote a package.properties file :
>
> timetable.monday=lundi
>
> monday=lundi
>
>
> But nothing is working.
>
> Is someone have an idea to help me ?
>
> thank in advance.
>
> Matthieu MARC
>
> --
> Matthieu MARC
> matthieu.marc@(protected)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187305.ezm (zipped)Hi,
I am using JPA and ehcache.
My entity is this.
@Entity
@Table(name = "holiday_calendar")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class HolidaysCalendar
{
@Id
@Column(name = "HOLIDAY_CALENDAR_ID", nullable = false, unique = true)
private int holidayCalendarId;
@Column(name = "DATE", nullable = false)
private Date date;
@Column(name = "TYPE", nullable = false)
private String type;
@Column(name = "DESCRIPTION", nullable = true)
private String description;
---
}
when I try to do an entityManager.merge(holidaycalendarobj)
First call I am succesful, next tine I get the exception
persistenceexception: detached object cannot be persisted.
I am using openSessionInViewFilter and spring.
I have tried using saveOrUpdate() of hibernate.
I got another exception then.
My log told me this by which I am confused. Please help
javax.persistence.RollbackException: Error while commiting the transaction
at
org.hibernate.ejb.TransactionImpl.commit (
TransactionImpl.java:71)
at
org.springframework.orm.jpa.JpaTransactionManager.doCommit (
JpaTransactionManager.java:433)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit (
AbstractPlatformTransactionManager.java:651)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit (
AbstractPlatformTransactionManager.java:621)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning (
TransactionAspectSupport.java:311)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke (
TransactionInterceptor.java:117)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (
ReflectiveMethodInvocation.java:161)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
at
com.slingmedia.emp.facade.employee.LeaveManager$$EnhancerByCGLIB$$5a2b3b92.createHoliday(<generated>)
at
com.slingmedia.emp.web.actions.employee.LeaveManagerAction.addHolidays(LeaveManagerAction.java:568)
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:585)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction (
DefaultActionInvocation.java:404)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly (
DefaultActionInvocation.java:267)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (
DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (
ValidationInterceptor.java:150)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (
AnnotationValidationInterceptor.java:48)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (
ConversionErrorInterceptor.java:123)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (
ParametersInterceptor.java:167)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (
StaticParametersInterceptor.java:105)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept (
CheckboxInterceptor.java:83)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept (
FileUploadInterceptor.java:207)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (
ModelDrivenInterceptor.java:74)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept (
ScopedModelDrivenInterceptor.java:127)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept (
ProfilingActivationInterceptor.java:107)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (
DebuggingInterceptor.java:206)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (
ChainingInterceptor.java:115)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (
I18nInterceptor.java:143)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (
PrepareInterceptor.java:121)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (
ServletConfigInterceptor.java:170)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (
AliasInterceptor.java:123)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (
ExceptionMappingInterceptor.java:176)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
at
org.apache.struts2.impl.StrutsActionProxy.execute (
StrutsActionProxy.java:50)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:504)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (
FilterDispatcher.java:419)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:173)
at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal (
OpenEntityManagerInViewFilter.java:111)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter (
OncePerRequestFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke (
AuthenticatorBase.java:524)
at
org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke (
ReplicationValve.java:346)
at
org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service (
CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (
PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (
LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at
java.lang.Thread.run (
Thread.java:595)
Caused by:
javax.persistence.OptimisticLockException:
org.hibernate.StaleStateException: Batch update returned unexpected row
count from update [0]; actual row count: 0; expected: 1
at
org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException (
AbstractEntityManagerImpl.java:654)
at
org.hibernate.ejb.TransactionImpl.commit (
TransactionImpl.java:59)
... 129 more
Caused by:
org.hibernate.StaleStateException: Batch update returned
unexpected row count from update [0]; actual row count: 0; expected: 1
at
org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
at
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
at
org.hibernate.jdbc.BatchingBatcher.checkRowCounts (
BatchingBatcher.java:68)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch (
BatchingBatcher.java:48)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch (
AbstractBatcher.java:246)
at
org.hibernate.engine.ActionQueue.executeActions (
ActionQueue.java:266)
at
org.hibernate.engine.ActionQueue.executeActions (
ActionQueue.java:168)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions (
AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush (
DefaultFlushEventListener.java:27)
at
org.hibernate.impl.SessionImpl.flush (
SessionImpl.java:1000)
at
org.hibernate.impl.SessionImpl.managedFlush (
SessionImpl.java:338)
at
org.hibernate.transaction.JDBCTransaction.commit (
JDBCTransaction.java:106)
at
org.hibernate.ejb.TransactionImpl.commit (
TransactionImpl.java:54)
... 129 more
Does any body has a soultion.I know this is becuase I use persist and
secondlevel cache together.
I am checking if the entity already exists in db. So the argument that I am
trying to persist an already existing entity itself is wrong.
My guess is the cache is not synching with db or something of that sort.
I have enabled query caching and is using that.
Is it becuase of that?
public List<HolidaysCalendar> getHolidaysCalendarForYear(int year, String
type)
{
Query query = null;
if ( "-1".equals(type) )
{
query = entityManager.createQuery("select hcal from HolidaysCalendar hcal
where YEAR(hcal.date) = :year ");
}
else
query = entityManager.createQuery("select hcal from HolidaysCalendar hcal
where YEAR(hcal.date) = :year and hcal.type= :type");
query.setHint("org.hibernate.cacheable", true);
//query.setHint("org.hibernate.timeout", 24 * 60 * 60);// 1 day cache.
query.setParameter("year", year);
if ( !"-1".equals(type) )
query.setParameter("type", type);
return query.getResultList();
}
Is query level caching affecting this or some sort of things like that?
Please help!!!
--
Thanks
Arun George

Attachment:
user_187306.ezm (zipped)Hi felipe, could you post a example?
2008/6/5 Felipe Lorenz <felipe.lorenz@(protected)>:
> Hi.. you can out the display tag inside of a remote div... and, every time
> when you want refresh the DT, just refresh the div....
>
> On Wed, Jun 4, 2008 at 10:41 PM, Arunkumar Balasubramanian <
> arun-82@(protected):
>
> >
> > Can we update the display:table with an ajax call? Here is what I was
> > expecting to do.
> >
> > - There are different radio buttons (each will have different status of
> > results) - Depending on the selection, the display:table has to update
> the
> > rows. - There display:table headers dosen't change and the values inside
> the
> > display:rable changes based on the selections.
> >
> > I was trying to do the following.
> >
> > - Make an AJAX call when the user clicks on radio buttons, so that only
> > the display:table gets refreshed and not the entire page. - Based on
> the
> > selections, the display:table will update the results.
> >
> > If someone was able to provide the reference for how to perform the
> above
> > task it would be great.
> >
> > Thanks in advance.
> > _________________________________________________________________
> > It's easy to add contacts from Facebook and other social sites through
> > Windows Live™ Messenger. Learn how.
> > https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
>