Error when creating deployment package - The JSON snippet is not valid.

1
Hi all, When I'm creating a deployment package, I'm getting a build error:    __ __ ____ _ _ _ | \/ | | _ \ (_) | | | | \ / |_ _| |_) |_ _ _| | __| | | |\/| \ \/ / _ <| | | | | |/ _` | | | | |> <| |_) | |_| | | | (_| | |_| |_/_/\_\____/ \__,_|_|_|\__,_| v7.18.1.40272 Starting build for Mendix Project file: /srv/cloud/slots/tr10000/deploy/data/tmp/1543933905171-0/src/***.mpr Using the following options: * Build target: Package * Deployment package file: /srv/cloud/slots/tr10000/deploy/data/tmp/buildjob2612975668371574034.mda * Model version: 1.0.0.1512 * Project name: *** Reading project file... Building project... Executing step 'Synchronize with file system' * Synchronizing with file system... Executing step 'Initialize' * Preparing deployment... Executing step 'Check prerequisites' * Checking for errors... ERROR: The project cannot be deployed, because it contains errors. ERROR at Production_API, JSON structure 'JSON_FakeJson', -: The JSON snippet is not valid. BUILD FAILED Invalid type Mendix.Modeler.UIFramework.WebView.HtmlControl for instance field Mendix.Modeler.UIFramework.WebView.WebViewSpec:htmlControl Invalid type Mendix.Modeler.UIFramework.WebView.WebViewSpec for instance field Mendix.Modeler.UIFramework.WebView.WebViewSpec+<>c__DisplayClass26_0:<>4__this We already checked the JSON, and it is valid. We also tried to create a new JSON with the same snippet but still the same message.  Based on this forum post https://community.mendix.com/link/questions/91587 it seems like this could be caused by conflicting / old .JAR files. However, we don't know which one is causing the build error. Anyone any suggesting on where to start tackle this problem? Thanks in advance.   Edit: Fixed it for now by replacing the JSON with a message definition, but I think the root cause is still there.
asked
4 answers
1

Indeed double check your userlib and check for jar's with the same name. There always should only be one. You could also give the list here in your post so we can take a look at possible conflicts.

Regards,

Ronald

[EDIT]

I see some double jars: bcpkix-jdk15on-150.jar, bcprov-jdk15on-150.jar, openid4java-0.9.8.jar. A good trick for a good cleanup is to remove all jars and reload all appstore modules. You only need to be aware of own custom java and jar files you placed there yourself.

answered
0
antisamy-1.5.3.jar
antisamy-1.5.3.jar.CommunityCommons.RequiredLib
apache-httpcomponents-httpclient.jar
aspose-words-16.10.0-jdk16.jar
axiom-api-1.2.12.jar
axiom-api-1.2.12.jar.AppCloudServices.RequiredLib
barcode4j.jar
bcpg-jdk15on-150.jar
bcpkix-jdk15on-150.jar
bcpkix-jdk15on-160.jar
bcprov-jdk15on-150.jar
bcprov-jdk15on-160.jar
build.xml
CHANGES
com.google.guava-14.0.1.jar
com.google.guava-14.0.1.jar.CommunityCommons.RequiredLib
com.google.guava-14.0.1.jar.XLSReport.RequiredLib
com.springsource.org.apache.batik.css-1.7.0.jar
com.springsource.org.apache.batik.css-1.7.0.jar.CommunityCommons.RequiredLib
com.springsource.org.apache.commons.lang-2.5.0.jar
com.springsource.org.apache.commons.lang-2.5.0.jar.ExcelImporter.RequiredLib
com.springsource.org.apache.commons.logging-1.1.1.jar
commons-codec-1.10.jar
commons-codec-1.10.jar.CommunityCommons.RequiredLib
commons-codec-1.10.jar.EmailTemplate.RequiredLib
commons-codec-1.10.jar.XLSReport.RequiredLib
commons-collections4-4.1.jar
commons-collections4-4.1.jar.XLSReport.RequiredLib
commons-email-1.4.jar
commons-email-1.4.jar.EmailTemplate.RequiredLib
commons-httpclient-3.1.jar
commons-io-2.3.jar
commons-io-2.3.jar.XLSReport.RequiredLib
commons-lang-2.5.jar
commons-lang-2.5.jar.AppCloudServices.RequiredLib
commons-lang3-3.8-javadoc.jar
commons-lang3-3.8-sources.jar
commons-lang3-3.8-test-sources.jar
commons-lang3-3.8-tests.jar
commons-lang3-3.8.jar
commons-logging-1.1.jar
commons-logging-1.1.jar.AppCloudServices.RequiredLib
commons-math3-3.1.1.jar
commons-math3-3.1.1.jar.XLSReport.RequiredLib
commons-pool-1.6.jar
commons-text-1.4-javadoc.jar
commons-text-1.4-sources.jar
commons-text-1.4-test-sources.jar
commons-text-1.4-tests.jar
commons-text-1.4.jar
commons.lang3-3.1.0.jar
commons.lang3-3.1.0.jar.XLSReport.RequiredLib
COPYING
DocumentGenerationForMendix.jar
dom4j-1.6.1.jar
dom4j-1.6.1.jar.ExcelImporter.RequiredLib
dom4j-1.6.1.jar.XLSReport.RequiredLib
esapi-2.1.0.jar
flying-saucer-core-9.1.13.jar
flying-saucer-pdf-9.1.13.jar
guava-22.0.jar
guice-2.0.jar
guice-2.0.jar.AppCloudServices.RequiredLib
HikariCP-2.6.1.jar
HikariCP-2.6.1.jar.DatabaseConnector.RequiredLib
httpclient-4.3.5.jar
itext-2.1.7.jar
jackson-annotations-2.9.0.jar
jackson-core-2.9.2.jar
jackson-databind-2.9.2.jar
java-jwt-3.3.0.jar
javax.mail-1.6.0.jar
javax.mail-1.6.0.jar.EmailTemplate.RequiredLib
javax.xml.stream-1.0.1.jar
javax.xml.stream-1.0.1.jar.ExcelImporter.RequiredLib
jempbox-1.8.5.jar
jempbox-1.8.5.jar.CommunityCommons.RequiredLib
joda-time-2.9.6.jar
joda-time-2.9.6.jar.CommunityCommons.RequiredLib
joda-time-2.9.6.jar.XLSReport.RequiredLib
json-simple.jar
json.jar
junit-4.11.jar
junit-4.11.jar.UnitTesting.RequiredLib
mysql-connector-java-5.1.46-bin.jar
mysql-connector-java-5.1.46.jar
nekohtml.jar
nekohtml.jar.CommunityCommons.RequiredLib
nekohtml.txt
opencsv-2.3.jar
openid4java-0.9.8.jar
openid4java-1.0.0.jar
openid4java-1.0.0.jar.AppCloudServices.RequiredLib
org.apache.commons.fileupload-1.2.1.jar
org.apache.commons.fileupload-1.2.1.jar.CommunityCommons.RequiredLib
org.apache.commons.io-2.3.0.jar
org.apache.commons.io-2.3.0.jar.CommunityCommons.RequiredLib
org.apache.commons.io-2.3.0.jar.ExcelImporter.RequiredLib
org.apache.commons.io-2.3.0.jar.UnitTesting.RequiredLib
org.apache.commons.lang3.jar
org.apache.commons.lang3.jar.CommunityCommons.RequiredLib
org.apache.commons.lang3.jar.ObjectHandling.RequiredLib
org.apache.commons.lang3.jar.UnitTesting.RequiredLib
org.apache.httpcomponents.httpclient-osgi.jar.AppCloudServices.RequiredLib
org.apache.httpcomponents.httpclient_4.4.1.jar
org.apache.httpcomponents.httpclient_4.4.1.jar.UnitTesting.RequiredLib
org.apache.httpcomponents.httpcore-osgi.jar
org.apache.httpcomponents.httpcore-osgi.jar.AppCloudServices.RequiredLib
org.apache.httpcomponents.httpcore_4.4.1.jar
org.apache.httpcomponents.httpcore_4.4.1.jar.UnitTestingRequiredLib
org.apache.servicemix.bundles.batik.1.8_1.jar
org.apache.servicemix.bundles.batik.1.8_1.jar.CommunityCommons.RequiredLib
org.apache.servicemix.bundles.commons-collections-3.2.1_3.jar
org.apache.servicemix.bundles.opensaml-2.6.0_3.jar
org.apache.servicemix.bundles.xalan-2.7.1.jar
org.apache.servicemix.bundles.xalan-2.7.1.jar.ExcelImporter.RequiredLib
org.apache.servicemix.bundles.xmlbeans-2.5.0.jar
org.apache.servicemix.bundles.xmlbeans-2.5.0.jar.ExcelImporter.RequiredLib
org.slf4j.slf4j-api.jar
org.slf4j.slf4j-api.jar.DatabaseConnector.RequiredLib
owasp-java-html-sanitizer-20170515.1.jar
pdfbox-2.0.11.jar
pdfbox-app-2.0.3.jar
pdfbox-app-2.0.3.jar.CommunityCommons.RequiredLib
poi-3.16.jar
poi-3.16.jar.ExcelImporter.RequiredLib
poi-3.16.jar.XLSReport.RequiredLib
poi-ooxml-3.16.jar
poi-ooxml-3.16.jar.ExcelImporter.RequiredLib
poi-ooxml-3.16.jar.XLSReport.RequiredLib
poi-ooxml-schemas-3.16.jar
poi-ooxml-schemas-3.16.jar.ExcelImporter.RequiredLib
poi-ooxml-schemas-3.16.jar.XLSReport.RequiredLib
README
README.txt
replication.jar
replication.jar.XLSReport.RequiredLib
replication7.jar
replication7.jar.ExcelImporter.RequiredLib
slf4j-api-1.7.22.jar
src
velocity-1.7.jar
xalan-2.7.1.jar
xalan-2.7.1.jar.XLSReport.RequiredLib
xerces.xercesImpl.2.8.1.jar
xerces.xercesImpl.2.8.1.jar.CommunityCommons.RequiredLib
xercesImpl-2.11.0.jar
xml-apis-ext.jar
xml-apis-ext.jar.CommunityCommons.RequiredLib
xml-apis-ext.jar.ExcelImporter.RequiredLib
xml-apis.jar
xmlbeans-2.6.0.jar
xmlbeans-2.6.0.XLSReport.RequiredLib
xmlsec-1.5.6.jar
zxing-core-3.3.0.jar
zxing-javase-3.3.0.jar

This is the list of .jar files in our userlib. 

answered
0

 

@Eric Tieniber

The Json file is as follows: 

[
    {
        "OrderType": "string",
        "Country": "string",
        "OrderID": 10000000000000000000,
        "Date": "2018-11-26",
        "Product": "string",
        "Size": "string",
        "Barcode": "string",
        "FirstName": "string",
        "LastName": "string",
        "City": "string",
        "File": "string"
    }
]

We already put it in a JSON validator, and it seems ok.

answered
0

Anyone an idea? 

Could it have to do with these libraries?

json-simple.jar
json.jar

 

answered