I try to parse a huge json file, it's more that 524288 characters and I can't parse it with groovy and haven't text of exception. Is it a known issue, is there any workaround?
Can it be limitation of tomcat?
Update:
I've got an exception:
ERROR (org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver) - JSONException occurred when processing request: [POST] /person/parsePersonJson
Expected a ',' or ']' at character 524288 of ...
Update2:
in grails I used:
JSON.parse(params.myJson)
Changed tomcat settings of maxPostSize to "0"
It may concern to value of configured POST parameter size in Tomcat (maxPostSize). You should refer to this documentation: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html (keyword: "maxPostSize") for more explanation. Then you can try to increase that value. Hope this helps!
It was a problem with input size. Max input size by specification is 512k
Related
I tried to save a node entity(#NodeEntity) whose property(string type)
has multi-byte string like Japanese, but JsonParseException occurred.
java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0x8d at [Source: [B#569cfc36; line: 1, column: 67]
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.executeRequest(BoltRequest.java:175) ~[neo4j-ogm-bolt-driver-2.1.2.jar!/:na]
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.execute(BoltRequest.java:89) ~[neo4j-ogm-bolt-driver-2.1.2.jar!/:na]
at org.neo4j.ogm.session.request.RequestExecutor.executeSave(RequestExecutor.java:287) ~[neo4j-ogm-core-2.1.1.jar!/:na]
at org.neo4j.ogm.session.request.RequestExecutor.executeSave(RequestExecutor.java:66) ~[neo4j-ogm-core-2.1.1.jar!/:na]
at org.neo4j.ogm.session.delegates.SaveDelegate.save(SaveDelegate.java:85) ~[neo4j-ogm-core-2.1.1.jar!/:na]
at org.neo4j.ogm.session.delegates.SaveDelegate.save(SaveDelegate.java:44) ~[neo4j-ogm-core-2.1.1.jar!/:na]
at org.neo4j.ogm.session.Neo4jSession.save(Neo4jSession.java:447) ~[neo4j-ogm-core-2.1.1.jar!/:na]
But if I invoked java with -Dfile.encoding=UTF-8 option, a entity is saved correctly...
Please advice me how to save multi-byte string without -D=file.encoding option?
I think that it is preferred that encoding is specified in config file or by coding.
Thanks.
My Environment is here.
OS=Windows 7 64bit(Japanese Edition)
Java=JDK1.8u121
Spring Boot=1.5.2
Spring Boot Neo4j=4.2.1
Noe4j Driver= Bolt Driver 2.1.2
This is a known issue in ogm - https://github.com/neo4j/neo4j-ogm/issues/244.
Current suggested workaround is exactly what you did - provide property at startup
-Dfile.encoding=UTF-8
I want to run a (python3) process from my (yap) prolog script and read its output formatted as a list of integers, e.g. [1,2,3,4,5,6].
This is what I do:
process_create(path(python3),
['my_script.py', MyParam],
[stdout(pipe(Out))]),
read(Out, OutputList),
close(Out).
However, it fails at read/2 predicate with the error:
PL_unify_term: PL_int64 not supported
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
I am sure that I can run the process correctly because with [stdout(std)] parameter given to process_create the program outputs [1,2,3,4,5,6] as expected.
Weird thing is that when I change the process to output some constant term (as constant_term) it still gives the same PL_int64 error. Appending a dot to the process' output ([1,2,3,4,5,6].) doesn't solve the error. Using read_term/3 gives the same error. read_string/3 is undefined in YAP-Prolog.
How can I solve this problem?
After asking at the yap-users mailing list I got the solution.
Re-compiled YAP Prolog 6.2.2 with libGMP option and now it works. It may also occur in 32-bit YAP.
While resolving conflict, I will get The file encoding -3 is not a valid encoding.
I am resolving conflict on folder.
Code :
workspace.MergeContent(conflict, false);
Error:
The file encoding -3 is not a valid encoding.
at Microsoft.TeamFoundation.VersionControl.Client.FileType.GetEncodingFromIntOrString(Int32 codePage, String encoding)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PreMerge(Conflict conflict, ThreeWayMerge threeWayMerge)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.InternalMergeContent(Conflict conflict)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.MergeContent(Conflict conflict, Boolean useExternalMergeTool)
I dont know if this will help you but I have a similar issue and I found out that the Microsoft Team Foundation Server 2010 Service Pack 1 made a fix regarding encoding problems.
Fixed issues:
Very aggressive automatic detection of file encoding can result in
unsuitable encoding mismatches during merges
http://support.microsoft.com/kb/2182621#mtDisclaimer
I've been successfully able to convert many PDFs to PNGs using "gm convert", but I've been running into an issue lately with a PDF that gives me this error:
**** Unknown operator: '0.0000-11728996', processed as number, value: 0.0
**** Unknown operator: '0.0000-11728996', processed as number, value: 0.0
**** This file had errors that were repaired or ignored.
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
I've looked around the interwebz and found that it is likely something to do with ghostscript. Could someone tell me if my PDF has errors or if it's a bug in ghostscript?
Here's the PDF: https://docs.google.com/file/d/0BycjEbtUqUfNT2M0bHkteHl0NDA/edit?pli=1
Appreciate the help in advance!
Edward
For each page, Ghostscript 9.14 says:
**** Warning: replacing malformed number '0.0000-11728996' with 0.
**** Warning: replacing malformed number '0.0000-11728996' with 0.
The warning says it all. The number is not formatted correctly.
A few people seem to have run into NSXMLParser error 111 before, but it's not defined in the constants. This answer seems to have mistaken 111 with 11: NSXMLParserErrorDomain 111
As far as I can tell, I have no illegal characters in my final xml:
<?xml version="1.0" encoding="utf-16"?><wsse:BinarySecurityToken wsu:Id="uuid:383b6148-1c27-45ab-963b-30e14af8154e" ValueType="http://schemas.xmlsoap.org/ws/2009/11/swt-token-profile-1.0" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">aHR0cCUzYSUyZiUyZnNjaGVtYXMueG1sc29hcC5vcmclMmZ3cyUyZjIwMDUlMmYwNSUyZmlkZW50aXR5JTJmY2xhaW1zJTJmbmFtZWlkZW50aWZpZXI9V3dEM2ozRzBobjE0MWFndkNWJTJmWERadmgwJTJiQ0xHV1hBblRLTmM4Qjc3N1UlM2QmaHR0cCUzYSUyZiUyZnNjaGVtYXMubWljcm9zb2Z0LmNvbSUyZmFjY2Vzc2NvbnRyb2xzZXJ2aWNlJTJmMjAxMCUyZjA3JTJmY2xhaW1zJTJmaWRlbnRpdHlwcm92aWRlcj11cmklM2FXaW5kb3dzTGl2ZUlEJkF1ZGllbmNlPWh0dHBzJTNhJTJmJTJma21haW4ta2RzLWV1czItMC5jbG91ZGFwcC5uZXQlMmYmRXhwaXJlc09uPTEzOTQ3NjExODEmSXNzdWVyPWh0dHBzJTNhJTJmJTJmdG9sZWRvLmFjY2Vzc2NvbnRyb2wud2luZG93cy5uZXQlMmYmSE1BQ1NIQTI1Nj1iVTg4cWs2OFc3bmFxOEZFam1EVUFWSlQySzZ5cCUyYkxmdGR4SlFlWDhsYXclM2Q=</wsse:BinarySecurityToken>
I've also tried changing the encoding to utf-8, but it made no difference. What causes a parser to fail with error 111? Is the parser not set up correctly, or is the XML killing it?
In NSXMLParserError docs, it says:
The following error codes are defined by NSXMLParser. For error codes not listed here, see the <libxml/xmlerror.h> header file.
The number 111 isn't mentioned in this list, so we go to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/libxml/xmlerror.h, and find the value:
XML_ERR_USER_STOP, /* 111 */
There isn't a lot of documentation on XML_ERR_USER_STOP in libxml2, but from reading the changeset, it looks like it's a fast-fail when the parser sees an unexpected EOF.
Referred DebugCN and Internet.
Turns out I was simply passing in an entirely wrong string. The XML chunk came from a larger JSON structure, which I then processed down to get the only XML part; yet when inited the parser, I used the wrong string to create the NSData. So make sure you aren't mixing variables up. I'm still not sure why error 111 isn't defined in the documentation, though.