jiangzhendong / google-api-translate-java

Automatically exported from code.google.com/p/google-api-translate-java
0 stars 0 forks source link

English to Croation translation is not working #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
... it throws exceptions:

java.lang.Exception: [google-api-translate-java] Error retrieving 
translation.
    at com.google.api.translate.Translate.retrieveTranslation
(Translate.java:85)
    at com.google.api.translate.Translate.translate(Translate.java:57)
    at gluposti.GoogleTranslateTest$1.actionPerformed
(GoogleTranslateTest.java:60)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown 
Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown 
Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown 
Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown 
Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown 
Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassCastException: org.json.JSONObject$Null cannot 
be cast to org.json.JSONObject
    at com.google.api.translate.Translate.retrieveTranslation
(Translate.java:79)
    ... 27 more

Original issue reported on code.google.com by joshe...@gmail.com on 24 Nov 2008 at 1:59

GoogleCodeExporter commented 8 years ago
It works for me after my patch. See 
http://code.google.com/p/google-api-translate-java/issues/detail?id=36

Original comment by maticpetek on 29 Nov 2008 at 10:15

GoogleCodeExporter commented 8 years ago
Thanks to maticpetek for the patch, this is now in source control and should be
available in the latest release shortly.

Original comment by rich.mid...@gmail.com on 9 Dec 2008 at 6:23