openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebbay <sebastian.bayerl...@elaxy.com>
Subject ArgumentException: Result type "class test.TenantImpl" does not have any public fields or setter methods for the projection or aggregate result element "EDITOR_SHORTCODE"
Date Mon, 05 Jul 2010 12:29:54 GMT

Hello,

I'm running an application under JBoss 5.1 using OpenEJB 1.2. My
persistence.xml looks like this:

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
        <persistence-unit name="demo">
               
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
                <jta-data-source>demoDS</jta-data-source>
                <exclude-unlisted-classes>false</exclude-unlisted-classes>
                <properties>
                        <property name="openjpa.Log" value="SQL=TRACE" />
                        <property name="openjpa.jdbc.DBDictionary"
value="oracle" />
                        <property name="openjpa.jdbc.UpdateManager"
value="operation-order" />
                        <property name="openjpa.TransactionMode"
value="managed" />
                        <property name="openjpa.ConnectionFactoryMode"
value="managed" />
                        <property name="openjpa.jdbc.TransactionIsolation"
value="read-committed" />
                        <property name="openjpa.MaxFetchDepth" value="1" />
                        <property name="openjpa.NontransactionalRead"
value="true" />
                        <property name="openjpa.NontransactionalWrite"
value="false" />
                        <property name="openjpa.ConnectionRetainMode"
value="transaction" />
                        <property name="openjpa.DataCache"
value="true(CacheSize=1000, SoftReferenceSize=0)" />
                        <property name="openjpa.RemoteCommitProvider"
value="sjvm" />
                        <property name="openjpa.QueryCache" value="false" />
                </properties>
        </persistence-unit>
</persistence>

-------------------------------------------------------------------------------------------
I have the following entity TenantImpl:

@DataCache(enabled=false)
@Entity(name = "Tenant")
@Table(name = "tenant")
public class TenantImpl extends AbstractTenantImpl
{
  public TenantImpl()
  {
    //
  }

  public TenantImpl(final Integer tenant_id, final String editorShortcode,
final String shortcode)
  {

  }  
}

-------------------------------------------------------------------------------------------
AbstractTenantImpl:

@MappedSuperclass
public abstract class AbstractTenantImpl extends
AbstractAuditableDomainEntity implements Tenant, TenantMutator, Auditable,
Serializable
{
  @Id
  @Column(name = "tenant_id", nullable = false)
  protected Integer             tenant_id;

  @Version
  @Column(name = "recordversion", nullable = false)
  protected Long                recordversion;

  @Column(name = "editor_shortcode", nullable = false)
  protected String              lastEditorShortcode;

  ...
}

-------------------------------------------------------------------------------------------
When calling a webservice I'm getting the following error in my JBoss
logfile.

Fault-Message:    demo.system.SystemException: <openjpa-1.2.2-r422266:898935
nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: Result type "class
demo.impl.TenantImpl" does not have any public fields or setter methods for
the projection or aggregate result element "EDITOR_SHORTCODE", nor does it
have a generic put(Object,Object) method that can be used, nor does it have
a public constructor that takes the types null.

-------------------------------------------------------------------------------------------
If I rename my variable 'lastEditorShortcode' in AbstractTenantImpl to
'editor_shortcode', the webservice runs successfully.
But this could not be the solution for my problem, because it is a large
project.

Has somebody an idea, what's the reason for this error?

Best regards,
sebbay 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/ArgumentException-Result-type-class-test-TenantImpl-does-not-have-any-public-fields-or-setter-method-tp5255867p5255867.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message