OHDSI Home | Forums | Wiki | Github

WebAPI installation issue

Hello All,

I am trying to set up webapi for postgresql in Ubuntu16.04 environment. Java version 8.0, maven version 3.3.9.
The package creator works for quite a long time and downloaded too many files and suddenly it started throwing errors which are mentioned below:

root@ambuj-OptiPlex-7020:/usr/share/maven/conf# mvn clean package -f /home/WebAPI/ settings.xml -P webapi-postgresql
[INFO] Scanning for projects…
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom: unexpected character in markup \ (position: START_TAG seen …e operation, please return to site and resend the information<… @67:2196) @ /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom, line 67, column 2196
[FATAL] Non-parseable POM /root/.m2/repository/org/apache/logging/log4j/log4j-bom/2.7/log4j-bom-2.7.pom: unexpected character in markup \ (position: START_TAG seen …e operation, please return to site and resend the information<… @67:2196) @ /root/.m2/repository/org/apache/logging/log4j/log4j-bom/2.7/log4j-bom-2.7.pom, line 67, column 2196
[ERROR] ‘dependencies.dependency.version’ for com.google.code.gson:gson:jar is missing. @ line 642, column 17
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.ohdsi:WebAPI:1.0.0-SNAPSHOT (/home/WebAPI/pom.xml) has 3 errors
[ERROR] Non-parseable POM /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom: unexpected character in markup \ (position: START_TAG seen …e operation, please return to site and resend the information<… @67:2196) @ /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom, line 67, column 2196 -> [Help 2]
[ERROR] Non-parseable POM /root/.m2/repository/org/apache/logging/log4j/log4j-bom/2.7/log4j-bom-2.7.pom: unexpected character in markup \ (position: START_TAG seen …e operation, please return to site and resend the information<… @67:2196) @ /root/.m2/repository/org/apache/logging/log4j/log4j-bom/2.7/log4j-bom-2.7.pom, line 67, column 2196 -> [Help 2]
[ERROR] ‘dependencies.dependency.version’ for com.google.code.gson:gson:jar is missing. @ line 642, column 17
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
root@ambuj-OptiPlex-7020:/usr/share/maven/conf#

Can someone please help me in fixing this problem or give any suggestions to resolve this.

TIA
-Ambuj

Check your POM XML in a code editor like NP++ or ATOM for hidden special characters or markup format errors.

You might want to try a newer version of maven - I recently ran into an issue similar to this where the settings.xml file would not properly parse using maven v3.3.x. I upgraded to maven v3.6 and this worked without any modification of the settings files.

Sure, I will try that and let you know if something comes up.
One thing that bothers me here is that do we have to reinstall any other version of Java here, currently I am on Java 8.
If a new java installation require, will it impact anything on the process?

If you have Java 8 installed already, that should be fine.

hi there. there has been some modifications in the environment. new configuration is O.S - CentOS 7, Java 8, Maven 3.6.0.
Now I am trying to build the .war file but getting the errors. Attached are the settings.xml and Pom.xml for reference and the screenshot for error.
Please let me know what i am doing wrong here.
TIA



pom.xml (39.1 KB)

So this is strange, according to the error message, it’s saying that your settings.xml is malformed (expected a ‘project’ tag, got a settings tag’), as if it’s trying to use the settings.xml file as the actual POM.xml. So, it’s a little confusing about that. But the root node of a settings.xml should be ‘settings’ just like you have. I wonder if there’s a probelm with your ‘mvn’ command that you’re executing?

mvn command worked fine. the issue I found was that POM.xml file was missing from Maven home, which fixed the error that I had on my above post and came across a new error.
Screenshot for the error has been attached

I validated the POM.xml and didn’t find any special characters so far. Please help.

TIA

Sorry, I do not understand this: you should not need to copy any Pom.XML files anywhere. You should have the root of the WebAPI directory which has the pom.xml, and then you specify the path to settings.xml via your mvn command. I’m not sure what the ‘maven home’ has to do with this.

Also, from the error, it is indicating which files it is unable to parse (the one under /jackson, for example), you should check the file in that location. I’m guessing that it downloaded an HTTP error response and not the pom.xml file for that library.

Ok, please let me know if I am doing something wrong here.
settings.xml lies under /root/WebAPI/settings.xml
maven lies at : /opt/apache-maven-3.6.0/conf
I am using the following command -
[root@ambuj~]# cd /opt/apache-maven-3.6.0/conf
[root@ambuj conf]#mvn clean package -s /root/WebAPI/settings.xml -P webapi-postgresql

I fixed the files and there is another error which I am not sure of.
[ERROR] the goal you specified requires a project to execute but there is no POM in this directory
Kindly suggest if I am doing it the correct way. Also with the error I can see there are too many discrepancies within the jackson’s folder’s pom files.

Try running maven from the WebAPI directory (i.e. the directory in which you clone the WebAPI git repo and in which the project POM should be located, as per @Chris_Knoll above). E.g.

[root@ambuj~]#cd /root/WebAPI
[root@ambuj conf]#mvn clean package -s settings.xml -P webapi-postgresql

Thank yo so much for correcting me. But I landed up on a different error overall.
[ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom: entity reference name can not contain character ’ (position: START_TAG seen …is = true;\n }\n\n\tvar recipientsList = “”;\n\n\tfor (var i=0; i &lt … @184:22) @ /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom, line 184, column 22 [FATAL] Non-parseable POM /root/.m2/repository/org/apache/logging/log4j/log4j-bom/2.7/log4j-bom-2.7.pom: start tag unexpected character ; (position: TEXT seen …\n\tvar recipientsList = “”;\n\n\tfor (var i=0; i [Help 1] [ERROR]
[ERROR] The project org.ohdsi:WebAPI:1.0.0-SNAPSHOT (/root/WebAPI/pom.xml) has 2 errors [ERROR] Non-parseable POM /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom: entity reference name can not contain character ’ (position: START_TAG seen …is = true;\n }\n\n\tvar recipientsList = “”;\n\n\tfor (var i=0; i &lt … @184:22) @ /root/.m2/repository/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom, line 184, column 22 -> [Help 2] [ERROR] Non-parseable POM /root/.m2/repository/org/apache/logging/log4j/log4j-bom/2.7/log4j-bom-2.7.pom: start tag unexpected character ; (position: TEXT seen …\n\tvar recipientsList = “”;\n\n\tfor (var i=0; i [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

function recipientsArr2StrInTable(recipientsArr, ellipsisLimit, useLinebreakes)
if (ellipsisLimit == undefined)
{
ellipsisLimit = 0;
}

if (useLinebreakes == undefined)
{
useEllipsis = true;
}

var recipientsList = "";

for (var i=0; i<recipientsArr.length; i++)
{
recipientsList += HTMLEncode(recipientsArr[i].address);
if (i < recipientsArr.length-1)
{
    recipientsList += ", ";
    if (useLinebreakes)
    {
        recipientsList += "<br>";
    }
}
}

if (ellipsisLimit > 0)
{
//recipientsList = Ext.util.Format.ellipsis(recipientsList, 
ellipsisLimit);
recipientsList = recipientsList;`enter code here`
}

return recipientsList;
} //

======================================================================================

And the line 184 where it is locating the error, I am unable to understand what is the issue with that line. I also re-downloaded the xml files by calling mvn clean.

Please let me know if you have any solution to this one.

This is the core of the problem, and somehow maven downloaded a corrupt POM.xml and has problems parsing it. What I would do is complete delete /root/.m2/repository/com/fasterxml (and all child directories) and maven will attempt to re-download those dependencies again. The text file you included in your message looks like some kind of javascript, which may have been rendered if you are going through some kind of HTTP proxy and it was prompting you for some kind of input before proceeding? So check your internet connection to ensure you can access the remote maven repositories without errors.

I tried the step to delete the files under /root/.m2 and maven did restarted download when I invoked the query. And again I landed up on the same error which I posted on my previous post.
However, one thing I observed are couple of WARNING messages I receive during download. I am pasting it here so you can shed some light on it if it is due to network firewall or something else.

Happy Friday


Hi, @ambuj, I just did a ‘clean’ build on my side (by deleting everything under my .m2/repository, and ran my mvn build, and it successfully downloaded and compiled the war.

My maven version is 3.5.4, could you paste a screenshot of what you get when you do a mvn -v? Perhaps this is a maven verision issue.

This is what i get:

hi, @Chris_Knoll,
Hope you had a great weekend.
I tried to clean up the /.m2/repository folder and redid the installation of files from repository and got the same errors as mentioned in WebAPI installation issue - #13 by Chris_Knoll. here is the screenshot for mvn -v.

And, I also see errors when the fresh files gets downloaded, so I am assuming that my network firewall is blocking something…Let me know your thoughts on this, whether its maven version issue or its a firewall situation.

TIA

I think it’s a firewall situation. Is there any way you can get a clean connection (not proxied) to the internet and try again?

yes, I will try to do that and let you know if I come across any issues with it.

@Chris_Knoll, well,nothing changed after removing the firewalls from the network.
Then I tried to open following url’s manually and got the errors:
http://repo.odysseusinc.com/artifactory/community-libs-release-local/com/fasterxml/jackson/jackson-bom/2.8.7/jackson-bom-2.8.7.pom
{
“errors” L [ {
“status” : 404,
“message” : “File not found.”
} ]
}

above error comes with this url too:
http://repo.odysseusinc.com/artifactory/community-libs-release-local/org/apache/logging/log4j/log4j-bom/2.7/log4j-bom-2.7.pom

So, I am confused at why the url have such error.
Please help.

Hi, I noticed the same responses on my side when going to those URLs. However, running the maven command does not result in the same error that you have. However, I’m running on a 3.5 version of maven. and you are 3.6. Is there a way you could install the 3.5.3 version of maven?

Otherwise, i’m sorry, I do not know what is going on in your environment, but i can not reproduce it.

t