[opencms-dev] OpenJPA issue

Georgi Naplatanov gosho at oles.biz
Sat May 12 09:42:46 CEST 2012


Hi Hemen.

Try to set transaction-type to RESOURCE_LOCAL in 
WEB-INF/classes/META-INF/persistence.xml file.

<persistence-unit name="OpenCmsJPAPool" transaction-type="RESOURCE_LOCAL">

You do not need to setup any data sources for OpenCms, because OpenCms 
configures database connection pool itself.

Best regards
Georgi

On 05/12/2012 12:19 AM, Hemen Thacker wrote:
>
>
> After moving to openJPA 2.0.1 I am getting the error as attached. Please
> advise on how do I fix this issue.
>
> Following were the changes made to get opencms working on jboss.
>
>     * replaced jstl with jar shipped with jboss.
>     * created jboss-web.xml
>     * removed xerces and xml-apis jars from opecms lib
>     * added following to web.xml
>
> <resource-ref>
> <description>Oracle Datasource example</description>
> <res-ref-name>OpencmsDS</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> <res-sharing-scope>Shareable</res-sharing-scope>
> </resource-ref>
>
>     * added following after <persistence-unit name="OpenCmsJPAPool">
>       <jta-data-source>java:/OpencmsDS</jta-data-source>
>     * Created jdbc connection pool.
>
> <local-tx-datasource>
> <jndi-name>OpencmsDS</jndi-name>
> <use-java-context>true</use-java-context>
> <connection-definition>javax.sql.DataSource</connection-definition>
> <min-pool-size>2</min-pool-size>
> <max-pool-size>10</max-pool-size>
> <blocking-timeout-millis>30000</blocking-timeout-millis>
> <idle-timeout-minutes>30</idle-timeout-minutes>
> <prefill>false</prefill>
> <user-name>xxxx</user-name>
> <password>xxxx</password>
> <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
> <driver-class>org.gjt.mm.mysql.Driver</driver-class>
> <connection-url>jdbc:mysql://localhost:3306/opencms</connection-url>
> </local-tx-datasource>
>
> Thanks,
>
> Hemen
>
> * *
> *Hemen Thacker*
> *Aon Hewitt *| 4 Overlook Point, Lincolnshire, IL 60069
> hemen.thacker at aonhewitt.com <mailto:hemen.thacker at aonhewitt.com> | ( +1
> (847) 442-9425 |http://www.aonhewitt.com/
> *From:* Hemen Thacker
> *Sent:* Friday, May 11, 2012 4:05 PM
> *To:* opencms-dev at opencms.org
> *Subject:* OpenJPA issue
>
> I am trying to deploy OpenCMS 8.0.4 on JBoss 5.10 which is java 5
> compatible. OpenJPA2.2.0.jar is built on java 6 making it uncompatible
> with java 1.5 server.
>
> OpenJPA 2.0.x is java 1.5 compatible. Can you fix this issue or I will
> manually replace it.
>
> -Hemen
>
> * *
> *Hemen Thacker*
> *Aon Hewitt *| 4 Overlook Point, Lincolnshire, IL 60069
> hemen.thacker at aonhewitt.com <mailto:hemen.thacker at aonhewitt.com> | ( +1
> (847) 442-9425 |http://www.aonhewitt.com/
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>



More information about the opencms-dev mailing list