You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by AndyG <an...@orprovision.com> on 2012/03/07 16:20:09 UTC

@Asynchronous method validation fails for external user type

If an @Asynchronous annotated method has a user parameter type that is
contained in a library [lib]/*.jar then validation fails with a
ClassNotFoundException.

@Asynchronous
public void myMethod(final MyLibraryClass aClass) { ...

1. 'A.jar' is placed in [apps] for deployment on startup - A.jar has a bean
with an @Asynchronous method that requires a class from 'B.jar'.

2. 'B.jar' is placed in [lib]

3. Start OpenEJB - Validation fails

CheckAsynchronous#getMethod tries to load the class in 'B.jar', but the
module classloader has no path to it.

This feels like a bug, any ideas?

Regards,

Andy.

--
View this message in context: http://openejb.979440.n4.nabble.com/Asynchronous-method-validation-fails-for-external-user-type-tp4453522p4453522.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: @Asynchronous method validation fails for external user type

Posted by Romain Manni-Bucau <rm...@gmail.com>.
maybe just an executor issue.

if it runs without the @Async annotation forgot the exclusion idea ;)

good luck

- Romain


2012/3/7 AndyG <an...@orprovision.com>

> If I remove @Asynchronous from the method then the apps 'A.jar' loads just
> fine (which is internally using 'many' classes from lib 'B.jar'), so I am
> not sure if this is exclude/include related.
>
> I will dig deeper on this tomorrow, going to call it a day for now. Just
> wanted to put this out to see if it rings any bells.
>
> Thanks.
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Asynchronous-method-validation-fails-for-external-user-type-tp4453522p4453851.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: @Asynchronous method validation fails for external user type

Posted by AndyG <an...@orprovision.com>.
If I remove @Asynchronous from the method then the apps 'A.jar' loads just
fine (which is internally using 'many' classes from lib 'B.jar'), so I am
not sure if this is exclude/include related.

I will dig deeper on this tomorrow, going to call it a day for now. Just
wanted to put this out to see if it rings any bells.

Thanks.

--
View this message in context: http://openejb.979440.n4.nabble.com/Asynchronous-method-validation-fails-for-external-user-type-tp4453522p4453851.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: @Asynchronous method validation fails for external user type

Posted by Romain Manni-Bucau <rm...@gmail.com>.
could the lib be excluded by openejb?

- Romain


2012/3/7 AndyG <an...@orprovision.com>

> If an @Asynchronous annotated method has a user parameter type that is
> contained in a library [lib]/*.jar then validation fails with a
> ClassNotFoundException.
>
> @Asynchronous
> public void myMethod(final MyLibraryClass aClass) { ...
>
> 1. 'A.jar' is placed in [apps] for deployment on startup - A.jar has a bean
> with an @Asynchronous method that requires a class from 'B.jar'.
>
> 2. 'B.jar' is placed in [lib]
>
> 3. Start OpenEJB - Validation fails
>
> CheckAsynchronous#getMethod tries to load the class in 'B.jar', but the
> module classloader has no path to it.
>
> This feels like a bug, any ideas?
>
> Regards,
>
> Andy.
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Asynchronous-method-validation-fails-for-external-user-type-tp4453522p4453522.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>