SAXParseException when creating Crowd users from Jira Edited

Crowd 2.7.2 & Jira Software 7.3.0 (also have Service Desk 3.3.0 installed)

When I try to create a user in a Crowd directory from Jira, the user is created in Crowd but not added to any groups, and Jira returns a stacktrace starting with:

 2017-06-12 10:30:15,528 http-nio-8081-exec-14 WARN bryan 630x207405x1 15ri3ay 38.105.223.130,0:0:0:0:0:0:0:1 /secure/admin/user/AddUser!default.jspa [w.view.taglib.IteratorTag] Value is null! Returning an empty set.
2017-06-12 10:30:39,807 http-nio-8081-exec-12 ERROR [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [com.atlassian.crowd.exception.runtime.OperationFailedException: javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]] with root cause
org.xml.sax.SAXParseException; Premature end of file.

Crowd doesn't show any errors; it has:

2017-06-12 10:09:16,498 http-bio-8095-exec-1593 DEBUG [crowd.manager.application.ApplicationServiceGeneric] Adding user <choate-personal> for application <jira>

2017-06-12 10:09:16,583 http-bio-8095-exec-1593 DEBUG [crowd.dao.user.UserDAOHibernate] Saving object: com.atlassian.crowd.model.user.InternalUser@6ab99ea8[id=<null>,name=choate-personal,createdDate=Mon Jun 12 10:09:16 EDT 2017,updatedDate=Mon Jun 12 10:09:16 EDT 2017,active=true,emailAddress=bryan.choate@test.com,firstName=Bryan,lastName=Choate,displayName=Bryan Choate,credential=com.atlassian.crowd.embedded.api.PasswordCredential@405f5e55[credential={PKCS5S2}IkcETK1DwtMOE7VjvxBtKosfdPEBCB6Oj/EDP6cJA0JeVGLCHunNfxT9OzllqHyY,encryptedCredential=true],lowerName=choate-personal,lowerEmailAddress=bryan.choate@test.com,lowerFirstName=bryan,lowerLastName=choate,lowerDisplayName=bryan choate,directoryId=32769,externalId=ba86f5f2-07af-4ac2-8774-25b913788864]

2017-06-12 10:09:16,602 http-bio-8095-exec-1593 DEBUG [crowd.manager.application.ApplicationServiceGeneric] User 'choate-personal' was added to directory 'Dstillery Crowd'.

When I try to create the user, I'm giving Jira all of the requested info and checking the "Jira Software" box for application access (but leaving the Service Desk checkbox blank).  I have the internal directory disabled, so there's no option for that.  When I submit I get the skull & crossbones, and the above errors in the log.  The full stacktrace is here:

2017-06-12 10:30:15,528 http-nio-8081-exec-14 WARN bryan 630x207405x1 15ri3ay 38.105.223.130,0:0:0:0:0:0:0:1 /secure/admin/user/AddUser!default.jspa [w.view.taglib.IteratorTag] Value is null! Returning an empty set.
2017-06-12 10:30:39,807 http-nio-8081-exec-12 ERROR      [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [com.atlassian.crowd.exception.runtime.OperationFailedException: javax.xml.bind.UnmarshalException
     - with linked exception:
    [org.xml.sax.SAXParseException; Premature end of file.]] with root cause
org.xml.sax.SAXParseException; Premature end of file.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)
	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:221)
	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:276)
	at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andOptionallyReceive(RestExecutor.java:468)
	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.addUser(RestCrowdClient.java:186)
	at com.atlassian.crowd.directory.RemoteCrowdDirectory.addUser(RemoteCrowdDirectory.java:235)
	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.addUser(DbCachingRemoteDirectory.java:555)
	at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addUser(DirectoryManagerGeneric.java:355)
	at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.addUser(ApplicationServiceGeneric.java:653)
	at com.atlassian.crowd.embedded.core.CrowdServiceImpl.addUser(CrowdServiceImpl.java:341)
	at com.atlassian.crowd.embedded.core.CrowdServiceImpl.addUser(CrowdServiceImpl.java:329)
	at com.atlassian.jira.user.util.DefaultUserManager.createUser(DefaultUserManager.java:688)
	at com.atlassian.jira.bc.user.DefaultUserService.createUser(DefaultUserService.java:280)
	at com.atlassian.jira.web.action.admin.user.AddUser.doExecute(AddUser.java:144)
	... 1 filtered
	at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
	... 7 filtered
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	... 52 filtered
	at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:56)
	... 4 filtered
	at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62)
	... 7 filtered
	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
	... 62 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76)
	... 1 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74)
	... 36 filtered
	at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
	... 5 filtered
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:181)
	at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:139)
	at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:92)
	at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:64)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:174)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:130)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:121)
	... 4 filtered
	at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32)
	... 8 filtered
	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
	... 4 filtered
	at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
	... 29 filtered
	at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
	... 28 filtered
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

I'm at a complete loss, and this is causing a mail handler to break, since the user that is created is not added to the default group (jira-users) for Jira Software and therefore can't create issues.

1 answer

0 vote
Ann Worley Atlassian Team Jun 12, 2017

Thanks for the log snippets and detailed description of the issue.

When you are creating the user and you check the box to allow "JIRA Software" it is supposed to add the user to the group defined on the Application Access page at <JIRA_Base_URL/secure/admin/ApplicationAccess.jspa.

Please make sure the desired group is listed there and has Default checked.

Screen Shot 2017-06-12 at 11.25.14 AM.png

Yep, that's what I was referring to in the last sentence - the group there is set to jira-users, and default is checked.  I should also mention that Jira has the ability to create & modify users and groups in Crowd, so it theoretically shouldn't be an issue there, either.

Edit:

Screen Shot 2017-06-12 at 12.51.52 PM.png

We have just upgraded to 7.5.2 and we have the same problem.

We have two groups added as default. jira-users and confluence-users.

Were you able to solve this?

Ann Worley Atlassian Team Dec 04, 2017

I got the same error using Crowd 2.7.2 with Jira 7.3 and Jira 7.5.2. I fooled around with jar files (because of JIRA Cannot Create Users when Crowd is Configured) and tried various configurations with no luck.

Long story short, you need to upgrade Crowd.

When I upgraded to Crowd 3.x it worked fine with Jira 7.5.2; I was able to create users in Jira in the Crowd directory and they belonged to the default group as expected.

Crowd has taken some huge steps forward in the last few versions. Please see: Crowd 3.1 Release Notes

Also, Crowd 2.7.2 has reached end of life status.

Thank you for your response. It seems that we have no choice but to upgrade.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

213 views 0 2
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