Hey im trying to develop a rest API by using this doc go-endpoints
I can test my app locally and on the app engine .
But i cant create a Java client in order to consume it on android device,
for some reason I'm getting an
HTTP 400 No JSON object could be decoded
on this command
GO_SDK/endpointscfg.py gen_client_lib java MY_FILE_NAME
This is the full stack trace
mik#mik-Aspire-S3:~/go-programs/src/cloudEndPoints/app$ $HOME/go_appengine/endpointscfg.py gen_client_lib java ballota_test
Traceback (most recent call last):
File "/home/mik/go_appengine/endpointscfg.py", line 133, in <module>
run_file(__file__, globals())
File "/home/mik/go_appengine/endpointscfg.py", line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "/home/mik/go_appengine/google/appengine/tools/endpointscfg.py", line 561, in <module>
main(sys.argv)
File "/home/mik/go_appengine/google/appengine/tools/endpointscfg.py", line 557, in main
args.callback(args)
File "/home/mik/go_appengine/google/appengine/tools/endpointscfg.py", line 458, in _GenClientLibCallback
args.build_system)
File "/home/mik/go_appengine/google/appengine/tools/endpointscfg.py", line 335, in _GenClientLib
build_system, client_name)
File "/home/mik/go_appengine/google/appengine/tools/endpointscfg.py", line 366, in _GenClientLibFromContents
raise ServerRequestException(error)
__main__.ServerRequestException: HTTP 400 (Bad Request) error when communicating with URL: https://google-api-client-libraries.appspot.com/generate. Details: ill-formed JSON: No JSON object could be decoded
UPDATE
I tried to built this sample project tictactoe as a Java client and i got the same error
I posted an issue in
crhym3 cloud endpoints example and he helped my to understand my error.
My mistake was that i tried to create the client with the wrong URL address .
This is the wrong address.
https://winged-precept-894.appspot.com this will return 404
And this is the correct discovery api URL.
https://winged-precept-894.appspot.com/_ah/api/discovery/v1/apis/myapp/v1/rpc
So it was a url error and not a Json oriented error .
Related
I want to run a customer script which inturn runs multiple python files from my java programs. the script runs fine when in run the jar manually from the terminal using java -jar jarfilename.jar but fails when i run the same jar as service in background.
I'm getting the following error in my debug log
Site:16 RESULT:False:Vmin test completed with no report! Something went wrong.#_#
Site:9 Traceback (most recent call last):
Site:9 File "pexpect/spawnbase.py", line 166, in read_nonblocking
Site:9 OSError: [Errno 5] Input/output error
Site:9
Site:9 During handling of the above exception, another exception occurred:
Site:9
Site:9 Traceback (most recent call last):
Site:9 File "pexpect/expect.py", line 111, in expect_loop
Site:9 File "pexpect/pty_spawn.py", line 485, in read_nonblocking
Site:9 File "pexpect/spawnbase.py", line 171, in read_nonblocking
Site:9 pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
Site:9
Site:9 During handling of the above exception, another exception occurred:
Site:9
Site:9 Traceback (most recent call last):`
The above error shows OSError: [Errno 5] Input/output error which from this link linki found it might be due to the print stattement in py file but unfortunately i don't have access to any customer file how can we handle it from java side or any thing when writing a service might fix it?
I am trying to make a Bluetooth app with Kivy so I need to use java classes, I get this error message when I use Pyjnius
Traceback (most recent call last):
File "C:\Users\Omer Akbas\Desktop\My Apps (Kivy)\First\main.py", line 3, in
<module>
BluetoothAdapter = autoclass('android.bluetooth.BluetoothAdapter')
File "C:\Python27\lib\site-packages\jnius\reflect.py", line 158, in
autoclass
c = find_javaclass(clsname)
File "jnius\jnius_export_func.pxi", line 25, in jnius.find_javaclass
JavaException: Class not found 'android/bluetooth/BluetoothAdapter'
If you're building a Kivy app, pyjnius is installed in the APK automatically as a dependency of Kivy, so you don't have to do anything special beyond the normal Programming Guide » Create a package for Android documentation.
I'm trying to write a Java application that uses the JournalParser to extract authors, citations, etc. from journal articles. The documentation for the GrobidJournalParser gives instructions for the command line app and for TikaServer. I need to point to Grobid running somewhere other than localhost:8080. I have a GrobidExtractor.properties file containing the correct URL on my classpath, but it doesn't seem to get found - I get an error because it's trying to access Grobid on localhost:8080.
WARNING: Interceptor for {http://localhost:8080/processHeaderDocument}WebClient has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: No message body writer has been found for class org.apache.cxf.jaxrs.ext.multipart.MultipartBody, ContentType: multipart/form-data
at org.apache.cxf.jaxrs.client.WebClient$BodyWriter.doWriteBody(WebClient.java:1220)
Is there some other way to tell Tika or the JournalParser where to find Grobid? The Javadocs were not helpful in this regard.
As explained in the documentation on using GROBID with Tika, if you want to configure Tika to use an alternate GROBID server you do so with a file named org/apache/tika/parser/journal/GrobidExtractor.properties
You have only called yours GrobidExtractor.properties, which is why it isn't being picked up. The full path is required
Assuming you're using Linux, using the Tika app, and with the GROBID properties in the current directory, you'd need to fix it with something like:
mkdir -p org/apache/tika/parser/journal
mv GrobidExtractor.properties org/apache/tika/parser/journal/
java -classpath .:tika-app-1.13.jar org.apache.tika.cli.TikaCLI --metadata journal.pdf
I'm trying to insert data to my local DB using a XML file. Actually I did it using postman client in chrome, I put the XML definition and I gave my service URL send it by POST and in work fine.
Now I'm trying to do it with curl commandline, this is the line that I'm using:
curl -F "file=#/Users/Jonathan/Documents;filename=variable.xml" 127.0,0.1:8080/WU-BDP-MetadataManagement/v1/variables
Where file# is the path to my XML file and variable.xml is my file name next to my service URL but this is not working.
Some advice of what im doing wrong?
Regards!
You are using the whole directory instead of file /Users/Jonathan/Documents and it should be something like /Users/Jonathan/Documents/variable.xml
So your overall command will be
curl -F "file=#/Users/Jonathan/Documents/variable.xml;filename=variable.xml" 127.0,0.1:8080/WU-BDP-MetadataManagement/v1/variables
I am trying to use Apache CFX wsdl2java command on Mac OSX.
I have run this command ./wsdl2java .
The error I get is the following: WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from :
Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing ''.: java.io.IOException: Server returned HTTP response code: 401 for URL:
I believe the reason I get this error is because it requires Windows Authentication. I have tried to search on how to do this, but I have had no luck so far.
I would be extremely thankful for any help or ideas on this topic.
Thanks ahead of time.
If Axis 1.3, you can try
wsdl2java -uri http://user:pass#myapp.example.com/service/myService.wsdl
If Axis 1.4+ you can try
wsdl2java -http-proxy-user user -http-proxy-password pass -uri http://myapp.example.com/service/myService.wsdl
Use singleWsdl rather than wsdl, save it and reference the local copy in command parameters.
use abc/service/myService.singleWsdl rather than abc/service/myService.wsdl