Build Error

56 views
Skip to first unread message

steve

unread,
Apr 11, 2014, 8:36:57 AM4/11/14
to codenameone...@googlegroups.com

Hi,
Im getting a build error(see attached document) when I'm trying to create a J2ME build from the server. i'm sending it using netbeans and i have the plugin version  1.0.70 (though im seeing there is version 1.0.71 which i'll download). The issue is I can create builds from other projects, I have tried the facebookdemo and it works. Also the program compiles and runs well on the emulator without any errors.

I don't understand the Warnings being given:
  •  the can't find enclosing method warnings -all the methods exist,
  • there were 32 unresolved references to program class members - the only instances of class members in my code is in the state machine (where it was commented out), it should be noted that i have not touched the StateMachine while creating the program.
  • Warning: com.sematime.bulksms.messages.sent.SentMessagesCompnent$12:  what does the $ represent?...
  • Alternatively, you may have to specify the option          '-dontskipnonpubliclibraryclassmembers'.  : How do I specify this option (it is given in the error log)

If someone could tell me what im doing wron it'll be much appreciated.

Thanks in Advance,
Steve.
error (5).txt

Shai Almog

unread,
Apr 11, 2014, 11:59:48 AM4/11/14
to codenameone...@googlegroups.com

steve

unread,
Apr 14, 2014, 7:50:36 AM4/14/14
to codenameone...@googlegroups.com
Hi,
I've replaced the methods as specified but it seems im experiencing the same error ie. the error log is still the same. Somehow the Android and Windows phone build works.

It should be noted that in some of the errors given in the error log, did not reference a final Util component from the start.

Below is an example of a method that is still having errors even after changing it as specified.

 private void deleteScheduledMessage(Hashtable delete) {
       
final Object temp=delete;
       
System.out.println("delete...");


       
InfiniteProgress waste = new InfiniteProgress();
       
final Dialog dlg = waste.showInifiniteBlocking();
       
NetworkManager networkManager = NetworkManager.getInstance();
        networkManager
.start();
        networkManager
.addErrorListener(new ActionListener() {


           
public void actionPerformed(ActionEvent evt) {
               
NetworkEvent n = (NetworkEvent) evt;
                n
.getError().printStackTrace();
           
}
       
});


       
String encodeMessageId = Util.encodeBody(delete.get("messageid").toString());




       
String url = "url to api" + encodeMessageId;


       
final ConnectionRequest request = new ConnectionRequest() {


           
private Result evaluator;


           
@Override
           
protected void postResponse() {
               
Hashtable delete=(Hashtable)temp;
               
               
if(scheduledMetaData.contains(delete)){
                    scheduledMessagesList
.getModel().removeItem(scheduledMetaData.indexOf(delete));
                scheduledMetaData
.remove(delete);
               
}
                dlg
.dispose();
           
}


           
@Override
           
protected void readResponse(InputStream input) throws IOException {
               
String xml = "<dummy>" + Util.readToString(input) + "</dummy>";
                evaluator
= Result.fromContent(xml, "xml");
               
System.out.println("deleted\n" + evaluator);




           
}
       
};
        request
.setPost(false);
        request
.addRequestHeader("userID", Storage.getInstance().readObject("userid").toString());
        request
.setHttpMethod("DELETE");
        request
.setUrl(url);
       
final int code = request.getResponseCode();
        request
.addResponseCodeListener(new ActionListener() {


           
public void actionPerformed(ActionEvent evt) {
               
Dialog.show("Error", "Oops...something seems to have gone wrong. We apologise for "
                       
+ "the inconvenience.", "OK", null);
           
}
       
});
        request
.setFailSilently(true);


        networkManager
.addToQueueAndWait(request);
   
}


Any help shall be appreciated.

Thanks in Advance,
Steve.

Shai Almog

unread,
Apr 14, 2014, 2:48:48 PM4/14/14
to codenameone...@googlegroups.com
That's an issue specific to RIM/J2ME, its a conflict between our Java 5 support code and the obfuscators.
What's the current error you are getting?

steve

unread,
Apr 15, 2014, 1:31:29 AM4/15/14
to codenameone...@googlegroups.com
Hi,
for the above code the error is:

Warning: com.sematime.bulksms.messages.scheduled.ScheduledComponent$5: can't find enclosing method 'void deleteScheduledMessage(java.util.Hashtable)' in class com.sematime.bulksms.messages.scheduled.ScheduledComponent
Warning: com.sematime.bulksms.messages.scheduled.ScheduledComponent$6: can'
t find enclosing method 'void deleteScheduledMessage(java.util.Hashtable)' in class com.sematime.bulksms.messages.scheduled.ScheduledComponent
Warning: com.sematime.bulksms.messages.scheduled.ScheduledComponent$7: can't find enclosing method 'void deleteScheduledMessage(java.util.Hashtable)' in class com.sematime.bulksms.messages.scheduled.ScheduledComponent

find attached the full error log.

Thanks in advance,
Steve.. 
error (10).txt

Shai Almog

unread,
Apr 15, 2014, 1:32:14 PM4/15/14
to codenameone...@googlegroups.com
Hi,
odd. I don't see why all 3 of them would fail for this case. Maybe its a weird edge case.
I suggest refactoring the inner classes to class level classes.

steve

unread,
Apr 16, 2014, 2:15:53 AM4/16/14
to codenameone...@googlegroups.com
Hi,

It's a pre Easter miracle....hehe...it now successfully builds.

I have noted that it's the Anonymous inner classes, that have issues, why I do not understand, cause in some cases it works other times it doesn't. If one refactors the Anonymous inner classes to member classes it works, and your methods works as well (for future reference :those interested).

Thanks,
Steve.
Reply all
Reply to author
Forward
0 new messages