openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1642) ClassCastException caused when using property 'openjpa.Sequence'
Date Thu, 29 Apr 2010 15:45:53 GMT


John commented on OPENJPA-1642:

Contents of persistence.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns=""

        We need to enumerate each persistent class first in the persistence.xml
    <persistence-unit name="none" transaction-type="RESOURCE_LOCAL">

        A persistence unit is a set of listed persistent entities as well
        the configuration of an EntityManagerFactory. We configure each
        example in a separate persistence-unit.
    <persistence-unit name="hellojpa" transaction-type="RESOURCE_LOCAL">
            The default provider can be OpenJPA, or some other product.
            This element is optional if OpenJPA is the only JPA provider
            in the current classloading environment, but can be specified
            in cases where there are multiple JPA implementations available.

        <!-- We must enumerate each entity in the persistence unit -->

                We can configure the default OpenJPA properties here. They
                happen to be commented out here since the provided examples
                all specify the values via System properties.

            <property name="openjpa.ConnectionURL" 
            <property name="openjpa.ConnectionDriverName" 
            <property name="openjpa.ConnectionUserName" 
            <property name="openjpa.ConnectionPassword" 
            <property name="openjpa.Sequence" value="org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq"/>

    <!-- persistence unit for the "relations" example -->
    <persistence-unit name="relations" transaction-type="RESOURCE_LOCAL">

    <!-- persistence unit for the "reversemapping" example -->
    <persistence-unit name="reversemapping" transaction-type="RESOURCE_LOCAL">
    <persistence-unit name="embeddables" transaction-type="RESOURCE_LOCAL">

> ClassCastException caused when using property 'openjpa.Sequence'
> ----------------------------------------------------------------
>                 Key: OPENJPA-1642
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.3, 1.2.2, 2.0.0
>            Reporter: Heath Thomann
>            Assignee: Heath Thomann
> When setting the following property:
> <property name="openjpa.Sequence"
> value="org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq()"/>
> the following exception is caused:
> java.lang.ClassCastException:
> org.apache.openjpa.conf.OpenJPAConfigurationImpl cannot be cast to
> org.apache.openjpa.jdbc.conf.JDBCConfiguration
> The same exception is caused when using other sequence generators, for example 'org.apache.openjpa.jdbc.kernel.TableJDBCSeq'.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message