I was running my JUnit tests via Maven, and ran into the following error:
loader constraints violated when linking org/w3c/dom/Node class
java.lang.LinkageError: loader constraints violated when linking org/w3c/dom/Node class at...
The solution: set maven.junit.fork=true in your project.properties file.
Programmer by day; ninja at night. The ninja part is NOT about programming, but about my martial arts skills (tae kwon do, martial arts tricks like the 540, aerial, etc.). Currently interested in clean code, BDD, and Ruby on Rails.
Thursday, December 22, 2005
XDoclet (EJB) and Spring
My project was using XDoclet to annotate our EJBs. I wanted to use Spring, and still keep the EJB, so I had the bean class extend Spring's AbstractStatelessSessionBean. The problem? The classes that XDoclet generated extended AbstractStatelessSessionRemote, AbstractStatelessSessionLocal, etc., all of which, don't exist.
The solution? Quite simple... by using the @ejb.home and @ejb.interface attributes, you can override the default behavior and specify which interface(s) the home interface and component interface should extend.
Example:
@ejb.home
extends="javax.ejb.EJBHome"
local-extends="javax.ejb.EJBLocalHome"
The solution? Quite simple... by using the @ejb.home and @ejb.interface attributes, you can override the default behavior and specify which interface(s) the home interface and component interface should extend.
Example:
@ejb.home
extends="javax.ejb.EJBHome"
local-extends="javax.ejb.EJBLocalHome"
Subscribe to:
Posts (Atom)