InvalidJadException
Dear All,
I'm facing problem with MIDlet. When I 'build' the program, there was no error. But, when I 'run' the program, the execution suddenly completed without any action from me. For your info, I have run the program twice (succesfully) before the program 'behaves' like this.
the console displays these :
========================================================
com.sun.midp.midletsuite.InvalidJadException: Reason = 28
at com.sun.midp.midletsuite.JadProperties.partialLoad(+259)
at com.sun.midp.midletsuite.JadProperties.load(+8)
at com.sun.midp.dev.DevMIDletSuiteImpl.create(+252)
at com.sun.midp.dev.DevMIDletSuiteImpl.create(+74)
at com.sun.midp.main.Main.runLocalClass(+20)
at com.sun.midp.main.Main.main(+116)
Execution completed.
========================================================
Can anybody help me? Thanks for your help.
Dewi Pramudi
Bandung, Indonesia
Hi,
Extract from doc:
(28) A key for an attribute is not formatted correctly. The extra data is the key or the line of the attribute.
Jack
Similar Messages
-
I get this error in WTK2.1 while trying to create package. Even the demos cannot be packaged.
The exact error is:
com.sun.kvem.midletsuite.InvalidJadException: Reason = 13
The file C:\WTK21\apps\photoalbum\bin\MANIFEST.MF is missing the required attribute: MIDlet-Name
The parameters are correctly set in Settings (the program above is a demo packaged with WTK2.1)
Any help is appreciated. I use Windows XP.strange, check if the manifest looks like this one
MIDlet-1: PhotoAlbum,, example.photoalbum.PhotoAlbum
MIDlet-Data-Size: 256
MIDlet-Description: Photoalbum of images
MIDlet-Name: PhotoAlbum
MIDlet-Permissions: javax.microedition.io.Connector.http
MIDlet-Vendor: Sun Microsystems, Inc.
MIDlet-Version: 2.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.0
if not, there is something wrong. These lines above are from my manifest and it works. Maybe you made some strange settings about the MIDlet-Name?
hth
Kay -
Hello,
Im getting the following error when trying to run a J2ME MIDlet app. (I'm using sun wireless toolkit 2.52):
com.sun.midp.installer.InvalidJadException: Reason = 2
at com.sun.midp.security.Permissions.openPropertiesFile(), bci=100
at com.sun.midp.security.Permissions.readPermissionsTable(), bci=8
at com.sun.midp.security.Permissions.initialized(Permissions.java:1122)
at com.sun.midp.security.Permissions.getUntrustedDomainName(Permissions.java:385)
at com.sun.midp.security.Permissions.forDomain(), bci=141
at com.sun.midp.installer.InternalMIDletSuiteImpl.initSecurityHandler(), bci=14
at com.sun.midp.installer.InternalMIDletSuiteImpl.setTempProperty(), bci=423
at com.sun.midp.main.MIDletSuiteLoader.main(), bci=1011
I'm using windows 7. permission to read the files is set. So what's wrong? Thanks in advance.Hi,
when i create the project and give class name then folders created are:
bin
lib
src
res
and a properties file project
Now i m placing the .java file in the src folder .
Then when i build..it shows
build Initializing in a small pop-up window and then in toolkit it displays
No sources to compile
Build failed..
in the bin folder teher was onlu manifest and jad file ..no jar file was created ,i thnk thats why it showed " No sources to compile ".
please tell me where to find the .jar file .
or any settings i need to configure? -
How to handle long lines in a JAD file?
Hi all,
setting MIDlet permissions in a JAD file easily expands the length of one line so that they need to get wrapped into 2 or more lines. AFAIK JADs actually are manifest files and the manifest file spec says that a line continuation is marked by a line beginning with a single space. I use Ant to create the JAD file and Ant's manifest task does it exactly like this. Example:
MIDlet-Permissions: javax.microedition.io.Connector.bluetooth.client,j
avax.microedition.io.Connector.socketThis works on my Sony Ericsson phone and in the MicroEmu emulator, but the WTK (2.5.2) emulator complains about that by throwing an exception:
com.sun.midp.midletsuite.InvalidJadException: Reason = 28
at com.sun.midp.midletsuite.JadProperties.partialLoad(+259)
at com.sun.midp.midletsuite.JadProperties.load(+8)
at com.sun.midp.dev.DevMIDletSuiteImpl.create(+252)
at com.sun.midp.dev.DevMIDletSuiteImpl.create(+74)
at com.sun.midp.main.Main.runLocalClass(+20)
at com.sun.midp.main.Main.main(+80)So who is wrong here?
Thanks for some information!
Best regards,
BrianMIDlet-Permissions: javax.microedition.io.Connector.bluetooth.client,j
avax.microedition.io.Connector.socketif memory serves, inability to handle stuff like above is a known WTK bug.
Try workarounds like "glueing" permissions into single (long) line or splitting them on commas -
Hi,
i'm using netbeans mobility 5.0
as i was new to this mobile programming i'm getting the output as "Connection Refused"
plz plz plz plz....... help me out from this problem
here is my code..
code:_
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import java.io.*;
public class FileViewer extends MIDlet implements CommandListener
private Display display; // Reference to Display object
private TextBox tbViewer; // View file contents in a textbox
private Command cmView; // Command to view file
private Command cmExit; // Command to exit
private String url = "http://www.corej2me.com/midpbook_v1e1/scratch/fileViewer.hlp";
public FileViewer()
display = Display.getDisplay(this);
// Define commands
cmView = new Command("View", Command.SCREEN, 2);
cmExit = new Command("Exit", Command.EXIT, 1);
tbViewer = new TextBox("Viewer", "", 250, TextField.ANY);
tbViewer.addCommand(cmView);
tbViewer.addCommand(cmExit);
tbViewer.setCommandListener(this);
public void startApp()
display.setCurrent(tbViewer);
private void viewFile() throws IOException
HttpConnection http = null;
InputStream iStrm = null;
try
http = (HttpConnection) Connector.open(url);
// Client Request
// 1) Send request method
http.setRequestMethod(HttpConnection.GET);
// 2) Send header information (this header is optional)
http.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
// 3) Send body/data - No data for this request
// Server Response
// 1) Get status Line
System.out.println("Msg: " + http.getResponseMessage());
System.out.println("Code: " + http.getResponseCode());
// 2) Get header information
if (http.getResponseCode() == HttpConnection.HTTP_OK)
// 3) Get data (show the file contents)
iStrm = http.openInputStream();
int length = (int) http.getLength();
if (length > 0)
byte serverData[] = new byte[length];
iStrm.read(serverData);
tbViewer.setString(new String(serverData));
finally
if (iStrm != null)
iStrm.close();
if (http != null)
http.close();
public void pauseApp()
public void destroyApp(boolean unconditional)
public void commandAction(Command c, Displayable s)
if (c == cmView)
try
viewFile();
catch (Exception e)
System.out.println(e.toString());
else if (c == cmExit)
destroyApp(false);
notifyDestroyed();
output*
build.xml(debug)*
some....
Application descriptor does not declare any MIDlet. Direct execution is not allowed.
Generated "C:\Documents and Settings\Lakshmi Narayan J\jlnexample\dist\jlnexample.jar" is 2655 bytes.
post-jar:
debug:
C:\Documents and Settings\Lakshmi Narayan J\jlnexample\src\.timestamp
Starting emulator in debug server mode on port 1469
com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
The manifest or the application descriptor MUST contain the attribute: MIDlet-1
nbdebug:
KdpDebugTask connecting to debugger 1 ..
KdpDebugTask connecting to debugger 2 ..
KdpDebugTask connecting to debugger 3 ..
KdpDebugTask connecting to debugger 4 ..
KdpDebugTask connecting to debugger 5 ..
Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:306: The following error occurred while executing this line:
C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:311: Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
BUILD FAILED (total time: 43 seconds)
Debugger console:
Attaching to localhost:1469
Connection refused.
Edited by: LAKSHMI_NARAYAN_J on Jun 23, 2008 9:54 AMIt's called potential deadlock. The emulator blocks your app 'cause any connection and commandAction needs its own thread. So I suggest use a new thread with this http connection then your program will be run successful.
-
Why is the .jar file not created??
the error i get is :
com.sun.kvem.midletsuite.InvalidJadException: Reason = 36
Error in opening jar file: list.jar
and in the \j2mewtk\2.5.2\apps\list\bin there are only 2 files are :
list.jad
MANIFEST.MF.
Why is that so?
Edited by: angelusPiper on May 7, 2009 7:24 AMHi Sudipto,
I'm assuming that you used the <wsgen> Ant task (in your build.xml) to create this
web service, right?
Are you sure the client.jar file isn't in the web-services.war? You can verify this
by extracting this file (web-services.war) from the .ear for your web service, and
viewing its contents with WinZip (or the jar.exe utility that comes with the JDK).
There is a way to create client code without having a client.jar (or a WSDL document),
but it takes a little more work :-) I have attached a "heavily commented" example
of this, at the bottom of this post.
Regards,
Mike Wooten
"Sudipto" <[email protected]> wrote:
>
Hi,
I have developed a web service for our Internal network. I have deployed
the web
service onto weblogic 6.1 and have been able to obtain the wsdl file. I
have coded
my java client, but to compile and run the client, I require the client.jar
file,
which weblogic should create on its own once the actual web service is successfully
deployed. wl server is not able able to create the client.jar file and hence
I am
unable to run the client. Could anyone tell me why the client.jar file is
not being
created and is there any workaround for coding the java client without using
the
client.jar file.
Thanx
sudipto[NoWSDLWeatherClient.java] -
Vendor attribute error???????
When I try to create package with KToolbar 2.1 I get this excpetion:
com.sun.kvem.midletsuite.InvalidJadException: Reason = 50
The MIDlet-Vendor attribute MUST be identical in the descriptor and manifest files.
I olso have an older KToolbar 1.0.4 and there everything seem to be ok but the application doesn't work on the mobile phone...But that KToolbar creates these files and I set in the settings the vendor so I suppose the KToolbar should do the rest(set Vendor attribute in jar and jad file).
-
Java.util.MissingResourceException: Missing device property
Hi all.
I've installed:
Sun Java Wireless Toolkit 2.5.2 for CLDC
Java Platform Micro Edition Software Development Kit 3.0 Early Access ( i suposed that it isn't necessarly)
JDK 6 Update 13
NetBeans IDE 6.5.1 (All)
After instalation i run WTK - > open sample project -> run and get this:
Warning: Could not start new emulator process:
java.util.MissingResourceException: Missing device property
Project is building without problems but i can't run it ;/ In NetBeans i have similiar problem i can't run sample projects because i have this:
Starting emulator in execution mode
com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
The manifest or the application descriptor MUST contain the attribute: MIDlet-1
I've re-installed everything many times without windows :) I tried to search solutions for that but i couldn't find anything usefull.
I will be very apreciate for helping me.
Edited by: grubasek on Apr 1, 2009 3:29 AM
i have of course more partitions and WTK, NetBeans, ME SDK 3.0 are installed on other than C: but JDK is installed on C: in program files where in path is space. It has any meaning?Did you figure this out? I've got exactly the same problem. Same error that is getting reported. The resource missing is the AMConfig.properties file which is required for the Access Manager Policy agent. Agent doesn't work until I get the WebSphere config correct.
Thanks in advance. -
Problem in installing MIDlet in the phone
Problem in installing MIDlet in the phone
The program cannot be installed in the phone,
When I double-clicked the JAD file in "bin" folder, there's an error message:
com.sun.kvem.midletsuite.InvalidJadException: Reason = 36
Error in opening jar file: HomeX1.jar
Anybody can help me?{color:red}CROSS POSTED{color}
[http://forum.java.sun.com/thread.jspa?threadID=5302738]
Cross posting is rude.
db -
WTK 2.2+Proguard 3.07: Preverify Error?
I unjarred proguard.jar and added few lines to keep some classes and then jarred the folder back to wtk22/bin
When I also followed proguard's user manual to change the ktoolbar property file
obfuscator.runner.class.name: proguard.wtk.ProGuardObfuscator
obfuscator.runner.classpath: \\bin\proguard.jar
Then I tried to obfuscated my project in WTK 2.2, I got following errors:
Building "DP"
ProGuard, version 3.0.7
Reading program jar [C:\WTK22\apps\DP\bin\DP.jar]
Reading library jar [C:\WTK22\lib\midpapi20.jar]
Reading library jar [C:\WTK22\lib\cldcapi10.jar]
Preparing output jar [D:\Profiles\E50008\LOCALS~1\Temp\DP.jar]
Copying resources from program jar [C:\WTK22\apps\DP\bin\DP.jar]
Error preverifying class ad
VERIFIER ERROR ad.f(Ljava/lang/String;)Z:
Mismatched stack types
com.sun.kvem.ktools.ExecutionException: Preverifier returned 1
Build failed
com.sun.kvem.midletsuite.InvalidJadException: Reason = 31
The jar size value in the Application Descriptor does not match the real jar file size.
Then I tried to open a simpler project and obfuscated; it worked fine.
Any suggestion?
Thanks in advance.do anyone got the solve about it?
i just the same problem with you...
this is the following errors when i tried to obfuscated my project in WTK2.2, and i'm work with proguard3.3
Project settings saved
Building "RemoteExecMIDlet"
Build complete
Project settings saved
Building "RemoteExecMIDlet"
ProGuard, version 3.3
Reading program jar [srv/WTK2.1/apps/RemoteExecMIDlet/bin/RemoteExecMIDlet.jar]
Reading library jar [srv/WTK2.1/lib/midpapi20.jar]
Reading library jar [srv/WTK2.1/lib/wma.jar]
Reading library jar [srv/WTK2.1/lib/cldcapi10.jar]
Preparing output jar [tmp/RemoteExecMIDlet.jar]
Copying resources from program jar [srv/WTK2.1/apps/RemoteExecMIDlet/bin/RemoteExecMIDlet.jar]
Note: duplicate definition of library class [com.sun.cldc.i18n.j2me.UTF_8_Reader]
com.sun.kvem.ktools.ExecutionException: Preverifier returned 1
Build failed
com.sun.kvem.midletsuite.InvalidJadException: Reason = 31
The jar size value in the Application Descriptor does not match the real jar file size.
Error preverifying class com.jcraft.jsch.A
VERIFIER ERROR com/jcraft/jsch/A.a(Lcom/jcraft/jsch/f;)Z:
Incompatible object argument for function call
i dont know what to do with these error...
thx.. -
Hello world!
I'm having a problem with my J2ME midlet. I can build it correctly, but I'm having problems running it.
When running that way :
emulator -Dcom.sun.midp.io.http.proxy=0:0 -Xdescriptor:C:\WTK21\apps\project\bin\MIDmain.jad
I'm obtaining this error:
com.sun.kvem.midletsuite.InvalidJadException: Reason = 18
Missing Jar URL in the jad descriptor
here is my MIDmain.jad file:
MIDlet-1: MIDmain, MIDmain.png, MIDmain
MIDlet-Name: MIDmain
midlet-jar-size: 7211
MIDlet-Jar-URL: C:\WTK21\apps\playboy\bin\MIDmain.jar
MIDlet-Permissions: javax.microedition.io.Connector.http
MIDlet-Vendor: Sun Microsystems
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
It seems to me that the Jar URL is in the jar descriptor, isn't it?
Here is my MANIFEST.MF file, by any chance:
MIDlet-1: MIDmain, MIDmain.png, MIDmain
MIDlet-Name: MIDmain
MIDlet-Permissions: javax.microedition.io.Connector.http
MIDlet-Vendor: Sun Microsystems
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
Any ideas?
I'm using WTK21 on windows 2000Hi
have you got any solution for the problem.If so please help as I am also facing the
same issue.
thanks
Hello world!
I'm having a problem with my J2ME midlet. I can build
it correctly, but I'm having problems running it.
When running that way :
emulator -Dcom.sun.midp.io.http.proxy=0:0
-Xdescriptor:C:\WTK21\apps\project\bin\MIDmain.jad
I'm obtaining this error:
com.sun.kvem.midletsuite.InvalidJadException: Reason =
18
Missing Jar URL in the jad descriptor
here is my MIDmain.jad file:
MIDlet-1: MIDmain, MIDmain.png, MIDmain
MIDlet-Name: MIDmain
midlet-jar-size: 7211
MIDlet-Jar-URL: C:\WTK21\apps\playboy\bin\MIDmain.jar
MIDlet-Permissions:
javax.microedition.io.Connector.http
MIDlet-Vendor: Sun Microsystems
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
It seems to me that the Jar URL is in the jar
descriptor, isn't it?
Here is my MANIFEST.MF file, by any chance:
MIDlet-1: MIDmain, MIDmain.png, MIDmain
MIDlet-Name: MIDmain
MIDlet-Permissions:
javax.microedition.io.Connector.http
MIDlet-Vendor: Sun Microsystems
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
Any ideas?
I'm using WTK21 on windows 2000
Maybe you are looking for
-
Copying apps from one itunes account to another
I have been using my moms account to buy apps for the past couple of years(as has my whole family) but im moving out and need to get my own account, will i be able to transfer my apps from her account to mine? It is on the same laptop already.
-
Best way to get bytes from a ByteBuffer
Hi, I see three possible ways to get the bytes from a ByteBuffer in a new byte array. (if I get the backed array, a change in that array will change the ByteBuffer, that's why I insist on new array). 1. System.arraycopy on the backed array 2. clone()
-
Variable creation for Transaction S_ALR_87013336
Hi I am getting following error on executing the transaction S_ALR_87013336 Global variable & has been deleted Message no. KH488 Diagnosis Global variable & has been deleted. Procedure Modify the report or form so that it no longer uses global variab
-
Error 372, Print Spooler Operation Failed
I have 2 remote offices logging in to a Server 2012 R2 via RDS, i'm using the Easy print redirect for printing. I've this setup for about a year, 2 days ago users started reporting they could not print from RDS. I restarted the Print Spooler Service
-
size of flash container is not well set on flex