-
1. Re: Do not inject EJB when run the test, do not know if the error is Arquillian's @ Deployment or is in my architecture. Can anyone help me?
kenfinni Oct 17, 2012 9:11 AM (in response to vinnywm)1 of 1 people found this helpfulVinny,
The problem is that the DAO class your Service is trying to inject is in a different package to the Service, and the deployment archive only contains classes from the package that the Service is in, so the DAO class is not present in the deployment.
Ken
-
2. Re: Do not inject EJB when run the test, do not know if the error is Arquillian's @ Deployment or is in my architecture. Can anyone help me?
vinnywm Oct 17, 2012 10:54 AM (in response to kenfinni)Hello Ken, thank you for answer.
Not wanting to bother but in this case I should pass the packet of DAO to test.jar, right? How would I do that? (I've tried some ways here and could not, trying .addPackage(PessoaDAO.class.getPackage()))
Sorry for my english, I'm brazilian.
Thanks again! =)
-
3. Re: Do not inject EJB when run the test, do not know if the error is Arquillian's @ Deployment or is in my architecture. Can anyone help me?
kenfinni Oct 17, 2012 11:01 AM (in response to vinnywm).addPackage() as you mentioned should be enough to add the DAO.
If there are other classes that the Service or DAO depend on for compilation that are not in those packages, then they will also need to be added to the deployment.
-
4. Re: Do not inject EJB when run the test, do not know if the error is Arquillian's @ Deployment or is in my architecture. Can anyone help me?
bmajsak Oct 17, 2012 12:27 PM (in response to vinnywm)Hi,
as last time you have a pull request. I hope commit messages are self explaining. If not just shout here
Working on your failing test demonstrated again how great Arquillian is as a learning platform.
I have also some remarks about the code in general so if you would like a peer review just tell me, I will be more than happy to help.
Cheers,
Bartosz
-
5. Re: Do not inject EJB when run the test, do not know if the error is Arquillian's @ Deployment or is in my architecture. Can anyone help me?
vinnywm Oct 17, 2012 4:46 PM (in response to bmajsak)Bartosz, I don't know how to thank you. You guys who have more experience should be super easy but for me it is complicated because there is few stuff of the subject and I'm now entering the world ejb having to meet deadlines. So I don't have time enough to study more deep.
Really Arquillian is as a learning platform, I've tryied put .addPackages() just don't know how, kkkk. About my code, really Bartosz, the biggest problem was in it. This code was legacy code in a web application and was not in the ejb pattern and how I am new to the ejb world I made plenty mistakes.
Thank you for your help, very helpful. Thanks a lot.