1 of 1 people found this helpful
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.
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! =)
.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.
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.
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.