Android Question problem when add image to database through jrdc

Discussion in 'Android Questions' started by azzam223, Jun 23, 2019.

  1. azzam223

    azzam223 Active Member Licensed User

    hello when i try to add image to my sql server database through jrdc i get error with in batch2 function

    Code:
    (ClassNotFoundException) java.lang.ClassNotFoundException: b4j.server.dataserver$_dbcommand
    Command: , took: 8483ms, client=
    192.168.1.11
    Error occurred on line: 
    89
    java.lang.RuntimeException: java.lang.ClassNotFoundException: b4j.server.dataserver$_dbcommand
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:
    297)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:
    357)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readList(B4XSerializator.java:
    246)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:
    345)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:
    231)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:
    347)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:
    112)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertBytesToObject(B4XSerializator.java:
    82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:613)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:228)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:159)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    90)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    93)
        at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:
    61)
        at b4j.server.rdchandler._executebatch2(rdchandler.java:
    489)
        at b4j.server.rdchandler._handle(rdchandler.java:
    919)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:613)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:231)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:159)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    90)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    93)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    77)
        at anywheresoftware.b4j.object.JServlet$Handle.run(JServlet.java:
    130)
        at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:
    30)
        at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:
    26)
        at anywheresoftware.b4a.ShellBA.startMessageLoop(ShellBA.java:
    114)
        at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:
    146)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:303)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:159)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    90)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    93)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    77)
        at b4j.server.main.main(main.java:
    29)
    Caused by: java.lang.ClassNotFoundException: b4j.server.dataserver$_dbcommand
        at java.net.URLClassLoader.findClass(URLClassLoader.java:
    381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
    335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:
    264)
        at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.readTypeClass(
    RandomAccessFile.java:525)
        at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:
    274)
        ... 
    52 more
    Command: 
    null, took: 7139ms, client=192.168.1.11
     
  2. DonManfred

    DonManfred Expert Licensed User

    Seems like b4j.server.dataserver does not have a dbcommand custom type in it.

    Due to missing projectuploads we can not say more.
     
  3. azzam223

    azzam223 Active Member Licensed User

    you mean dataserver library in b4j i don't have dataserver in b4j I use the jrdc2

    the problem occur in batch2 function when try to convert byte to object
    Code:
    Dim m As Map = ser.ConvertBytesToObject(Bit.InputStreamToBytes(in))
     
  4. DonManfred

    DonManfred Expert Licensed User

    I suggest to learn to read errorstacktraces and understand what is happening.

    But the b4j app has a packagename b4j.server.dataserver?

    Again:
    .
     
  5. azzam223

    azzam223 Active Member Licensed User

    the package name is b4j.server
     
  6. DonManfred

    DonManfred Expert Licensed User

    and inside it is a module dataserver which is called it seems.

    Start with uploading sample project which shows the issue.

    I´m out here as i´m not interested to get any single info pulled individually! Good luck
     
  7. azzam223

    azzam223 Active Member Licensed User

    I don't have any module name dataserver inside b4j project
     
  8. DonManfred

    DonManfred Expert Licensed User

    Hard to help you with the informations you provide.
    Something in your app MUST point to something like dataserver. Help us helping you. What is dataserver in your app? A variable? A Classname? A Classinstancename?
     
  9. OliverA

    OliverA Expert Licensed User

    Shows us your code on the client side that you use to sent your image to the jRDC2 server.
     
  10. OliverA

    OliverA Expert Licensed User

    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice