You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Travis Romney <tr...@gmail.com> on 2012/01/11 22:02:41 UTC

Mixin trying to use an enum

I have been trying to upgrade from tapestry 5.2.6 to 5.3.1,
and I am experiencing a very frustrating issue.

I have a mixin which takes an enum as a parameter, and I am getting the
following error:

org.apache.tapestry5.ioc.internal.OperationException: Base class
java.lang.Enum (super class of inpowered.common.tap5.base.RenderPart) is
not in a controlled package and is therefore not valid. You should try
moving the class to package inpowered.common.tap5.base

I did move the enum RenderPart to the package inpowered.common.tap5.base as
recommended by the error message.

But it's complaining about java.lang.Enum being in the wrong package!!!


This is preventing me from upgrading.

Regards,
Travis Romney

Re: Mixin trying to use an enum

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 12 Jan 2012 19:37:09 -0200, Travis Romney <tr...@gmail.com>  
wrote:

> A jira issue has been filed under
> TAPESTRY-2788<https://issues.apache.org/jira/browse/TAPESTRY-2788>

Thanks! I forgot to mention that the TRAC project for Tapestry 5 is TAP-5,  
not TAPESTRY. This is a common mistake. Don't worry about it, we'll move  
it to the correct project. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Re: Mixin trying to use an enum

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 12 Jan 2012 17:16:27 -0200, Travis Romney <tr...@gmail.com>  
wrote:

> OK,
> I changed it to a different directory and it worked.

:)

> But, I must say the error message is a bit confusing.
> It says that the enum is not in a controlled package when it actually is  
> in a controlled package,
> and it recommends that you move the enum to the base package, which as
> you stated is also a controlled package.

Please file a JIRA about it. Tapestry should explicitly check for enums  
and show an appropriate message. ;)

Cheers!

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Re: Mixin trying to use an enum

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 11 Jan 2012 20:50:59 -0200, Travis Romney <tr...@gmail.com>  
wrote:

> I have already done that as I stated.
>
> This is the fully qualified name of the enum.
> inpowered.common.tap5.base.**RenderPart
>
> As you can see it is not in a managed package.

Base (and all its subpackages) *is* a Tapestry-controlled (managed)  
package.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Re: Mixin trying to use an enum

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 11 Jan 2012 19:02:41 -0200, Travis Romney <tr...@gmail.com>  
wrote:

> org.apache.tapestry5.ioc.internal.OperationException: Base class
> java.lang.Enum (super class of inpowered.common.tap5.base.RenderPart) is
> not in a controlled package and is therefore not valid. You should try
> moving the class to package inpowered.common.tap5.base

Never, never, neeeeeever :P put anything that isn't a component, mixin or  
page in a controlled package (components, mixins, pages or base).

Move your enum class to some other package and it will work. Tapestry 5.3  
is doing more checks for stuff that will cause problems than 5.2.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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