我有一个简单的表,Oracle DB
其中ID
包含 Integer( PK
) 和ATTACHMENT
BLOB列,我可以在其中存储image, audio, video, File..etc
。
我已经为该表创建了 Web 服务,当我通过URL
它进行消费时会给出这样的结果。
<List>
<attachment>
<attachment>oracle.sql.BLOB@27c59ba1</attachment>
<id>101</id>
</attachment>
</List>
当我使用 oracle 移动应用程序时,它总是会Connection timed out
出错。以下是错误日志供您参考,
[SEVERE - oracle.adfmf.framework - GenericInvokeRequestHandler - process] Process AdfException caught: ERROR [oracle.adfmf.framework.exception.AdfException] - Unable to load class: Didn't find class "oracle.omss.containerization.OMSSContainerizationNativeLayerImpl" on path: DexPathList[[zip file "/data/app/com.company.ATTACHMENT-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.company.ATTACHMENT-1, /vendor/lib, /system/lib]]
Unable to load sqlite_jni fromSQLite.library.path=/data/data/com.company.ATTACHMENT/storage/jvm/lib, trying system default: java.lang.UnsatisfiedLinkError: Can't load library: /data/data/com.company.ATTACHMENT/storage/jvm/lib/libsqlite_jni.so
[SEVERE - oracle.adfmf.application - DBPersistenceManager - oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager] Processing SQL script META-INF/ATTACHMENT.sql, executing statement CREATE TABLE ATTACHMENT ( ATTACHMENT VARCHAR , ID NUMERIC NOT NULL, CONSTRAINT ATTACHMENT_PK PRIMARY KEY(ID));
[SEVERE - oracle.adfmf.application - DBPersistenceManager - oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager] Processing SQL script META-INF/ATTACHMENT.sql, executing statement CREATE TABLE DATA_SYNCH_ACTIONS ( ID NUMERIC NOT NULL, SERVICE_CLASS_NAME VARCHAR NOT NULL, ENTITY_CLASS_NAME VARCHAR NOT NULL, JSON_PAYLOAD VARCHAR , ACTION VARCHAR NOT NULL, DATE_CREATED DATE NOT NULL, DATE_LAST_SYNCH DATE NOT NULL, LAST_SYNCH_ERROR VARCHAR, CUSTOM_METHOD_NAME VARCHAR, CONSTRAINT DSA_PK PRIMARY KEY(SERVICE_CLASS_NAME ,ID));
[SEVERE - oracle.adfmf.application - DBPersistenceManager - oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager] Processing SQL script META-INF/ATTACHMENT.sql, executing statement CREATE TABLE WEB_SERVICE_CALL ( ID NUMERIC NOT NULL, CONNECTION VARCHAR , REQUEST VARCHAR , METHOD VARCHAR , REQUEST_HEADERS VARCHAR , DURATION NUMERIC , REQUEST_PAYLOAD VARCHAR , RESPONSE_PAYLOAD VARCHAR , ERROR_MESSAGE VARCHAR , TIMESTAMP DATE , CONSTRAINT WEB_SERVICE_CALL_PK PRIMARY KEY(ID));
Back Channel Hidden Feature: Received Event: deviceready
Back Channel Hidden Feature - Startup is complete.
[SEVERE - oracle.adfmf.framework - Utility - printCurrentStackTrace] Cannot serialize the object as cyclical reference to oracle.ateam.sample.mobile.util.MCSManager (object getter method - instance) was detected during the JSON serialization process. A possible resolution to this could be to make the oracle.ateam.sample.mobile.util.MCSManager field transient.
java.lang.Throwable: Cannot serialize the object as cyclical reference to oracle.ateam.sample.mobile.util.MCSManager (object getter method - instance) was detected during the JSON serialization process. A possible resolution to this could be to make the oracle.ateam.sample.mobile.util.MCSManager field transient.
at oracle.adfmf.framework.api.JSONBeanSerializationHelper.toJSONActual(Unknown Source)
at oracle.adfmf.framework.api.JSONBeanSerializationHelper.toJSONActual(Unknown Source)
at oracle.adfmf.framework.api.JSONBeanSerializationHelper.toJSONActual(Unknown Source)
at oracle.adfmf.framework.api.JSONBeanSerializationHelper.toJSON(Unknown Source)
at oracle.adfmf.framework.event.DataChangeEvent.toJSON(Unknown Source)
at oracle.adfmf.framework.api.JSONBeanSerializationHelper.toJSONActual(Unknown Source)
at oracle.adfmf.framework.api.JSONBeanSerializationHelper.toJSON(Unknown Source)
at oracle.adfmf.framework.event.DataChangeManager.getDataChangeEventJSON(Unknown Source)
at oracle.adfmf.framework.event.DataChangeManager.createDataChangeEvent(Unknown Source)
at oracle.adfmf.request.EmbeddedToNativeRequest.flushDataChangeEvents(Unknown Source)
at oracle.adfmf.framework.event.DataChangeManager.flushDataChangeEvents(Unknown Source)
at oracle.adfmf.framework.api.AdfmfJavaUtilities.flushDataChangeEvent(Unknown Source)
at oracle.adfmf.framework.EmbeddedFeatureContext$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
DalvikProxySelector.getProxyForURL(): No proxy found
FetchCallback AttachmentService Method Called.!
End of ViaInspFileAttachments FetchCallback
[SEVERE - oracle.adfmf.framework - RestTransportLayer - readResponse] Exception while reading response: java.io.IOException: Connection timed out
[SEVERE - oracle.adfmf.application - RestPersistenceManager - oracle.ateam.sample.mobile.v2.persistence.manager.RestPersistenceManager] Error invoking REST GET service /query/Attachment.findAll : Connection timed out
[SEVERE - oracle.adfmf.application - AbstractRemotePersistenceManager - oracle.ateam.sample.mobile.v2.persistence.manager.AbstractRemotePersistenceManager] Error invoking REST GET service /query/Attachment.findAll : Connection timed out
DalvikProxySelector.getProxyForURL(): No proxy found
Exception in thread "Thread-9" java.lang.NullPointerException
at oracle.ateam.sample.mobile.util.TaskExecutor.lambda$updateStatus$14(TaskExecutor.java:115)
at oracle.ateam.sample.mobile.util.TaskExecutor$$Lambda$2/9021663.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-10" java.lang.NullPointerException
at oracle.ateam.sample.mobile.util.TaskExecutor.lambda$updateStatus$14(TaskExecutor.java:115)
at oracle.ateam.sample.mobile.util.TaskExecutor$$Lambda$2/9021663.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[SEVERE - oracle.adfmf.framework - RestServiceAdapterImpl - getOutputStream] ERROR: Retrieving OutputStream failed - java.net.ConnectException: Connection timed out
[SEVERE - oracle.adfmf.framework - RestTransportLayer - sendPayload] Exception while writing payload. Connection:oracle.microedition.io.HttpConnectionImpl@e8e832
DalvikProxySelector.getProxyForURL(): No proxy found
[SEVERE - oracle.adfmf.framework - RestServiceAdapterImpl - getOutputStream] ERROR: Retrieving OutputStream failed - java.net.ConnectException: Connection timed out
[SEVERE - oracle.adfmf.framework - RestTransportLayer - sendPayload] Exception while writing payload. Connection:oracle.microedition.io.HttpConnectionImpl@603e43
DalvikProxySelector.getProxyForURL(): No proxy found
[SEVERE - oracle.adfmf.framework - RestServiceAdapterImpl - getOutputStream] ERROR: Retrieving OutputStream failed - java.net.ConnectException: Connection timed out
[SEVERE - oracle.adfmf.framework - RestTransportLayer - sendPayload] Exception while writing payload. Connection:oracle.microedition.io.HttpConnectionImpl@463673
DalvikProxySelector.getProxyForURL(): No proxy found
[SEVERE - oracle.adfmf.framework - GenericInvokeRequestHandler - process] Process AdfException caught: ERROR [oracle.adfmf.framework.exception.AdfException] - Unable to load class: Didn't find class "oracle.omss.containerization.OMSSContainerizationNativeLayerImpl" on path: DexPathList[[zip file "/data/app/com.company.ATTACHMENT-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.company.ATTACHMENT-1, /vendor/lib, /system/lib]]
FetchCallback AttachmentService Method Called.!
End of ViaInspFileAttachments FetchCallback
[SEVERE - oracle.adfmf.framework - RestServiceAdapterImpl - getOutputStream] ERROR: Retrieving OutputStream failed - java.net.ConnectException: Connection timed out
[SEVERE - oracle.adfmf.framework - RestTransportLayer - sendPayload] Exception while writing payload. Connection:oracle.microedition.io.HttpConnectionImpl@f1c53a
[SEVERE - oracle.adfmf.application - RestPersistenceManager - oracle.ateam.sample.mobile.v2.persistence.manager.RestPersistenceManager] Error invoking REST POST service /entity/Attachment : Connection timed out
[SEVERE - oracle.adfmf.application - AbstractRemotePersistenceManager - oracle.ateam.sample.mobile.v2.persistence.manager.AbstractRemotePersistenceManager] Error invoking REST POST service /entity/Attachment : Connection timed out
问题是,我正在尝试将base64
图像存储到数据库中。但没有成功,下面是sample base64 image string
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABQ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qMUtFACUUUtADaKdSUAJRilooASjFKaKAEopaKAExRS0UAJRS0YoATtRilxRQAlFLikxQAlFLRQAlFLRQAlGKWjFACUUtJQAlFLiigRJiilxRUliUUuKKAEopaKAEopaKACiiigBKWiigAoxRRQAYooooAKKWigBKMUtFACCjFLRQAlFLRTASilooATFFLSUAFGKWjFACUUtFACUYpaKAEopaKAEopaMUCEopaKAEopaKACkpaKAEopaMUAGKKKKBiUUtGKBCUuKKKAEoxS0UAJRS0UAJS0UUAJRS4ooASilxRQAlFLRQAmKKXFFACYopaKAEopaKAEopaMUAJRS0UAJRilooASilooASilpKACkp1JQAlFLRQAlFLRigBKKWigBKKWigQlFLSUAFFFFMAopaSkAUlLRTASjFLRSASilooASilooASilpKYBRS0UgEopaKYCUmKWigApKWikAlFLRTGJRS0UCEopaMUAJSUtH1oASilxRigBKKWigB9LRRUliUtFFABRRRQAUUVXmvYIXCu3PpSvYCxRVSDUI5bl4CVyOVIP3hVvj2oTT2C1goxS0UwEopaKAEopaKAEopaKAExRS0UCExRS0UAJS0UUAJiloooAKKKKACiiigBKWiigAooooAKMUUUAFFLikoAKKKMUAFFLSYpgFFLSUAFGKKWgBKKKWgBKKWigBMUUuKKAEopaKBCUUtJigAopaKAEopaSgAopaTFABRS0UAJSYp1JQAYopaKAExRS4pKAEpaWkoAKKWkoAKSlooAKTFLRQAlFLRQAlFLRQAlFLikxQAUUUUAFJS0UAJRS0UAJRS0UAJRS0UAJRS0UAJRS0YoASilooASilxSUAFFFFABikpaKAEopaKAEooz7Uhb0oAWigE0tACUUtFACfWilpKACiiigApKWigBKKWkoEFFFFAwooooESUUtFSaCUUtJQIKOlLUVwpaFgAT7DvQApljGRvHHvXK6jKXuWBbcAflJGK03s5o1Z5wgz/CG5ArHnjwT147HsKxqO6sawWpAkjLMpDFSGAyK6bT5zJKyZJIOK5Z+vBya6bRYkgg82bCOerMcUqRVS1jWoqo2oQgttJYA4yBwangnSdcowNb3MSSloxRQIMUUUYoAKKKKAACkpaK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ZyT/wDXrCVRFHIZFIDIQue59awcbaG0XfUsSXWLOWzRIxGjKwXuw7irVvaM0KXelyNb5+8N2QMdjWKC2/nBJXBrQ0W9FpNIszkW7Llk/vGrUtSXE6exn+12izSJskztYe9WlUHtVe3RUiBR94c7tw75qwrcVYiVRUinHWoQ1O3UhjnkHQUgAqM0b8UAS5AppbPSoS9N8ynYVx7YqM+1IXpu454q0Qx9FMD84NPqiAPHU4FIWULuLrjIGc96y9Wvl8toImXceGycVzguZYpY2wdqOCVz1waylU5XYqMLnbsQjAMQpPY0tZkdtG+rwzCQskkRk2Fs4b0+lamCTWidyWhKKakqSFghyVODT6YhKKWigBKKWigBKKWigBKKWigBKMcUtFACUUtFACUUtFACUYpaMUAJRS0UAJRS4ooASiloxQAlFLRQAlGKWigBKKWigBKKKWgBKKKKAEopaMUAJSYp1FACUUuKMUAJSU6koASilooASiloxQISilooATrRilooASiiigBKKXFFABRRRQAlFLRigBKKXFGKAEppbngU+jFADRk9aWlpKAEPTpTQpp9FAxuDSgUtFACHpUZU54qWigCAqc0BGqbFGKAuR7Cep4p4GKWigAooooAaVB5prYHankUhAoAiz6U8NTti0bAKBpibqKNoopWHzHMX2rvd4AjCxemeTVCRkJJQlfarF3pd1YRl7lMDOKonp8wrnd+p0RS6D9p7kH6U0r6dKVemc/hSqQSQxx6HtUlDF64qQn5Nq8+ppGiYAHI5oU4BA6+tABFC0qttUkCmAAMQ3apELLxkgHnilkcSHdtAPfFAEbx90yRjn2qe1kYuI2YZOACT92ojkcg/KeMVGQB2pphY072CSL5WuUYDuOe9SHW/OGy8t45gOAwG0isuOMvzvC9+TVm0jSWYRsuSTw3rT6k201CVYm3NGcDriosMmMrnip71BBclAgAQY61IZHvLUAKqBeOByai1nqO+mhVAduMcd6R1LAEckUhjkjPBINH3xwcSDr70hl+yu1tLVjGMTvwSO1QTXRl5lZhjpUaxCVBulCOB82eOB/WmbVyBuz6bqq7JsrjS5JPcHvTT8496M4J5pnOevNBQ9GOfpU9tOYJVlxyGBNV06/NwDzmnbhsIA96GI6gamUuVWaRVibkZ7itKC7huP9U3HbPeuGLOxBbLdhntV+z+1tE08DfLCRuJrSM7GbgdLe2izDkZZjx7VgzpcP5iLDmCIEbmH61v2F6t5FzxIo+YUmqzLBpswZtpdCFHrVNJq6JTa0OXnurZjFLDCVKEFlPRqgXm4BZcRE5HsKmzbsAArBjgbmPFSwWPmyTq8oVNmYznhj6VitWbdDZ0K68yHyDEybcsrHowrWyawdA1OLBtLmQrLuwhYcfSty4lS3QvKcAVvHYxk7MczFVLMwAHc1Qn1VI87PnCjJxWfqmovcoEt+I+5PFYsryJIM4yRzg8GplLsEU2dbp+opfghOHHY96uEH1riLW7e0nWVOgbO0dxXX212l5F50IYKTjDdRThK6CSaJ8UuKbznmlya0IFwKMD0pDmlBoAMD0rE17UZLUrDEcEjt1rczzXPa7BJNd5YpGir1J5qJuyHFXepiCSTcZGfcccg02QjPB681NIimMiMh9p+8BTERdgLsrAHoOtc+50Gv4bVp7zzmk/1CbBnpiteO4Go+clu7JCnymVernuBXNI8sdqkccyJbS53Hvx61v6bfabBax28V0gIGTkY5reDurGU11NGKNYo1jX7qj86dTEkWRd0bB1PRgcil3GtDOw6imhjTlPY9aAsFNlljh/1jqv1NNuJltoWlfotcfqF7JdzeYw2jPAqJT5Rxjc7RWV03IwZfUGiuV0PUPs1+iSsfJk+Uj37GuvaJeaUZ3Q3CxFRQM9KcUIGa0uTZjaKXFGKBCUUtFACUUtJ060AFFJmlyaLjsFFHPekJ546UXCwtLQvNO2ehpXDlYyihhg4zQD2p3C1haKKKBBRRRQAUUmfalHPSgLBSU
请分享您的想法,如果您有解决此问题的方法?