EHS6 OTAP problem: Invalid JAD Type

811 views
Skip to first unread message

Florent

unread,
May 4, 2014, 5:13:41 PM5/4/14
to java...@googlegroups.com
Hi everyone,

I have problems triggering OTAP on the EHS6.

These are the commands I'm typing:
at^sjotap?
^SJOTAP: ,"http://94.23.55.152:8080/helloehs6/helloehs6.jad","a:",,,"gprs","websfr",,,,,"off","off"
at^sjotap
OK
at^scfg="Trace/Syslog/Otap","1"
OTAP.OUT STARTED
[OTAP] PS Detach
[OTAP] Starting installation
[OTAP] Try to get http://94.23.55.152:8080/helloehs6/helloehs6.jad ...
[OTAP] Transfer finished.
[OTAP] DONE with status: Invalid JAD Type
[OTAP] operation failed
[OTAP] Reboot now.

The JAD contains the following fieds and I don't see what is wrong with them:
MIDlet-1: Main,,helloehs6.MainMidlet
MIDlet-Description: Hello world test
MIDlet-Jar-Size: 999
MIDlet-Jar-URL: http://94.23.55.152:8080/helloehs6/helloehs6.jar
MIDlet-Name: helloehs6
MIDlet-Vendor: Webingenia
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: IMP-NG
Oracle-MIDlet-Autostart: 2
Oracle-MIDlet-Restart: true
Oracle-MIDlet-Restart-Count: 10

I've read the documentation and I can't figure out what I'm doing wrong.

Best regards,
Florent

Ahmed Adnane

unread,
May 5, 2014, 6:06:54 AM5/5/14
to java...@googlegroups.com
Hello Florent,
Did you check the encoding of your jad file, I'm not sure but logically it can be the origin of such an error
Regards,


--
javacint group - http://www.javacint.com/
---
You received this message because you are subscribed to the Google Groups "Cinterion Java enabled chips support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javacint+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
ADNANE Ahmed

Florent

unread,
May 5, 2014, 3:57:40 PM5/5/14
to java...@googlegroups.com
Hi,

It's pure ASCII. There's no special chars. And it's generated directly from netbeans like I always do without problems.

So I don't think this is it.

Best regards,

On Monday, May 5, 2014 12:06:54 PM UTC+2, Ahmed ADNANE wrote:
Hello Florent,
Did you check the encoding of your jad file, I'm not sure but logically it can be the origin of such an error
Regards,
To unsubscribe from this group and stop receiving emails from it, send an email to javacint+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
ADNANE Ahmed

Ondřej Janovský

unread,
May 5, 2014, 4:53:15 PM5/5/14
to java...@googlegroups.com
Florent, try to put your midlet to another server on port 80 and url without port number. Some old J2ME phones had problem with another ports.

I compared your JAD with my for EHS5, it is similar, I can't find any error.
To unsubscribe from this group and stop receiving emails from it, send an email to javacint+u...@googlegroups.com.

Florent Clairambault

unread,
May 5, 2014, 6:17:49 PM5/5/14
to javacint
Hi,

It indeed works on port 80 but I think it's because of the server software change. I'm pretty sure the chip checks the Content-Type of the JAD and JAR files and they were not being reported correctly by the thttpd server on port 8080.

Here are some details (with only the most important data):

# curl http://94.23.55.152:8080/helloehs6/helloehs6.jad -v
< HTTP/1.1 200 OK
< Server: thttpd/2.25b 29dec2003
< Content-Type: text/plain; charset=iso-8859-1
 
# curl http://94.23.55.152/helloehs6/helloehs6.jad -v
< HTTP/1.1 200 OK
< Server: Apache
< Content-Type: text/vnd.sun.j2me.app-descriptor

have been using this secondary server because I had some issues with some versions of the TC65 not willing to download files from Apache. But it turns out now it's the opposite behavior.
The good thing is that it proves a lot of things were changed with the EHS5/EHS6 chips.

Best regards,
-- 
Florent

eppie

unread,
Jun 11, 2014, 9:43:43 AM6/11/14
to java...@googlegroups.com
Florent did you find the solution? I have the same problem with an EHS6 module. JAD file looks beeing downloaded ok but the JAR is not good. With the TC65 this was working correctly. So far compatibility....

[OTAP] ====================================================================
[OTAP] Parameters set via AT command:
[OTAP] JAD File URL: http://otap.apn.***.nl/OtapService.svc/file/8931086013116574607/tc65.app.gateway.jad
[OTAP] Bearer: GPRS
[OTAP] Apn Or Num: apn.maingate
[OTAP] Notify URL: http://otap.apn.***.nl/OtapService.svc/notify/8931086013116574607
[OTAP] no sms PID check: off
[OTAP] hide HTTTP authentication params: off
[OTAP] ====================================================================
[OTAP] Parameters for current procedure:
[OTAP] JAD File URL: http://otap.apn.***.nl/OtapService.svc/file/8931086013116574607/tc65.app.gateway.jad
[OTAP] Http User:
[OTAP] Http Pwd:
[OTAP] Bearer: GPRS
[OTAP] Apn Or Num: apn.maingate
[OTAP] Net User:
[OTAP] Net Pwd:
[OTAP] Dns: 0.0.0.0
[OTAP] Notify URL: http://otap.apn.***.nl/OtapService.svc/notify/8931086013116574607
[OTAP] no sms PID check: off
[OTAP] hide HTTTP authentication params: off
[OTAP] ====================================================================
[OTAP] Starting OTAP download operation
[OTAP] Stopping all midlets
[OTAP] midlets stopped
[OTAP] PS Detach
[OTAP] Starting installation
[OTAP] Try to get http://otap.apn.***.nl/OtapService.svc/file/8931086013116574607/tc65.app.gateway.jad ...
[OTAP] Transfer finished.
[OTAP] Update of existing midlet
[OTAP] JAR file download
[OTAP] Try to get http://otap.apn.***.nl/OtapService.svc/file/8931086013116574607/tc65.app.gateway.jar ...
[OTAP] Transfer finished.
[OTAP] Installation completed with result: 907 Invalid JAR
[OTAP] Try to post result to http://otap.apn.***.nl/OtapService.svc/notify/8931086013116574607 ...
[OTAP] ERROR: Result post failed!
[OTAP] DONE with status: Invalid JAR Type
[OTAP] operation failed
[OTAP] Reboot now.

Download JAD header
Connected to *.nl (192.168.110.20) port 80
> GET /OtapService.svc/file/8931086013116574607/tc65.app.gateway.jad HTTP/1.1
> User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: *
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 11 Jun 2014 13:39:34 GMT
< Server: Microsoft-IIS/7.5
< Cache-Control: private
< Content-Length: 418
< Content-Type: text/vnd.sun.j2me.app-descriptor
< Content-disposition: attachment;filename="tc65.app.gateway.jad"
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Via: 1.1 otap.apn.ireal.nl (Apache/2.2.22)


Download JAR header
* Connected to *** (192.168.110.20) port 80
> GET /OtapService.svc/file/8931086013116574607/tc65.app.gateway.jar HTTP/1.1
> User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: ***
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 11 Jun 2014 13:39:11 GMT
< Server: Microsoft-IIS/7.5
< Cache-Control: private
< Content-Length: 1646042
< Content-Type: application/jar
< Content-disposition: attachment;filename="tc65.app.gateway.jar"
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Via: 1.1 otap.apn.ireal.nl (Apache/2.2.22)


Florent Clairambault

unread,
Jun 13, 2014, 10:51:57 AM6/13/14
to javacint
Hi Eppie,

Here is what I have:


< HTTP/1.1 200 OK
< Server: Apache
< Content-Type: application/java-archive

Best regards,
-- 
Florent

eppie

unread,
Jun 17, 2014, 5:08:51 AM6/17/14
to java...@googlegroups.com
Thank you Florent! will give it a try. Why is this not in the officials documentation regarding OTAP :s

eppie

unread,
Jul 14, 2014, 10:37:14 AM7/14/14
to java...@googlegroups.com
For the record, the solution from Florent is working correct for me. For tc65 and ehsx.

Sergio DQ

unread,
Oct 20, 2014, 7:57:32 AM10/20/14
to java...@googlegroups.com
Sorry, but how I can change Content-Type: application/java-archive ? 

When I get curl of my JAD file I get < Content-Type: text/vnd.sun.j2me.app-descriptor

Because I´ve found the same problem in a BGS5T my OTAP trace gets 

[OTAP] Installation completed with result: 907 Invalid JAR<CR><LF>

[OTAP] No NotifyURL set. Not posting result.<CR><LF>

[OTAP] DONE with status: Invalid JAR Type<CR><LF>

Florent Clairambault

unread,
Oct 21, 2014, 7:47:07 PM10/21/14
to javacint
Hi,

It depends on your server. On Apache2/Debian, it relies on the /etc/mime.types file:

This is what I have a on debian server:
# grep ja[rd] /etc/mime.types 
application/java-archive jar
text/vnd.sun.j2me.app-descriptor jad

Best regards,
-- 
Florent

Sergio DQ

unread,
Oct 22, 2014, 4:00:27 PM10/22/14
to java...@googlegroups.com
Thanks for your answer. But still I continue with the same issue.

When I make:   curl http://www.domain.com/xxx.jad -v

I´ve got  : HTTP/1.1 200 OK
< Date: Wed, 22 Oct 2014 14:45:15 GMT
< Server: Apache
< Last-Modified: Mon, 20 Oct 2014 11:19:38 GMT
< Accept-Ranges: bytes
< Content-Length: 757
< Connection: close
< Content-Type: text/vnd.sun.j2me.app-descriptor

When I make : curl http://www.domain.com/xxx.jar -v

< HTTP/1.1 200 OK
< Date: Wed, 22 Oct 2014 14:45:26 GMT
< Server: Apache
< Last-Modified: Mon, 20 Oct 2014 11:19:39 GMT
< ETag: "280003-f0eb-505d8e3f348c0"
< Accept-Ranges: bytes
< Content-Length: 61675
< Connection: close
< Content-Type: application/x-java-archive

And when I tried to make OTAP I´ve got the same result

[OTAP] Installation completed with result: 907 Invalid JAR<CR><LF>

[OTAP] No NotifyURL set. Not posting result.<CR><LF>

[OTAP] DONE with status: Invalid JAR Type<CR><LF>

Reply all
Reply to author
Forward
Message has been deleted
0 new messages