com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #6: Error on parsing query Query: OUser where name = 'admin' limit 1 -----------^

Sonatype JIRA | Peter Lynch | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    If Nexus is forcefully killed during the startup process, while the OrientDB ( used by NPM in Nexus 2.x ) is being loaded, the database will not be properly closed and will start recovery on next startup. The problem is, it is possible the automated recovery process may not fully recover the database. The recovery fails with {{OQueryParsingException: Error on parsing query at position #6: Error on parsing query Query: OUser where name = 'admin' limit 1}}. This subsequently leaves the NPM plugin features unusable. The only workaround appears to be renaming/deleting the db/npm directory and have Nexus recreate it from scratch. For example: {noformat} jvm 1 | 2015-07-28 22:06:37,951-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies - OrientDB auto-config DISKCACHE=13,617MB (heap=683MB os=16,348MB disk=295,254MB) < forcefully stop / kill -9 nexus process here > {noformat} On restart, Nexus tries to recover the db and it mostly succeeds but ultimately fails: {noformat} jvm 2 | 2015-07-28 22:07:06,446-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies - OrientDB auto-config DISKCACHE=13,617MB (heap=683MB os=16,348MB disk=294,856MB) jvm 2 | 2015-07-28 22:07:08,089-0400 WARN [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.OSingleFileSegment - {db=npm} segment file 'database.ocf' was not closed correctly last time jvm 2 | 2015-07-28 22:07:08,174-0400 WARN [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - {db=npm} Storage npm was not closed properly. Will try to restore from write ahead log. jvm 2 | 2015-07-28 22:07:08,174-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - {db=npm} Looking for last checkpoint... jvm 2 | 2015-07-28 22:07:08,371-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - {db=npm} FULL checkpoint found. jvm 2 | 2015-07-28 22:07:08,372-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - {db=npm} Data restore procedure from full checkpoint is started. Restore is performed from LSN OLogSequenceNumber{segment=0, position=5827} jvm 2 | 2015-07-28 22:07:08,376-0400 WARN [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - {db=npm} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=5839}} will be skipped during data restore. jvm 2 | 2015-07-28 22:07:08,378-0400 WARN [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - {db=npm} Non tx operation was used during data modification we will need index rebuild. jvm 2 | 2015-07-28 22:07:08,400-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - {db=npm} Storage data restore was completed wrapper | Waiting to start... jvm 2 | 2015-07-28 22:07:08,934-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.index.OIndexManagerShared - {db=npm} Wait till indexes restore after crash was finished. jvm 2 | 2015-07-28 22:07:09,237-0400 INFO [OrientDB rebuild indexes] *SYSTEM com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask - {db=npm} 0 indexes were restored successfully, 0 errors jvm 2 | 2015-07-28 22:07:09,238-0400 INFO [jetty-main-1] *SYSTEM com.orientechnologies.orient.core.index.OIndexManagerShared - {db=npm} Indexes restore after crash was finished. jvm 2 | 2015-07-28 22:07:09,297-0400 ERROR [jetty-main-1] *SYSTEM com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStore - Life-cycle operation failed jvm 2 | com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #6: Error on parsing query jvm 2 | Query: OUser where name = 'admin' limit 1 jvm 2 | -----------^ jvm 2 | at com.orientechnologies.orient.core.sql.filter.OSQLTarget.<init>(OSQLTarget.java:76) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.sql.OSQLEngine.parseTarget(OSQLEngine.java:440) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:200) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:78) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:56) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:37) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1181) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:71) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:85) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:493) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:215) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityShared.authenticate(OSecurityShared.java:169) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityProxy.authenticate(OSecurityProxy.java:87) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:260) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStore.doStart(OrientMetadataStore.java:107) ~[nexus-npm-repository-plugin-2.11.4-01/:na] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleSupport$Handler.doStart(LifecycleSupport.java:70) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleHandlerContext$MainMap_Starting.started(LifecycleHandlerContext.java:255) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleHandlerContext.started(LifecycleHandlerContext.java:57) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:129) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStoreLifecycle.on(OrientMetadataStoreLifecycle.java:51) [nexus-npm-repository-plugin-2.11.4-01/:na] .... jvm 2 | Caused by: com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #6: Error on parsing query jvm 2 | Query: OUser where name = 'admin' limit 1 jvm 2 | -----------^ jvm 2 | at com.orientechnologies.orient.core.sql.filter.OSQLTarget.<init>(OSQLTarget.java:76) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.OSQLEngine.parseTarget(OSQLEngine.java:440) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:200) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:78) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:56) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:37) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1181) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:71) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:85) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:493) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:215) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityShared.authenticate(OSecurityShared.java:169) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.metadata.security.OSecurityProxy.authenticate(OSecurityProxy.java:87) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:260) ~[na:na] jvm 2 | at com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStore.doStart(OrientMetadataStore.java:107) ~[na:na] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleSupport$Handler.doStart(LifecycleSupport.java:70) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleHandlerContext$MainMap_Starting.started(LifecycleHandlerContext.java:255) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleHandlerContext.started(LifecycleHandlerContext.java:57) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at org.sonatype.sisu.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:129) ~[goodies-lifecycle-1.9.jar:1.9] jvm 2 | at com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStoreLifecycle.on(OrientMetadataStoreLifecycle.java:51) ~[na:na] jvm 2 | ... 54 common frames omitted jvm 2 | Caused by: com.orientechnologies.orient.core.exception.OCommandExecutionException: Class 'OUSER' was not found in current database jvm 2 | at com.orientechnologies.orient.core.sql.filter.OSQLTarget.extractTargets(OSQLTarget.java:262) ~[na:na] jvm 2 | at com.orientechnologies.orient.core.sql.filter.OSQLTarget.<init>(OSQLTarget.java:67) ~[na:na] jvm 2 | ... 74 common frames omitted {noformat}

    Sonatype JIRA | 2 years ago | Peter Lynch
    com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #6: Error on parsing query Query: OUser where name = 'admin' limit 1 -----------^
  2. 0

    I cannot run distributed server

    GitHub | 1 year ago | jfernandezrico
    com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #6: Error on parsing command at position #0: Error on parsing query Query: OUser WHERE name = "replicator" LIMIT 1 -----------^

    Root Cause Analysis

    1. com.orientechnologies.orient.core.exception.OQueryParsingException

      Error on parsing query at position #6: Error on parsing query Query: OUser where name = 'admin' limit 1 -----------^

      at com.orientechnologies.orient.core.sql.filter.OSQLTarget.<init>()
    2. OrientDB Core
      ODatabaseDocumentTx.open
      1. com.orientechnologies.orient.core.sql.filter.OSQLTarget.<init>(OSQLTarget.java:76)[nexus-npm-repository-plugin-2.11.4-01/:na]
      2. com.orientechnologies.orient.core.sql.OSQLEngine.parseTarget(OSQLEngine.java:440)[nexus-npm-repository-plugin-2.11.4-01/:na]
      3. com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:200)[nexus-npm-repository-plugin-2.11.4-01/:na]
      4. com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:78)[nexus-npm-repository-plugin-2.11.4-01/:na]
      5. com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:56)[nexus-npm-repository-plugin-2.11.4-01/:na]
      6. com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:37)[nexus-npm-repository-plugin-2.11.4-01/:na]
      7. com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1181)[nexus-npm-repository-plugin-2.11.4-01/:na]
      8. com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:71)[nexus-npm-repository-plugin-2.11.4-01/:na]
      9. com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:85)[nexus-npm-repository-plugin-2.11.4-01/:na]
      10. com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)[nexus-npm-repository-plugin-2.11.4-01/:na]
      11. com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:493)[nexus-npm-repository-plugin-2.11.4-01/:na]
      12. com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:215)[nexus-npm-repository-plugin-2.11.4-01/:na]
      13. com.orientechnologies.orient.core.metadata.security.OSecurityShared.authenticate(OSecurityShared.java:169)[nexus-npm-repository-plugin-2.11.4-01/:na]
      14. com.orientechnologies.orient.core.metadata.security.OSecurityProxy.authenticate(OSecurityProxy.java:87)[nexus-npm-repository-plugin-2.11.4-01/:na]
      15. com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:260)[nexus-npm-repository-plugin-2.11.4-01/:na]
      15 frames
    3. com.bolyuba.nexus
      OrientMetadataStore.doStart
      1. com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStore.doStart(OrientMetadataStore.java:107)[nexus-npm-repository-plugin-2.11.4-01/:na]
      1 frame
    4. ${project.groupId}:${project.artifactId}
      LifecycleSupport.start
      1. org.sonatype.sisu.goodies.lifecycle.LifecycleSupport$Handler.doStart(LifecycleSupport.java:70)[goodies-lifecycle-1.9.jar:1.9]
      2. org.sonatype.sisu.goodies.lifecycle.LifecycleHandlerContext$MainMap_Starting.started(LifecycleHandlerContext.java:255)[goodies-lifecycle-1.9.jar:1.9]
      3. org.sonatype.sisu.goodies.lifecycle.LifecycleHandlerContext.started(LifecycleHandlerContext.java:57)[goodies-lifecycle-1.9.jar:1.9]
      4. org.sonatype.sisu.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:129)[goodies-lifecycle-1.9.jar:1.9]
      4 frames
    5. com.bolyuba.nexus
      OrientMetadataStoreLifecycle.on
      1. com.bolyuba.nexus.plugin.npm.service.internal.orient.OrientMetadataStoreLifecycle.on(OrientMetadataStoreLifecycle.java:51)[nexus-npm-repository-plugin-2.11.4-01/:na]
      1 frame