sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.91k stars 564 forks source link

nexus-db-migrator-3.70.0-02.jar has issue with OrientDB #441

Open JackFish opened 1 month ago

JackFish commented 1 month ago

Sonatype Nexus Repository OSS users can file an issue here. https://download.sonatype.com/nexus/nxrm3-migrator/nexus-db-migrator-3.70.0-02.jar

ERROR o.s.batch.core.step.AbstractStep - Encountered an error executing step migrateSamlConfigurationStep in job migrationFromOrientNoExportJSONJob org.springframework.batch.core.step.skip.NonSkippableReadException: Non-skippable exception during read at org.springframework.batch.core.step.item.FaultTolerantChunkProvider.read(FaultTolerantChunkProvider.java:105) at org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:126) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145) at org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:118) at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:71) at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:407) at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:331) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:273) at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:82) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145) at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:258) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:152) at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68) at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68) at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169) at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144) at org.springframework.batch.core.job.flow.FlowStep.doExecute(FlowStep.java:92) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:152) at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68) at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68) at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169) at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144) at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:139) at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:149) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50) at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:128) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:220) at com.sun.proxy.$Proxy64.run(Unknown Source) at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.execute(JobLauncherApplicationRunner.java:199) at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.executeLocalJobs(JobLauncherApplicationRunner.java:173) at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.launchJobFromProperties(JobLauncherApplicationRunner.java:160) at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.run(JobLauncherApplicationRunner.java:155) at com.sonatype.nexus.db.migrator.config.MigratorJobLauncherApplicationRunner.run(MigratorJobLauncherApplicationRunner.java:38) at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:773) at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:763) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) at com.sonatype.nexus.db.migrator.MigratorApplication.main(MigratorApplication.java:117) Caused by: com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #5: Error on parsing query Query: saml WHERE @rid > #-1:-1 LIMIT 10000 ----------^ DB name="config" at com.orientechnologies.orient.core.sql.filter.OSQLTarget.(OSQLTarget.java:74) at com.orientechnologies.orient.core.sql.OSQLEngine.parseTarget(OSQLEngine.java:464) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:278) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:93) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:53) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:34) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3302) at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78) at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74) at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:102) at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.query(ODatabaseDocumentTx.java:756) at com.sonatype.nexus.db.migrator.reader.OrientDocumentReader.doReadPage(OrientDocumentReader.java:121) at org.springframework.batch.item.database.AbstractPagingItemReader.doRead(AbstractPagingItemReader.java:110) at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.read(AbstractItemCountingItemStreamItemReader.java:93) at org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:99) at org.springframework.batch.core.step.item.FaultTolerantChunkProvider.read(FaultTolerantChunkProvider.java:87) ... 55 common frames omitted Caused by: com.orientechnologies.orient.core.exception.OCommandExecutionException: Class 'SAML' was not found in database 'config' DB name="config" at com.orientechnologies.orient.core.sql.filter.OSQLTarget.extractTargets(OSQLTarget.java:273) at com.orientechnologies.orient.core.sql.filter.OSQLTarget.(OSQLTarget.java:64) ... 71 common frames omitted

elJosho commented 1 month ago

Glad to hear it isn't just me. Same thing, trying to migrate 3.70.0-02 from orientDB to H2 and getting this error. Running the migrator with --healthcheck comes back OK. Have also tried opening all DBs in the OrientDB console and running:

REBUILD INDEX * REPAIR DATABASE --fix-graph REPAIR DATABASE --fix-links REPAIR DATABASE --fix-ridbags REPAIR DATABASE --fix-bonsai

exported the DB again and got the same thing. Please let me know if there's any additional info I can provide to help troubleshoot.

lisadurant commented 1 month ago

Hi everyone. We've just released a DB migrator to allow OSS deployments to move to H2. Please take a look at our documentation specifically for migrating to 3.71.0+

You'll need to go to 3.70.1 first and use the 3.70.1 DB Migrator. Downloads for the 3.70.x line and the 3.70.x migrator are now in an OrientDB-specific download page.