[opencms-dev] error during setup

Georgi Naplatanov gosho at oles.biz
Fri Jun 8 22:31:22 CEST 2012


Hi.

It seems that you are trying to deploy OpenCms 8.x into Java application 
server, but it doesn't support OpenJPA as JPA provider.

Are you using GlassFish ?

You can make the following steps:
- in the file WEB-INF/classes/META-INF/persistence.xml replace the line:

<persistence-unit name="OpenCmsJPAPool">

with

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

so the extended persistence context to be the default for OpenCms' JPA 
layer.

- install OpenJPA 2.x as JPA provider in your JEE environment (this step 
might be optional. For an example JBoss AS 7 requires that step).

HTH

Best regards
Georgi

On 06/08/2012 11:03 PM, Furst, Carl wrote:
> I get the following error when trying to install.
> javax.persistence.PersistenceException: Failed to load provider from
> META-INF/services
>
> Stack trace:
>
> at
> org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:202)
> 27: at
> org.opencms.setup.CmsSetupWorkplaceImportThread.kill(CmsSetupWorkplaceImportThread.java:110)
> 26: at org.opencms.main.CmsShell.exit(CmsShell.java:571)
> 25: java.lang.NullPointerException
> 24: at
> org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:187)
> 23: at org.opencms.main.CmsShell.start(CmsShell.java:663)
> 22: at org.opencms.main.CmsShell.executeCommands(CmsShell.java:835)
> 21: at org.opencms.main.CmsShell.executeCommand(CmsShell.java:760)
> 20: ${user}@${project}>java.lang.NullPointerException
> 19: ${user}@${project}># Turn echo on
> 18: ... 10 more
> 17: at
> javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:110)
> 16: Caused by: java.lang.ClassCastException:
> org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to
> javax.persistence.spi.PersistenceProvider
> 15: at
> org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:148)
> 14: at org.opencms.main.CmsShell.<init>(CmsShell.java:447)
> 13: at org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:1816)
> 12: at org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:1156)
> 11: at
> org.opencms.db.CmsSecurityManager.newInstance(CmsSecurityManager.java:160)
> 10: at org.opencms.db.CmsSecurityManager.init(CmsSecurityManager.java:3161)
> 9: at org.opencms.db.CmsDriverManager.newInstance(CmsDriverManager.java:456)
> 8: at
> org.opencms.db.jpa.CmsDbContextFactory.initialize(CmsDbContextFactory.java:63)
> 7: at org.opencms.db.jpa.CmsSqlManager.init(CmsSqlManager.java:325)
> 6: at
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)
> 5: at
> javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:121)
> 4: javax.persistence.PersistenceException: Failed to load provider from
> META-INF/services
>
> Does anyone know what this might be referring to? The file is indeed
> missing, and I'm not sure if its' generated or perhaps the demo has been
> shut down?
>
> Anyone know?
>
> Thanks,
> Carl Furst
>
>
>
>
>
>
>
> **********************************************************
>
> MLB.com: Where Baseball is Always On
>
>
>
> _______________________________________________
> 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