Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline import doesn't work #395

Closed
jindrichmynarz opened this issue May 27, 2015 · 55 comments
Closed

Pipeline import doesn't work #395

jindrichmynarz opened this issue May 27, 2015 · 55 comments

Comments

@jindrichmynarz
Copy link

Importing pipelines doesn't work as expected. Even if there are the exact same versions of DPUs in the UV instance that exported the pipeline and the UV instance that imports it, pipeline import fails with "It is not possible to import pipeline due to missing DPUs. Please install DPUs from table and then run import again."

For example, I have a pipeline that uses uv-t-sparqlUpdate-2.0.4-SNAPSHOT.jar and uv-t-tabular-2.1.1-SNAPSHOT.jar. The exact same DPUs are available in both UV instance I export the pipeline from and the UV instance I import the pipeline to. Nevertheless, importing the pipeline fails.

Tested on the UV version that comes with odn-simple 1.0.1 Debian package.

Related to #356.

@jakubklimek
Copy link

I came across the same issue. Import of pipeline got broken somewhere after 2.0.0. I have installed UV from latest develop (clean install, no DPUs). I imported the DPUs using create template from zip, frontend sucessfully created the DPU Templates, dialogs work (which proves that frontend can access the DPU jars and they work). However, when I then want to import the pipeline itself, all the DPUs in it are listed as missing, even though they are not.

@tomas-knap
Copy link

Note: In 2.0 release (April 2), this issue does not appear, so it was introduced later on.

@jindrichmynarz
Copy link
Author

Can we create a test for the pipeline import to guard against regression bugs like this one?

@skrchnavy
Copy link

we have tested import in 2.0.2 released version and for us it works ( @Jan-Marcek to confirm).

@jakubklimek
Copy link

Have you tested import of pipelines from before 2.0.2 to 2.0.2 as well?

@tomas-knap
Copy link

@jakubklimek Please upload somewhere the problematic exported file from pre-2.0.2 UV version, we will test it.

@jakubklimek
Copy link

@Jan-Marcek
Copy link

I tried it.
Import of pipeline doesn't work when pipeline with same name is in uv.
problem occurs when pipeline_name@uv == pipeline_name@zip

It happens in version odn 1.0.1 and 1.0.2

frontend.log

org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "ppl_model_name_key"
  Detail: Key (name)=(dataset) already exists.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ~[commons-dbcp-1.4.jar:1.4]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ~[commons-dbcp-1.4.jar:1.4]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:890) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1991) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:298) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:377) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:165) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:180) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:489) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:301) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1793) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1775) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1726) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:226) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:193) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:138) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4196) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1531) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:277) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169) ~[commons-app-2.0.1.jar:na]
        at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:132) ~[commons-app-2.0.1.jar:na]
        at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:512) ~[spring-orm-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$afterReturning$org_springframework_transaction_aspectj_AbstractTransactionAspect$3$2a73e96c(AbstractTransactionAspect.aj:78) ~[spring-aspects-3.1.4.RELEASE.
jar:3.1.4.RELEASE]
        at cz.cuni.mff.xrg.odcs.commons.app.facade.PipelineFacadeImpl.save(PipelineFacadeImpl.java:193) ~[commons-app-2.0.1.jar:na]
        at sun.reflect.GeneratedMethodAccessor229.invoke(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
        at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) ~[spring-security-core-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
        at com.sun.proxy.$Proxy87.save(Unknown Source) ~[na:na]
        at cz.cuni.mff.xrg.odcs.commons.app.pipeline.transfer.ImportService.importPipeline(ImportService.java:135) ~[commons-app-2.0.1.jar:na]
        at cz.cuni.mff.xrg.odcs.commons.app.pipeline.transfer.ImportService.importPipeline(ImportService.java:77) ~[commons-app-2.0.1.jar:na]
        at cz.cuni.mff.xrg.odcs.commons.app.pipeline.transfer.ImportService$$FastClassByCGLIB$$9c8f1769.invoke(<generated>) ~[cglib-3.0.jar:na]
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[cglib-3.0.jar:na]
        at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689).....

@tomas-knap
Copy link

Kuba was trying to import to empty database of pipelines, so there cannot be a problem with already existing pipeline

@skrchnavy
Copy link

based on @Jan-Marcek comment, 2.0.2 version of UV is working OK, it is something in develop branch only.

@Jan-Marcek
Copy link

When I change the name of pipeline@uv then I imported the pipeline successfully.

@eea02
Copy link

eea02 commented Jun 8, 2015

Using the provided zip file, when I try to import DPU's, I get following errors in UV:

* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.cssz-xls2csv_1.0.0.SNAPSHOT [13]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* Failed to load DPU because of !unexpected! exception:cz/cuni/mff/xrg/uv/transformer/sparql/construct/SparqlConstruct : Unsupported major.minor version 52.0
* Failed to load DPU because of !unexpected! exception:cz/cuni/mff/xrg/uv/transformer/sparql/update/SparqlUpdate : Unsupported major.minor version 52.0
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-t-tabular_2.2.0.SNAPSHOT [16]" could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.poi.openxml4j.exceptions; version="0.0.0"
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-e-filesFromLocal_1.4.0 [17]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* Failed to load DPU because of !unexpected! exception:cz/cuni/mff/xrg/uv/extractor/sparqlendpoint/SparqlEndpoint : Unsupported major.minor version 52.0
* Failed to load DPU because of !unexpected! exception:cz/cuni/mff/xrg/uv/extractor/sparqlendpoint/SparqlEndpoint : Unsupported major.minor version 52.0
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-l-filesToLocalFS_1.4.1.SNAPSHOT [20]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-l-rdfToSparql_1.4.0 [21]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-t-filesFilter_1.5.0.SNAPSHOT [22]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.2.0,2.0.0)"
* Failed to load DPU because of !unexpected! exception:eu/unifiedviews/plugins/transformer/rdftofiles/RdfToFiles : Unsupported major.minor version 52.0

@Jan-Marcek
Copy link

when I tried @jakubklimek's pipeline: http://opendata.cz/kuba/datacube2009.zip then I got.

* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-l-filesToLocalFS_1.4.1.SNAPSHOT [40]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-l-rdfToSparql_1.4.0 [41]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.cssz-xls2csv_1.0.0.SNAPSHOT [42]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* DPU uv-t-filesFilter-1.5.0-SNAPSHOT.jar already exists but with different version.
* DPU uv-t-rdfToFiles-2.1.0-SNAPSHOT.jar already exists but with different version.
* Failed to load DPU because of exception:org.osgi.framework.BundleException: The bundle "eu.unifiedviews.plugins.uv-e-filesFromLocal_1.4.0 [43]" could not be resolved. Reason: Missing Constraint: Import-Package: eu.unifiedviews.dataunit; version="[1.0.0,2.0.0)"
* DPU uv-t-tabular-2.2.0-SNAPSHOT.jar already exists but with different version.
* Failed to load DPU because of !unexpected! exception:cz/cuni/mff/xrg/uv/extractor/sparqlendpoint/SparqlEndpoint : Unsupported major.minor version 52.0
* Failed to load DPU because of !unexpected! exception:cz/cuni/mff/xrg/uv/extractor/sparqlendpoint/SparqlEndpoint : Unsupported major.minor version 52.0
* DPU uv-t-sparqlConstruct-2.0.3-SNAPSHOT.jar already exists but with different version.
* DPU uv-t-sparqlUpdate-2.0.4-SNAPSHOT.jar already exists but with different version.```

@Jan-Marcek
Copy link

Is it even possible to import those dpu on 2.0.2?

@tomas-knap
Copy link

@eea02 : This seems to be a problem with Java version - the DPUs were compiled under Java 8

@tomas-knap
Copy link

@Jan-Marcek The pipeline which Jakub has problems with is using certain outdated DPUs - so you need to have library for backward compatibility with UV 1.X API - see: https://grips.semantic-web.at/pages/viewpage.action?pageId=59113485

@skrchnavy
Copy link

Isn't this caused by the backward compatibility library? Did you tested import with only 2.X compliant DPUs?

@tomas-knap
Copy link

Probably not, as the issue was also reported by Jindrich, who was using DPUs 2.X. You can also try to reproduce the problem reported by @jindrichmynarz . I also asked @jakubklimek to provide simpler pipeline export which is not working

@skrchnavy
Copy link

@jindrichmynarz do you have a pipeline example that doesn't work?

@jindrichmynarz
Copy link
Author

Meanwhile, I have updated to UV in ODN 1.0.2 and I can no longer reproduce the issue for the pipeline that couldn't be imported previously. Should I close the issue and reopen it in case I encounter a failing import example?

@skrchnavy
Copy link

This issue is probably valid but if it works in UV 2.0.2 (ODN 1.0.2) then we can isolate bug in some change in develop branch.
Thanks @jindrichmynarz for confirmation that it is not in production branch.

@eea03
Copy link

eea03 commented Jun 10, 2015

I have tested it in develop branch and there was one bug introduced recently by merging pull requests, but this should not be connected with problems described in here. It was fixed (c582efb) and then I tested pipeline export / import and it worked as expected;

  • tested export / import on the same UV instance
  • tested export / import between 2 UV instances

I could not reproduce the described problem, everything worked as expected

@jindrichmynarz
Copy link
Author

I tried to import DPU templates from a pipeline, in which I have a template for t-sparqlUpdate. However, the template was not imported. The result log contained * DPU uv-t-sparqlUpdate-2.0.4-SNAPSHOT.jar already exists but with different version., so I suspect the template was not imported because the DPU it instantiates is already available. However, DPU templates should be imported even when the DPUs they instantiate are already available.

Context: I tried this in ODN 1.1.0.

@skrchnavy
Copy link

UnifiedViews supports only one version of DPU so it is avoided now to install another version.
It is also not possible to install template (3rd level DPU derived from 2nd level) if version of DPU differs due to configuration changes that could be there. So based on current implementation, system works correctly.
Implementation of import/export v2 is in progress (#356), you shall check if it will solve your issues with import.

@jindrichmynarz
Copy link
Author

Thanks for clarifying. However, I think the import of DPU templates should work the same as the import of DPU instances. I.e. if there is a newer version of a DPU that is able to handle configuration from previous DPU versions, then the import of DPU instance works. In that case I think the import of DPU templates should work as well.

@skrchnavy
Copy link

@jindrichmynarz
Copy link
Author

My point is that importing DPU template and DPU instance is technically the same: it is an import of the DPU configuration (without the DPU JAR-file). Hence, I think they should be handled the same way.

@tomas-knap
Copy link

Got the point, will think about that and update

@mvi-eea-sk
Copy link

#521 should fix this problem as it includes:

  • allowing to import pipeline with dpu template version lower or equal
  • improved search for appropriate DPU template

Note: not sure it fixes all the problems mentioned in this issue

@skrchnavy
Copy link

@jindrichmynarz / @tomas-knap please comment if all is fixed what is expected or if there is still outstanding issue (lot of issues discussed)

@tomas-knap
Copy link

I will test #521 and finalize. Then @jindrichmynarz can retest his use case.

@jindrichmynarz
Copy link
Author

If I should retest this, then it would be useful to have the test scenarios written down, so that it is clear what to test.

@skrchnavy
Copy link

Isn't test scenario defined in bug report?

@jindrichmynarz
Copy link
Author

As you wrote previously, there are many scenarios discussed here, so it's not clear what to retest.

@tomas-knap
Copy link

I tested the export/import feature on the following scenarios:

  1. the same DPU templates already in the target system
  2. newer/older DPU templates in the target system
  3. missing DPU templates in the target system

It behaved correctly at the end in all these situations. Suggest to close when #521 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants