You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Shing Hing Man <ma...@yahoo.com> on 2013/02/20 17:43:47 UTC

PlasticClassImp locked error in Tapestry Spring Security


Hi,
  

  I have been trying to use Tapestry Spring security from 

   https://github.com/antalk/Tapestry-Spring-Security

with Tapestry 5.3.6.

I have discovered a minor issue in   transformMethod  of  SpringSecurityWorker.java. 
It would be great if Antalk could fix  SpringSecurityWorker.java  in github. 


In the transformMethod, the "FieldHandle" is retrieved inside the 
advice. In certain circumstance, the following exception would occur.
org.apache.tapestry5.internal.plastic.PlasticClassImpl@64b9726e has been locked and can no longer be used.

Filter stack frames Stack trace

org.apache.tapestry5.internal.plastic.Lockable.check(Lockable.java:34)
org.apache.tapestry5.internal.plastic.PlasticFieldImpl.getHandle(PlasticFieldImpl.java:84)
nu.localhost.tapestry5.springsecurity.services.internal.SpringSecurityWorker$3.advise(SpringSecurityWorker.java:126)
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
nu.localhost.tapestry5.springsecuritytest.pages.Start.onActionFromCounter(Start.java)
nu.localhost.tapestry5.springsecuritytest.pages.Start.dispatchComponentEvent(Start.java)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:927)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1112)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1057) 



The above mentioned  error could  be reproduced using the  sample application at 

http://www.localhost.nu/svn/public/tapestry-spring-security-sample/

On the start.tml page of the above,  under section "Try it yourself", click the action link "score : 0 [increase]"

( I have migrated the above tapestry-spring-security-sample/ to Tapestry 5.3.6, and here is a 
    running version :
       http://lombok.demon.co.uk/testsecurity/
)



A fix  is to get the handle outside the advice, as suggested by Taha in the following post.

http://tapestry-users.832.n2.nabble.com/Tap-5-3-x-Set-field-value-s-AFTER-transformation-td7226795.html#none


Shing 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PlasticClassImp locked error in Tapestry Spring Security

Posted by Shing Hing Man <ma...@yahoo.com>.
Thanks !

Shing 



----- Original Message -----
From: antalk <na...@vankalleveen.net>
To: users@tapestry.apache.org
Cc: 
Sent: Thursday, February 21, 2013 3:11 PM
Subject: Re: PlasticClassImp locked error in Tapestry Spring Security

And fixed, also added a testcase for this issue



--
View this message in context: http://tapestry.1045711.n5.nabble.com/PlasticClassImp-locked-error-in-Tapestry-Spring-Security-tp5720124p5720145.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PlasticClassImp locked error in Tapestry Spring Security

Posted by antalk <na...@vankalleveen.net>.
And fixed, also added a testcase for this issue



--
View this message in context: http://tapestry.1045711.n5.nabble.com/PlasticClassImp-locked-error-in-Tapestry-Spring-Security-tp5720124p5720145.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PlasticClassImp locked error in Tapestry Spring Security

Posted by antalk <na...@vankalleveen.net>.
Let me have a look at it ;)



--
View this message in context: http://tapestry.1045711.n5.nabble.com/PlasticClassImp-locked-error-in-Tapestry-Spring-Security-tp5720124p5720144.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org