Skip to main content
Level 2
Oct 16, 2015 2:28 AM UTC
Solved

An error Maven with linkchecker

When I deploy my source I get this message below. I do not understand why I see the linkchecker------ Caused by: org.apache.maven.plugin.MojoExecutionException: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) 

        at com.day.jcr.vault.maven.mgr.AbstractPackageManagerMojo.postRequest(AbstractPackageManagerMojo.java:261)

        at com.day.jcr.vault.maven.mgr.PackageInstallMojo.uploadPackage(PackageInstallMojo.java:267)

        at com.day.jcr.vault.maven.mgr.PackageInstallMojo.execute(PackageInstallMojo.java:200)

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

        ... 31 more

Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) 

        at org.codehaus.plexus.util.xml.pull.MXParser.parseEndTag(MXParser.java:1689)

        at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1172)

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Adobe Employee
Oct 16, 2015 2:28 AM UTC

Hi,

it has to do with the POST request issued by the content-package-plugin, as it is indicated by this line

Caused by: org.apache.maven.plugin.MojoExecutionException: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) at com.day.jcr.vault.maven.mgr.AbstractPackageManagerMojo.postRequest(AbstractPackageManagerMojo.java:261)

as then the XML parser is listed as the root cause of this exception, my assumption is that the content-package-maven-plugin utilizes an XML parser to parse the output of the POST request, but then somehow fails. It would be good if you sniff the network trafic in that case, so we actually know what's happening. Also the request.log can give insight what status code is sent for this POST request.

kind regards,
Jörg

17 replies

wmakendAuthor
Level 2
Oct 16, 2015 2:28 AM UTC
Thanks for the reply. The problem was solved.  The exception has actually just XML that is returned.

kind regards,
Willy

 

 

 

Translate
joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:28 AM UTC

Hi,

it has to do with the POST request issued by the content-package-plugin, as it is indicated by this line

Caused by: org.apache.maven.plugin.MojoExecutionException: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) at com.day.jcr.vault.maven.mgr.AbstractPackageManagerMojo.postRequest(AbstractPackageManagerMojo.java:261)

as then the XML parser is listed as the root cause of this exception, my assumption is that the content-package-maven-plugin utilizes an XML parser to parse the output of the POST request, but then somehow fails. It would be good if you sniff the network trafic in that case, so we actually know what's happening. Also the request.log can give insight what status code is sent for this POST request.

kind regards,
Jörg

Translate
Oct 16, 2015 2:28 AM UTC

There are no details in the error log. 

Furthermore the build only fails 1 in 3 times without changing any code.

If it fails, it is always the same content-package, which is installed right after a bundle.

 

Jerry

Translate
joerghoh
Adobe Employee
Adobe Employee
Oct 16, 2015 2:28 AM UTC

HI,

I think, that maven tries to upload the bundle to your AEM, but it runs into a problem. This problem occurrs because maven tries to parse the body of the response. Check your error.log of your AEM instance to find out the details.

Jörg

Translate
wmakendAuthor
Level 2
Oct 16, 2015 2:28 AM UTC
It is here that I do not understand because the components have only 4 files and those files there is no n <td> or <img>------- [ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.24:install (install-content-package) on project global-skizz_1.4.0-i18n: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.24:install (install-content-package) on project global-skizz_1.4.0-i18n: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:325)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.MojoExecutionException: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) 
        at com.day.jcr.vault.maven.mgr.AbstractPackageManagerMojo.postRequest(AbstractPackageManagerMojo.java:261)
        at com.day.jcr.vault.maven.mgr.PackageInstallMojo.uploadPackage(PackageInstallMojo.java:267)
        at com.day.jcr.vault.maven.mgr.PackageInstallMojo.execute(PackageInstallMojo.java:200)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 31 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) 
        at org.codehaus.plexus.util.xml.pull.MXParser.parseEndTag(MXParser.java:1689)
        at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1172)
        at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1093)
        at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:187)
        at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:83)
        at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:48)
        at com.day.jcr.vault.maven.mgr.AbstractPackageManagerMojo.postRequest(AbstractPackageManagerMojo.java:248)
        ... 35 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :global-skizz_1.4.0-i18n
Translate
smacdonald2008
Level 10
Oct 16, 2015 2:28 AM UTC

Please provide more details. You are deploying an OSGi bundle here correct. Are you following an online document? What APIs are you using in your bundle? 

Translate
smacdonald2008
Level 10
Oct 16, 2015 2:28 AM UTC

There is a mismatch in your code. Look at the exception - it giving you a hint at line 31 in your code. 

"end tag name </td> must match start tag name <img> from line 31"
Translate
Oct 23, 2015 2:12 PM UTC
This was wrongfully closed. The problem was not solved. 

In the 2 links edubey posted, the roots of the problem are in the pom or repository.

 

But here it seems not to be a problem of maven, but more a problem of AEM.

It occurs when trying to deploy the module that fails:

ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.24:install (install-content-package) on project global-skizz_1.4.0-i18n: end tag name </td> must match start tag name <img> from line 31 (position: START_TAG seen ...="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>... @31:243) -> [Help 1]

 

"grep"-ing through our Code for "linkcheck" shows no result at all. So I guess, this is a (incomplete) response from AEM.

Taking a tcpdump of the communication between "mvn" and "AEM", shows nothing abnormal.

 

Kind regards,

 

Jerry

Translate
smacdonald2008
Level 10
Oct 23, 2015 2:26 PM UTC

The user who opened this thread says problem was solved. 

Translate