Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPA not working inside Equinox but fine in unit tests


Hi Shaun,

Thanks for your swift response and apologies for the vagueness of my original post.

My toy/test app has the same bundle and maven module setup as the larger app; 
  • A domain bundle which contains annotated entity POJOs
  • A DAO bundle that gets the PersistenceProvider (either via plain BundleActivator or Peaberry ActivationModule) that handles passing the EntityManagerFactory to DAOs (kept inside a threadlocal).  It does package imports on the domain bundle, contains the META-INF/persistence.xml and declares a single PU in the JPA-Persistence-Units manifest header.  The DAOs are then exported (using lowlevel BundleContext in the plain BundleActivator or using Peaberry's Guice extensions in the ActivationModule)
  • A simple client bundle which imports a DAO and uses it (as proof of concept)


This is output from Equinox shell's ss comand for the toy app:
id    State       Bundle
0    ACTIVE      org.eclipse.osgi_3.5.1.R35x_v20090827
                Fragments=11
1    ACTIVE      aopalliance_0.0.0
2    ACTIVE      org.ops4j.peaberry_1.1.1.v698
3    ACTIVE      org.ops4j.peaberry.extensions.peaberry.activation_1.2.0.SNAPSHOT
4    ACTIVE      com.google.inject_1.0.0.customloader-20090412
5    ACTIVE      com.mysql.jdbc_5.1.12
6    ACTIVE      javax.persistence_2.0.0.v200910091002
7    ACTIVE      org.eclipse.persistence.core_2.1.0.v20100503-r7134
8    ACTIVE      org.eclipse.persistence.jpa_2.1.0.v20100503-r7134
9    ACTIVE      org.eclipse.persistence.asm_2.1.0.v20100503-r7134
10  ACTIVE      org.eclipse.persistence.antlr_2.1.0.v20100503-r7134
11  RESOLVED    org.eclipse.persistence.jpa.equinox.weaving_2.1.0.v20100503-r7134
                Master=0
12    ACTIVE      net.earcam.domain_1.0.0
13    ACTIVE      osgi.cmpn_4.2.0.200908310645
14    ACTIVE      osgi.core_4.2.0.200908310645
15    ACTIVE      net.earcam.dao_1.0.0
16    ACTIVE      net.earcam.client_1.0.0


The larger app has the same, except I've removed references to weaving and don't deploy the org.eclipse.persistence.jpa.equinox.weaving bundle fragment.


The EntityManagerFactory is created in the unit tests via the old JPA way with Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME)  while within OSGi the PersistenceProvider is looked up from the service registry (or injected via Peaberry) and then on the instance I make the following call:
persistenceProvider.createEntityManagerFactory(GuiceModule.PERSISTENCE_UNIT_NAME, Collections.emptyMap());


Am I correct in thinking the equinox framework extension is the weaving fragment org.eclipse.persistence.jpa.equinox.weaving from equinox's org.eclipse.osgi ?




Persistence XML:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
   
        <persistence-unit name="crm" transaction-type="RESOURCE_LOCAL">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

        <!--  Alphabetical order, please maintain  -->
        <class>com.matterhorn.crm.domain.activitylog.ActivityLogItem</class>
        <class>com.matterhorn.crm.domain.activitylog.ActivityLogMessage</class>
       
        <class>com.matterhorn.crm.domain.client.AccountManager</class>
        <class>com.matterhorn.crm.domain.client.ClientAssets</class>
        <class>com.matterhorn.crm.domain.client.Client</class>
        <class>com.matterhorn.crm.domain.client.ClientGroup</class>
        <class>com.matterhorn.crm.domain.client.ClientInvestmentInformation</class>
        <class>com.matterhorn.crm.domain.client.ClientInvestmentProcess</class>
        <class>com.matterhorn.crm.domain.client.ClientRelationInformation</class>
        <class>com.matterhorn.crm.domain.client.ClientStrategy</class>
        <class>com.matterhorn.crm.domain.client.ClientType</class>
        <class>com.matterhorn.crm.domain.client.investment.Investment</class>
        <class>com.matterhorn.crm.domain.client.investment.InvestmentSummary</class>
        <class>com.matterhorn.crm.domain.client.process.ProcessStage</class>
        <class>com.matterhorn.crm.domain.client.process.ProcessTask</class>
        <class>com.matterhorn.crm.domain.client.process.ProductionLine</class>
        <class>com.matterhorn.crm.domain.client.process.ProductionStage</class>
        <class>com.matterhorn.crm.domain.client.process.RepeatingProcessTask</class>
        <class>com.matterhorn.crm.domain.client.process.StageAction</class>
       
        <class>com.matterhorn.crm.domain.contact.Address</class>
        <class>com.matterhorn.crm.domain.contact.Branch</class>
        <class>com.matterhorn.crm.domain.contact.City</class>
        <class>com.matterhorn.crm.domain.contact.Contact</class>
        <class>com.matterhorn.crm.domain.contact.Country</class>
        <class>com.matterhorn.crm.domain.contact.LegacyEmail</class>
        <class>com.matterhorn.crm.domain.contact.Region</class>
        <class>com.matterhorn.crm.domain.contact.StateCounty</class>
       
       
        <class>com.matterhorn.crm.domain.document.StoredFile</class>
        <class>com.matterhorn.crm.domain.document.UploadedFile</class>
       
        <class>com.matterhorn.crm.domain.email.EmailTemplate</class>
        <class>com.matterhorn.crm.domain.email.SentEmailRecord</class>

        <class>com.matterhorn.crm.domain.email.meeting.OutlookInvitationEmail</class>
        <class>com.matterhorn.crm.domain.email.meeting.ScheduledMeeting</class>
       
        <class>com.matterhorn.crm.domain.graph.Edge</class>
        <class>com.matterhorn.crm.domain.graph.Node</class>
       
        <class>com.matterhorn.crm.domain.interaction.Interaction</class>
        <class>com.matterhorn.crm.domain.interaction.InteractionNote</class>
        <class>com.matterhorn.crm.domain.interaction.InteractionTodoItem</class>
        <class>com.matterhorn.crm.domain.interaction.InteractionType</class>
       
        <class>com.matterhorn.crm.domain.investment.Fund</class>
       
        <class>com.matterhorn.crm.domain.mailinglist.DynamicMailingList</class>
        <class>com.matterhorn.crm.domain.mailinglist.MailingList</class>
        <class>com.matterhorn.crm.domain.mailinglist.StaticMailingList</class>
       
        <class>com.matterhorn.crm.domain.person.PersonalRelationship</class>
        <class>com.matterhorn.crm.domain.person.Person</class>
        <class>com.matterhorn.crm.domain.person.PersonClient</class>
        <class>com.matterhorn.crm.domain.person.PersonInformation</class>
        <class>com.matterhorn.crm.domain.person.PersonMatterhorn</class>
        <class>com.matterhorn.crm.domain.person.Relationship</class>
        <class>com.matterhorn.crm.domain.person.Role</class>
       
        <class>com.matterhorn.crm.domain.query.AdvanceQuery</class>
        <class>com.matterhorn.crm.domain.query.Column</class>
        <class>com.matterhorn.crm.domain.query.EntityColumn</class>
        <class>com.matterhorn.crm.domain.query.PathFieldMapping</class>
        <class>com.matterhorn.crm.domain.query.process.ProcessView</class>
        <class>com.matterhorn.crm.domain.query.process.ProcessViewStep</class>
        <class>com.matterhorn.crm.domain.query.Query</class>
        <class>com.matterhorn.crm.domain.query.QueryWhereClause</class>
        <class>com.matterhorn.crm.domain.query.SimpleQuery</class>
       
        <class>com.matterhorn.crm.domain.tagging.Item</class>
        <class>com.matterhorn.crm.domain.tagging.ItemTag</class>
        <class>com.matterhorn.crm.domain.tagging.Tag</class>
        <class>com.matterhorn.crm.domain.tagging.TaggingSource</class>
        <class>com.matterhorn.crm.domain.tagging.TagGroup</class>
       
        <class>com.matterhorn.crm.domain.todo.StrategyAction</class>
        <class>com.matterhorn.crm.domain.todo.TodoItem</class>
       
        <class>com.matterhorn.crm.domain.valuations.Account</class>
        <class>com.matterhorn.crm.domain.valuations.HighWaterMark</class>
        <class>com.matterhorn.crm.domain.valuations.MoneyFlowAmount</class>
        <class>com.matterhorn.crm.domain.valuations.MoneyFlow</class>
        <class>com.matterhorn.crm.domain.valuations.Shareholder</class>       

       
        <exclude-unlisted-classes>false</exclude-unlisted-classes>
       
        <properties>

            <!-- Derby Connection - - >
            <property name="eclipselink.target-database" value="Derby" />
            <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver" />
            <property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/crm;create=true" />
            <property name="javax.persistence.jdbc.user" value="autobot" />
            <property name="javax.persistence.jdbc.password" value="decepticon" / -->
           
           
            <!-- Hypersonic HSQLDB Connection - - >
            <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform" />
            <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
            <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:file:/tmp/crm;ifexists=true" />
            <property name="javax.persistence.jdbc.user" value="sa" />
            <property name="javax.persistence.jdbc.password" value="" / -->
           
            <!-- MySQL Connection -->
            <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.MySQLPlatform" />
            <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
            <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/crm" />
            <property name="javax.persistence.jdbc.user" value="crm" />
            <property name="javax.persistence.jdbc.password" value="xxxxxx" />
           
           
                        <!-- To drop and replace existing schema this can be used. -->
            <!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables" / -->
                        <!-- Configure database to be created on startup if not already existing. -->
            <!-- property name="eclipselink.ddl-generation" value="create-tables" / -->
           
            <!-- property name="eclipselink.application-location" value="/tmp/"/>
            <property name="eclipselink.create-ddl-jdbc-file-name" value="create.sql"/>
            <property name="eclipselink.drop-ddl-jdbc-file-name" value="drop.sql"/ -->           
           
            <!--
            Using weaving add:
                -javaagent:${M2_REPO}/org/eclipse/persistence/eclipselink/${eclipselink.version}/eclipselink-${eclipselink.version}.jar
            And set M2_REPO in run/debug -&gt; string substitution..
            And setup surefire test plugin in this module&apos;s pom
             -->
           
            <!-- property name="eclipselink.weaving" value="dynamic" />
            <property name="eclipselink.weaving.lazy" value="true" />
            <property name="eclipselink.weaving.fetchgroups" value="false" / -->
           
            <property name="eclipselink.weaving" value="false"/>
           
           
            <property name="eclipselink.orm.throw.exceptions " value="false" />
           
           
            <!-- JDBC Settings -->
            <property name="eclipselink.jdbc.connections.initial" value="1" />
            <property name="eclipselink.jdbc.read-connections.min" value="5" />
            <property name="eclipselink.jdbc.write-connections.min" value="5" />
            <property name="eclipselink.jdbc.batch-writing" value="JDBC" />
                        <!-- Avoids flush being triggered before every query execution. -->
            <property name="eclipselink.persistence-context.flush-mode" value="COMMIT" />
           

            <!-- Logging -->
            <property name="eclipselink.logging.level" value="FINEST" />
            <property name="eclipselink.logging.timestamp" value="true" />
            <property name="eclipselink.logging.session" value="false" />
            <property name="eclipselink.logging.thread" value="false" />                   
        </properties>
       
    </persistence-unit>
</persistence>


console log:


!ENTRY org.eclipse.osgi 4 0 2010-05-04 10:58:22.176
!MESSAGE Error starting bundle: initial@reference:file:../bundles/org.eclipse.persistence.jpa.equinox.weaving_2.1.0.v20100311-r6779.jar/
!STACK 0
org.osgi.framework.BundleException: A fragment bundle cannot be started: org.eclipse.persistence.jpa.equinox.weaving_2.1.0.v20100311-r6779 [13]
    at org.eclipse.osgi.framework.internal.core.BundleFragment.startWorker(BundleFragment.java:228)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startBundle(EclipseStarter.java:1128)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startBundles(EclipseStarter.java:1121)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.loadBasicBundles(EclipseStarter.java:640)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:301)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:150)

!ENTRY org.eclipse.osgi 4 0 2010-05-04 10:58:23.231
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:52)
  while locating javax.persistence.EntityManagerFactory
    for parameter 0 at com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp.<init>(ActivityLogItemDaoImp.java:19)
  while locating com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp
  at com.matterhorn.crm.dao.internal.DaoActivationModule$1.bind(DaoActivationModule.java:34)
  while locating org.ops4j.peaberry.Export<com.matterhorn.crm.dao.activitylog.ActivityLogItemDao>

1 error
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:768)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.activation.internal.InstanceBundleRoot.activate(InstanceBundleRoot.java:45)
    at org.ops4j.peaberry.activation.internal.BundleActivation.activate(BundleActivation.java:178)
    at org.ops4j.peaberry.activation.internal.BundleActivation.update(BundleActivation.java:156)
    at org.ops4j.peaberry.activation.internal.StateBundleActivationTracker.start(StateBundleActivationTracker.java:38)
    at org.ops4j.peaberry.activation.internal.BundleActivation.start(BundleActivation.java:136)
    at org.ops4j.peaberry.activation.internal.BundleTracker.start(BundleTracker.java:103)
    at org.ops4j.peaberry.activation.internal.BundleTracker.bundleChanged(BundleTracker.java:82)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:43)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:64)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:93)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:110)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:813)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.internal.Setting$2.get(Setting.java:79)
    at org.ops4j.peaberry.internal.ServiceSettings.getExport(ServiceSettings.java:180)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:45)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:31)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:805)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    ... 22 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:101)
    ... 39 more
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.CompositeClassLoader@21fb3211
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.getEntityManagerFactory(DaoActivationModule.java:66)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.access$000(DaoActivationModule.java:22)
    at com.matterhorn.crm.dao.internal.DaoActivationModule$1.createEntityManagerFactory(DaoActivationModule.java:39)
    at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:53)
    ... 44 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:993)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:124)
    ... 49 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 52 more
Caused by: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1323)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:350)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processJoinTable(RelationshipAccessor.java:459)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor.process(ManyToManyAccessor.java:133)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:559)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1090)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1373)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:464)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:947)
    ... 51 more

!ENTRY org.ops4j.peaberry.extensions.peaberry.activation 4 0 2010-05-04 10:58:23.236
!MESSAGE
!STACK 0
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:52)
  while locating javax.persistence.EntityManagerFactory
    for parameter 0 at com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp.<init>(ActivityLogItemDaoImp.java:19)
  while locating com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp
  at com.matterhorn.crm.dao.internal.DaoActivationModule$1.bind(DaoActivationModule.java:34)
  while locating org.ops4j.peaberry.Export<com.matterhorn.crm.dao.activitylog.ActivityLogItemDao>

1 error
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:768)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.activation.internal.InstanceBundleRoot.activate(InstanceBundleRoot.java:45)
    at org.ops4j.peaberry.activation.internal.BundleActivation.activate(BundleActivation.java:178)
    at org.ops4j.peaberry.activation.internal.BundleActivation.update(BundleActivation.java:156)
    at org.ops4j.peaberry.activation.internal.StateBundleActivationTracker.start(StateBundleActivationTracker.java:38)
    at org.ops4j.peaberry.activation.internal.BundleActivation.start(BundleActivation.java:136)
    at org.ops4j.peaberry.activation.internal.BundleTracker.start(BundleTracker.java:103)
    at org.ops4j.peaberry.activation.internal.BundleTracker.bundleChanged(BundleTracker.java:82)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:43)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:64)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:93)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:110)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:813)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.internal.Setting$2.get(Setting.java:79)
    at org.ops4j.peaberry.internal.ServiceSettings.getExport(ServiceSettings.java:180)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:45)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:31)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:805)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    ... 22 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:101)
    ... 39 more
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.CompositeClassLoader@21fb3211
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.getEntityManagerFactory(DaoActivationModule.java:66)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.access$000(DaoActivationModule.java:22)
    at com.matterhorn.crm.dao.internal.DaoActivationModule$1.createEntityManagerFactory(DaoActivationModule.java:39)
    at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:53)
    ... 44 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:993)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:124)
    ... 49 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 52 more
Caused by: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1323)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:350)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processJoinTable(RelationshipAccessor.java:459)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor.process(ManyToManyAccessor.java:133)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:559)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1090)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1373)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:464)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:947)
    ... 51 more

!ENTRY net.earcam.client 4 0 2010-05-04 10:58:23.239
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in net.earcam.client.internal.TestActivator.start() of bundle net.earcam.client.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.Exception: java.lang.NullPointerException: A null service reference is not allowed.
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:28)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    ... 10 more
Caused by: java.lang.NullPointerException: A null service reference is not allowed.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:660)
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:23)
    ... 13 more
Root exception:
java.lang.Exception: java.lang.NullPointerException: A null service reference is not allowed.
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:28)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.NullPointerException: A null service reference is not allowed.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:660)
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:23)
    ... 13 more

!ENTRY org.eclipse.osgi 4 0 2010-05-04 10:58:23.239
!MESSAGE Bundle org.eclipse.persistence.jpa.equinox.weaving_2.1.0.v20100311-r6779 [13] is not active.

!ENTRY org.eclipse.osgi 4 0 2010-05-04 10:58:23.240
!MESSAGE Bundle net.earcam.client_1.0.0 [20] is not active.

!ENTRY org.eclipse.osgi 4 0 2010-05-04 11:02:36.130
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:52)
  while locating javax.persistence.EntityManagerFactory
    for parameter 0 at com.matterhorn.crm.dao.internal.contact.CountryDaoImp.<init>(CountryDaoImp.java:19)
  while locating com.matterhorn.crm.dao.internal.contact.CountryDaoImp
  at com.matterhorn.crm.dao.internal.DaoActivationModule$1.bind(DaoActivationModule.java:34)
  while locating org.ops4j.peaberry.Export<com.matterhorn.crm.dao.contact.CountryDao>

1 error
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:768)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.activation.internal.InstanceBundleRoot.activate(InstanceBundleRoot.java:45)
    at org.ops4j.peaberry.activation.internal.BundleActivation.activate(BundleActivation.java:178)
    at org.ops4j.peaberry.activation.internal.BundleActivation.update(BundleActivation.java:156)
    at org.ops4j.peaberry.activation.internal.StateBundleActivationTracker.start(StateBundleActivationTracker.java:38)
    at org.ops4j.peaberry.activation.internal.BundleActivation.start(BundleActivation.java:136)
    at org.ops4j.peaberry.activation.internal.BundleTracker.start(BundleTracker.java:103)
    at org.ops4j.peaberry.activation.internal.BundleTracker.bundleChanged(BundleTracker.java:82)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.resumeBundles(PackageAdminImpl.java:297)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:546)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:239)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:43)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:64)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:93)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:110)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:813)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.internal.Setting$2.get(Setting.java:79)
    at org.ops4j.peaberry.internal.ServiceSettings.getExport(ServiceSettings.java:180)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:45)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:31)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:805)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    ... 20 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:101)
    ... 37 more
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.CompositeClassLoader@21fb3211
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.getEntityManagerFactory(DaoActivationModule.java:66)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.access$000(DaoActivationModule.java:22)
    at com.matterhorn.crm.dao.internal.DaoActivationModule$1.createEntityManagerFactory(DaoActivationModule.java:39)
    at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:53)
    ... 42 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:993)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:124)
    ... 47 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 50 more
Caused by: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1323)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:350)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:313)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:168)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:111)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:559)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1090)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1373)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:464)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:947)
    ... 49 more

!ENTRY org.ops4j.peaberry.extensions.peaberry.activation 4 0 2010-05-04 11:02:36.133
!MESSAGE
!STACK 0
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:52)
  while locating javax.persistence.EntityManagerFactory
    for parameter 0 at com.matterhorn.crm.dao.internal.contact.CountryDaoImp.<init>(CountryDaoImp.java:19)
  while locating com.matterhorn.crm.dao.internal.contact.CountryDaoImp
  at com.matterhorn.crm.dao.internal.DaoActivationModule$1.bind(DaoActivationModule.java:34)
  while locating org.ops4j.peaberry.Export<com.matterhorn.crm.dao.contact.CountryDao>

1 error
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:768)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.activation.internal.InstanceBundleRoot.activate(InstanceBundleRoot.java:45)
    at org.ops4j.peaberry.activation.internal.BundleActivation.activate(BundleActivation.java:178)
    at org.ops4j.peaberry.activation.internal.BundleActivation.update(BundleActivation.java:156)
    at org.ops4j.peaberry.activation.internal.StateBundleActivationTracker.start(StateBundleActivationTracker.java:38)
    at org.ops4j.peaberry.activation.internal.BundleActivation.start(BundleActivation.java:136)
    at org.ops4j.peaberry.activation.internal.BundleTracker.start(BundleTracker.java:103)
    at org.ops4j.peaberry.activation.internal.BundleTracker.bundleChanged(BundleTracker.java:82)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.resumeBundles(PackageAdminImpl.java:297)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:546)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:239)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:43)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:64)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:93)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:110)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:813)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.internal.Setting$2.get(Setting.java:79)
    at org.ops4j.peaberry.internal.ServiceSettings.getExport(ServiceSettings.java:180)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:45)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:31)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:805)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    ... 20 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:101)
    ... 37 more
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.CompositeClassLoader@21fb3211
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.getEntityManagerFactory(DaoActivationModule.java:66)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.access$000(DaoActivationModule.java:22)
    at com.matterhorn.crm.dao.internal.DaoActivationModule$1.createEntityManagerFactory(DaoActivationModule.java:39)
    at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:53)
    ... 42 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:993)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:124)
    ... 47 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 50 more
Caused by: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.todo.TodoItem] as target entity in the relationship attribute [field actions].
    at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1323)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:350)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:313)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:168)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:111)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:559)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1090)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1373)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:464)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:947)
    ... 49 more

!ENTRY net.earcam.client 4 0 2010-05-04 11:02:36.136
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in net.earcam.client.internal.TestActivator.start() of bundle net.earcam.client.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.resumeBundles(PackageAdminImpl.java:302)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:546)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:239)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.Exception: java.lang.NullPointerException: A null service reference is not allowed.
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:28)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    ... 9 more
Caused by: java.lang.NullPointerException: A null service reference is not allowed.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:660)
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:23)
    ... 12 more
Root exception:
java.lang.Exception: java.lang.NullPointerException: A null service reference is not allowed.
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:28)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.resumeBundles(PackageAdminImpl.java:302)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:546)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:239)
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException: A null service reference is not allowed.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:660)
    at net.earcam.client.internal.TestActivator.start(TestActivator.java:23)
    ... 12 more

!ENTRY org.eclipse.osgi 4 0 2010-05-04 11:03:19.182
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:52)
  while locating javax.persistence.EntityManagerFactory
    for parameter 0 at com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp.<init>(ActivityLogItemDaoImp.java:19)
  while locating com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp
  at com.matterhorn.crm.dao.internal.DaoActivationModule$1.bind(DaoActivationModule.java:34)
  while locating org.ops4j.peaberry.Export<com.matterhorn.crm.dao.activitylog.ActivityLogItemDao>

1 error
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:768)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.activation.internal.InstanceBundleRoot.activate(InstanceBundleRoot.java:45)
    at org.ops4j.peaberry.activation.internal.BundleActivation.activate(BundleActivation.java:178)
    at org.ops4j.peaberry.activation.internal.BundleActivation.update(BundleActivation.java:156)
    at org.ops4j.peaberry.activation.internal.StateBundleActivationTracker.start(StateBundleActivationTracker.java:38)
    at org.ops4j.peaberry.activation.internal.BundleActivation.start(BundleActivation.java:136)
    at org.ops4j.peaberry.activation.internal.BundleTracker.start(BundleTracker.java:103)
    at org.ops4j.peaberry.activation.internal.BundleTracker.bundleChanged(BundleTracker.java:82)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
    at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:253)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:43)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:64)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:93)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:110)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:813)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.internal.Setting$2.get(Setting.java:79)
    at org.ops4j.peaberry.internal.ServiceSettings.getExport(ServiceSettings.java:180)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:45)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:31)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:805)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    ... 26 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:101)
    ... 43 more
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.CompositeClassLoader@21fb3211
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.getEntityManagerFactory(DaoActivationModule.java:66)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.access$000(DaoActivationModule.java:22)
    at com.matterhorn.crm.dao.internal.DaoActivationModule$1.createEntityManagerFactory(DaoActivationModule.java:39)
    at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:53)
    ... 48 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:993)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:124)
    ... 53 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 56 more
Caused by: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1323)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:350)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processJoinTable(RelationshipAccessor.java:459)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor.process(ManyToManyAccessor.java:133)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:559)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1090)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1373)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:464)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:947)
    ... 55 more

!ENTRY org.ops4j.peaberry.extensions.peaberry.activation 4 0 2010-05-04 11:03:19.184
!MESSAGE
!STACK 0
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:52)
  while locating javax.persistence.EntityManagerFactory
    for parameter 0 at com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp.<init>(ActivityLogItemDaoImp.java:19)
  while locating com.matterhorn.crm.dao.internal.activitylog.ActivityLogItemDaoImp
  at com.matterhorn.crm.dao.internal.DaoActivationModule$1.bind(DaoActivationModule.java:34)
  while locating org.ops4j.peaberry.Export<com.matterhorn.crm.dao.activitylog.ActivityLogItemDao>

1 error
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:768)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.activation.internal.InstanceBundleRoot.activate(InstanceBundleRoot.java:45)
    at org.ops4j.peaberry.activation.internal.BundleActivation.activate(BundleActivation.java:178)
    at org.ops4j.peaberry.activation.internal.BundleActivation.update(BundleActivation.java:156)
    at org.ops4j.peaberry.activation.internal.StateBundleActivationTracker.start(StateBundleActivationTracker.java:38)
    at org.ops4j.peaberry.activation.internal.BundleActivation.start(BundleActivation.java:136)
    at org.ops4j.peaberry.activation.internal.BundleTracker.start(BundleTracker.java:103)
    at org.ops4j.peaberry.activation.internal.BundleTracker.bundleChanged(BundleTracker.java:82)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
    at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
    at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:253)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:43)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:64)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:93)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:110)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:813)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:790)
    at org.ops4j.peaberry.internal.Setting$2.get(Setting.java:79)
    at org.ops4j.peaberry.internal.ServiceSettings.getExport(ServiceSettings.java:180)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:45)
    at org.ops4j.peaberry.internal.ExportedServiceProvider.get(ExportedServiceProvider.java:31)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:759)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:805)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:755)
    ... 26 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:101)
    ... 43 more
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.CompositeClassLoader@21fb3211
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.getEntityManagerFactory(DaoActivationModule.java:66)
    at com.matterhorn.crm.dao.internal.DaoActivationModule.access$000(DaoActivationModule.java:22)
    at com.matterhorn.crm.dao.internal.DaoActivationModule$1.createEntityManagerFactory(DaoActivationModule.java:39)
    at com.matterhorn.crm.dao.internal.GuiceModule.getEntityManagerFactory(GuiceModule.java:53)
    ... 48 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:993)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:124)
    ... 53 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [crm] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 56 more
Caused by: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.0.v20100311-r6779): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].
    at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1323)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:350)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processJoinTable(RelationshipAccessor.java:459)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor.process(ManyToManyAccessor.java:133)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:559)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1090)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1373)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:464)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:947)
    ... 55 more


If I comment out various parts of the code referring to the uses a non-entity class as target entity in the relationship attribute then it's replaced with a similar exception for a different relation on different entity.

Exception Description: [class com.matterhorn.crm.domain.client.Client] uses a non-entity [class com.matterhorn.crm.domain.valuations.Shareholder] as target entity in the relationship attribute [field shareholders].


Other info: it's running on Ubuntu 9.10 with sun jdk 1.6.0_20 64bit server VM.


I was hoping to put my toy app in a blog post to benefit the wider community but need to complete the production app's migration first.  My CTO is ok with me sending you both projects privately if that's of any use.


thanks,
Caspar




On 5 May 2010 16:13, Shaun Smith <shaun.smith@xxxxxxxxxx> wrote:
Hi Caspar,

    Let me restate your situation to confirm I understand it. You have a small example working in Equinox OSGi with dynamic weaving, the bundle start levels are set as per the wiki example, and you have the Equinox framework extension declared.  A larger example with the same configuration fails with various errors.

Can you answer these questions:
    Are all your entities listed in your persistence.xml? 
    How are the entities and persistence.xml packaged? Are they in the same bundle or spread out?
    In which bundle did you declare the JPA-Persistence-Units property?
    How are you creating an EntityManagerFactory?

And can you post your persistence.xml and the console log?

        Shaun



On 5/5/2010 8:13 AM, Caspar MacRae wrote:

Hi,

When I run unit tests for my JPA (pax Construct) project (using javax.persistence.Persistence.createEntityManagerFactory) the tests pass as expected, however when the same is deployed to Equinox (looking up and using javax.persistence.spi.PersistenceProvider) it fails repeatedly with variations of:

ValidationException: Exception Description: [class x.y.z.Abc] uses a non-entity [class x.y.z.Bcd] as target entity in the relationship attribute [field b].

(Toplink error code # 7250).

In the persistence.xml I declare:

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
and
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<property name="eclipselink.orm.throw.exceptions " value="false" />

I'm using standard JPA annotations with no orm.xml.

I have a very simple test app that works fine (in unit tests and with equinox) with the org.eclipse.persistence.jpa.PersistenceProvider implementation, the only notable difference between my toy test app and the full scale app I'm trying to migrate is the JPA entities, but as the JPA appears to be fine outside of the OSGi environment (ie. I can get a PersistenceUnit) I'm a bit stuck as to the cause..

A big difference (though likely an effect rather than cause) is that the dynamic weaving fails in full scale app - but only when attempting to use the entities not during the actual weaving (logging is set to FINEST).  When attempting to use dynamic weaving (which works perfectly in the toy test app), the console is filled with exceptions of the form:

[EclipseLink-60]   ...  The method [_persistence_set_xxxx_vh] or [_persistence_get_xxxx_vh] is not defined in the object [x.y.z.Abc].

and

[EclipseLink-93]    ... The table [abc] is not present in this descriptor.

Although the table abc is generated in the dB.

and

[EclipseLink-41] ... A non-read-only mapping must be defined for the sequence number field.

Although the table it refers to has a correct primary key BIGINT AUTO INC (defined in generic superclass (with generic type for ID, typically Long throughout the app)

Also I've noted the following:
[EL Finer]: 2010-05-05 12:19:27.805--Could not initialize Validation Factory. Encountered following exception: java.lang.NoClassDefFoundError: javax/validation/Validation


I've played with various settings for properties: eclipselink.weaving, eclipselink.weaving.lazy and eclipselink.weaving.fetchgroups all to no avail. So without weaving (guessing it's proxy based) the unit tests work fine but I can't even acquire a EntityManagerFactory inside OSGi, as i get PersistenceUnitLoadingException -> Predeployment of PersistenceUnit [xxxx] failed.



I've tried using eclipse link versions 2.0.2, 2.1.0-M6 and 2.1.0-M7 using Equinox via a pax-construct maven build (pax runner v 1.4.0), and get virtually the same results with each eclipselink version (although the latest 2.1.0-M7 seems to completely ignore the @Column(name = "please_use_this_lower_case_name") annotations when generating the DDLs).



I'm open to the fact that it may well be my bad config/poor understanding, but as it's possible to get a PersistentUnit outside of Equinox I suspect it's a deeper problem.


Any suggestions would be most gratefully received as I am completely stumped - I'm about to try manually editing the schema but after this it seems I've only two options; debug the eclipselink code or try a wrapped hibernate implementation (i prefer the former however this project is now quite behind).



thanks,
Caspar MacRae
_______________________________________________ eclipselink-users mailing list

--
Oracle
Shaun Smith | Principal Product Manager
Phone: +19055023094
Oracle Server Technologies, Oracle TopLink
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga, Ontario | L5R 3P4

Green Oracle Oracle is committed to developing practices and products that help protect the environment

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top