tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thabach <b...@evolootion.ch>
Subject Re: Problem Running quartz-app RAR JUnit Test
Date Mon, 02 Nov 2009 20:30:47 GMT

I tried what you suggested, had to actually try with
getClass().getClassLoader().getSystemResource("META-INF/ra.xml") to succeed,
but the ra.xml is on the Classpath. 

The quartz-beans JUnit Test in Eclipse runs fine as soon as I move the
ra.xml from the quartz-ra module to the quartz-beans module, but only as
long as I do not put an ejb-jar.xml into the src/main/resources/META-INF as
well. 

It really seems that it all depends on some ordering constraint, does one
have to manage rar before ejb deployment somehow ?

Cheers Christian. 



David Blevins wrote:
> 
> 
> On Oct 27, 2009, at 12:54 AM, thabach wrote:
> 
>>
>> Heya
>>
>> I am investigating RAR support in OpenEJB and was playing with the
>> quartz-app from some earlier post (
>> http://www.nabble.com/need-help-getting-quartz-ra.rar-file-to-deploy-td18531000.html#a18538001
>> http://www.nabble.com/need-help-getting-quartz-ra.rar-file-to-deploy-td18531000.html#a18538001
>> ).
>>
>> When running a top-level mvn clean install the tests are executed  
>> fine.
>> Running the quartz-beans module test from within Eclipse as a JUnit  
>> test,
>> leads to a problem in matching the message listener interface of the  
>> MDB
>> against the message listener interface of the automatically deployed
>> MdbContainer and yields this:
>>
>> org.apache.openejb.OpenEJBException: Creating application failed:
>> classpath.ear: Error deploying 'TimerJob'.  Exception: class
>> org.apache.openejb.OpenEJBException: Deployment 'TimerJob' has message
>> listener interface org.quartz.Job but this MDB container only supports
>> interface javax.jms.MessageListener: Deployment 'TimerJob' has message
>> listener interface org.quartz.Job but this MDB container only supports
>> interface javax.jms.MessageListener
> 
> It seems there's something about the way the Eclipse project is setup  
> that does not match the Maven setup.  If Eclipse isn't including the  
> META-INF/ra.xml file in the classpath, then OpenEJB will not be able  
> to see and deploy the resource adapter and create the required MDB  
> container.
> 
> Try a little test code like this to verify your Eclipse setup:
> 
>    import junit.framework.TestCase;
> 
>    import java.net.URL;
> 
>    public class ClasspathTest extends TestCase {
> 
>        public void test() throws Exception {
> 
>            URL raXml = this.getClass().getResource("META-INF/ra.xml");
> 
>            assertNotNull("There is no resource adapter in the  
> classpath", raXml);
>        }
>    }
> 
> 
> Hope that helps!
> 
> -David
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-Running-quartz-app-RAR-JUnit-Test-tp26073540p26157816.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message