Home » Support » Forum » Problem using Maven Repository - Enitiy Class will be ignored

Problem using Maven Repository - Enitiy Class will be ignored

#1

I found this suspect if i use the maven to download objectdb.

<dependency>
            <groupId>com.objectdb</groupId>
            <artifactId>objectdb</artifactId>
            <version>2.6.2</version>
</dependency>

I got follow Java Warning that tells me that Entity Class will be ignored.

../WEB-INF/lib/objectdb-2.6.2.jar' contains offending class: javax.persistence.Entity. It will be ignored.

 

If i download the jar File from this site and add the Dependency as an SystemPath all works are fine.

Whats the problem?

<dependency>
            <groupId>objectdb</groupId>
            <artifactId>com.objectdb</artifactId>
            <version>2.6.2</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/mahi/objectdb/objectdb.jar</systemPath>
</dependency>
#2

Note that the ObjectDB Maven repository currently includes only the full ObjectDB jar with JPA classes and interfaces, and since these classes (including javax.persistence.Entity that is mentioned in the warning in your post) may be already included in your Java EE environment, there may be a conflict.

You may prefer using objectdb-jee.jar, which does not include JPA classes but has to be used manually, as described in your post.

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

I read nothing about this issue in the manual. 

It should be one more repositorys available for "jee".

#4

Thank you for this report. Starting version 2.6.3 (and build build 2.6.2_02) the ObjectDB Maven repository will include only ObjectDB without JPA and JTA, which will help using ObjectDB in Java EE application servers with no errors or warnings.

The Maven examples have been updated and tested successfully with TomEE 1.7.2 and ObjectDB 2.6.3.

To use ObjectDB outside a Java EE application server (starting build 2.6.2_02 / 2.6.3), dependency on JPA and JTA should be explicitly specified in the pom.xml file:

    <dependency>
        <groupId>com.objectdb</groupId>
        <artifactId>objectdb</artifactId>
        <version>2.6.3</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>javax.persistence</artifactId>
        <version>2.1.0</version>
    </dependency>
    <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>jta</artifactId>
        <version>1.1</version>
    </dependency>
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#5

Thank you very much for this support. Thats great and works fine.


Post Reply

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