I'm trying to setup a cronjob for the scheduler but getting errors for non existing DB tables.
Via cli_dispatch.phpsh
/usr/local/bin/php_cli /home/www/MyAccount/html/typo3/typo3/cli_dispatch.phpsh scheduler
Oops, an error occurred: An exception occurred while executing 'SELECT `content` FROM `cf_cache_hash` WHERE (`identifier` = ?) AND (`expires` >= ?)' with params ["22b1624a39d90c5db056873686cabf4f", 1498474993]:
Table 'usr_MyAccount_1.cf_cache_hash' doesn't exist
Via Symfony Command
/usr/local/bin/php_cli /home/www/MyAccount/html/typo3/typo3/sysext/core/bin/typo3 scheduler:run
Uncaught TYPO3 Exception An exception occurred while executing 'SELECT `content` FROM `cf_extbase_object` WHERE (`identifier` = ?) AND (`expires` >= ?)' with params ["3bcc835c5d8d7866a0ce2dc41464b9a8", 1498475122]:
Table 'usr_MyAccount_1.cf_extbase_object' doesn't exist
thrown in file /html/typo3/typo3_src-8.7.2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
in line 53
The "Database analyzer" says everything is OK. Am I missing something?
The problem is the APCu Cache. Since APCu doesn't work with CLI you have to disable it for CLI commands. Until now there isn't a good solution for that problem. See: https://forge.typo3.org/issues/78140
Related
I implemented User storage SPI to use keycloak with an existing user DB, but I ran into this problem: when updating roles in my DB, roles in keycloak are not updated and all my attempts to fix this lead to errors, for example i try do disable the cache for User Federation, an error after disabling the cache:
21:37:46,556 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-3) Uncaught server error: java.lang.NullPointerException
at org.keycloak.keycloak-server-spi-private#9.0.2//org.keycloak.models.utils.KeycloakModelUtils.resolveAttribute(KeycloakModelUtils.java:415)
at org.keycloak.keycloak-services#9.0.2//org.keycloak.protocol.oidc.mappers.UserAttributeMapper.setClaim(UserAttributeMapper.java:101)
at org.keycloak.keycloak-services#9.0.2//org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper.setClaim(AbstractOIDCProtocolMapper.java:119)
at org.keycloak.keycloak-services#9.0.2//org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper.transformAccessToken(AbstractOIDCProtocolMapper.java:81)
at org.keycloak.keycloak-services#9.0.2//org.keycloak.protocol.oidc.TokenManager.transformAccessToken(TokenManager.java:556)
at org.keycloak.keycloak-services#9.0.2//org.keycloak.protocol.oidc.TokenManager.createClientAccessToken(TokenManager.java:415)
I found a workaround to solve this problem - override the getAttribute method from the UserModel interface: workaround and then got this error:
21:42:05,659 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-3) Unique index or primary key violation: "PRIMARY_KEY_41 ON PUBLIC.FED_USER_ROLE_MAPPING(ROLE_ID, USER_ID) VALUES ('3cc65575-ba9b-4248-8601-bf4a9413cb17', 'f:cbd0e1b7-c6ed-4bd2-a4eb-b47fd8201ca8:1', 1)"; SQL statement:
insert into FED_USER_ROLE_MAPPING (REALM_ID, STORAGE_PROVIDER_ID, ROLE_ID, USER_ID) values (?, ?, ?, ?) [23505-193]
21:42:05,661 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-3) Uncaught server error: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate#5.3.13.Final//org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
at org.hibernate#5.3.13.Final//org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1515)
if i enable the cache, then on the first request of the token I get the same error as above, and on all subsequent ones I just get the token, but the roles do not match mine from DB. What i can do with it? Thanks.
I've some problem querying a db2/as400 table, let's call it TAB1. Since it was added a trigger on this table when I perform a normal SELECT (using the TAB1-key) I get the following error. Never had a problem before the trigger was created.
It's a query performed in a batch-application (Java 1.6) using Modern Batch and Spring Batch 2.1.8. No chance to update the libraries, since the program is quite old and the customers won't agree.
Anyway,I would say it's a trigger problem ( as the sql codes say) but different applications perform different SELECTs on TAB1 and they never get any similar problem.The batch perform more or less 40000 select like this, and just 300 fail with this error.
Any idea, tip, suggestion?
### Error querying database. Cause: java.sql.SQLException: [SQL0443] *N *N
### The error may exist in class path resource [eu/mycompany/el20/dq/as400/dataaccess/mappers/tab1/Tab1Mapper.xml]
### The error may involve eu.mycompany.el20.dq.as400.dataaccess.persistence.tab.Tab1Mapper.selectByExample-Inline
### The error occurred while setting parameters
### SQL: select * from TAB1 WHERE ( D10_SOC = ? and D10_COD_NDG = ? and D10_DATE = ? )
### Cause: java.sql.SQLException: [SQL0443] *N *N
; uncategorized SQLException for SQL []; SQL state [38501]; error code [-443]; [SQL0443] *N *N; nested exception is java.sql.SQLException: [SQL0443] *N *Nstack trace: org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
com.sun.proxy.$Proxy120.selectList(Unknown Source)
org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:195)
org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:124)
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:90)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40)
com.sun.proxy.$Proxy136.selectByExample(Unknown Source)
eu.mycompany.el20.dq.as400.crud.services.tab.BLSTab1.select(BLSTab1.java:46)
it.mycompany.xframe.dq.batch.steps.programstep.ProgramExecutor.processRecord(ProgramExecutor.java:544)
com.ibm.websphere.batch.devframework.steps.technologyadapters.GenericXDBatchStep.processRecord(GenericXDBatchStep.java:263)
com.ibm.websphere.batch.devframework.steps.technologyadapters.GenericXDBatchStep.processJobStep(GenericXDBatchStep.java:227)
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl._regularJobBatchLoop(StepManagerImpl.java:1065)
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl.executeStep(StepManagerImpl.java:390)
com.ibm.ws.gridcontainer.security.actions.ExecuteStepBatchUserPrivilegedAction.executeAction(ExecuteStepBatchUserPrivilegedAction.java:47)
com.ibm.ws.gridcontainer.security.AbstractUserPrivilegedAction.runWithoutSecurity(AbstractUserPrivilegedAction.java:66)
com.ibm.ws.gridcontainer.services.impl.WASRunUnderCredentialServiceImpl.runUnderUserCredential(WASRunUnderCredentialServiceImpl.java:134)
com.ibm.ws.gridcontainer.services.impl.WASRunUnderCredentialServiceImpl.runActionUnderUserCredential(WASRunUnderCredentialServiceImpl.java:386)
com.ibm.ws.gridcontainer.batch.impl.JobManagerImpl._sequentialStepScheduling(JobManagerImpl.java:783)
com.ibm.ws.gridcontainer.batch.impl.JobManagerImpl.executeJob(JobManagerImpl.java:199)
com.ibm.ws.batch.BatchJobControllerWork._runJob(BatchJobControllerWork.java:435)
com.ibm.ws.batch.BatchJobControllerWork.run(BatchJobControllerWork.java:241)
com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:271)
java.security.AccessController.doPrivileged(AccessController.java:399)
com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:797)
com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)
java.lang.Thread.run(Thread.java:790)
The text for message SQL0443 is 'Trigger program or external routine detected an error'.
I would suggest looking at the host database server job for the JDBC connection.
On the IBM i command line, run the command WRKOBJLCK OBJ(<user>) OBJTYPE(*USRPRF) (where <user> is the user profile you're using to do the JDBC connection) and find jobs named QZDASOINIT. These are the database host server jobs.
In these jobs, look at the joblog (or joblog spool file) to find the SQL0443 message ... around that message you should see what the actual error is.
I am using Postgresql persistence provider with Thingworx. When I am trying to run a service for ConnectivityActivation I am getting the following error
Cause: Execute Update failed: org.postgresql.util.PSQLException: ERROR: syntax error at or near "on"
Position: 145
When I tried this on some other thingworx server then I wasn't getting this error.
I am thinking in the direction that this might be some issue with the permissions but I am not able to find the root cause for this issue.
Please let me know if my understanding is correct or there could be some issue with the postgresql database.
The query run is
insert into transactiondata
("transId","category","api","devId","timestamp","state","country")
values ('123','category','api','123456','','Active','India')
on CONFLICT ("transId")
DO UPDATE SET "state" = 'Disabled', "timestamp" = '' ,"category" = 'NA';
I'm trying to run a process in Bonita BPM 7.3 but get the following error when I click "Start" in the generated Instantiation form:
USERNAME=elh1u | org.bonitasoft.engine.persistence.SRetryableException: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
I tried changing the auto-generated form but it's not working either
Has anyone ever encountered this problem and how can it be solved ? Thank you
Hi lelh
javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
PersistenceException Mean : you are try to overwrite persistanceid in some table
For Resolve : delete your previous data from database (Studio > Preference > Database > Tick Clear > Restart Studio )
ConstraintViolationException Mean : Maybe in some contract or constraint in humantask form level configured and you didn't respect it.
For Resolve : you need to send or respect it
I have followed the instructions from here and installed the updated plugin. The error has become:
Query error
Message: net.sf.jasperreports.engine.JRException:
Error executing SQL statement for : null Level: SEVERE Stack Trace:
Error executing SQL statement for : null com.jaspersoft.hadoop.hive.HiveFieldsProvider.getFields(HiveFieldsProvider.java:113)
com.jaspersoft.ireport.hadoop.hive.designer.HiveFieldsProvider.getFields(HiveFieldsProvider.java:32)
com.jaspersoft.ireport.hadoop.hive.connection.HiveConnection.readFields(HiveConnection.java:154)
com.jaspersoft.ireport.designer.wizards.ConnectionSelectionWizardPanel.validate(ConnectionSelectionWizardPanel.java:146)
org.openide.WizardDescriptor$7.run(WizardDescriptor.java:1357)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
After downgrading to 4.5.0 the error has become (the connection is verified and I am able to query the table from hive):
Query error
Message: net.sf.jasperreports.engine.JRException: Query returned non-zero code: 10, cause:
FAILED: Error in semantic analysis: Line 1:14 Table not found 'panstats' Level:
SEVERE Stack Trace: Query returned non-zero code: 10, cause:
FAILED: Error in semantic analysis: Line 1:14 Table not found 'panstats'
com.jaspersoft.hadoop.hive.HiveFieldsProvider.getFields(HiveFieldsProvider.java:260)
com.jaspersoft.ireport.hadoop.hive.designer.HiveFieldsProvider.getFields(HiveFieldsProvider.java:32)
com.jaspersoft.ireport.hadoop.hive.connection.HiveConnection.readFields(HiveConnection.java:146)
com.jaspersoft.ireport.designer.wizards.ConnectionSelectionWizardPanel.validate(ConnectionSelectionWizardPanel.java:146)
org.openide.WizardDescriptor$7.run(WizardDescriptor.java:1357)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
I am using Hive 0.8.1 on OS X Lion 10.7.4.
Is your query as simple as select * from panstats? I suspect that the query is not the problem, but you'll want to confirm that first.
You could try querying that table from a tool like SQuirreL SQL. If that tool also cannot get the data, then it's probably a Hive issue. If it can... then it's probably an issue with iReport or the Hive plugin.
It sounds like Hive is not configured to share metadata. It uses the annoying default configuration with Derby, so outside connections don't get access to your panstats table. I came across this article about configuring Hive earlier this year. It documents using MySQL instead of derby. If that's indeed the problem, then it's just a Hive configuration issue. Following that article would solve things both for SQuirreL and for iReport.