on 10-25-2012 4:03 PM
Hello,
I'm trying to run the sample application which can be found here: https://cw.sdn.sap.com/cw/docs/DOC-146460, and it fails to make a request due to a strange ClassCastException. Stack trace looks like this:
10-25 14:35:56.568: E/MDP(650): Error: 1053 Native Error: -2146233088 Message: 'Error: 502 Message: com.sybase.djc.transaction.TransactionRolledbackSystemException: com.sybase.sup.server.msgchannel.internal.MessageChannelInternal.dispatch(com.sybase.sup.server.msgchannel.internal.InternalContext, com.sybase.sup.server.msgchannel.internal.Request, com.sybase.sup.server.msgchannel.internal.Response)' Detail: '<object>monet:SupBridge.dll:SupMessageChannel</object><method>Execute</method>'
10-25 14:35:56.568: E/MDP(650): at com.sybase.mo.MoObject.execute(MoObject.java:648)
10-25 14:35:56.568: E/MDP(650): at com.sybase.mobile.lib.client.SUPServerRmiCalls.makeRequest(SUPServerRmiCalls.java:174)
10-25 14:35:56.568: E/MDP(650): at com.sybase.mobile.lib.client.SUPServerRmiCalls.makeRequest(SUPServerRmiCalls.java:317)
10-25 14:35:56.568: E/MDP(650): at com.sybase.mobile.lib.client.IMOConnectionFactory.makeRequest(IMOConnectionFactory.java:306)
10-25 14:35:56.568: E/MDP(650): at com.sybase.mobile.lib.client.IMOConnectionHandler.performRequest(IMOConnectionHandler.java:337)
10-25 14:35:56.568: E/MDP(650): at com.sybase.mobile.lib.client.IMOConnectionHandler.makeHttpRequest(IMOConnectionHandler.java:176)
10-25 14:35:56.568: E/MDP(650): at com.sap.mobile.lib.sdmconnectivity.AbstractConnectionHandler.processRequestType(AbstractConnectionHandler.java:193)
10-25 14:35:56.568: E/MDP(650): at com.sap.mobile.lib.sdmconnectivity.AbstractConnectionHandler.processRequestsFromQueue(AbstractConnectionHandler.java:125)
10-25 14:35:56.568: E/MDP(650): at com.sybase.mobile.lib.client.IMOConnectionHandler.run(IMOConnectionHandler.java:97)
...
10-25 14:35:57.998: E/AbstractListScreen(650): List error HTTP status: -1 Error in network connection.
10-25 14:35:57.998: E/AbstractListScreen(650): java.lang.ClassCastException: com.sybase.afx.json.JsonArray cannot be cast to com.sybase.afx.json.JsonObject
10-25 14:35:57.998: E/AbstractListScreen(650): at com.sybase.mobile.lib.client.SUPResponse.prepareResponse(SUPResponse.java:64)
10-25 14:35:57.998: E/AbstractListScreen(650): at com.sybase.mobile.lib.client.IMOConnectionFactory.makeRequest(IMOConnectionFactory.java:306)
10-25 14:35:57.998: E/AbstractListScreen(650): at com.sybase.mobile.lib.client.IMOConnectionHandler.performRequest(IMOConnectionHandler.java:337)
10-25 14:35:57.998: E/AbstractListScreen(650): at com.sybase.mobile.lib.client.IMOConnectionHandler.makeHttpRequest(IMOConnectionHandler.java:176)
10-25 14:35:57.998: E/AbstractListScreen(650): at com.sap.mobile.lib.sdmconnectivity.AbstractConnectionHandler.processRequestType(AbstractConnectionHandler.java:193)
10-25 14:35:57.998: E/AbstractListScreen(650): at com.sap.mobile.lib.sdmconnectivity.AbstractConnectionHandler.processRequestsFromQueue(AbstractConnectionHandler.java:125)
10-25 14:35:57.998: E/AbstractListScreen(650): at com.sybase.mobile.lib.client.IMOConnectionHandler.run(IMOConnectionHandler.java:97)
I'm using SUP 2.1.3 and Android 4.1, SCC shows that the connection was successful and the app status is online. I'd be grateful for any help on this.
Thanks!
Lukasz
On Android 2.3.3 I experience the same behavior.
Does anyone know about any working OData + Android sample apps?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lukasz,
In the stack trace I see the error code "Error in network connection". At what point are you getting this error? While requesting for data?
Have you configured proxy URL in SCC?
If you are tying to create a new android app using SUP-ODP, you can refer to http://scn.sap.com/docs/DOC-23532.
Regards
Rohith
Hi Rohith,
Yes, the error occurs after app registration, while requesting for data. Proxy in Application Connection Properties has been set to http://gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2, however I've noticed in SUP Server logs the following problem: "Error=Login Failed: user 'GW@ESW'. Account is locked due to previous login failures. Account will be unlocked in 599 seconds." When I try to test my connection in SCC ('Domains' -> 'default' -> 'Connections', then 'Properties' and 'Test connection') it just says ping failed even though I've set password and login for the Gateway (see the screenshot). I've cross checked the Gateway credentials using a web browser and they are correct.
Could this problem be caused by the fact that the SUP server is running on my local machine, behind the corporate proxy and thus the Gateway instance is unreachable? If so, how can I set HTTP proxy for SUP server?
Thanks!
Lukasz
Hi Lukasz,
Good that you are getting into the cause of error.
1. If your SUP is behind firewall, and data provider URL is in internet, you cannot reach. as far as I know, SUP does not have any HTTP proxy configuration option. You can try by setting some Odata provider URL within firewall.
2. You can also try by moving your system(where SUP is installed) to internet.
If you are in corporate network, I am wondering how did you get "Error=Login Failed: user 'GW@ESW'. Account is locked due to previous login failures. Account will be unlocked in 599 seconds." ?
Did you check if the user is really locked?
Regards
Rohith
Apache HTTP server with mod_proxy and mod_rewrite solved the problem with corporate proxy. BTW here is a great tutorial on OData, SUP and Android: http://scn.sap.com/docs/DOC-27410
Hi Madiha,
So your problem is the one with login ("Error=Login Failed: user 'GW@ESW")? If you are behind a proxy make sure that your SUP server can connect to the Gateway. Since it is not possible to setup a proxy in SUP server, for my development purposes I solved this issue by proxying the traffic between my SUP Server and the Gateway through a local Apache instance with mod_proxy. I don't know how familiar with Apache you are but this configuration in httpd.conf does the job:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
RewriteEngine On
RewriteRule ^(.+) http://gw.esworkplace.sap.com/$1 [P]
ProxyPassReverse / http://gw.esworkplace.sap.com/
http://gw.esworkplace.sap.com is the address of sample Gateway instance I was using.
If you don't have any proxy, and you can access the Gateway with your browser then maybe as Rohith mentioned you didn't set the Application Connection proxy in SCC.
What I've also noticed was that this example: http://scn.sap.com/docs/DOC-27410 was working perfectly while this: https://cw.sdn.sap.com/cw/docs/DOC-146460 was causing some problems.
Regards,
Lukasz
Hi Lukasz,
Thank you Replaying me. i don't have any proxy i used the same config as mentioned in the example
http://scn.sap.com/docs/DOC-27410 . In effect the two examples causing problems in getFlightCollection() . i think that there's problem with filter just saying i am not sure !!!
Hi Madiha,
Error code 401 is for invalid login credentials. Check if you are passing the right login credentials of gateway.
Also check the gateway client in the URL. You can get the complete gateway URL from the server logs. Check if you are trying to login to the correct client. (Ex: User exists in gateway client 001, URL has client 000)
Regards
Rohith
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.