Not able to login to jasperserver wih mysql as repo db after restart.

0

Jasperadmin/Jasperadmin login works when doing a fresh install of jasperserver in docker container with Azure MySQL server as repository database. The same login is not working after restarting the docker container. It says below error,

"Invalid credentials supplied.Could not login to JasperReports Server"

Product Version: 7.8.0 (Build: 20200807_1412)

Azure MySQL Version: 5.7

 

The loin works when dropped the created db jaseperserver from Azure MySQL and start a fresh install with the below queries executed on DB.

    GRANT ALL PRIVILEGES ON jasperserver . * TO 'user@'%';
    GRANT ALL PRIVILEGES ON jasperserver . * TO 'user@server'@'%';
    FLUSH PRIVILEGES;

 

Also seen below error from logs,

2021-07-01T16:00:00,497 ERROR ErrorLogger,JasperServerMaintenanceScheduler_Worker-1:2407 - Job (DEFAULT.accessEventPurgerJob threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.jaspersoft.jasperserver.api.engine.scheduling.quartz.JSJobMethodInvocationFailedException: Invocation of method 'purgeAccessEvents' on target class [class com.sun.proxy.$Proxy77] failed; nested exception is org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1093]; could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: com.jaspersoft.jasperserver.api.engine.scheduling.quartz.JSJobMethodInvocationFailedException: Invocation of method 'purgeAccessEvents' on target class [class com.sun.proxy.$Proxy77] failed; nested exception is org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1093]; could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement
        at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.JSMethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(JSMethodInvokingJobDetailFactoryBean.java:254)
        at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.JSQuartzJobBean.execute(JSQuartzJobBean.java:51)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        ... 1 more
Caused by: org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1093]; could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement
        at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:248)
        at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:364)
        at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:328)
        at org.springframework.orm.hibernate5.HibernateTemplate.bulkUpdate(HibernateTemplate.java:1133)
        at com.jaspersoft.jasperserver.api.logging.access.service.impl.AccessServiceImpl.purgeAccessEvents(AccessServiceImpl.java:186)
        at jdk.internal.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
        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:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy77.purgeAccessEvents(Unknown Source)
        at jdk.internal.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
        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.util.MethodInvoker.invoke(MethodInvoker.java:265)
        at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.JSMethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(JSMethodInvokingJobDetailFactoryBean.java:247)
        ... 3 more
Caused by: org.hibernate.exception.GenericJDBCException: could not execute statement
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:178)
        at org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:100)
        at org.hibernate.hql.internal.ast.exec.BasicExecutor.execute(BasicExecutor.java:59)
        at org.hibernate.hql.internal.ast.exec.DeleteExecutor.execute(DeleteExecutor.java:110)
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:442)
        at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:374)
        at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1512)
        at org.hibernate.query.internal.AbstractProducedQuery.doExecuteUpdate(AbstractProducedQuery.java:1526)
        at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1504)
        at org.springframework.orm.hibernate5.HibernateTemplate$38.doInHibernate(HibernateTemplate.java:1145)
        at org.springframework.orm.hibernate5.HibernateTemplate$38.doInHibernate(HibernateTemplate.java:1133)
        at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:361)
        ... 23 more
Caused by: java.sql.SQLException: (conn=65060) You can't specify target table 'JIAccessEvent' for update in FROM clause
        at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:262)
        at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:164)
        at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:258)
        at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:225)
        at org.mariadb.jdbc.ClientSidePreparedStatement.execute(ClientSidePreparedStatement.java:145)
        at org.mariadb.jdbc.ClientSidePreparedStatement.executeUpdate(ClientSidePreparedStatement.java:176)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
        ... 34 more
Caused by: java.sql.SQLException: You can't specify target table 'JIAccessEvent' for update in FROM clause
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1599)
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1461)
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1424)
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:240)
        at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:216)
        ... 39 more
 

 

ssr452's picture
4
Joined: Nov 24 2017 - 2:44am
Last seen: 3 months 1 week ago

Not sure on first issue, but see this for second issue: https://community.jaspersoft.com/questions/1175336/error-jasperservermai...

jonmcano - 6 months 3 weeks ago

0 Answers:

No answers yet
Feedback