airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Christie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRAVATA-2350) USER_RESOURCE_PROFILE DB Primary Key should include the gateway_id
Date Wed, 29 Mar 2017 15:03:41 GMT

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

Marcus Christie commented on AIRAVATA-2350:
-------------------------------------------

I wanted to try to see if OpenJPA could synchronize the mappings so I tried setting the following
in AppCatalogJPAUtils.java
{code}
            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(PrimaryKeys=true,ForeignKeys=true,Indexes=true)");
{code}
Here I added the PrimaryKeys=true and Indexes=true. ForeignKeys=true was already there.

However, when the server starts up I get this error:
{noformat}
2017-03-29 10:49:30 [main] ERROR o.a.a.r.a.s.util.AppCatalogInitUtil - Multiple primary key
defined {stmnt 623545006 
ALTER TABLE APPLICATION_DEPLOYMENT ADD PRIMARY KEY (DEPLOYMENT_ID) } [code=1068, state=42000]
org.apache.openjpa.persistence.PersistenceException: Multiple primary key defined {stmnt 623545006

ALTER TABLE APPLICATION_DEPLOYMENT ADD PRIMARY KEY (DEPLOYMENT_ID) } [code=1068, state=42000]
	at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:559)
	at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:455)
	at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:160)
	at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:164)
	at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:122)
	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:209)
	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
	at org.apache.airavata.registry.core.app.catalog.util.AppCatalogJPAUtils.getEntityManager(AppCatalogJPAUtils.java:73)
	at org.apache.airavata.registry.core.app.catalog.resources.GatewayProfileResource.isExists(GatewayProfileResource.java:362)
	at org.apache.airavata.registry.api.service.util.AppCatalogInitUtil.initializeDB(AppCatalogInitUtil.java:82)
	at org.apache.airavata.registry.api.service.RegistryAPIServer.StartRegistryServer(RegistryAPIServer.java:57)
	at org.apache.airavata.registry.api.service.RegistryAPIServer.start(RegistryAPIServer.java:119)
	at org.apache.airavata.server.ServerMain.startAllServers(ServerMain.java:369)
	at org.apache.airavata.server.ServerMain.performServerStart(ServerMain.java:218)
	at org.apache.airavata.server.ServerMain.main(ServerMain.java:203)
{noformat}

So I guess these need to manually manipulated.

> USER_RESOURCE_PROFILE DB Primary Key should include the gateway_id
> ------------------------------------------------------------------
>
>                 Key: AIRAVATA-2350
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2350
>             Project: Airavata
>          Issue Type: Bug
>          Components: Registry API
>    Affects Versions: 0.17
>            Reporter: Marcus Christie
>             Fix For: 0.17
>
>
> If I recall correctly, the problem that this caused was that a user with the same username
in two gateways was not able to create a USER_RESOURCE_PROFILE in the second gateway because
of the PK violation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message