I want to create a widget and upload it to my FIWARE Mashup Workspace. When I upload my ".wgt" file I get the error:
Error adding packaged resource: Error parsing config.xml descriptor
file: No valid parser found.
How can I get more information about the error?
Is it simply a parsing error, or is something different went wrong (no valid parser found sounds like some service is missing)
Is there a way to check my config.xml file?
This is definitely a configuration error; there is no service missing.
Since your config is in xml, check it with an XML checker, to be sure that no opening/closing tags are missing.
If your wgt is an operator, check that your preferences/endpoints have different IDs. Also, please be sure that all your endpoints use distinct names
Related
Trying to upload an annotations.tsv file to CSE, the upload dialogue says "File uploading is not successful". That's all. There's no specific error and no apparent cause. Everything looks fine.
The file is called: annotations.tsv
It has headers on the first line: URL<tab>Label<tab>Score
The file includes lines of the form: *somedomain.com/*<tab>_cse_etc<tab>1
And: someotherdomain/*<tab>_cse_etc<1>
What could possibly be wrong?
The problem was that one of the url patterns was invalid.
Google CSE does not give explicit error messages. If the file's list of patterns contains any that are invalid, it just rejects the whole file. If there are any other problems with the file, it just rejects the whole file.
The invalid pattern was of the form *.domainName.*
Whereas these are valid patterns:
www.domainName.com/
www.domainName.com/*
subdomainName.domainName.com/dirName/*
*.domainName.com/*
This is not valid: *.domainName.*
I'm trying to require some JSON files in my React app (based on CRA 3.01 with Typescript).
The normal const obj = require('./path/file.json') would work if my files had a .json extension - however, these files have .md for 'metadata' and a couple other extensions, and the standard require isn't working. The files are from a tool, so changing to .json isn't a practical option.
Doing some research, it seems the approach is to use the webpack json-loader module (the webpack json-loader docs says that working with different file extensions is the main reason for using the module). I found an example and am using this:
const context = require.context(
"json-loader!./metadata",
true,
/^\.\/.*\.md$/
);
const metadata = context("./foo.md");
I've got a minimum reproduction here (see App.tsx):
https://github.com/ericsolberg/testjson
It seems that this is correctly using the json-loader, and finding the file correctly. However, I'm getting a syntax error:
Error: Module build failed (from ./node_modules/json-loader/index.js):
SyntaxError: Unexpected token m in JSON at position 0
at JSON.parse (<anonymous>)
at Object.module.exports (/Users/***/projects/jsontest/node_modules/json-loader/index.js:4:49)
I did some research on this error, and believe the problem is that the file is being parsed twice - first by the loader configured by CreateCreactApp's default webpack config, then by the specified JSON loader.
I don't want to eject my CRA app to modify the webpack config, and would like to avoid a re-wire hack (and whatever other issues that introduces) ... does anyone know of a way to load JSON files in a CRA app, if these files don't have a JSON extension?
Here's the solution that ended up working for me.
I could eject my project, of course, and customize the webpack config to load JSON files with other extensions. It may be possible to make a rewire hack work as well.
But I realized that when I require a file that is not one of the extensions recognized by CRA's config, it instead copies that file into the build, and require('file.ext') returns the URL of the file. So I'm using axios to load the file. This means a trip to the server for something that could be done statically, but for where I'm taking this project that is actually OK (eventually it will load metadata from a server anyway).
There are several errors in my JSON file. What is the best option for debugging JSON files? I used this editor - http://www.jsoneditoronline.org/, but it's a bit difficult to use for long files.
For instance, the error message says:
Error: Parse error on line 1:
...000.0}]}},"data": [{"id": 0,"fr
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':'"
But the line looks fine.
Try putting your JSON file's content into a validator, like http://jsonlint.com/ or http://jsonformatter.curiousconcept.com/ and see what it says.
I suggest entering your JSON into a linter such as http://jsonlint.com/. Additionally, properly formatting your JSON will make it easier to debug. A site such as http://jsonformatter.curiousconcept.com/ can do this for you.
If you have access to NodeJS locally, there's a CLI tool that works well for linting JSON files: https://github.com/zaach/jsonlint
Otherwise, you can use JSONLint if you don't mind uploading your JSON to a "random" remote server.
If you have access to Visual Studio. They have a visualizer debugging tool, which as such, will traverse the structure and throw at the problematic lines.
JSON Debugger Visualizer in Visual Studio 2013
Why not try something like vim or Notepad++ and try matching the brackets and braces? You may need to use something to "pretty print" the JSON first. I believe you could do that from a Python console.
You may try something from here http://jsbeautifier.org/ to format in one-line JSON stuff.
You can use Codverter JSON Validator, its online but it`s highly secure and everything you do is interpreted on your local computer and never sent back to the server. the validation error messages are informative and accurate.
(Full Disclosure: I am one of the developers).
On running the DITA conversion on DITA-OT we are getting the following error,
"The XML parser reported the following error: : D:\DITA-OT1.8.4_full_easy_install_bin\DITA-OT1.8.4\dtd\utilities\ibmUtilitiesDomain.ent (The system cannot find the path specified)"
Where can I get ibmUtilitiesDomain.ent file? Thanks in advance.
ibmUtilitiesDomain.ent is part of IBM specific Author Information DTD that is not bundled with DITA-OT. You need to find the DTD module somewhere and save it locally somewhere DITA-OT can access it.
I am using Google Drive api's to upload the new file....While doing so, I get the following error
You cannot upload content to files of type
application/vnd.google-apps.drive-sdk.
I am able to upload the file when I set the mimeType as null...If I set the mimeType as application/octet-stream, I get the above error
Can anyone let me know what are the mimeTypes which can be set?? and also what does that error actually means??
TIA,
VijayRaj
I suspect you are getting this error because you did not register the MIME type application/octet-stream as a MIME type of your application in the Google APIs Console project. If you update those settings with the correct MIME type(s) and extensions, this should work fine. The code from your comment seems correct.