openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: Problems migrating to 1.0
Date Wed, 22 Aug 2007 16:56:20 GMT
Well, the only thing that I can think of is that there is some sort of
classloader confusion preventing the isAssignableFrom check to pass.
This would also potentially explain why the com.sun class is not being
found.

I think that maybe it makes sense to change the new configuration
option to allow the user to select between a warning and an error.
Thoughts?

-Patrick

On 8/22/07, Prashant Bhat <prashant.mr@gmail.com> wrote:
> Here is the output of javap run on one of the entity.
>
> public class com.sample.accounts.entity.Account extends
> com.sample.company.base.CompanyEntity implements org.apache.op
> enjpa.enhance.PersistenceCapable{
>     static java.lang.Class class$Lcom$sample$company$base$CompanyEntity;
>     static java.lang.Class class$Ljava$lang$String;
>     static java.lang.Class class$Lcom$sample$accounts$entity$AccountType;
>     static java.lang.Class class$Lcom$sample$company$entity$BusinessPartner;
>     static java.lang.Class class$Lcom$sample$accounts$entity$Currency;
>     static java.lang.Class class$Ljava$math$BigDecimal;
>     static java.lang.Class class$Lcom$sample$accounts$entity$Account;
>     static java.lang.Class class$Lcom$sample$accounts$entity$TaxRate;
>     public com.sample.accounts.entity.Account();
>     public com.sample.accounts.entity.Account(long, java.lang.String,
> java.lang.String, com.sample.accounts.entity.Acc
> ountType, java.math.BigDecimal);
>     public long getId();
>     public void setId(long);
>     public java.lang.String getName();
>     public void setName(java.lang.String);
>     public java.lang.String getDescription();
>     public void setDescription(java.lang.String);
>     public java.lang.String getAccountNumber();
>     public void setAccountNumber(java.lang.String);
>     public com.sample.accounts.entity.Currency getCurrency();
>     public void setCurrency(com.sample.accounts.entity.Currency);
>     public com.sample.accounts.entity.TaxRate getRelatedTax();
>     public void setRelatedTax(com.sample.accounts.entity.TaxRate);
>     public com.sample.accounts.entity.Account getParentAccount();
>     public void setParentAccount(com.sample.accounts.entity.Account);
>     public com.sample.accounts.entity.AccountType getAccountType();
>     public void setAccountType(com.sample.accounts.entity.AccountType);
>     public com.samooha.company.entity.BusinessPartner getBusinessPartner();
>     public void setBusinessPartner(com.sample.company.entity.BusinessPartner
> );
>     public boolean isPostable();
>     public void setPostable(boolean);
>     public int getSequenceNumber();
>     public void setSequenceNumber(int);
>     public boolean isSplitAccount();
>     public void setSplitAccount(boolean);
>     public boolean isGroupingAccount();
>     public void setGroupingAccount(boolean);
>     public java.math.BigDecimal getCurrentBalance();
>     public void setCurrentBalance(java.math.BigDecimal);
>     public int pcGetEnhancementContractVersion();
>     static final {};
>     static java.lang.Class class$(java.lang.String);
>     protected void pcClearFields();
>     public org.apache.openjpa.enhance.PersistenceCapable pcNewInstance(
> org.apache.openjpa.enhance.StateManager, java.lan
> g.Object, boolean);
>     public org.apache.openjpa.enhance.PersistenceCapable pcNewInstance(
> org.apache.openjpa.enhance.StateManager, boolean)
> ;
>     protected static int pcGetManagedFieldCount();
>     public void pcReplaceField(int);
>     public void pcReplaceFields(int[]);
>     public void pcProvideField(int);
>     public void pcProvideFields(int[]);
>     protected void pcCopyField(com.sample.accounts.entity.Account, int);
>     public void pcCopyFields(java.lang.Object, int[]);
>     public void pcCopyKeyFieldsToObjectId(
> org.apache.openjpa.enhance.FieldSupplier, java.lang.Object);
>     public void pcCopyKeyFieldsToObjectId(java.lang.Object);
>     public void pcCopyKeyFieldsFromObjectId(
> org.apache.openjpa.enhance.FieldConsumer, java.lang.Object);
>     public void pcCopyKeyFieldsFromObjectId(java.lang.Object);
>     public java.lang.Object pcNewObjectIdInstance(java.lang.Object);
>     public java.lang.Object pcNewObjectIdInstance();
> }
>
>
> As from the above output, it is enhanced properly, but I still get the
> following exception:
>
> <openjpa-0.0.0-r420667:568385 nonfatal user error>
> org.apache.openjpa.persistence.ArgumentException: This configuration
> disallows runtime optimization, but the following listed types were not
> enhanced at build time or at class load time with a javaagent: "[..]".
>     at
> org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(
> ManagedClassSubclasser.java:90)
>
> Thanks,
> Prashant.
>


-- 
Patrick Linskey
202 669 5907

Mime
View raw message