Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    My application is working fine on Nokia E61i (S60)
    But when I start my application on Nokia 3110c (Series 40), App. Error screen appears saying:
    java/lang/NoSuchMethodError: No such method ByteAlignCurrentPosition.()V
    Note: ByteAlignCurrentPosition() is a function in my application

  2. #2
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Hi,
    That means that method is not in the picture of the device,
    Can you put the code here,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    My project contains 105 .java files and jar file size is 316 KB
    That method is present in several class

    But I don't understand one thing... Same jar file is running fine on Nokia E61i and same jar file is giving this problem on Nokia 3110c...why?

  4. #4
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Hi,
    I have no idea about it..just guessing -
    Make sure that the Nokia 3110 c support that perticluar class and hence then method..
    make sure that E 61 includes the details as follow
    Java Technology CLDC 1.1
    JSR 135 Mobile Media API
    JSR 172 Web Services API
    JSR 177 Security and Trust Services API
    JSR 179 Location API
    JSR 180 SIP API
    JSR 184 Mobile 3D Graphics API
    JSR 185 JTWI
    JSR 205 Wireless Messaging API
    JSR 75 FileConnection and PIM API
    JSR 82 Bluetooth API
    MIDP 2.0
    On the other hand the 3110
    Java Technology CLDC 1.1
    JSR 135 Mobile Media API
    JSR 172 Web Services API
    JSR 177 Security and Trust Services API
    JSR 184 Mobile 3D Graphics API
    JSR 185 JTWI
    JSR 205 Wireless Messaging API
    JSR 226 Scalable 2D Vector Graphics API
    JSR 75 FileConnection and PIM API
    JSR 82 Bluetooth API
    MIDP 2.0
    Nokia UI API
    Just compare that the class you are using is supported by the 3110 c,
    else no idea about the same,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    I already did that...
    My project uses following:
    CLDC 1.0
    MIDP 2.0
    JSR 120 Wireless Messaging API
    JSR 75 FileConnection and PIM API
    JSR 82 Bluetooth API
    MIDP 2.0
    where are supported by both the handsets...

    I tried compiling my project with Series_40_6th_Edition_SDK_v0_9_en
    and it gave me error
    G:\Projects\Software\J2ME\MyProject1\src\MyLibraries\IO\ClassBluetooth.java:48: cannot access javax.microedition.lcdui.ChoiceVector
    class file for javax.microedition.lcdui.ChoiceVector not found
    ListDevices = new List("", List.IMPLICIT);

  6. #6
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    Quote Originally Posted by arpit2agrawal View Post
    I tried compiling my project with Series_40_6th_Edition_SDK_v0_9_en
    and it gave me error
    That error is resolved by downloading file http://wiki.forum.nokia.com/index.php/Image:Midp21.zip
    The application is running fine on Emulator of Series_40_6th_Edition_SDK_v0_9_en
    But its giving error on Nokia 3110c as mentioned in the first post...

  7. #7
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    What steps do you have in your build process?

    You have javac with -source 1.2 and -target 1.1, then you preverify... anything else?

    In particular, are there any other tools not part of the JDK or WTK? Obfuscators, compression tools, etc?

    Cheers,
    Graham.

  8. #8
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    I have no extra tools
    I am using Netbeans IDE 6.0
    I just wrote all 105 .java files organized into 6 packages and then clicked on "Clean and Build Main Project (Shift+F11)" icon

  9. #9
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    This is output of Netbeans IDE 6.0 when I click on "Clean and Build Main Project (Shift+F11)" icon
    pre-init:
    pre-load-properties:
    exists.config.active:
    exists.netbeans.user:
    exists.user.properties.file:
    load-properties:
    exists.platform.active:
    exists.platform.configuration:
    exists.platform.profile:
    basic-init:
    cldc-pre-init:
    cldc-init:
    cdc-init:
    ricoh-pre-init:
    ricoh-init:
    semc-pre-init:
    semc-init:
    savaje-pre-init:
    savaje-init:
    nokiaS80-pre-init:
    nokiaS80-init:
    nsicom-pre-init:
    nsicom-init:
    post-init:
    init:
    conditional-clean-init:
    conditional-clean:
    pre-clean:
    clean-timestamp:
    Deleting: G:\Projects\Software\J2ME\MyProject1\build\.timestamp
    clean-preprocessed:
    Deleting directory G:\Projects\Software\J2ME\MyProject1\build\preprocessed
    clean-classes:
    Deleting directory G:\Projects\Software\J2ME\MyProject1\build\compiled
    clean-obfuscated:
    clean-preverified:
    Deleting directory G:\Projects\Software\J2ME\MyProject1\build\preverifysrc
    Deleting directory G:\Projects\Software\J2ME\MyProject1\build\preverified
    clean-manifest:
    Deleting: G:\Projects\Software\J2ME\MyProject1\build\manifest.mf
    clean-jar:
    Deleting: G:\Projects\Software\J2ME\MyProject1\dist\MyProject1.jar
    clean-jad:
    Deleting: G:\Projects\Software\J2ME\MyProject1\dist\MyProject1.jad
    clean-javadoc:
    clean-j9:
    clean-ricoh:
    clean-semc:
    clean-savaje:
    post-clean:
    do-clean:
    clean:
    deps-jar:
    pre-preprocess:
    do-preprocess:
    Created dir: G:\Projects\Software\J2ME\MyProject1\build\preprocessed
    Pre-processing 105 file(s) into G:\Projects\Software\J2ME\MyProject1\build\preprocessed directory.
    post-preprocess:
    preprocess:
    pre-compile:
    extract-libs:
    Created dir: G:\Projects\Software\J2ME\MyProject1\build\compiled
    Copying 2 files to G:\Projects\Software\J2ME\MyProject1\build\compiled
    do-compile:
    Compiling 105 source files to G:\Projects\Software\J2ME\MyProject1\build\compiled
    post-compile:
    compile:
    pre-obfuscate:
    proguard-init:
    skip-obfuscation:
    proguard:
    post-obfuscate:
    obfuscate:
    pre-preverify:
    do-preverify:
    Created dir: G:\Projects\Software\J2ME\MyProject1\build\preverifysrc
    Copying 123 files to G:\Projects\Software\J2ME\MyProject1\build\preverifysrc
    Created dir: G:\Projects\Software\J2ME\MyProject1\build\preverified
    Preverifying 123 file(s) into G:\Projects\Software\J2ME\MyProject1\build\preverified directory.
    Copying 2 files to G:\Projects\Software\J2ME\MyProject1\build\preverified
    post-preverify:
    preverify:
    pre-jar:
    set-password-init:
    set-keystore-password:
    set-alias-password:
    set-password:
    create-jad:
    add-configuration:
    add-profile:
    do-extra-libs:
    nokiaS80-prepare-j9:
    nokiaS80-prepare-manifest:
    nokiaS80-prepare-manifest-no-icon:
    nokiaS80-create-manifest:
    semc-build-j9:
    do-jar:
    Building jar: G:\Projects\Software\J2ME\MyProject1\dist\MyProject1.jar
    nsicom-create-manifest:
    do-jar-no-manifest:
    update-jad:
    Updating application descriptor: G:\Projects\Software\J2ME\MyProject1\dist\MyProject1.jad
    Generated "G:\Projects\Software\J2ME\MyProject1\dist\MyProject1.jar" is 323416 bytes.
    ricoh-init-dalp:
    ricoh-add-app-icon:
    ricoh-build-dalp-with-icon:
    ricoh-build-dalp-without-icon:
    ricoh-build-dalp:
    savaje-prepare-icon:
    savaje-build-jnlp:
    post-jar:
    jar:
    pre-build:
    override-jad:
    semc-ppro-arm:
    semc-make-sis-icon:
    semc-make-sis:
    semc-sign-sis:
    semc-no-sign-sis:
    semc-sis:
    increment-app-version:
    Updating property file: G:\Projects\Software\J2ME\MyProject1\nbproject\private\private.properties
    post-build:
    build:
    rebuild:
    BUILD SUCCESSFUL (total time: 2 seconds)

  10. #10
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    I don't use NetBeans, so it's hard for me to comment...

    There is a lot happening in your build script.

    Can you reproduce this error in any emulator?

  11. #11
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    Everything is working fine on WTK emulator as well as Series_40_6th_Edition_SDK_v0_9_en emulator...
    I can't reproduce the error on any emulator...

    also, some days before when I had around 75 files in my project, it was working fine on Nokia 3110c... but don't know what happened now...

  12. #12
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Hi,
    First point -
    There is no problem at all while cleaning and building the project....
    In fact this is the problem while running the application..can you test this thing on the other handset of the same technical features...

    Second point -
    The problem persists from the point you have added the file other then 75 file...you just think that what can be the reason and due to which file..
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  13. #13
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    I'm afraid I'm a bit lost on this one.

    Possibly, the number of classes you have exceeds some kind of limit. IBM have a tool called JAX, which can reduce the number of classes in a Java application. Unfortunately, you cannot licence this product, and it is not supported. However, you might find a copy somewhere.

    Alternatively, simply running the app through Proguard might help. This will at least reduce the size of the classes, and might reduce the number of them.

  14. #14
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    I have merged some come in different classes and reduced the number of classes to 93. But still the problem persists.
    I will try to isolate the problem by creating a new project with around 10 classes and post the progress here...

  15. #15
    Super Contributor arpit2agrawal's Avatar
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546
    Found the problem and Got the solution !!!

    Note this issue in Series 40 phones

    If you have:
    1. Interface named Interface1
    2. Abstract class named BaseClass which implements Interface1
    3. Derived class named DerivedClass which extends BaseClass
    Let's say Interface1 contains say 10 methods but BaseClass implements only 8 of them while rest 2 are implemented by DerivedClass then if you don't declare those 2 methods as abstract methods in BaseClass and if any BaseClass function access one of those methods then you get method not found error.

    Conclusion: Make sure you declare methods of interface which you don't implement as abstract methods otherwise you will face problem on some phones.
    Last edited by arpit2agrawal; 2009-01-05 at 20:38.

Page 1 of 2 12 LastLast

Similar Threads

  1. understanding series 30,40 vs. 60
    By hp3 in forum Symbian C++
    Replies: 9
    Last Post: 2008-11-06, 01:47
  2. MIDP applicatyion accessing a servlet not working in series 60 emulator
    By ferozekadamapuzha in forum Mobile Java General
    Replies: 11
    Last Post: 2008-05-07, 18:04
  3. Replies: 15
    Last Post: 2006-11-24, 01:06
  4. Replies: 0
    Last Post: 2006-08-11, 08:45
  5. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved