Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenJPA says: You have supplied colums for FooBar but this mapping cannot have columns in this context
    primarykey
    data
    text
    <p>I have some Java entity classes that are working well in my production code. I am writing an automated test for this application where I am reusing the very same classes.</p> <p>When the test application is creating its entity manager this way:</p> <pre><code> Properties props = new Properties(); props.setProperty("provider", "org.apache.openjpa.persistence.PersistenceProviderImpl"); props.setProperty(...); EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("foobar-upgrade-restful-test", props); EntityManager entityManager = entityManagerFactory.createEntityManager(); </code></pre> <p>The applications throws an error message telling that:</p> <pre><code>Caused by: &lt;openjpa-2.2.0-r422266:1244990 fatal user error&gt; org.apache.openjpa.persistence.ArgumentException: You have supplied columns for "com.foo.bar.server.commontypes.job.CompositeJob", but this mapping cannot have columns in this context. at org.apache.openjpa.jdbc.meta.MappingInfo.assertNoSchemaComponents(MappingInfo.java:382) at org.apache.openjpa.jdbc.meta.strats.FlatClassStrategy.map(FlatClassStrategy.java:51) at org.apache.openjpa.jdbc.meta.ClassMapping.setStrategy(ClassMapping.java:392) at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:56) at org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(MappingRepository.java:411) at org.apache.openjpa.meta.MetaDataRepository.preMapping(MetaDataRepository.java:762) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:651) ... 72 more </code></pre> <p>I do not really understand the error message as the same entity bean is working in the application under Glassfish and the persistence.xml is also almost identical. (In the test I use <code>RESOURCE_LOCAL</code> tx instead of JTA but I doubt that it has relation with this error.</p> <p>Do you have any idea what's wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload