Deploy ObjectDB in WildFly 10

#1

Hi,

I'm currently evaluating ObjectDB and try to deploy my project in WildFly 10.

I've installed ObjectDB in the modules directory and added a persistence.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="TestPU" transaction-type="JTA">
        <provider>com.objectdb.jpa.Provider</provider>
        <jta-data-source>java:/TestDS</jta-data-source>
        <properties>
            <property name="javax.persistence.jdbc.url" value="/tmp/objectdb/testdb.odb"/>
            <property name="javax.persistence.jdbc.user" value="admin"/>
            <property name="javax.persistence.jdbc.password" value="admin"/>
        </properties>
    </persistence-unit>
</persistence>

As soon as I deploy my project, I get an error:

017-10-23 09:23:31,715 INFO  [org.jboss.as.jpa] WFLYJPA0002: Read persistence.xml for TestPU
2017-10-23 09:23:31,722 ERROR [org.jboss.msc.service.fail] MSC000001: Failed to start service jboss.deployment.unit."omd-in-memory-db.jar".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."omd-in-memory-db.jar".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "omd-in-memory-db.jar"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider 'com.objectdb.jpa.Provider' not found
        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:1009)
        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:270)
        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleJarDeployment(PersistenceUnitServiceHandler.java:163)
        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:133)
        at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
        ... 5 more

Has anybody successfully used ObjectDB with WildFly?

 

Thanks,

Heiner

#2

Please include objectdb-jee.jar in your application WEB-INF/lib directory.

If this doesn't help you may want to try this Maven Java EE demo application.

It was tested successfully on WildFly 10.1.0.Final.

You may download it, import to Eclipse (File > Import > Maven > Existing Maven Projects), and then right click the project root and run (Run As > Run on Server) with WildFly if installed on Eclipse.

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login