NoSuchMethodError: javax.persistence.JoinColumn.foreignKey ()

Ich versuche meine Anwendung auf OpenShift (JBoss Enterprise Application Platform 6) bereitzustellen und erhalte den im Titel genannten NoSuchMethodError. Also habe ich das Ganze gegoogelt und ein paar Artikel oder Threads gefunden, in denen erwähnt wurde, dass diese Methode seit JPA-API 2.1 verfügbar ist. Ich habe herausgefunden, dass eine für Openshift notwendige Abhängigkeit die JPA-API 2.0 enthält. Ich habe versucht, diese Abhängigkeit auszuschließen, aber es funktioniert nicht. Irgendwelche Ideen? Bitte finden Sie die pom.xml unten.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>christmasmarkets</groupId>
<artifactId>christmasmarkets</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>christmasmarkets</name>
<repositories>
    <repository>
        <id>eap</id>
        <url>http://maven.repository.redhat.com/techpreview/all</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>springsource-repo</id>
        <name>SpringSource Repository</name>
        <url>http://repo.springsource.org/release</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>eap</id>
        <url>http://maven.repository.redhat.com/techpreview/all</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <spring.version>4.1.2.RELEASE</spring.version>
    <hibernate.version>4.3.7.Final</hibernate.version>
    <hibernate-annotations.version>3.5.6-Final</hibernate-annotations.version>
    <hibernate-commons-annotations.version>3.2.0.Final</hibernate-commons-annotations.version>
    <jackson.version>2.2.3</jackson.version>
    <postgre.version>9.3-1102-jdbc41</postgre.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.jboss.spec</groupId>
        <artifactId>jboss-javaee-6.0</artifactId>
        <version>3.0.2.Final-redhat-4</version>
        <type>pom</type>
        <scope>provided</scope>
        <exclusions>
            <exclusion>
                <groupId>org.hibernate.javax.persistence</groupId>
                <artifactId>hibernate-jpa-2.0-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>${hibernate.version}</version>
    </dependency>

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>${postgre.version}</version>
    </dependency>

</dependencies>
<profiles>
    <profile>
        <!-- When built in OpenShift the 'openshift' profile will be used when 
            invoking mvn. -->
        <!-- Use this profile for any OpenShift specific customization your app 
            will need. -->
        <!-- By default that is to put the resulting archive into the 'deployments' 
            folder. -->
        <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
        <id>openshift</id>
        <build>
            <finalName>christmasmarkets</finalName>
            <plugins>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1.1</version>
                    <configuration>
                        <outputDirectory>deployments</outputDirectory>
                        <warName>ROOT</warName>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

Antworten auf die Frage(4)

Ihre Antwort auf die Frage