Results 1 to 3 of 3

Thread: @ManagedBean can only be placed on a class

  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Default @ManagedBean can only be placed on a class

    I'm developing an application with STS using Spring Roo. When I deploy the app in a JBoss As 7 Server, logs shows me this ERROR:

    Caused by: org.jboss.as.server.deployment.DeploymentUnitProce ssingException: @ManagedBean can only be placed on a class

    That is because the .aj files with @ManagedBean annotations (e.g. ApplicationBean_Roo_ApplicationBean.aj). I have the same problem with some Convert annotations. I thougth that JBoss should not knowing about this from a .class. If a Refactor -> Push In those files, the problem is gone, but it's not a good way to do it. Then I must to Ctrl-Z the changes. I don't want to do that.

    There is a way to fix that? Thanks a lot!

    Regards,

    Sebastian.

  2. #2
    Join Date
    May 2012
    Posts
    1

    Default żnobody?

    The same problem for me, żnobody?

  3. #3
    Join Date
    Mar 2012
    Posts
    3

    Default Solution

    Hi!

    You must to put @ManagedBean into the java file with the Roo console active. Immediately the annotation @ManagedBean will be deleted from the .aj file

    Do the same with every annotation that troubles you.

    Regards!

    Regards!

    Quote Originally Posted by david24365 View Post
    The same problem for me, żnobody?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •