cancel
Showing results for 
Search instead for 
Did you mean: 

activiti 5.0rc1 JPA Examples

parul_vipparthi
Champ on-the-rise
Champ on-the-rise
Hello

I get an exception when running JPAVariableTest included in the examples

20:48:36,250 INF  | ProcessEngine default created  [org.activiti.engine.impl.ProcessEngineImpl]
20:48:36,250 SEV  |                                                                                              [org.activiti.engine.impl.test.ActivitiInternalTestCase]
20:48:36,468 INF  | Processing resource org/activiti/examples/variables/jpa/JPAVariableTest.testStoreJPAEntityAsVariable.bpmn20.xml  [org.activiti.engine.impl.bpmn.deployer.BpmnDeployer]
20:48:37,078 INF  | XMLSchema currently not supported as typeLanguage  [org.activiti.engine.impl.bpmn.parser.BpmnParse]
20:48:37,078 INF  | XPath currently not supported as typeLanguage  [org.activiti.engine.impl.bpmn.parser.BpmnParse]
32  WARN   [main] openjpa.Runtime - The configuration property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id".
391  INFO   [main] openjpa.Runtime - Starting OpenJPA 1.2.2
20:48:38,781 SEV  |                                                                                              [org.activiti.engine.impl.test.PvmTestCase]
20:48:38,781 SEV  | EXCEPTION: <openjpa-1.2.2-r422266:898935 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property.
<openjpa-1.2.2-r422266:898935 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property.
   at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:74)
   at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:784)
   at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:561]

Do I have to configure jdbc somewhere?
I am new to JPA and i am sure i missed out something.

Thank you
parul
11 REPLIES 11

frederikherema1
Star Contributor
Star Contributor
Parul,

The tables for all the entities in the JPAVariableTest are generated by OpenJPA. It seems like the BigDecimal primary key has a column that isn't big enough to fit the values.
Since MySQL is capable of storing BigDecimals without any problem, I presume it's because it's the primary key. The unique index that is being created for primary-keys has a limited size (I think it's about 700 bytes or something).

Our QA runs there tests on H2, MySQL, Postgres and Oracle on each commit. Guessing it might have something to do with encoding. Which type of DB are you using (InnoDB?).

Not sure if I can think of a quick solution. However, it is not a very big deal if this test doesn't run, since it's no issue in Activiti but more a OpenJPA-issue. The test is there to validate of we can use all kinds of entities with different types of id's in our variables. BigDecimals aren't commonly used as primary key, the test is just there because the JPA-spec allows this type.

parul_vipparthi
Champ on-the-rise
Champ on-the-rise
That is so right.
Thank you for a reply.


parul