SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-943
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: Oleg Tsarev
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

Broken integration with OpenJPA

Created: 01/Nov/12 06:34 AM   Updated: 01/Nov/12 06:34 AM
Component/s: Compass::Gps
Affects Version/s: 2.2.0 GA
Fix Version/s: None

Environment: Windows 7, Glassfish 3.1.2, OpenJpa 2.2.0


 Description  « Hide
persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence              http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="TestJpa" transaction-type="JTA">
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
    <jta-data-source>jdbc/TestDataSource</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="openjpa.jdbc.DBDictionary" value="com.sultry.test.UnlimitedSizeDB2Dictionary"/>
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
      <property name="openjpa.jdbc.TransactionIsolation" value="read-committed"/>
      <property name="compass.engine.connection" value="/target/compass-index"/>
      <property name="compass.openjpa.reindexOnStartup" value="true"/>
    </properties>
  </persistence-unit>
</persistence>

There are problems I've gotten during start project:
1. Exception during deploy project:

"server log"

SEVERE: 66 TestJpa INFO [admin-thread-pool-4848(3)] openjpa.Runtime - OpenJPA dynamically loaded a validation provider.

SEVERE: 147 TestJpa INFO [admin-thread-pool-4848(3)] openjpa.Runtime - Starting OpenJPA 2.2.0

SEVERE: 334 TestJpa INFO [admin-thread-pool-4848(3)] openjpa.jdbc.JDBC - Using dictionary class "com.sultry.test.UnlimitedSizeDB2Dictionary".

SEVERE: 1550 TestJpa WARN [admin-thread-pool-4848(3)] openjpa.Runtime - Exception thrown while calling a BrokerFactoryListener. This exception will be ignored.
java.lang.ClassCastException: org.compass.core.config.binding.metadata.AsmMetaDataReader cannot be cast to org.compass.core.config.binding.metadata.MetaDataReader
at org.compass.core.config.binding.metadata.MetaDataReaderFactory.getMetaDataReader(MetaDataReaderFactory.java:35)
at org.compass.core.config.binding.AbstractClassMetaDataMappingBinding.setUpBinding(AbstractClassMetaDataMappingBinding.java:24)
at org.compass.annotations.config.binding.AnnotationsMappingBinding.setUpBinding(AnnotationsMappingBinding.java:94)
at org.compass.core.config.CompassMappingBinding.setUpBinding(CompassMappingBinding.java:57)
at org.compass.core.config.CompassConfiguration.getMappingBinding(CompassConfiguration.java:124)
at org.compass.core.config.CompassConfiguration.tryAddClass(CompassConfiguration.java:613)
at org.compass.gps.device.jpa.embedded.openjpa.CompassProductDerivation.installIntoFactory(CompassProductDerivation.java:228)
at org.compass.gps.device.jpa.embedded.openjpa.CompassProductDerivation.access$000(CompassProductDerivation.java:99)
at org.compass.gps.device.jpa.embedded.openjpa.CompassProductDerivation$1.afterBrokerFactoryCreate(CompassProductDerivation.java:168)
at org.compass.gps.device.jpa.embedded.openjpa.CompassProductDerivation$1.eventFired(CompassProductDerivation.java:173)
at org.apache.openjpa.event.BrokerFactoryEventManager.fireEvent(BrokerFactoryEventManager.java:47)
at org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager.fireEvent(AbstractConcurrentEventManager.java:115)
at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:651)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:203)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.zeroturnaround.jrebel.integration.openjpa.EntityManagerFactoryInvocationHandler.invokeInternal(EntityManagerFactoryInvocationHandler.java:118)
at org.zeroturnaround.jrebel.integration.openjpa.EntityManagerFactoryInvocationHandler.invokeCreateEntityManager(EntityManagerFactoryInvocationHandler.java:101)
at org.zeroturnaround.jrebel.integration.openjpa.EntityManagerFactoryInvocationHandler.invoke(EntityManagerFactoryInvocationHandler.java:81)
at $Proxy275.createEntityManager(Unknown Source)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)

2. There is no index by address "/target/compass-index". (I wait It will be exist, because I declare compass.openjpa.reindexOnStartup property)
3. OpenJPAHelper.getCompass(entityManager) always returns null.

If I try to use version 2.0.2 of Compass I haven't gotten first exception, but the second and third statements still exist.

P.S. I use OSEM definitions over my entities.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.