Search Results

Search found 355 results on 15 pages for 'j2me newbiew'.

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • PWC1406: Servlet.service() threw exception java.io.IOException: Invalid chunk header When client se

    - by Nivek
    I am developing an application using J2ME to send the GPS coordinates received to the server and i am new to developing client server application. Everything works fine with the use of Nokia N97mini or E71. But when i tried it on HTC HD2, i get the exception from the server. I am using Netbeans 6.5.1 GlassFish V2 as Server. I have no idea why this error occurs only on the HTC HD2. Any help will be greatly appreciated. Thanks... Below is the error message: StandardWrapperValve[FindHospitalServlet]: PWC1406: Servlet.service() for servlet FindHospitalServlet threw exception java.io.IOException: Invalid chunk header at org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilter.java:171) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:719) at org.apache.coyote.Request.doRead(Request.java:482) at org.apache.coyote.tomcat5.InputBuffer.realReadBytes(InputBuffer.java:342) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:378) at org.apache.coyote.tomcat5.InputBuffer.readByte(InputBuffer.java:351) at org.apache.coyote.tomcat5.CoyoteInputStream.read(CoyoteInputStream.java:159) at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:320) at java.io.DataInputStream.readUTF(DataInputStream.java:572) at java.io.DataInputStream.readUTF(DataInputStream.java:547) at myPackage.FindHospitalServlet.doPost(FindHospitalServlet.java:28) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Below is the code that i wrote to connect to the server: private void connectFindHospServlet() { String url = "http://172.22.190.13:8080/UpdateServlet/FindHospitalServlet"; StringBuffer sb = new StringBuffer(); String info = lat+"!"+lng+"!"; try { HttpConnection c = (HttpConnection) Connector.open(url); c.setRequestProperty("User-Agent","Profile/MIDP-2.0, Configuration/CLDC-1.0"); c.setRequestProperty("Content-Language","en-US"); c.setRequestMethod(HttpConnection.POST); DataOutputStream os = (DataOutputStream)c.openDataOutputStream(); os.writeUTF(info); os.flush(); os.close(); // Get the response from the servlet page. DataInputStream is =(DataInputStream)c.openDataInputStream(); int ch; sb = new StringBuffer(); while ((ch = is.read()) != -1) sb.append((char)ch); is.close(); c.close(); if(sb.toString().charAt(0) == 'n') { formDisplayResultFindHosp(); display.setCurrent(formDisplayResultFindHosp); } else { PlannerMain pm = new PlannerMain(); hospInfo = pm.getFindHospInfo(sb.toString().substring(0, sb.length()-2)); formDisplayResultFindHosp(hospInfo); display.setCurrent(formDisplayResultFindHosp); } } catch (Exception e) { System.out.println("Error recieve find user"); } } Any information needed to better help in understanding the problem, do let me know. I will try to provide as much as possible.

    Read the article

  • Trying to convert simple midlet application to Android application but running into problems.

    - by chobo2
    Hi I am trying to do some threading in Android so I took an old threading assignment I had done fora midlet and took out the midlet code and replaced it with android code(such as textview). package com.assignment1; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class Threading extends Activity { private TextView tortose; private TextView hare; private Thread hareThread; private Thread torotoseThread; private int num = 0; private int num2 = 0; public Threading() { } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tortose = (TextView) findViewById(R.id.TextView01); hare = (TextView) findViewById(R.id.TextView02); Hare newHare = new Hare(); hareThread = new Thread(newHare); hareThread.start(); Torotose newTortose = new Torotose(); torotoseThread = new Thread(newTortose); torotoseThread.start(); //updateDisplay(); } private synchronized void check(int value1, int value2) { if((value1-value2) >= 10) { try { wait(); } catch(Exception ex) { System.out.println(ex); } } } private synchronized void getGoing(int value1, int value2) { if((value1-value2) == 0) { try { notify(); } catch(Exception ex) { System.out.println(ex); } } } private class Hare extends Thread { public void run() { while(true) { num++; hare.setText(Integer.toString(num)); check(num, num2); try { // are threads different in andriod apps? Thread.sleep(100); // hareThread.sleep(100); } catch(Exception ex) { System.out.println(ex); } } } } private class Torotose extends Thread { public void run() { while(true) { num2++; tortose.setText(Integer.toString(num2)); getGoing(num,num2); try { Thread.sleep(200); //torotoseThread.sleep(200); } catch(Exception ex) { System.out.println(ex); } } } } } First it wanted me to change my threads to like static threads.So is this just how Android does it? Next when I run this code it just crashes with some unexpected error. I am not sure what the error is but when I try to debug it and goes to like to create a new "hare" object it shows me this. // Compiled from ClassLoader.java (version 1.5 : 49.0, super bit) public abstract class java.lang.ClassLoader { // Method descriptor #8 ()V // Stack: 3, Locals: 1 protected ClassLoader(); 0 aload_0 [this] 1 invokespecial java.lang.Object() [1] 4 new java.lang.RuntimeException [2] 7 dup 8 ldc <String "Stub!"> [3] 10 invokespecial java.lang.RuntimeException(java.lang.String) [4] 13 athrow Line numbers: [pc: 0, line: 4] Local variable table: [pc: 0, pc: 14] local: this index: 0 type: java.lang.ClassLoader // Method descriptor #14 (Ljava/lang/ClassLoader;)V // Stack: 3, Locals: 2 protected ClassLoader(java.lang.ClassLoader parentLoader); 0 aload_0 [this] 1 invokespecial java.lang.Object() [1] 4 new java.lang.RuntimeException [2] 7 dup 8 ldc <String "Stub!"> [3] 10 invokespecial java.lang.RuntimeException(java.lang.String) [4] 13 athrow Line numbers: [pc: 0, line: 5] Local variable table: [pc: 0, pc: 14] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 14] local: parentLoader index: 1 type: java.lang.ClassLoader // Method descriptor #17 ()Ljava/lang/ClassLoader; // Stack: 3, Locals: 0 public static java.lang.ClassLoader getSystemClassLoader(); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 6] // Method descriptor #19 (Ljava/lang/String;)Ljava/net/URL; // Stack: 3, Locals: 1 public static java.net.URL getSystemResource(java.lang.String resName); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 7] Local variable table: [pc: 0, pc: 10] local: resName index: 0 type: java.lang.String // Method descriptor #23 (Ljava/lang/String;)Ljava/util/Enumeration; // Signature: (Ljava/lang/String;)Ljava/util/Enumeration<Ljava/net/URL;>; // Stack: 3, Locals: 1 public static java.util.Enumeration getSystemResources(java.lang.String resName) throws java.io.IOException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 8] Local variable table: [pc: 0, pc: 10] local: resName index: 0 type: java.lang.String // Method descriptor #29 (Ljava/lang/String;)Ljava/io/InputStream; // Stack: 3, Locals: 1 public static java.io.InputStream getSystemResourceAsStream(java.lang.String resName); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 9] Local variable table: [pc: 0, pc: 10] local: resName index: 0 type: java.lang.String // Method descriptor #31 ([BII)Ljava/lang/Class; // Signature: ([BII)Ljava/lang/Class<*>; // Stack: 3, Locals: 4 protected final java.lang.Class defineClass(byte[] classRep, int offset, int length) throws java.lang.ClassFormatError; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 10] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: classRep index: 1 type: byte[] [pc: 0, pc: 10] local: offset index: 2 type: int [pc: 0, pc: 10] local: length index: 3 type: int // Method descriptor #39 (Ljava/lang/String;[BII)Ljava/lang/Class; // Signature: (Ljava/lang/String;[BII)Ljava/lang/Class<*>; // Stack: 3, Locals: 5 protected final java.lang.Class defineClass(java.lang.String className, byte[] classRep, int offset, int length) throws java.lang.ClassFormatError; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 11] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: className index: 1 type: java.lang.String [pc: 0, pc: 10] local: classRep index: 2 type: byte[] [pc: 0, pc: 10] local: offset index: 3 type: int [pc: 0, pc: 10] local: length index: 4 type: int // Method descriptor #42 (Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class; // Signature: (Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class<*>; // Stack: 3, Locals: 6 protected final java.lang.Class defineClass(java.lang.String className, byte[] classRep, int offset, int length, java.security.ProtectionDomain protectionDomain) throws java.lang.ClassFormatError; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 12] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: className index: 1 type: java.lang.String [pc: 0, pc: 10] local: classRep index: 2 type: byte[] [pc: 0, pc: 10] local: offset index: 3 type: int [pc: 0, pc: 10] local: length index: 4 type: int [pc: 0, pc: 10] local: protectionDomain index: 5 type: java.security.ProtectionDomain // Method descriptor #46 (Ljava/lang/String;Ljava/nio/ByteBuffer;Ljava/security/ProtectionDomain;)Ljava/lang/Class; // Signature: (Ljava/lang/String;Ljava/nio/ByteBuffer;Ljava/security/ProtectionDomain;)Ljava/lang/Class<*>; // Stack: 3, Locals: 4 protected final java.lang.Class defineClass(java.lang.String name, java.nio.ByteBuffer b, java.security.ProtectionDomain protectionDomain) throws java.lang.ClassFormatError; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 13] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: name index: 1 type: java.lang.String [pc: 0, pc: 10] local: b index: 2 type: java.nio.ByteBuffer [pc: 0, pc: 10] local: protectionDomain index: 3 type: java.security.ProtectionDomain // Method descriptor #52 (Ljava/lang/String;)Ljava/lang/Class; // Signature: (Ljava/lang/String;)Ljava/lang/Class<*>; // Stack: 3, Locals: 2 protected java.lang.Class findClass(java.lang.String className) throws java.lang.ClassNotFoundException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 14] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: className index: 1 type: java.lang.String // Method descriptor #52 (Ljava/lang/String;)Ljava/lang/Class; // Signature: (Ljava/lang/String;)Ljava/lang/Class<*>; // Stack: 3, Locals: 2 protected final java.lang.Class findLoadedClass(java.lang.String className); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 15] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: className index: 1 type: java.lang.String // Method descriptor #52 (Ljava/lang/String;)Ljava/lang/Class; // Signature: (Ljava/lang/String;)Ljava/lang/Class<*>; // Stack: 3, Locals: 2 protected final java.lang.Class findSystemClass(java.lang.String className) throws java.lang.ClassNotFoundException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 16] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: className index: 1 type: java.lang.String // Method descriptor #17 ()Ljava/lang/ClassLoader; // Stack: 3, Locals: 1 public final java.lang.ClassLoader getParent(); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 17] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader // Method descriptor #19 (Ljava/lang/String;)Ljava/net/URL; // Stack: 3, Locals: 2 public java.net.URL getResource(java.lang.String resName); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 18] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: resName index: 1 type: java.lang.String // Method descriptor #23 (Ljava/lang/String;)Ljava/util/Enumeration; // Signature: (Ljava/lang/String;)Ljava/util/Enumeration<Ljava/net/URL;>; // Stack: 3, Locals: 2 public java.util.Enumeration getResources(java.lang.String resName) throws java.io.IOException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 19] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: resName index: 1 type: java.lang.String // Method descriptor #29 (Ljava/lang/String;)Ljava/io/InputStream; // Stack: 3, Locals: 2 public java.io.InputStream getResourceAsStream(java.lang.String resName); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 20] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: resName index: 1 type: java.lang.String // Method descriptor #52 (Ljava/lang/String;)Ljava/lang/Class; // Signature: (Ljava/lang/String;)Ljava/lang/Class<*>; // Stack: 3, Locals: 2 public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 21] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: className index: 1 type: java.lang.String // Method descriptor #62 (Ljava/lang/String;Z)Ljava/lang/Class; // Signature: (Ljava/lang/String;Z)Ljava/lang/Class<*>; // Stack: 3, Locals: 3 protected java.lang.Class loadClass(java.lang.String className, boolean resolve) throws java.lang.ClassNotFoundException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 22] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: className index: 1 type: java.lang.String [pc: 0, pc: 10] local: resolve index: 2 type: boolean // Method descriptor #67 (Ljava/lang/Class;)V // Signature: (Ljava/lang/Class<*>;)V // Stack: 3, Locals: 2 protected final void resolveClass(java.lang.Class clazz); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 23] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: clazz index: 1 type: java.lang.Class Local variable type table: [pc: 0, pc: 10] local: clazz index: 1 type: java.lang.Class<?> // Method descriptor #19 (Ljava/lang/String;)Ljava/net/URL; // Stack: 3, Locals: 2 protected java.net.URL findResource(java.lang.String resName); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 24] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: resName index: 1 type: java.lang.String // Method descriptor #23 (Ljava/lang/String;)Ljava/util/Enumeration; // Signature: (Ljava/lang/String;)Ljava/util/Enumeration<Ljava/net/URL;>; // Stack: 3, Locals: 2 protected java.util.Enumeration findResources(java.lang.String resName) throws java.io.IOException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 25] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: resName index: 1 type: java.lang.String // Method descriptor #76 (Ljava/lang/String;)Ljava/lang/String; // Stack: 3, Locals: 2 protected java.lang.String findLibrary(java.lang.String libName); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 26] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: libName index: 1 type: java.lang.String // Method descriptor #79 (Ljava/lang/String;)Ljava/lang/Package; // Stack: 3, Locals: 2 protected java.lang.Package getPackage(java.lang.String name); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 27] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: name index: 1 type: java.lang.String // Method descriptor #81 ()[Ljava/lang/Package; // Stack: 3, Locals: 1 protected java.lang.Package[] getPackages(); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 28] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader // Method descriptor #83 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/net/URL;)Ljava/lang/Package; // Stack: 3, Locals: 9 protected java.lang.Package definePackage(java.lang.String name, java.lang.String specTitle, java.lang.String specVersion, java.lang.String specVendor, java.lang.String implTitle, java.lang.String implVersion, java.lang.String implVendor, java.net.URL sealBase) throws java.lang.IllegalArgumentException; 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 29] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: name index: 1 type: java.lang.String [pc: 0, pc: 10] local: specTitle index: 2 type: java.lang.String [pc: 0, pc: 10] local: specVersion index: 3 type: java.lang.String [pc: 0, pc: 10] local: specVendor index: 4 type: java.lang.String [pc: 0, pc: 10] local: implTitle index: 5 type: java.lang.String [pc: 0, pc: 10] local: implVersion index: 6 type: java.lang.String [pc: 0, pc: 10] local: implVendor index: 7 type: java.lang.String [pc: 0, pc: 10] local: sealBase index: 8 type: java.net.URL // Method descriptor #94 (Ljava/lang/Class;[Ljava/lang/Object;)V // Signature: (Ljava/lang/Class<*>;[Ljava/lang/Object;)V // Stack: 3, Locals: 3 protected final void setSigners(java.lang.Class c, java.lang.Object[] signers); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 30] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: c index: 1 type: java.lang.Class [pc: 0, pc: 10] local: signers index: 2 type: java.lang.Object[] Local variable type table: [pc: 0, pc: 10] local: c index: 1 type: java.lang.Class<?> // Method descriptor #100 (Ljava/lang/String;Z)V // Stack: 3, Locals: 3 public void setClassAssertionStatus(java.lang.String cname, boolean enable); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 31] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: cname index: 1 type: java.lang.String [pc: 0, pc: 10] local: enable index: 2 type: boolean // Method descriptor #100 (Ljava/lang/String;Z)V // Stack: 3, Locals: 3 public void setPackageAssertionStatus(java.lang.String pname, boolean enable); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 32] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: pname index: 1 type: java.lang.String [pc: 0, pc: 10] local: enable index: 2 type: boolean // Method descriptor #106 (Z)V // Stack: 3, Locals: 2 public void setDefaultAssertionStatus(boolean enable); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 33] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader [pc: 0, pc: 10] local: enable index: 1 type: boolean // Method descriptor #8 ()V // Stack: 3, Locals: 1 public void clearAssertionStatus(); 0 new java.lang.RuntimeException [2] 3 dup 4 ldc <String "Stub!"> [3] 6 invokespecial java.lang.RuntimeException(java.lang.String) [4] 9 athrow Line numbers: [pc: 0, line: 34] Local variable table: [pc: 0, pc: 10] local: this index: 0 type: java.lang.ClassLoader } So I am not sure where I went wrong. Thanks

    Read the article

  • BlackBerry Horizontal Scrolling in TreeField or ListField

    - by sethxian
    I am working on an application that requires text larger than the viewable screen size in both a TreeField and a ListField. As you know, the TreeField and ListField callbacks support only graphics.drawText() methods, so I cannot add an instance of a Field per row. Does anyone have a method of Scrolling horizontally past the viewable text size? Is there maybe a scrollable panel that would work? I know of the NullField(Field.Focusable) trick but this won't work on the list field. Lastly, I am aware that the type of screen makes a different as FullScreen and MainScreen use VerticalFieldMangers. So am using a PopupScreen at the moment for my testing. Thank you in advance for your time.

    Read the article

  • BlackBerry - waiting screen

    - by Pankaj Pareek
    Hello , i am developing one application in blackberry java development. I am requesting to http means i am connecting to web service .response of web service taking some time .That time i want to display some waiting screen. Could you tell me how can i do that.... Regards Pankaj Pareek

    Read the article

  • LWUIT Deadlock (lwuit dialog VS System dialog)

    - by Ramps
    Hi, I have a deadlock problem when I try to make some I/O operations that needs user permission. When user click the button I start a new thread which is responsible for performing IO operations, and I display lwuit "please wait" dialog. Dialog is dismissed by IO thread from callback method. Problem is that, when system dialog appears (asking for user permission ) on top of lwuit dialog - deadlock occurs. I assume that this is because dialog.show() method blocks main thread (EDT), so it's impossible to dismiss system dialog, when lwuit dialog is behind it. Anyone managed to solve this problem? Here is the simplified code, hope it is clear enough: protected void actionPerformed(ActionEvent evt, int id) { switch (id) { case ID_FRIEND: MyRunnableWithIoOperation r = new MyRunnableWithIoOperation(this); new Thread(r).start(); //run the thread performing IO operations Command cmd = mWaitDialog.showDialog(); // show the "please wait" dialog ...//handle cancel }//end switch } /* method called from MyRunnableWithIoOperation, when operation finished*/ public void myCallbackMethod(){ mWaitDialog.dispose(); // } I tried to start my IO thread by calling Display.getInstance().invokeAndBlock( r ), but with no luck. In such case, my "wait dialog" doesn't show up.

    Read the article

  • Blackberry Storm - focus issue on bitmap field

    - by SWATI
    in my screen there are 3 managers h1 h2 bmpf = new BitmapField added in order like this as backgroundmanager.add(h1) backgroundmanager.add(bmpf) backgroundmanager.add(h2) add(background manager); protected boolesn navigationClick() { int index1 = h1.getFieldWithFocusIndex(); int index2 = h2.getFieldWithFocusIndex(); return true; } mow i get the focus index of all focussable fields in managers h1 and h2 but i cant get index of the bitnmapfield on focus i need to execute some code on its click what to do

    Read the article

  • setTitle displays black background in Blackberry Bold

    - by SWATI
    hey i have made an application for BlackBerry Curve 8300 where i use setTitle() i have put in an image as background for setTitle() It works perfectly fine on curve simulator but when i deploy this app on bold(device and simulator both) for testing the setTitle() shows black background. i dont have curve device to test n check can any body suggest what could be the problem

    Read the article

  • Displaying a pdf file located on a http server from mobile phone

    - by JCasso
    I have some pdf files located on a http server: Like: http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf I need to display these files on a mobile application using java me. I tried to display them by opening Google Docs Viewer with platformRequest. However it seems Google Docs Viewer uses ajax and many mobile browsers does not support it. Is there an alternative for "Google Docs Viewer" for mobile devices ? Or is there a better solution for this problem ?

    Read the article

  • In Netbeans 6.8 cant find org.netbeans package

    - by Rohit
    I have netbeans 6.8 with java ME platform setup on my ubuntu 9.10. My code requires the package org.netbeans.microedition.lcdui which is either not installed or not in the path. Surprising this runs perfectly in netbeans 6.8 on windows on my friend's pc. Is there any java ME plugin I need to install? Can somebody help me out with this? Thanks in advance.

    Read the article

  • Error in java code.

    - by user243680
    I am getting the following error when i try to use a blue tooth dongle to transfer a video file from pc to mobile phone. does anyone know run: BlueCove log redirected to log4j log4j:WARN No appenders could be found for logger (com.intel.bluetooth). log4j:WARN Please initialize the log4j system properly. BlueCove version 2.1.0 on bluesoleil java.io.IOException: Device not discovered BlueCove stack shutdown completed at com.intel.bluetooth.BluetoothStackBlueSoleil.connectionRfOpenClientConnection(BluetoothStackBlueSoleil.java:361) at com.intel.bluetooth.BluetoothRFCommClientConnection.<init>(BluetoothRFCommClientConnection.java:37) at com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:379) at com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:162) at javax.microedition.io.Connector.open(Connector.java:83) at de.avetana.obexsolo.OBEXConnector.open(OBEXConnector.java:103) at OBEXTest.main(OBEXTest.java:23)

    Read the article

  • KeyPressed working on N95 but not woking on N86 etc

    - by awaghad-ashish
    I have a customItem in my application and I am using keypressed event for it. Until now, I have been testing my application on N95 and it works perfectly there but the same keypressed event is not working on other nokia phones such as N86 and ExpressMusic. Does anybody know what the issue is. Thanks and regards, Ashish.

    Read the article

  • BlueCove failing to associate with Bluetooth device in Java.

    - by user243680
    I am getting the following error when i try to use a blue tooth dongle to transfer a video file from pc to mobile phone. does anyone know run: BlueCove log redirected to log4j log4j:WARN No appenders could be found for logger (com.intel.bluetooth). log4j:WARN Please initialize the log4j system properly. BlueCove version 2.1.0 on bluesoleil java.io.IOException: Device not discovered BlueCove stack shutdown completed at com.intel.bluetooth.BluetoothStackBlueSoleil.connectionRfOpenClientConnection(BluetoothStackBlueSoleil.java:361) at com.intel.bluetooth.BluetoothRFCommClientConnection.<init>(BluetoothRFCommClientConnection.java:37) at com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:379) at com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:162) at javax.microedition.io.Connector.open(Connector.java:83) at de.avetana.obexsolo.OBEXConnector.open(OBEXConnector.java:103) at OBEXTest.main(OBEXTest.java:23)

    Read the article

  • how to close a popup screen in blackberry bold

    - by SWATI
    hey i have displayed a pop-up screen when i click on a menu item now i want to close that pop-up screen when user presses escape key.but it does not work and remain stuck,till i click on a button on the pop=up screen. how can i achieve that???? filter is my pop-up screen my code is ::: protected boolean keyChar(char c, int status, int time) { boolean retVal = false; if (c == Characters.ESCAPE) { close(); UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { //UiApplication.getUiApplication().popScreen(filter); UiApplication.getUiApplication(). popScreen(UiApplication.getUiApplication().getActiveScreen());//(filter); } }); retVal = super.keyChar(c,status,time); } return retVal; }

    Read the article

  • load images dynamically on scroll in blackberry

    - by Maneesh
    How to display images in the form of pages where only one page is displayed at a time on blackberry screen. On scrolling down subsequent images will load at run time. So that loading of images do not consume time at startup. Edit: I am using loadimage function which loads images from blackberry device memory which loads images from specified path and resizing them.As number of images increases, it increases the startup time during opening of window.There is an in-built application(Media) in blackberry phone, where images load without taking any extra time. My idea is to display particular number of images which fit to the blackberry screen. As user scroll down to bottom of screen, application will then load and display more images. So my question is how to detect when user reached to bottom of blackberry screen and display one more row images.

    Read the article

  • MIDP 2.0 version issues: $method is undefined for $type

    - by Kilnr
    Hi, I've written a MIDlet that does several "advanced" things: fetching images from the web, resizing them, saving them on the phone, displaying them. This all works perfectly in the Nokia S60 3rd Edition FP1 emulator. This device has MIDP 2.0 and CLDC 1.1 support (also JSR75, which I need in order to save files). It also works as it should on the Nokia E71 (physical device). I then tried to run the MIDlet on several other emulators. One of them, the DefaultCldcJtwiPhone2 from the Java ME SDK 3.0, also claims MIDP 2.0 and CLDC 1.1 support. It doesn't have JSR75, which explains why "FileConnection can not be resolved to a type". This does not, however, explain why List.deleteAll(), String.equalsIgnoreCase(String) and a few others are undefined. The actual errors that I get: The method ceil(double) is undefined for the type Math The method deleteAll() is undefined for the type List The method equalsIgnoreCase(String) is undefined for the type String The method getWidth() is undefined for the type Displayable When I look at the MIDP 2.0 (i.e. JSR118) API (http://java.sun.com/javame/reference/apis/jsr118/), I can clearly see all of these methods being present, with the "since" tag being either MIDP 2.0 or CLDC 1.1. My question: why doesn't an emulator with MIDP 2.0 support have access to all MIDP 2.0 methods? Or alternatively, what am I doing wrong?

    Read the article

  • Parser generator for JavaME

    - by Anders K.
    First: I have looked at this SO question but unfortunately there is no mention of JavaME I am looking for a parser/lexer generator that produces code that can run on the Blackberry and its (obnoxious) JavaME. E.g. at first I thought I could use ANTLR however it seems the run-time library is not compatible with JavaME TIA

    Read the article

  • Draw background for each cell in ObjectListField

    - by user315647
    Hi all, I am creating a blackberry apllication which pre-dominantly uses ObjectListFields..All i need now is to draw an image as a background for each cell. I know this is quiet possible but i am not getting hold of the procedure. if i draw bitmap in drawlistrow() function the bluehighlight gets into the background and the cell highlight becomes very hard to read......can anybody help me with a code snippet to get through this problem ....thanks...

    Read the article

  • Can obfuscation (proguard) lead to MIDlet malfunction?

    - by eMgz
    Hi, Im trying to obfuscate a Java MIDlet with proguard. It runs ok on the PC, however, when I run it on the phone, the program opens, connects to the server, and then freezes. If I disable obfuscation, it runs ok again on the phone. Ive tryed all the obfuscation levels for apps (7, 8 and 9 at NetBeans), and none of them seems to work properly, and I cant release this app for comercial use without obfuscation. Also, the compiler throws some warnings: Note: duplicate definition of library class [java.io.ByteArrayOutputStream] Note: there were 14 duplicate class definitions. But I dont know if this is realy the problem. Does anyone knows what is wrong? The obfuscator arguments are listed below: Obfuscator Arguments (7): -dontusemixedcaseclassnames -default package '' -keep public class ** { public *; } Obfuscator Arguments (8): same as (7) plus -overloadaggressively. Obfuscator Arguments (9): same as (8) but -keep public class ** extends javax.microedition.midlet.MIDlet { public *; } instead. Thanks.

    Read the article

  • Polish: Rendering of an empty menubar

    - by scheibenkleister
    Hi, I've recently upgraded Polish from 2.0.7 to 2.4.2, which causes a problem with the extended toolbar. Before everything works fine. But now, if the menubar doesn't contain an item/command, the menubar is partially rendered: http://img263.imageshack.us/img263/457/bugi.jpg Is that a known issue? Or has anything changed in the css definition? Thanks.

    Read the article

  • How do encrypt a long or int using the Bouncy Castle crypto routines for BlackBerry?

    - by DanG
    How do encrypt/decrypt a long or int using the Bouncy Castle crypto routines for BlackBerry? I know how to encrypt/decrypt a String. I can encrypt a long but can't get a long to decrypt properly. Some of this is poorly done, but I'm just trying stuff out at the moment. I've included my entire crypto engine here: import org.bouncycastle.crypto.BufferedBlockCipher; import org.bouncycastle.crypto.DataLengthException; import org.bouncycastle.crypto.InvalidCipherTextException; import org.bouncycastle.crypto.engines.AESFastEngine; import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher; import org.bouncycastle.crypto.params.KeyParameter; public class CryptoEngine { // Global Variables // Global Objects private static AESFastEngine engine; private static BufferedBlockCipher cipher; private static KeyParameter key; public static boolean setEncryptionKey(String keyText) { // adding in spaces to force a proper key keyText += " "; // cutting off at 128 bits (16 characters) keyText = keyText.substring(0, 16); keyText = HelperMethods.cleanUpNullString(keyText); byte[] keyBytes = keyText.getBytes(); key = new KeyParameter(keyBytes); engine = new AESFastEngine(); cipher = new PaddedBufferedBlockCipher(engine); // just for now return true; } public static String encryptString(String plainText) { try { byte[] plainArray = plainText.getBytes(); cipher.init(true, key); byte[] cipherBytes = new byte[cipher.getOutputSize(plainArray.length)]; int cipherLength = cipher.processBytes(plainArray, 0, plainArray.length, cipherBytes, 0); cipher.doFinal(cipherBytes, cipherLength); String cipherString = new String(cipherBytes); return cipherString; } catch (DataLengthException e) { Logger.logToConsole(e); } catch (IllegalArgumentException e) { Logger.logToConsole(e); } catch (IllegalStateException e) { Logger.logToConsole(e); } catch (InvalidCipherTextException e) { Logger.logToConsole(e); } catch (Exception ex) { Logger.logToConsole(ex); } // else return "";// default bad value } public static String decryptString(String encryptedText) { try { byte[] cipherBytes = encryptedText.getBytes(); cipher.init(false, key); byte[] decryptedBytes = new byte[cipher.getOutputSize(cipherBytes.length)]; int decryptedLength = cipher.processBytes(cipherBytes, 0, cipherBytes.length, decryptedBytes, 0); cipher.doFinal(decryptedBytes, decryptedLength); String decryptedString = new String(decryptedBytes); // crop accordingly int index = decryptedString.indexOf("\u0000"); if (index >= 0) { decryptedString = decryptedString.substring(0, index); } return decryptedString; } catch (DataLengthException e) { Logger.logToConsole(e); } catch (IllegalArgumentException e) { Logger.logToConsole(e); } catch (IllegalStateException e) { Logger.logToConsole(e); } catch (InvalidCipherTextException e) { Logger.logToConsole(e); } catch (Exception ex) { Logger.logToConsole(ex); } // else return "";// default bad value } private static byte[] convertLongToByteArray(long longToConvert) { return new byte[] { (byte) (longToConvert >>> 56), (byte) (longToConvert >>> 48), (byte) (longToConvert >>> 40), (byte) (longToConvert >>> 32), (byte) (longToConvert >>> 24), (byte) (longToConvert >>> 16), (byte) (longToConvert >>> 8), (byte) (longToConvert) }; } private static long convertByteArrayToLong(byte[] byteArrayToConvert) { long returnable = 0; for (int counter = 0; counter < byteArrayToConvert.length; counter++) { returnable += ((byteArrayToConvert[byteArrayToConvert.length - counter - 1] & 0xFF) << counter * 8); } if (returnable < 0) { returnable++; } return returnable; } public static long encryptLong(long plainLong) { try { String plainString = String.valueOf(plainLong); String cipherString = encryptString(plainString); byte[] cipherBytes = cipherString.getBytes(); long returnable = convertByteArrayToLong(cipherBytes); return returnable; } catch (Exception e) { Logger.logToConsole(e); } // else return Integer.MIN_VALUE;// default bad value } public static long decryptLong(long encryptedLong) { byte[] cipherBytes = convertLongToByteArray(encryptedLong); cipher.init(false, key); byte[] decryptedBytes = new byte[cipher.getOutputSize(cipherBytes.length)]; int decryptedLength = cipherBytes.length; try { cipher.doFinal(decryptedBytes, decryptedLength); } catch (DataLengthException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvalidCipherTextException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } long plainLong = convertByteArrayToLong(decryptedBytes); return plainLong; } public static boolean encryptBoolean(int plainBoolean) { return false; } public static boolean decryptBoolean(int encryptedBoolean) { return false; } public static boolean testLongToByteArrayConversion() { boolean returnable = true; // fails out of the bounds of an integer, the conversion to long from byte // array does not hold, need to figure out a better solution for (long counter = -1000000; counter < 1000000; counter++) { long test = counter; byte[] bytes = convertLongToByteArray(test); long result = convertByteArrayToLong(bytes); if (result != test) { returnable = false; Logger.logToConsole("long conversion failed"); Logger.logToConsole("test = " + test + "\n result = " + result); } // regardless } // the end Logger.logToConsole("final returnable result = " + returnable); return returnable; } }

    Read the article

  • Midlet signing issue

    - by abc
    Hello please check this. its not reposting . its just to focus more number of people on the problem. http://superuser.com/questions/135198/code-signing-issues

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >