aspose file tools*
The moose likes Java Micro Edition and the fly likes problem with jsr172 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "problem with jsr172" Watch "problem with jsr172" New topic
Author

problem with jsr172

Kurinchikumaran Thavarajah
Greenhorn

Joined: Dec 06, 2004
Posts: 13
To use sun's jsr172, the api should be already installed in the phone.

I created an application using sun's api classes , midlet classes and generated stubs.

It gives error in real phone. (please reffer my other questions about jsr172)

as i mentioned in other questions, my api and sun's api is not working and give same error.

please any body help me. I am hanging in these things for a long time and I 'm unable to move to any other things.
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
1. You cannot run JSR 175 apps on a device that does not support this API.

2. You do not say what is the private API you developed yourself. Did you write a SOAP parser from scratch to process the WS-RPC traffic on your device?


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Kurinchikumaran Thavarajah
Greenhorn

Joined: Dec 06, 2004
Posts: 13
Yes , I developed my own api according to jsr172. It has 2 optional packages jaxrpc and jaxp. jaxp is a a sax parser implementation. and jaxrpc is an rpc module. My api is fully independent from other apis. I only used cldc10.jar and midpapi.jar to developed my project. It is not dependent on any other apis. It doesn't use sun's j2me api any where. If clearly says, my api can be used for web accessing instead of sun's api.

I developed mobile applications using my api, midlet class and generated stubs by my wsdl2java tool. It works well with wireless tool kit. But I am unable to run it in a real phone. I got the problems with these phones,

Nokia 3650- I installed the jar. But while running it throws "application error ,illegal state exception"

Nokia 6600- I couldn't install my jar file. while installing using bluetooth it throws "authorisation fail"

I developed mobile applications using sun's api, midlet class and generated stubs by sun's tool. It works well with wireless tool kit. But it gives same problem with phones.

Here I checked for both midp1 and 2.And for normally packaged jar and obfuscated jar. but same error comes.

And enother problem I found while writing this message. The packaged jar also works well with wireless tool kit. But obfuscated jar throws error while running in wireless tool kit,the error is

" Uncaught exception java/lang/NoClassDefFoundError: javax/xml/rpc/a: Cannot create class in system package "

what is the reason for this error? But simple applications are working well with packaged jar and also with obfuscated jar.

So i am looking forward from you soon with a complete reply to solve obfuscation error, and please let me know how can I test my implementation in a phone. and the type of phone.
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
How big is your application JAR file? Did you include implementation classes for your own API in the JAR? Can you run on Nokia's emulators? You can not have any class in the "javax" name space. So, you need to change the package name in your own API.
Kurinchikumaran Thavarajah
Greenhorn

Joined: Dec 06, 2004
Posts: 13
Thanks for ur reply.

Yes I got the application work on the phone.

The problem is I had some packages with standard names including java. , javax. etc. After I changed all the names it works well with the phone.

But i'm using some already existing classes. so i want to have the original package names. What should i do to to have those packages with original name. It is a must for me.
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
The phone will not accept any class under the "java" or "javax" packages. However, when you develop your app, you can use those package names in the source code and then obfuscate the entire application with the library. You need to obfuscate the package names as well as the class names (the example you showed earlier only have class names obfuscated).

You cannot deliver standalone libraries to the device -- so you will always include the library JAR will all of your apps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with jsr172