0

I just upgraded Tapestry 5.3.8 to 5.4.0, and then I found the @Secured annotation has an issue. If I go to page which has this @Secured, the exception org/apache/tapestry5/services/TransformMethodSignature and could not initialize class nu.localhost.tapestry5.springsecurity.services.internal.TransformConstants2 will thrown (with no detail). Is it no longer supported in 5.4.0? Or do I need to upgrade something in my pom.xml?

pom.xml

<dependency>
    <groupId>org.apache.tapestry</groupId>
    <artifactId>tapestry-core</artifactId>
    <version>${tapestry-release-version}</version>
</dependency>

<dependency>
    <groupId>org.apache.tapestry</groupId>
    <artifactId>tapestry-hibernate</artifactId>
    <version>${tapestry-release-version}</version>
</dependency>

<dependency>
    <groupId>org.apache.tapestry</groupId>
    <artifactId>tapestry-upload</artifactId>
    <version>${tapestry-release-version}</version>
</dependency>

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-c3p0</artifactId>
    <version>4.2.0.Final</version>
</dependency>

<dependency>
    <groupId>com.mchange</groupId>
    <artifactId>c3p0</artifactId>
    <version>0.9.5.2</version>
</dependency>

<dependency>
    <groupId>org.apache.tapestry</groupId>
    <artifactId>tapestry-spring</artifactId>
    <version>${tapestry-release-version}</version>
</dependency>

<dependency>
    <groupId>org.apache.tapestry</groupId>
    <artifactId>tapestry-kaptcha</artifactId>
    <version>${tapestry-release-version}</version>
</dependency>

<dependency>
    <groupId>org.got5</groupId>
    <artifactId>tapestry5-jquery</artifactId>
    <version>4.1.1</version>
</dependency>

<dependency>
    <groupId>com.github.lltyk</groupId>
    <artifactId>tapestry-spring-security</artifactId>
    <version>3.0.3</version>
</dependency>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>4.3.0.RELEASE</version>
</dependency>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-test</artifactId>
    <version>4.3.0.RELEASE</version>
    <scope>test</scope>
</dependency>
4
  • It's working in fine in 5.4.3, are there any other details? Can you show the stacktrace? Apr 11, 2019 at 16:20
  • That's the problem, there is no stacktrace / detail. I updated my question with how my pom.xml looks like
    – Frank
    Apr 12, 2019 at 2:01
  • It looks like in 5.4.0, org.apache.tapestry5.services.TransformMethodSignature is no longer available. If so, what's the replacement?
    – Frank
    Apr 12, 2019 at 2:50
  • I just checked nu.localhost.tapestry5.springsecurity.services.internal.TransformConstants2 and one of the import classes is org.apache.tapestry5.services.TransformMethodSignature
    – Frank
    Apr 12, 2019 at 2:52

1 Answer 1

1

Well, after struggling for days, I'm finally figured out that this library:

<dependency>
    <groupId>com.github.lltyk</groupId>
    <artifactId>tapestry-spring-security</artifactId>
    <version>3.0.3</version>
</dependency>

Can not keep up with Tapesty 5.4, because it has a class: nu.localhost.tapestry5.springsecurity.services.internal.TransformConstants2 that refers to org.apache.tapestry5.services.TransformMethodSignature which is not available any longer in Tapestry 5.4.

I've tried to upgrade tapestry-spring-security to highest version: 3.0.5, but still can't keep up with Tapestry 5.4, so the only way to solve it, is to remove it. And to replace all the functionalities which was provided by tapestry-spring-security, I need to add 4 new libs to pom (in your case you might need to add more or less than 4): spring-security-core: 4.0.0.M1, spring-security-web: 4.2.3.RELEASE, spring-dao: 2.0.8, servlet-api: 2.5

In my case, I need to copy the code from the original source for these classes: LogoutService (interface), LogoutServiceImpl, IfRole and IfLoggedIn. Create the files and paste the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.