You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (JIRA)" <ji...@apache.org> on 2016/10/21 16:43:58 UTC

[jira] [Comment Edited] (AIRAVATA-2152) UI for to add compute resource/storage allocations

    [ https://issues.apache.org/jira/browse/AIRAVATA-2152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15595600#comment-15595600 ] 

Marcus Christie edited comment on AIRAVATA-2152 at 10/21/16 4:43 PM:
---------------------------------------------------------------------

[~anujbhan],

I'm getting an error when trying to save a UserStoragePreference. Here's the error from the registry log file
{noformat}
Caused by: <openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.InvalidStateException: Attempt to set column "USER_STORAGE_PREFERENCE.USER_ID" to two different values: (null)"null", (class java.lang.String)"marcus-user" This can occur when you fail to set both sides of a two-sided relation between objects, or when you map different fields to the same column, but you do not keep the values of these fields in synch.
        at org.apache.openjpa.jdbc.sql.PrimaryRow.setObject(PrimaryRow.java:344)
        at org.apache.openjpa.jdbc.sql.RowImpl.flushJoinValues(RowImpl.java:294)
        at org.apache.openjpa.jdbc.sql.RowImpl.flushForeignKey(RowImpl.java:222)
        at org.apache.openjpa.jdbc.sql.RowImpl.setForeignKey(RowImpl.java:197)
        at org.apache.openjpa.jdbc.sql.PrimaryRow.setForeignKey(PrimaryRow.java:172)
        at org.apache.openjpa.jdbc.meta.ValueMappingImpl.setForeignKey(ValueMappingImpl.java:329)
        at org.apache.openjpa.jdbc.meta.FieldMapping.setForeignKey(FieldMapping.java:1123)
        at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.insert(RelationFieldStrategy.java:279)
        at org.apache.openjpa.jdbc.meta.FieldMapping.insert(FieldMapping.java:623)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.insert(AbstractUpdateManager.java:230)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.populateRowManager(AbstractUpdateManager.java:162)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:95)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:713)
        at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
        ... 18 more
{noformat}


----

I think the problem is here: https://github.com/machristie/airavata/blob/8469effce22ffe3a54255d3920ee33b9d9035c06/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UserStoragePreferenceResource.java#L316 and also on line 305 above.  The userId isn't getting set.


was (Author: marcuschristie):
[~anujbhan],

I'm getting an error when trying to save a UserStoragePreference. Here's the error from the registry log file
{noformat}
Caused by: <openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.InvalidStateException: Attempt to set column "USER_STORAGE_PREFERENCE.USER_ID" to two different values: (null)"null", (class java.lang.String)"marcus-user" This can occur when you fail to set both sides of a two-sided relation between objects, or when you map different fields to the same column, but you do not keep the values of these fields in synch.
        at org.apache.openjpa.jdbc.sql.PrimaryRow.setObject(PrimaryRow.java:344)
        at org.apache.openjpa.jdbc.sql.RowImpl.flushJoinValues(RowImpl.java:294)
        at org.apache.openjpa.jdbc.sql.RowImpl.flushForeignKey(RowImpl.java:222)
        at org.apache.openjpa.jdbc.sql.RowImpl.setForeignKey(RowImpl.java:197)
        at org.apache.openjpa.jdbc.sql.PrimaryRow.setForeignKey(PrimaryRow.java:172)
        at org.apache.openjpa.jdbc.meta.ValueMappingImpl.setForeignKey(ValueMappingImpl.java:329)
        at org.apache.openjpa.jdbc.meta.FieldMapping.setForeignKey(FieldMapping.java:1123)
        at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.insert(RelationFieldStrategy.java:279)
        at org.apache.openjpa.jdbc.meta.FieldMapping.insert(FieldMapping.java:623)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.insert(AbstractUpdateManager.java:230)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.populateRowManager(AbstractUpdateManager.java:162)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:95)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:713)
        at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
        ... 18 more
{noformat}

> UI for to add compute resource/storage allocations
> --------------------------------------------------
>
>                 Key: AIRAVATA-2152
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2152
>             Project: Airavata
>          Issue Type: Bug
>          Components: PGA PHP Web Gateway
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)