Support Topics Documentation Slack YouTube Blog

Cannot fetch data from a table


(Payal Garg) #1

I am trying to find records in a table where userId,password and host matches the one provided in EditText.Table name is Agency.But it shows FATAL EXCEPTION

HERE IS MY CODE

public class FTPLogin extends Activity {
EditText ftpUserName, ftpPassword, ftpHost;
String str_user, str_pass, str_host;
String whereClause;
Button ftpLogin;
BackendlessCollection<Map> result;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_ftplogin);
    ftpUserName = (EditText) findViewById(R.id.ftp_identityField);
    ftpPassword = (EditText) findViewById(R.id.ftp_passwordField);
    ftpHost = (EditText) findViewById(R.id.ftp_host);
    ftpLogin=(Button)findViewById(R.id.ftp_loginButton);

    Backendless.setUrl( Defaults.SERVER_URL );
    Backendless.initApp( this, Defaults.APPLICATION_ID, Defaults.SECRET_KEY, Defaults.VERSION );

    ftpLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
 onFTPLogin();
}

});
}

public void onFTPLogin() {
    str_user = ftpUserName.getText().toString();
    str_pass = ftpPassword.getText().toString();
    str_host = ftpHost.getText().toString();
    //validate FTP login credentials
    whereClause = "userId="+str_user;
    whereClause+=" and ";
    whereClause+="password="+str_pass;
    whereClause+=" and";
    whereClause+=" host="+str_host;

    BackendlessDataQuery dataQuery = new BackendlessDataQuery();
    dataQuery.setWhereClause(whereClause);

// ***********************************************************
// Synchronous API:
// ***********************************************************
result = Backendless.Persistence.of(“Agency”).find(dataQuery);
Toast.makeText(FTPLogin.this, result.toString(), Toast.LENGTH_SHORT).show();

// ***********************************************************
// Asynchronous API:
// ***********************************************************
Backendless.Persistence.of(“Agency”).find(dataQuery,new AsyncCallback<BackendlessCollection<Map>>() {
@Override
public void handleResponse(BackendlessCollection<Map> response) {
// every loaded object from the “Contact” table is now an individual java.util.Map
Toast.makeText(FTPLogin.this,response.toString(),Toast.LENGTH_LONG).show();
//Intent i=new Intent(FTPLogin.this,SubmitActivity.class);
//startActivity(i);
}

        @Override
        public void handleFault(BackendlessFault fault) {
            // an error has occurred, the error code can be retrieved with fault.getCode()
            Toast.makeText(FTPLogin.this,"Login Failure",Toast.LENGTH_LONG).show();
        }
    });
}

}

THIS IS THE EXCEPTION04-08 12:19:56.003 2703-2703/? D/dalvikvm: Late-enabling CheckJNI04-08 12:19:56.163 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method android.app.Application.registerOnProvideAssistDataListener, referenced from method com.android.tools.fd.runtime.BootstrapApplication.registerOnProvideAssistDataListener04-08 12:19:56.163 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve virtual method 285: Landroid/app/Application;.registerOnProvideAssistDataListener (Landroid/app/Application$OnProvideAssistDataListener;)V04-08 12:19:56.163 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x6e at 0x000204-08 12:19:56.163 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method android.app.Application.unregisterOnProvideAssistDataListener, referenced from method com.android.tools.fd.runtime.BootstrapApplication.unregisterOnProvideAssistDataListener04-08 12:19:56.163 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve virtual method 288: Landroid/app/Application;.unregisterOnProvideAssistDataListener (Landroid/app/Application$OnProvideAssistDataListener;)V04-08 12:19:56.163 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x6e at 0x000204-08 12:19:56.183 2703-2703/com.backendless.teripix.activity_main I/InstantRun: Instant Run Runtime started. Android package is com.backendless.teripix.activity_main, real application class is null.04-08 12:19:56.203 2703-2703/com.backendless.teripix.activity_main W/InstantRun: No instant run dex files added to classpath04-08 12:19:56.208 2703-2703/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘android.util.ArrayMap’, referenced from method com.android.tools.fd.runtime.MonkeyPatcher.monkeyPatchExistingResources04-08 12:19:56.208 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 2189 (Landroid/util/ArrayMap;) in Lcom/android/tools/fd/runtime/MonkeyPatcher;04-08 12:19:56.208 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x025e04-08 12:19:56.213 2703-2703/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘android.util.ArrayMap’, referenced from method com.android.tools.fd.runtime.MonkeyPatcher.pruneResourceCache04-08 12:19:56.213 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve const-class 2189 (Landroid/util/ArrayMap;) in Lcom/android/tools/fd/runtime/MonkeyPatcher;04-08 12:19:56.213 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1c at 0x006004-08 12:19:56.303 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)04-08 12:19:56.303 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested04-08 12:19:56.303 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve interface method 19653: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z04-08 12:19:56.303 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x72 at 0x000204-08 12:19:56.303 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode04-08 12:19:56.303 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve interface method 19657: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;04-08 12:19:56.303 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x72 at 0x000204-08 12:19:56.393 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable04-08 12:19:56.393 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve virtual method 762: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;04-08 12:19:56.393 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x6e at 0x000204-08 12:19:56.393 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity04-08 12:19:56.393 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve virtual method 764: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;04-08 12:19:56.393 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x6e at 0x000204-08 12:19:56.438 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed 250K, 17% free 7669K/9160K, paused 3ms+2ms, total 21ms04-08 12:19:56.463 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed 4K, 17% free 7670K/9160K, paused 13ms, total 13ms04-08 12:19:56.468 2703-2703/com.backendless.teripix.activity_main I/dalvikvm-heap: Grow heap (frag case) to 11.473MB for 2908176-byte allocation04-08 12:19:56.483 2703-2718/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed 0K, 13% free 10510K/12004K, paused 13ms, total 13ms04-08 12:19:56.498 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed 0K, 13% free 10510K/12004K, paused 3ms+2ms, total 18ms04-08 12:19:56.718 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed <1K, 13% free 10510K/12004K, paused 12ms, total 12ms04-08 12:19:56.733 2703-2703/com.backendless.teripix.activity_main I/dalvikvm-heap: Grow heap (frag case) to 17.713MB for 6543376-byte allocation04-08 12:19:56.758 2703-2718/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed 0K, 9% free 16900K/18396K, paused 23ms, total 23ms04-08 12:19:56.773 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed <1K, 9% free 16900K/18396K, paused 2ms+1ms, total 19ms04-08 12:19:56.788 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed 2841K, 24% free 14062K/18396K, paused 13ms, total 13ms04-08 12:19:56.793 2703-2703/com.backendless.teripix.activity_main I/dalvikvm-heap: Grow heap (frag case) to 17.715MB for 2908176-byte allocation04-08 12:19:56.803 2703-2718/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed <1K, 9% free 16902K/18396K, paused 13ms, total 13ms04-08 12:19:56.823 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed 0K, 9% free 16902K/18396K, paused 3ms+1ms, total 16ms04-08 12:19:57.023 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed <1K, 9% free 16902K/18396K, paused 13ms, total 13ms04-08 12:19:57.038 2703-2703/com.backendless.teripix.activity_main I/dalvikvm-heap: Grow heap (frag case) to 23.956MB for 6543376-byte allocation04-08 12:19:57.053 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed 0K, 7% free 23292K/24788K, paused 1ms+2ms, total 17ms04-08 12:19:57.053 2703-2718/com.backendless.teripix.activity_main D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 16ms04-08 12:19:57.113 2703-2703/com.backendless.teripix.activity_main D/libEGL: loaded /system/lib/egl/libEGL_mali.so04-08 12:19:57.118 2703-2703/com.backendless.teripix.activity_main D/libEGL: loaded /system/lib/egl/libGLESv1_CM_mali.so04-08 12:19:57.118 2703-2703/com.backendless.teripix.activity_main D/libEGL: loaded /system/lib/egl/libGLESv2_mali.so [ 04-08 12:19:57.123 2703: 2703 E/ ] Device driver API match Device driver API version: 20 User space API version: 20 [ 04-08 12:19:57.123 2703: 2703 E/ ] mali: REVISION=Linux-r3p2-01rel2 BUILD_DATE=Mon Nov 18 21:41:36 KST 2013 04-08 12:19:57.138 2703-2703/com.backendless.teripix.activity_main D/OpenGLRenderer: Enabling debug mode 004-08 12:20:23.553 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed 2860K, 18% free 20485K/24780K, paused 14ms, total 14ms04-08 12:20:23.553 2703-2703/com.backendless.teripix.activity_main I/dalvikvm-heap: Grow heap (frag case) to 23.988MB for 2908176-byte allocation04-08 12:20:23.568 2703-2718/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed <1K, 6% free 23325K/24780K, paused 14ms, total 14ms04-08 12:20:23.583 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed <1K, 6% free 23324K/24780K, paused 3ms+3ms, total 19ms04-08 12:20:23.858 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed <1K, 6% free 23324K/24780K, paused 14ms, total 14ms04-08 12:20:23.873 2703-2703/com.backendless.teripix.activity_main I/dalvikvm-heap: Grow heap (frag case) to 30.227MB for 6543376-byte allocation04-08 12:20:23.898 2703-2718/com.backendless.teripix.activity_main D/dalvikvm: GC_FOR_ALLOC freed 0K, 5% free 29714K/31172K, paused 22ms, total 22ms04-08 12:20:23.928 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed 0K, 5% free 29722K/31172K, paused 3ms+6ms, total 31ms04-08 12:20:23.993 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgressDrawable mProgressDrawable = null, d = android.graphics.drawable.LayerDrawable@424d5df8needUpdate = false04-08 12:20:23.993 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgressDrawable drawableHeight = 2404-08 12:20:23.998 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 004-08 12:20:23.998 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 0, fromUser = false04-08 12:20:23.998 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: mProgress = 0mIndeterminate = false, mMin = 0, mMax = 10004-08 12:20:24.023 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.management.messaging.DestinationMessageCountWatcher.getInstance, referenced from method weborb.v3types.core.DestinationManager.addDestination04-08 12:20:24.023 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve static method 32513: Lweborb/management/messaging/DestinationMessageCountWatcher;.getInstance ()Lweborb/management/messaging/DestinationMessageCountWatcher;04-08 12:20:24.023 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x71 at 0x000504-08 12:20:24.023 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.management.messaging.DestinationMessageCountWatcher.getInstance, referenced from method weborb.v3types.core.DestinationManager.removeDestination04-08 12:20:24.023 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve static method 32513: Lweborb/management/messaging/DestinationMessageCountWatcher;.getInstance ()Lweborb/management/messaging/DestinationMessageCountWatcher;04-08 12:20:24.023 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x71 at 0x000804-08 12:20:24.028 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.util.spring.SpringObjectFactory.createServiceObject, referenced from method weborb.util.ObjectFactories._createServiceObject04-08 12:20:24.028 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve static method 33616: Lweborb/util/spring/SpringObjectFactory;.createServiceObject (Ljava/lang/String;)Ljava/lang/Object;04-08 12:20:24.028 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x71 at 0x001e04-08 12:20:24.033 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.config.StartUpMode.isGAE, referenced from method weborb.config.LoggingConfig.configure04-08 12:20:24.033 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve static method 32476: Lweborb/config/StartUpMode;.isGAE (I)Z04-08 12:20:24.033 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x71 at 0x000304-08 12:20:24.048 2703-2703/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.util.StreamReader.readStream, referenced from method weborb.util.ClassLoaders.loadResourceBytes04-08 12:20:24.048 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve static method 33401: Lweborb/util/StreamReader;.readStream (Ljava/io/InputStream;)[B04-08 12:20:24.048 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x71 at 0x001a04-08 12:20:24.103 2703-2703/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘org.hibernate.proxy.HibernateProxy’, referenced from method weborb.writer.MessageWriter.initWriters04-08 12:20:24.103 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve const-class 4087 (Lorg/hibernate/proxy/HibernateProxy;) in Lweborb/writer/MessageWriter;04-08 12:20:24.103 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1c at 0x01cc04-08 12:20:24.103 2703-2703/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘javax.servlet.http.HttpSession’, referenced from method weborb.writer.MessageWriter.writeObject04-08 12:20:24.103 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 3872 (Ljavax/servlet/http/HttpSession;) in Lweborb/writer/MessageWriter;04-08 12:20:24.103 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x005204-08 12:20:24.113 2703-2703/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘weborb.types.jdbc.JDBCResultSet’, referenced from method weborb.writer.ResultSetWriter.write04-08 12:20:24.113 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve new-instance 4374 (Lweborb/types/jdbc/JDBCResultSet;) in Lweborb/writer/ResultSetWriter;04-08 12:20:24.113 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x22 at 0x000004-08 12:20:24.113 2703-2703/com.backendless.teripix.activity_main D/dalvikvm: DexOpt: unable to opt direct call 0x8214 at 0x04 in Lweborb/writer/ResultSetWriter;.write04-08 12:20:24.128 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 004-08 12:20:24.128 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 0, fromUser = false04-08 12:20:24.128 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: mProgress = 0mIndeterminate = false, mMin = 0, mMax = 1000004-08 12:20:24.213 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: left = 004-08 12:20:24.213 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: top = 004-08 12:20:24.213 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: right = 7204-08 12:20:24.213 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: bottom = 7204-08 12:20:24.328 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: left = 004-08 12:20:24.328 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: top = 004-08 12:20:24.328 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: right = 7204-08 12:20:24.328 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: bottom = 004-08 12:20:24.328 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: mProgressDrawable.setBounds()04-08 12:20:24.468 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:20:24.548 2703-2703/com.backendless.teripix.activity_main E/ViewRootImpl: sendUserActionEvent() mView == null04-08 12:20:25.648 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:20:36.713 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:20:36.718 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:20:45.278 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 004-08 12:20:45.283 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 0, fromUser = false04-08 12:20:45.283 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: mProgress = 0mIndeterminate = false, mMin = 0, mMax = 1000004-08 12:20:45.333 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.dispatch.Invoker.handleInvoke, referenced from method weborb.v3types.ReqMessage.execute04-08 12:20:45.333 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve static method 32481: Lweborb/dispatch/Invoker;.handleInvoke (Lweborb/message/Message;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;04-08 12:20:45.333 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x71 at 0x007804-08 12:20:45.338 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.protocols.wolf.RequestParser.instance, referenced from method weborb.util.io.Serializer.fromBytes04-08 12:20:45.338 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve static method 32974: Lweborb/protocols/wolf/RequestParser;.instance ()Lweborb/protocols/wolf/RequestParser;04-08 12:20:45.338 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x71 at 0x008404-08 12:20:45.343 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Ljavax/servlet/http/HttpSession;)04-08 12:20:45.343 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: Could not find method javax.servlet.http.HttpSession.getAttribute, referenced from method weborb.util.ThreadContext.getCallerCredentials04-08 12:20:45.343 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve interface method 29855: Ljavax/servlet/http/HttpSession;.getAttribute (Ljava/lang/String;)Ljava/lang/Object;04-08 12:20:45.343 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x72 at 0x000904-08 12:20:45.343 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Lweborb/security/Credentials;)04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘javax.servlet.http.HttpServletRequest’, referenced from method weborb.util.ThreadContext.getContext04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 3870 (Ljavax/servlet/http/HttpServletRequest;) in Lweborb/util/ThreadContext;04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x000604-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘javax.servlet.http.HttpServletRequest’, referenced from method weborb.util.ThreadContext.getHttpRequest04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 3870 (Ljavax/servlet/http/HttpServletRequest;) in Lweborb/util/ThreadContext;04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x000604-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘javax.servlet.http.HttpServletResponse’, referenced from method weborb.util.ThreadContext.getHttpResponse04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 3871 (Ljavax/servlet/http/HttpServletResponse;) in Lweborb/util/ThreadContext;04-08 12:20:45.348 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: left = 004-08 12:20:45.348 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: top = 004-08 12:20:45.348 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: right = 7204-08 12:20:45.348 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: bottom = 7204-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x000604-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘javax.servlet.http.HttpSession’, referenced from method weborb.util.ThreadContext.getHttpSession04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 3872 (Ljavax/servlet/http/HttpSession;) in Lweborb/util/ThreadContext;04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x000604-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘javax.servlet.http.HttpSession’, referenced from method weborb.util.ThreadContext.getHttpSessionId04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 3872 (Ljavax/servlet/http/HttpSession;) in Lweborb/util/ThreadContext;04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x000604-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Lweborb/security/Credentials;)04-08 12:20:45.348 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve instance field 1776304-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x54 at 0x000604-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Lweborb/security/Credentials;)04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve instance field 1776404-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x54 at 0x000604-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Lweborb/security/Credentials;)04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Ljavax/servlet/http/HttpSession;)04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: Could not find method javax.servlet.http.HttpSession.removeAttribute, referenced from method weborb.util.ThreadContext.setCallerCredentials04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve interface method 29857: Ljavax/servlet/http/HttpSession;.removeAttribute (Ljava/lang/String;)V04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x72 at 0x000c04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: Could not find method javax.servlet.http.HttpSession.setAttribute, referenced from method weborb.util.ThreadContext.setCallerCredentials04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve interface method 29858: Ljavax/servlet/http/HttpSession;.setAttribute (Ljava/lang/String;Ljava/lang/Object;)V04-08 12:20:45.353 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x72 at 0x001304-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Lweborb/service/WebORBCacheAttribute;)04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Lweborb/util/cache/Arguments;)04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘weborb.service.cacheinvalidatorevent.CacheInvalidator’, referenced from method weborb.util.cache.Cache.ensureSubscription04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve new-instance 4363 (Lweborb/service/cacheinvalidatorevent/CacheInvalidator;) in Lweborb/util/cache/Cache;04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x22 at 0x000b04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to find class referenced in signature (Lweborb/service/WebORBCacheAttribute;)04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: Could not find method weborb.service.WebORBCacheAttribute.cacheScope, referenced from method weborb.util.cache.Cache.getTarget04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve interface method 33261: Lweborb/service/WebORBCacheAttribute;.cacheScope ()Lweborb/service/SimpleParameterAnnotation$CacheScope;04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x72 at 0x000004-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘weborb.service.ICacheInvalidator’, referenced from method weborb.util.cache.Cache.getValue04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve const-class 4358 (Lweborb/service/ICacheInvalidator;) in Lweborb/util/cache/Cache;04-08 12:20:45.358 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1c at 0x000204-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘weborb.service.WebORBCacheAttribute’, referenced from method weborb.util.cache.Cache.getValue04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve const-class 4362 (Lweborb/service/WebORBCacheAttribute;) in Lweborb/util/cache/Cache;04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1c at 0x001904-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘weborb.service.WebORBCacheAttribute’, referenced from method weborb.util.cache.Cache.invalidateCache04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve const-class 4362 (Lweborb/service/WebORBCacheAttribute;) in Lweborb/util/cache/Cache;04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1c at 0x000b04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘weborb.service.WebORBCacheAttribute’, referenced from method weborb.util.cache.Cache.saveValue04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 4362 (Lweborb/service/WebORBCacheAttribute;) in Lweborb/util/cache/Cache;04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x000b04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: DexOpt: unable to opt direct call 0x81ef at 0x0d in Lweborb/util/cache/Cache;.ensureSubscription04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: DexOpt: unable to opt direct call 0x81f1 at 0x14 in Lweborb/util/cache/Cache;.ensureSubscription04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: DexOpt: unable to optimize static field ref 0x4565 at 0x04 in Lweborb/util/cache/Cache;.getTarget04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: DexOpt: unable to optimize static field ref 0x4566 at 0x0d in Lweborb/util/cache/Cache;.getTarget04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: DexOpt: unable to opt direct call 0x8292 at 0xc8 in Lweborb/util/cache/Cache;.getValue04-08 12:20:45.363 2703-3796/com.backendless.teripix.activity_main I/dalvikvm: DexOpt: unable to optimize instance field ref 0x458e at 0xcd in Lweborb/util/cache/Cache;.getValue04-08 12:20:45.368 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: DexOpt: unable to opt direct call 0x8293 at 0x5a in Lweborb/util/cache/Cache;.invalidateCache04-08 12:20:45.368 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: DexOpt: unable to opt direct call 0x829d at 0x70 in Lweborb/util/cache/Cache;.saveValue04-08 12:20:47.158 2703-3796/com.backendless.teripix.activity_main E/dalvikvm: Could not find class ‘java.beans.BeanInfo’, referenced from method weborb.reader.AnonymousObject.setFieldsAsBean04-08 12:20:47.158 2703-3796/com.backendless.teripix.activity_main W/dalvikvm: VFY: unable to resolve check-cast 3573 (Ljava/beans/BeanInfo;) in Lweborb/reader/AnonymousObject;04-08 12:20:47.158 2703-3796/com.backendless.teripix.activity_main D/dalvikvm: VFY: replacing opcode 0x1f at 0x001f04-08 12:20:47.313 2703-2703/com.backendless.teripix.activity_main E/ViewRootImpl: sendUserActionEvent() mView == null04-08 12:20:49.263 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgressDrawable mProgressDrawable = null, d = android.graphics.drawable.LayerDrawable@43bebe20needUpdate = false04-08 12:20:49.263 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgressDrawable drawableHeight = 2404-08 12:20:49.263 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 004-08 12:20:49.263 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: setProgress = 0, fromUser = false04-08 12:20:49.263 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: mProgress = 0mIndeterminate = false, mMin = 0, mMax = 10004-08 12:20:49.308 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: left = 004-08 12:20:49.308 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: top = 004-08 12:20:49.308 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: right = 7204-08 12:20:49.308 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: bottom = 2404-08 12:20:49.308 2703-2703/com.backendless.teripix.activity_main D/ProgressBar: updateDrawableBounds: mProgressDrawable.setBounds()04-08 12:20:49.318 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:20:50.688 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:20:55.328 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:20:55.333 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:21:01.203 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:21:01.208 2703-2703/com.backendless.teripix.activity_main D/WritingBuddyImpl: getCurrentWritingBuddyView() 04-08 12:21:20.468 2703-2708/com.backendless.teripix.activity_main D/dalvikvm: GC_CONCURRENT freed 3983K, 16% free 27680K/32904K, paused 3ms+6ms, total 32ms04-08 12:21:20.498 2703-2703/com.backendless.teripix.activity_main D/AndroidRuntime: Shutting down VM04-08 12:21:20.498 2703-2703/com.backendless.teripix.activity_main W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41c0d960)04-08 12:21:20.503 2703-2703/com.backendless.teripix.activity_main E/AndroidRuntime: FATAL EXCEPTION: main BackendlessException{ code: ‘Internal client exception’, message: ‘null’ } at com.backendless.Invoker$SyncResponder.errorHandler(Invoker.java:127) at com.backendless.core.responder.AdaptingResponder.errorHandler(AdaptingResponder.java:93) at weborb.client.ioEngine.HttpIOEngine.send(HttpIOEngine.java:213) at weborb.client.ioEngine.HttpIOEngine.invoke(HttpIOEngine.java:145) at weborb.client.WeborbClient.invoke(WeborbClient.java:138) at com.backendless.Invoker.invokeSync(Invoker.java:100) at com.backendless.persistence.MapDrivenDataStore.find(MapDrivenDataStore.java:270) at com.backendless.teripix.login.FTPLogin.onFTPLogin(FTPLogin.java:64) at com.backendless.teripix.login.FTPLogin$1.onClick(FTPLogin.java:43) at android.view.View.performClick(View.java:4452) at android.widget.Button.performClick(Button.java:148) at android.view.View$PerformClick.run(View.java:18428) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5365) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)<img>https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif</img>


(Mark Piller) #2

Your “whereClause” is missing single quotes around string values. See the documentation for examples:
https://backendless.com/documentation/data/android/data_search_with_where_clause.htm

Test the where clause using console first:
https://backendless.com/feature-14-sql-based-search-for-data-objects-using-console/

Mark


(Payal Garg) #3

but I am not trying to search hardcore values to be put inside single quotes.my values are strings coming from values inserted in edittext.pls tell me what should I do


(Mark Piller) #4

the problem is you have syntax errors in the where clause.


(Payal Garg) #5
    so should I use StringBuilder?

(Anton Govorushkin) #6

Hey Payal

Take a look, hope it will get things clear https://hastebin.com/anayewehiv.java
Also querying password field will not work, it’s a protected field.

Regards Anton


(Payal Garg) #7

didnt work for me.I have attached the exception and i am gtting it on following lines

result = Backendless.Persistence.of(“Agency”).find(dataQuery);
public void onClick(View v) {
onFTPLogin();
}
});
}


(Payal Garg) #8

also my password is not protected.pls chk my agency table I attached earlier and help me out


(Payal Garg) #9

hey I have got rid of the crash which I was getting for using Synchronous and Asyncronous API together

But the response that is coming in from BackendlessCollection is not in reaadable format
I need to check if the query is satified and the record is found so that I can move to next activity.
But I am getting response as
com.backendless.BackendlessCollection@42013568
pls help me

here is my code

public void onFTPLogin() {
str_user = ftpUserName.getText().toString();
str_pass = ftpPassword.getText().toString();
str_host = ftpHost.getText().toString();
//validate FTP login credentials
whereClause = “userId=’”+str_user+"’";
whereClause+=" and “;
whereClause+=“password=’”+str_pass+”’";
whereClause+=" and";
whereClause+=" host=’"+str_host+"’";

    BackendlessDataQuery dataQuery = new BackendlessDataQuery();
    dataQuery.setWhereClause(whereClause);

// ***********************************************************
// Synchronous API:
// ***********************************************************
// result = Backendless.Persistence.of(“Agency”).find(dataQuery);
// Toast.makeText(FTPLogin.this, result.toString(), Toast.LENGTH_SHORT).show();

// ***********************************************************
// Asynchronous API:
// ***********************************************************
Backendless.Persistence.of(“Agency”).find(dataQuery,new AsyncCallback<BackendlessCollection<Map>>() {
@Override
public void handleResponse(BackendlessCollection<Map> response) {
int totalObj=response.getTotalObjects();
// every loaded object from the “Contact” table is now an individual java.util.Map
if(totalObj>1){
Log.d(“Backendless Success:”, response.getTableName());
Toast.makeText(FTPLogin.this,“Sucess”+ response.toString(), Toast.LENGTH_LONG).show();
//Intent i=new Intent(FTPLogin.this,SubmitActivity.class);
//startActivity(i);

            }
            else
            {
                Log.d("Backendless Fail:", response.toString());
                Toast.makeText(FTPLogin.this,"FAIL"+ response.toString(), Toast.LENGTH_LONG).show();
            }
        }

        @Override
        public void handleFault(BackendlessFault fault) {
            // an error has occurred, the error code can be retrieved with fault.getCode()
            Toast.makeText(FTPLogin.this,"Login Failure",Toast.LENGTH_LONG).show();
        }
    });
}

(Mark Piller) #10

The response you’re getting, which is:

com.backendless.BackendlessCollection@42013568

is produced when you do something like this:

Log.i( FTPLogin.this, instanceOfBackendlessCollection );

This is totally expected if you decide to just “print” the collection object. Instead, you should get the data from the collection and do something useful with it…

Mark


(Payal Garg) #11

well I didnt do that Mark.what I did was a toast to display response.toString().In my case response is the object name for BackendlessCollection.I just wanted to check if the data entered is getting matched with the records,if it does I can do further task.so how to check?


(Sergey Chupov) #12

The .toString() method is not overriden in BackendlessCollection. Try printing the enclosed java List:

Log.i( FTPLogin.this, instanceOfBackendlessCollection.getCurrentPage() );