You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openwebbeans.apache.org by taha ghasemi <ta...@yahoo.com> on 2013/11/08 04:51:57 UTC

Bad access to protected data

Hi all,

I've recently upgraded from 1.1.8 to 1.2.0 but got this exception during proxy generation:

java.lang.VerifyError: (class: co/pishfa/security/db/UserRepository$$OwbInterceptProxy0, method: entityManager signature: ()Ljavax/persistence/EntityManager;) Bad access to protected data

The structure of my classes is this:

package co.pishfa.db
class AbstractJpaRepository {
    protected EntityManager entityManager() { return ...}

}

package co/pishfa/security/db
class UserRepository extends AbstractJpaRepository {
}

Do you have any idea?

Thanks

Re: Bad access to protected data

Posted by taha ghasemi <ta...@yahoo.com>.
Hi Arne,

Great to hear that. 

Thanks for your reply.
 



On Friday, November 8, 2013 9:56 PM, Arne Limburg <ar...@openknowledge.de> wrote:
 
Hi Taha,

I guess the issue is related to our generic handling.
There is a bug in the CDI spec currently: https://issues.jboss.org/browse/CDI-389
I guess we wait until we know which way the spec will go and then will fix it that way

Cheers,
Arne

Von: taha ghasemi <ta...@yahoo.com>
Antworten an: "user@openwebbeans.apache.org" <us...@openwebbeans.apache.org>, taha ghasemi <ta...@yahoo.com>
Datum: Freitag, 8. November 2013 19:17
An: "user@openwebbeans.apache.org" <us...@openwebbeans.apache.org>, taha ghasemi <ta...@yahoo.com>
Betreff: Re: Bad access to protected data


Hi again,

I've switched to 1.2.1-SNAPSHOT and it seems there is a bug related to qualifiers. I have the following classes:

public interface Cache<K, V> {
}

@Qualifier
public @interface NamedCache {
    @Nonbinding
    String value() default "";
}

@ApplicationScoped
public class CacheService {
    @Produces
    @NamedCache
    @Dependent
    public <K, V> Cache<K, V> getNamedCache(InjectionPoint injectionPoint) {
        return ...
    }
 }

Now when I want to use it in this way:

@ApplicationScoped
public class OtherService {
    @Inject
    @NamedCache
    private Cache<Principal, Map<String, Permission>> principalPermissions;
}

OWB complains that:

Api type [co.pishfa.accelerate.cache.Cache] is not found with the qualifiers 
Qualifiers: [@co.pishfa.accelerate.cache.NamedCache(value=)]


There is no problem with 1.1.8




On Friday, November 8, 2013 10:15 AM, taha ghasemi <ta...@yahoo.com> wrote:

Hi,

Thanks for your response.

Switching to 1.2.1-SNAPSHOT solved the problem.

Thanks again.





On Friday, November 8, 2013 9:10 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:

Hi
Can you give it a try with the snapshot please?
Le 8 nov. 2013 04:52, "taha ghasemi" <ta...@yahoo.com> a écrit :

Hi all,
>
>
>I've recently upgraded from 1.1.8 to 1.2.0 but got this exception during proxy generation:
>
>
>java.lang.VerifyError: (class: co/pishfa/security/db/UserRepository$$OwbInterceptProxy0, method: entityManager signature: ()Ljavax/persistence/EntityManager;) Bad access to protected data
>
>
>The structure of my classes is this:
>
>
>package co.pishfa.db
>class AbstractJpaRepository {
>    protected EntityManager entityManager() { return ...}
>
>}
>
>
>package co/pishfa/security/db
>class UserRepository extends AbstractJpaRepository {
>}
>
>
>Do you have any idea?
>
>
>Thanks
>

Re: Bad access to protected data

Posted by Arne Limburg <ar...@openknowledge.de>.
Hi Taha,

I guess the issue is related to our generic handling.
There is a bug in the CDI spec currently: https://issues.jboss.org/browse/CDI-389
I guess we wait until we know which way the spec will go and then will fix it that way

Cheers,
Arne

Von: taha ghasemi <ta...@yahoo.com>>
Antworten an: "user@openwebbeans.apache.org<ma...@openwebbeans.apache.org>" <us...@openwebbeans.apache.org>>, taha ghasemi <ta...@yahoo.com>>
Datum: Freitag, 8. November 2013 19:17
An: "user@openwebbeans.apache.org<ma...@openwebbeans.apache.org>" <us...@openwebbeans.apache.org>>, taha ghasemi <ta...@yahoo.com>>
Betreff: Re: Bad access to protected data

Hi again,

I've switched to 1.2.1-SNAPSHOT and it seems there is a bug related to qualifiers. I have the following classes:

public interface Cache<K, V> {
}

@Qualifier
public @interface NamedCache {
    @Nonbinding
    String value() default "";
}

@ApplicationScoped
public class CacheService {
    @Produces
    @NamedCache
    @Dependent
    public <K, V> Cache<K, V> getNamedCache(InjectionPoint injectionPoint) {
        return ...
    }
 }

Now when I want to use it in this way:

@ApplicationScoped
public class OtherService {
    @Inject
    @NamedCache
    private Cache<Principal, Map<String, Permission>> principalPermissions;
}

OWB complains that:

Api type [co.pishfa.accelerate.cache.Cache] is not found with the qualifiers
Qualifiers: [@co.pishfa.accelerate.cache.NamedCache(value=)]

There is no problem with 1.1.8


On Friday, November 8, 2013 10:15 AM, taha ghasemi <ta...@yahoo.com>> wrote:
Hi,

Thanks for your response.

Switching to 1.2.1-SNAPSHOT solved the problem.

Thanks again.



On Friday, November 8, 2013 9:10 AM, Romain Manni-Bucau <rm...@gmail.com>> wrote:
Hi
Can you give it a try with the snapshot please?
Le 8 nov. 2013 04:52, "taha ghasemi" <ta...@yahoo.com>> a écrit :
Hi all,

I've recently upgraded from 1.1.8 to 1.2.0 but got this exception during proxy generation:

java.lang.VerifyError: (class: co/pishfa/security/db/UserRepository$$OwbInterceptProxy0, method: entityManager signature: ()Ljavax/persistence/EntityManager;) Bad access to protected data

The structure of my classes is this:

package co.pishfa.db
class AbstractJpaRepository {
    protected EntityManager entityManager() { return ...}
}

package co/pishfa/security/db
class UserRepository extends AbstractJpaRepository {
}

Do you have any idea?

Thanks





Re: Bad access to protected data

Posted by taha ghasemi <ta...@yahoo.com>.
Hi again,

I've switched to 1.2.1-SNAPSHOT and it seems there is a bug related to qualifiers. I have the following classes:

public interface Cache<K, V> {
}

@Qualifier
public @interface NamedCache {
    @Nonbinding
    String value() default "";
}

@ApplicationScoped
public class CacheService {
    @Produces
    @NamedCache
    @Dependent
    public <K, V> Cache<K, V> getNamedCache(InjectionPoint injectionPoint) {
        return ...
    }
 }

Now when I want to use it in this way:

@ApplicationScoped
public class OtherService {
    @Inject
    @NamedCache
    private Cache<Principal, Map<String, Permission>> principalPermissions;
}

OWB complains that:

Api type [co.pishfa.accelerate.cache.Cache] is not found with the qualifiers 
Qualifiers: [@co.pishfa.accelerate.cache.NamedCache(value=)]


There is no problem with 1.1.8




On Friday, November 8, 2013 10:15 AM, taha ghasemi <ta...@yahoo.com> wrote:
 
Hi,

Thanks for your response.

Switching to 1.2.1-SNAPSHOT solved the problem.

Thanks again.





On Friday, November 8, 2013 9:10 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
 
Hi
Can you give it a try with the snapshot please?
Le 8 nov. 2013 04:52, "taha ghasemi" <ta...@yahoo.com> a écrit :

Hi all,
>
>
>I've recently upgraded from 1.1.8 to 1.2.0 but got this exception during proxy generation:
>
>
>java.lang.VerifyError: (class: co/pishfa/security/db/UserRepository$$OwbInterceptProxy0, method: entityManager signature: ()Ljavax/persistence/EntityManager;) Bad access to protected data
>
>
>The structure of my classes is this:
>
>
>package co.pishfa.db
>class AbstractJpaRepository {
>    protected EntityManager entityManager() { return ...}
>
>}
>
>
>package co/pishfa/security/db
>class UserRepository extends AbstractJpaRepository {
>}
>
>
>Do you have any idea?
>
>
>Thanks
>

Re: Bad access to protected data

Posted by taha ghasemi <ta...@yahoo.com>.
Hi,

Thanks for your response.

Switching to 1.2.1-SNAPSHOT solved the problem.

Thanks again.





On Friday, November 8, 2013 9:10 AM, Romain Manni-Bucau <rm...@gmail.com> wrote:
 
Hi
Can you give it a try with the snapshot please?
Le 8 nov. 2013 04:52, "taha ghasemi" <ta...@yahoo.com> a écrit :

Hi all,
>
>
>I've recently upgraded from 1.1.8 to 1.2.0 but got this exception during proxy generation:
>
>
>java.lang.VerifyError: (class: co/pishfa/security/db/UserRepository$$OwbInterceptProxy0, method: entityManager signature: ()Ljavax/persistence/EntityManager;) Bad access to protected data
>
>
>The structure of my classes is this:
>
>
>package co.pishfa.db
>class AbstractJpaRepository {
>    protected EntityManager entityManager() { return ...}
>
>}
>
>
>package co/pishfa/security/db
>class UserRepository extends AbstractJpaRepository {
>}
>
>
>Do you have any idea?
>
>
>Thanks
>

Re: Bad access to protected data

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Can you give it a try with the snapshot please?
Le 8 nov. 2013 04:52, "taha ghasemi" <ta...@yahoo.com> a écrit :

> Hi all,
>
> I've recently upgraded from 1.1.8 to 1.2.0 but got this exception during
> proxy generation:
>
> java.lang.VerifyError: (class:
> co/pishfa/security/db/UserRepository$$OwbInterceptProxy0, method:
> entityManager signature: ()Ljavax/persistence/EntityManager;) Bad access to
> protected data
>
> The structure of my classes is this:
>
> package co.pishfa.db
> class AbstractJpaRepository {
>     protected EntityManager entityManager() { return ...}
> }
>
> package co/pishfa/security/db
> class UserRepository extends AbstractJpaRepository {
> }
>
> Do you have any idea?
>
> Thanks
>