openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From endium <natha...@andrew.cmu.edu>
Subject Re: need help getting quartz-ra.rar file to deploy
Date Tue, 12 Aug 2008 16:28:56 GMT

Thanks for this David! For some reason, I didn't get an email notifying me of
your reply. I am trying to implement this right now. Was the maven
configuration for openejb changed at all? This may be an unrelated problem,
but since today it doesn't seem that maven is correctly identifying all of
the dependencies. I am getting this error:

java.lang.NoClassDefFoundError: org/apache/openejb/loader/OpenEJBInstance
	at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:59)
	at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:51)
	at
org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:40)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.<init>(InitialContext.java:197)
	at com.example.job.QuartzMdbTest.test(QuartzMdbTest.java:25)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

In eclipse, I noticed that the openejb loader package is not being included
with the maven dependencies. I tried updating the maven dependencies for my
other projects, and have started getting the same error.


David Blevins wrote:
> 
> Ok. Finally got something working here.   New zip available at http// 
> issues.apache.org/jira/secure/attachment/12387373/quartz-app.zip
> 
> Inside you'll see:
> 
>    .
>    ./pom.xml
>    ./quartz-beans
>    ./quartz-beans/pom.xml
>    ./quartz-beans/src
>    ./quartz-beans/src/main
>    ./quartz-beans/src/main/java
>    ./quartz-beans/src/main/java/com
>    ./quartz-beans/src/main/java/com/example
>    ./quartz-beans/src/main/java/com/example/job
>    ./quartz-beans/src/main/java/com/example/job/TimerJob.java
>    ./quartz-beans/src/main/resources
>    ./quartz-beans/src/main/resources/log4j.properties
>    ./quartz-beans/src/test
>    ./quartz-beans/src/test/java
>    ./quartz-beans/src/test/java/com
>    ./quartz-beans/src/test/java/com/example
>    ./quartz-beans/src/test/java/com/example/job
>    ./quartz-beans/src/test/java/com/example/job/QuartzMdbTest.java
>    ./quartz-ra
>    ./quartz-ra/pom.xml
>    ./quartz-ra/src
>    ./quartz-ra/src/main
>    ./quartz-ra/src/main/resources
>    ./quartz-ra/src/main/resources/META-INF
>    ./quartz-ra/src/main/resources/META-INF/ra.xml
>    ./quartz-ra.jar
>    ./README.txt
> 
> For some reason, Maven refuses to add .rar files to the test  
> classpath.  A .rar file is just a jar that contains other jars and a  
> META-INF/ra.xml file, so I went ahead and created a maven module that  
> has the ra.xml file and lists the appropriate jars as dependencies.   
> All the jars were available online except the jar containing the JBoss  
> Quartz Resource Adapter classes, so that jar has to be installed into  
> your local maven repo manually (see the README.txt for the command).
> 
> Last but not least, here is the maven test output for the quartz-beans  
> module:
> 
> -------------------------------------------------------
>   T E S T S
> -------------------------------------------------------
> Running com.example.job.QuartzMdbTest
> 14:31:05,103 DEBUG QuartzMdbTest:19 - Set Initial Context
> Apache OpenEJB 3.1-SNAPSHOT    build: 20080801-09:26
> http://openejb.apache.org/
> INFO - openejb.home = /private/tmp/work/quartz-app/quartz-beans
> INFO - openejb.base = /private/tmp/work/quartz-app/quartz-beans
> INFO - Configuring Service(id=Default Security Service,  
> type=SecurityService, provider-id=Default Security Service)
> INFO - Configuring Service(id=Default Transaction Manager,  
> type=TransactionManager, provider-id=Default Transaction Manager)
> INFO - Found EjbModule in classpath: /private/tmp/work/quartz-app/ 
> quartz-beans/target/classes
> INFO - Found ConnectorModule in classpath: /private/tmp/work/quartz- 
> app/quartz-ra/target/quartz-ra-0.0.1-SNAPSHOT.jar
> INFO - Beginning load: /private/tmp/work/quartz-app/quartz-beans/ 
> target/classes
> INFO - Beginning load: /private/tmp/work/quartz-app/quartz-ra/target/ 
> quartz-ra-0.0.1-SNAPSHOT.jar
> INFO - Extracting jar: /private/tmp/work/quartz-app/quartz-ra/target/ 
> quartz-ra-0.0.1-SNAPSHOT.jar
> INFO - Extracted path: /private/tmp/work/quartz-app/quartz-ra/target/ 
> quartz-ra-0.0.1-SNAPSHOT
> INFO - Configuring enterprise application: classpath.ear
> INFO - Configuring Service(id=quartz-ra-0.0.1-SNAPSHOT.jarRA,  
> type=Resource, provider-id=quartz-ra-0.0.1-SNAPSHOT.jarRA)
> INFO - Configuring Service(id=quartz-ra-0.0.1-SNAPSHOT.jar- 
> org.quartz.Job, type=Container, provider-id=Default MDB Container)
> INFO - Configuring Service(id=quartz-ra-0.0.1-SNAPSHOT.jar- 
> org.quartz.StatefulJob, type=Container, provider-id=Default MDB  
> Container)
> INFO - Enterprise application "classpath.ear" loaded.
> INFO - Assembling app: classpath.ear
> INFO - start quartz!!!
> DEBUG - endpointActivation, spec=jobName=job. 
> 0.1217626266122,jobGroup=default,triggerName=trigger. 
> 1.1217626266122,triggerGroup=default,cronTrigger=0/2 * * * * ? 
> volatilityfalsedurabilityfalserecoverablefalse
> DEBUG - adding job: jobName=job. 
> 0.1217626266122,jobGroup=default,triggerName=trigger. 
> 1.1217626266122,triggerGroup=default,cronTrigger=0/2 * * * * ? 
> volatilityfalsedurabilityfalserecoverablefalse
> INFO - Created Ejb(deployment-id=TimerJob, ejb-name=TimerJob,  
> container=quartz-ra-0.0.1-SNAPSHOT.jar-org.quartz.Job)
> INFO - Deployed Application(path=classpath.ear)
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.084  
> sec
> 
> Results :
> 
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> 
> 
> Let us know how things go for you.  If there's anything you'd like  
> changed in how things work, feel free to make requests.
> 
> -David
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/need-help-getting-quartz-ra.rar-file-to-deploy-tp18531000p18947909.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message