Getting [com.ctc.wstx.exc.WstxLazyException] Duplicate attribute 'class'.

Frank March 15, 2018

Hello everybody,

 

I have an add-on for Confluence Server that is throwing this error once it's included in a page. I've been looking for a response to other similar questions and Jira tickets but the best I've been able to get is something like "this fixed once I updated the Confluence version".

This is happening to a client and sometimes I can reproduce it on my testing instance but other I just see that error in the log.

 

2018-03-15 11:35:26,280 ERROR [http-nio-8090-exec-15] [xhtml.view.macro.DefaultViewMacroWrapper] wrapMacro Error parsing macro [agile Retrospectives for Confluence] because of [[com.ctc.wstx.exc.WstxLazyException] Duplicate attribute 'class'.

at [row,col {unknown-source}]: [1,14981]]. Excluding it from list of macros which are safe to wrap

 

Thank you so much for your help :)

2 answers

1 accepted

1 vote
Answer accepted
Frank March 19, 2018

Hi Ann,

 

First of all, thank you for the Atlassian Developer Community link :D it's really appreciated.

Just to let you know that I solved the issue. The problem was (effectively) a duplicated class attribute. I had to check every file on my add-on used by Velocity in order to find the duplicated class attribute.

The thing is that, internally, the templates are parsed as a one-line String, so it's quite hard to know where is the column indicated in the error. If you know someone of Confluence/Jira Server and it's possible to improve that part, I'll be glad of helping them :D

 

Thanks again and please mark this question as resolved.

1 vote
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2018

Hi Frank,

I had a look at the vendor's support site, and it looks like quite a few users are having the same issue:

I've tagged the vendor on this issue, but I would also recommend reaching out to them on the same site as above. It may be a bug in the plugin and any information you can provide them will be helpful.

Regards,

Shannon

Frank March 16, 2018

Hi Shannon,

 

Thank you for your response :D let me clarify the phrase "I have an add-on for Confluence Server". Actually, I'm part of the dev team for that add-on haha

The NPE was fixed on a previous version (marked as resolved now) but I'm trying to solve the other issue.

As I said, I can't find a good response on what's producing the error or how to reproduce it, since it's not like a constant error on my SDK or the testing Confluence instance.

I'll really appreciate if you can help me to see what's producing that error because the log doesn't provide enough information :(

Regards,

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2018

Hi Frank,

You mention the issue is intermittent, could you let us know more about the environments (DBMS, OS, Confluence version and plugin version) where you have seen the error?

I am not a developer, so forgive me for stating the obvious, but the way I read the error there is some duplicate class attribute on row one, column 4981. Is there anything on that row and column that looks like a duplicate class?

In case it helps, I wanted to let you know a lot of the other Marketplace developers use this other resource.

Thanks,

Ann

Frank March 18, 2018

Hi Ann,

 

First of all, thank you for the Atlassian Developer Community link :D it's really appreciated.

Just to let you know that I solved the issue. The problem was (effectively) a duplicated class attribute. I had to check every file on my add-on used by Velocity in order to find the duplicated class attribute.

The thing is that, internally, the templates are parsed as a one-line String, so it's quite hard to know where is the column indicated in the error. If you know someone of Confluence/Jira Server and it's possible to improve that part, I'll be glad of helping them :D

 

Thanks again and please mark this question as resolved.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 19, 2018

Hi Frank,

Thank you for letting us know!

If you'd like, you can put your answer down as a separate answer from mine earlier and I can accept it for you. Just enter it below Suggest an answer and I will mark it as correct.

Kind regards,

Shannon

Frank March 19, 2018

Done :D

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events