-
1. Re: SwitchYard Unit Testing errors
kcbabo Jan 9, 2013 8:30 AM (in response to eleni.papadopoulou)You shouldn't need those dependencies directly in your project's pom.xml as they should be included transitively from the switchyard-component-bean dependency. Can you attach the actual projects you are using for these tests? Both errors seem to be class path resolution issues and/or project configuration problems.
-
2. Re: SwitchYard Unit Testing errors
eleni.papadopoulou Jan 13, 2013 3:24 PM (in response to kcbabo)Hi,
You can find attached the project included the implemented Unit Test cases for which I get the errors I mentioned in my previous post.
The exact error I get during Maven build is : WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
I have also attached the surefire reports of the tests.
Thank you in advance.
-
3. Re: SwitchYard Unit Testing errors
kcbabo Jan 14, 2013 8:55 AM (in response to eleni.papadopoulou)There are a number of things at play here:
- The Weld error you referenced above is harmless and is just an indication that injection of a user transaction is not available for your unit test.
- Without changing anything, the project compiles and one of the tests passes in my environment.
- The web service test is failing because you are using a SOAP 1.2 media type ("application/soap+xml") with a SOAP 1.1 request. Chanigng your unit test to use "text/xml" instead allows the test to pass.
- I noticed there is an Ant build script and a number of dependencies in the pom.xml which should be inherited transitively from our SwitchYard component definitions (Drools and CDI are two examples). Whenever possible, try to stick with our component dependencies in your pom.xml and allow the transitive dependencies to be resolved on their own. This is not causing an issue with your current project, but there is potential for it to cause problems. You can add pom.xml dependencies to any SY project by right-clicking on your project and selecting Configure -> SwitchYard Capabilities ...
hth,
keith