Freshly installed server throws error when inviting comma-separated email list Edited

Mail server was configured and tested. 

 

Technical details

Log's referral number: c40ccafe-601d-4064-8752-c42e123c4288

Cause

Referer URL: https://jira.XXXX.com/secure/admin/user/InviteUser!default.jspa

java.lang.reflect.UndeclaredThrowableException
java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy4447.addInvitation(Unknown Source) [?:?]
	at com.atlassian.jira.plugin.inviteuser.InvitationManagerImpl.sendInvitation(InvitationManagerImpl.java:55) [?:?]
	at com.atlassian.jira.plugin.inviteuser.InvitationServiceImpl.sendInvitation(InvitationServiceImpl.java:76) [?:?]
	at com.atlassian.jira.plugin.inviteuser.InviteUser.doExecute(InviteUser.java:147) [?:?]
	at webwork.action.ActionSupport.execute(ActionSupport.java:165) [webwork-1.4-atlassian-30.jar:?]
	at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) [jira-api-7.4.4.jar:?]
	at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) [webwork-1.4-atlassian-30.jar:?]
	at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) [webwork-1.4-atlassian-30.jar:?]
	at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) [webwork-1.4-atlassian-30.jar:?]
	at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) [webwork-1.4-atlassian-30.jar:?]
	at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) [webwork-1.4-atlassian-30.jar:?]
	at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154) [webwork-1.4-atlassian-30.jar:?]
	at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:138) [classes/:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [catalina.jar:8.5.6]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:8.5.6]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.6]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [catalina.jar:8.5.6]
[.....]
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_102]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [?:1.8.0_102]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_102]
	at java.lang.reflect.Method.invoke(Method.java:498) [?:1.8.0_102]
	at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:60) [?:?]
	at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:33) [?:?]
	... 252 more
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
    Database:
    	- name:MySQL
    	- version:5.7.19-0ubuntu0.16.04.1
    	- minor version:7
    	- major version:5
    Driver:
    	- name:MySQL Connector Java
    	- version:mysql-connector-java-5.1.44 ( Revision: b3cda4f864902ffdde495b9df93937c3e20009be )
    
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:94) [?:?]
	at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.create(TenantAwareActiveObjects.java:266) [?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_102]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [?:1.8.0_102]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_102]
	at java.lang.reflect.Method.invoke(Method.java:498) [?:1.8.0_102]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [?:?]
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [?:?]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [?:?]
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [?:?]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [?:?]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
	at com.sun.proxy.$Proxy4379.create(Unknown Source) [?:?]
	at com.atlassian.jira.plugin.inviteuser.ao.AOInvitationStoreImpl.addInvitation(AOInvitationStoreImpl.java:55) [?:?]
	... 258 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_102]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_102]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_102]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_102]
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.Util.getInstance(Util.java:408) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2487) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998) [mysql-connector-java-5.1.44-bin.jar:5.1.44]
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) [commons-dbcp2-2.1.jar:2.1]
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) [commons-dbcp2-2.1.jar:2.1]
	at net.java.ao.DatabaseProvider.executeInsertReturningKey(DatabaseProvider.java:1947) [?:?]
	at net.java.ao.DatabaseProvider.insertReturningKey(DatabaseProvider.java:1861) [?:?]
	at net.java.ao.EntityManager.create(EntityManager.java:366) [?:?]
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:92) [?:?]
	... 281 more

1 answer

Hi Niklas,

There is a knowledge base article titled Duplicate entry 0 for key PRIMARY exceptions in log that may help:

Cause

In MySQL configuration ( my.ini (Windows) or my.cnf (Unix) ), parameter of sql_mode is set to  NO_AUTO_VALUE_ON_ZERO.

Resolution

  1. Stop the application.
  2. Stop MySQL
  3. Edit the my.cnf file (often named my.ini on Windows operating systems or my.cnf on UNIX operating systems) in your MySQL server.
  4. Remove NO_AUTO_VALUE_ON_ZERO from sql_mode.

  5. Start MySQL
  6. Start the application.

Verify the sql_mode and remove NO_AUTO_VALUE_ON_ZERO from sql_mode if necessary, restart JIRA and let us know the result.

Cheers,

Branden

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published yesterday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

38 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot