javaee-samples / javaee7-hol

Java EE 7 Hands-on Lab
http://htmlpreview.github.io/?https://github.com/javaee-samples/javaee7-hol/blob/master/docs/javaee7-hol.html
Other
136 stars 92 forks source link

Exception when running job in GlassFish 4.1.1 #25

Open bgoetzmann opened 7 years ago

bgoetzmann commented 7 years ago

Hi,

I followed the HOL with NetBeans 8.2 and GlassFish 4.1.1 (the version bundled with NetBeans 8.2). After deploying the application, when I want to run job (link Sales, and then "Run Job" button), I get this exception : java.util.ServiceConfigurationError: javax.batch.operations.JobOperator: Provider com.ibm.jbatch.container.api.impl.JobOperatorImpl could not be instantiated

with this cause: java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.EmbeddedDriver

Looking at GlassFish Batch Runtime Configuration, I realized that GlasssFish uses __TimerPool as connection pool connection; and we have org.apache.derby.jdbc.EmbeddedXADataSource defined as datasource classname. So, is there a missing jar in GlassFish?

A work around, is to specify another connection pool.