Bem-vindo, Visitante
Nome do utilizador: Senha: Memorizar

TÓPICO: Problemas com o motor PostgreSQL

Problemas com o motor PostgreSQL 2 meses 2 semanas atrás #12021

Bom dia,
Na 2ª execução do programa depois de instalar e popular a base de dados o colibri crasha.
SO: Win10
Ver Colibri: 12.1.3.1
BD: Postgres
!SESSION 2017-09-06 12:17:57.109 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_144
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_PT
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.osgi 4 0 2017-09-06 12:18:47.499
!MESSAGE Application error
!STACK 1
java.lang.ExceptionInInitializerError
	at org.projectocolibri.api.database.mapper.TableMap$FIELDS.<clinit>(TableMap.java:863)
	at org.projectocolibri.api.database.mapper.TableMap$FETCHPLANS.<clinit>(TableMap.java:126)
	at org.projectocolibri.api.database.mapper.TableMap$TABLES.fetch(TableMap.java:2186)
	at org.projectocolibri.api.database.mapper.TableMap$TABLES.enumCheck(TableMap.java:2165)
	at org.projectocolibri.api.database.mapper.TableMap$TABLES.compileMap(TableMap.java:2171)
	at org.projectocolibri.api.database.mapper.TableMap$TABLES.compile(TableMap.java:2133)
	at org.projectocolibri.api.database.DatabaseManager.authenticate(DatabaseManager.java:63)
	at org.projectocolibri.api.database.ColibriDatabase.authenticate(ColibriDatabase.java:119)
	at org.projectocolibri.api.database.ColibriDatabase.initialize(ColibriDatabase.java:107)
	at org.projectocolibri.api.database.ColibriLogin.process(ColibriLogin.java:69)
	at org.projectocolibri.ui.login.shell.LoginShell$1.widgetSelected(LoginShell.java:189)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.dma.eclipse.swt.custom.CustomShell.openAndSleep(CustomShell.java:53)
	at org.projectocolibri.ui.login.shell.LoginShell.<init>(LoginShell.java:88)
	at org.projectocolibri.ui.login.shell.LoginShell.<init>(LoginShell.java:71)
	at org.projectocolibri.rcp.Application.start(Application.java:41)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: javax.jdo.JDODataStoreException: Exception thrown while querying indices for table=UNIDADESMEDIDA
NestedThrowables:
org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
  Position: 407
	at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:319)
	at org.datanucleus.jdo.JDOPersistenceManager.newObjectIdInstance(JDOPersistenceManager.java:1549)
	at org.datanucleus.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1667)
	at org.projectocolibri.api.database.mapper.TableMap$TABLES.getObject(TableMap.java:2208)
	at org.projectocolibri.api.database.mapper.TableMap$TABLES.loadObject(TableMap.java:2213)
	at org.projectocolibri.api.database.manager.ParametrosManager.load(ParametrosManager.java:123)
	at org.projectocolibri.api.database.DatabaseManager.loadParametros(DatabaseManager.java:182)
	at org.projectocolibri.api.database.DatabaseManager.getParametros(DatabaseManager.java:177)
	at org.projectocolibri.api.database.ColibriDatabase.getParametros(ColibriDatabase.java:215)
	at org.projectocolibri.api.database.mapper.TableMap$DEFAULTS.<clinit>(TableMap.java:86)
	... 32 more
Caused by: org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
  Position: 407
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:283)
	at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getIndexInfo(AbstractJdbc2DatabaseMetaData.java:4234)
	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableIndexInfoForTable(RDBMSSchemaHandler.java:616)
	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableIndexInfoForTable(RDBMSSchemaHandler.java:585)
	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getSchemaData(RDBMSSchemaHandler.java:202)
	at org.datanucleus.store.rdbms.table.TableImpl.getExistingCandidateKeys(TableImpl.java:1099)
	at org.datanucleus.store.rdbms.table.TableImpl.validateCandidateKeys(TableImpl.java:698)
	at org.datanucleus.store.rdbms.table.TableImpl.validateConstraints(TableImpl.java:400)
	at org.datanucleus.store.rdbms.table.ClassTable.validateConstraints(ClassTable.java:3298)
	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:2777)
	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTablesAndValidate(RDBMSStoreManager.java:2507)
	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2152)
	at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:113)
	at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:987)
	at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:953)
	at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:914)
	at org.datanucleus.ObjectManagerImpl.newObjectId(ObjectManagerImpl.java:2849)
	at org.datanucleus.jdo.JDOPersistenceManager.newObjectIdInstance(JDOPersistenceManager.java:1545)
	... 40 more
O adminstrador desactivou a escrita pública.

Problemas com o motor PostgreSQL 2 meses 2 semanas atrás #12023

Mesmo depois de criar uma base de dados nova, continua só a funcionar depois da população da mesma. Ao tentar abrir a base de dados numa sessão depois de a mesma ser populada devolve o erro mencionado anteriormente.
O adminstrador desactivou a escrita pública.

Problemas com o motor PostgreSQL 2 meses 2 semanas atrás #12028

  • marcolopes
  • Avatar de marcolopes
  • DESLIGADO
  • Mensagens: 4912
  • Obrigado recebido 681
kranken escreveu:
Na 2ª execução do programa depois de instalar e popular a base de dados o colibri crasha.
SO: Win10
Ver Colibri: 12.1.3.1
BD: Postgres

Qual é a versão do PostgreSQL que está a usar?
Marco Lopes
Gestor de projecto
Análise e Programação
O adminstrador desactivou a escrita pública.

Problemas com o motor PostgreSQL 2 meses 2 semanas atrás #12039

9.6
O adminstrador desactivou a escrita pública.

Problemas com o motor PostgreSQL 3 semanas 6 dias atrás #12221

  • fidalgo
  • Avatar de fidalgo
  • DESLIGADO
  • Mensagens: 25
  • Obrigado recebido 12
@marcolopes penso que a verão do driver de JDBC tenha que ser atualizada.
stackoverflow.com/a/40284834/1006863

Em Fedora 26 estou a ter o mesmo problema, com a mesma versão da base de dados.
O adminstrador desactivou a escrita pública.

Problemas com o motor PostgreSQL 3 semanas 6 dias atrás #12222

  • fidalgo
  • Avatar de fidalgo
  • DESLIGADO
  • Mensagens: 25
  • Obrigado recebido 12
Com uma base de dados nova, e possivel iniciar o Colibri, no entanto nao permite fazer qualquer tipo de escrita, temos a segunte excepcao:
java.util.concurrent.ExecutionException: org.datanucleus.exceptions.NucleusDataStoreException: Exception thrown when executing query
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.datanucleus.store.query.Query.performExecuteTask(Query.java:1875)
        at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:572)
        at org.datanucleus.store.query.Query.executeQuery(Query.java:1672)
        at org.datanucleus.store.query.Query.executeWithArray(Query.java:1514)
        at org.datanucleus.store.query.Query.execute(Query.java:1487)
        at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221)
        at org.projectocolibri.api.database.manager.EntidadesManager.getNumero(EntidadesManager.java:253)
        at org.projectocolibri.api.database.ColibriDatabase.getEntidadesCollection$Numero(ColibriDatabase.java:1981)
        at org.projectocolibri.api.database.model.Entidades.existsNif(Entidades.java:799)
        at org.projectocolibri.rcp.colibri.workbench.views.entidades.registo.EntidadesRegistoView$1.execute(EntidadesRegistoView.java:162)
        at org.projectocolibri.rcp.colibri.workbench.support.views.actions.ColibriViewAction.run(ColibriViewAction.java:46)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
        at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3562)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3186)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.projectocolibri.rcp.Application.start(Application.java:44)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: org.datanucleus.exceptions.NucleusDataStoreException: Exception thrown when executing query
        at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecuteInternal(JDOQLQuery.java:755)
        at org.datanucleus.store.query.Query$1.run(Query.java:1848)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.postgresql.util.PSQLException: ERROR: invalid escape string
  Hint: Escape string must be empty or one character.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
        at com.jolbox.bonecp.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:197)
        at org.datanucleus.store.rdbms.SQLController.executeStatementQuery(SQLController.java:457)
        at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecuteInternal(JDOQLQuery.java:751)
        ... 4 more

Ja tentei atualizar o driver, mas sem sucesso!
O adminstrador desactivou a escrita pública.
Moderadores: marcolopes