Skip to Main Content

problems with many images json

JLopezJujuyAug 19 2015 — edited Nov 2 2016

Hello how are you? I have a REST service that returns a list of pests with their respective images , tree for each plague , and when many images have memory problems in android.

I have configured the mapping as follows .

<classMappingDescriptor className="mobile.model.ExpertPlagaView" persisted="false">

      <crudServiceClass className="mobile.model.service.ExpertPlagaViewService" autoIncrementPrimaryKey="true" localPersistenceManager="oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager" remotePersistenceManager="oracle.ateam.sample.mobile.v2.persistence.manager.RestJSONPersistenceManager" remoteReadInBackground="false" remoteWriteInBackground="true"

                        showWebServiceInvocationErrors="false" autoQuery="true" enableOfflineTransactions="true"/>

      <table name="EXPERT_PLAGA_VIEW">

         <primaryKeyColumn name="PLAGA_ENFERMEDAD_CULTIVO_ID"/>

      </table>

      <attributeMappings>

         <directMapping attributeName="actividadId" payloadAttributeName="actividadId" columnName="ACTIVIDAD_ID" columnDataType="NUMERIC" required="false" persisted="false" javaType="java.math.BigDecimal" keyAttribute="false"/>

         <directMapping attributeName="empresaId" payloadAttributeName="empresaId" columnName="EMPRESA_ID" columnDataType="NUMERIC" required="false" persisted="false" javaType="java.math.BigDecimal" keyAttribute="false"/>

         <directMapping attributeName="imagen" payloadAttributeName="imagen" columnName="IMAGEN"

                        columnDataType="VARCHAR2" required="false" persisted="false" javaType="java.lang.String" keyAttribute="false"/>

         <directMapping attributeName="imagen2" payloadAttributeName="imagen2" columnName="IMAGEN2"

                        columnDataType="VARCHAR2" required="false" persisted="false" javaType="java.lang.String" keyAttribute="false"/>

         <directMapping attributeName="imagen3" payloadAttributeName="imagen3" columnName="IMAGEN3"

                        columnDataType="VARCHAR2" required="false" persisted="false" javaType="java.lang.String" keyAttribute="false"/>

         <directMapping attributeName="nombreCientifico" payloadAttributeName="nombreCientifico" columnName="NOMBRE_CIENTIFICO" columnDataType="VARCHAR" required="false" persisted="false" javaType="java.lang.String" keyAttribute="false"/>

         <directMapping attributeName="nombreVulgar" payloadAttributeName="nombreVulgar" columnName="NOMBRE_VULGAR" columnDataType="VARCHAR" required="false" persisted="false" javaType="java.lang.String" keyAttribute="false"/>

         <directMapping attributeName="plagaEnfermedadCultivoId" payloadAttributeName="plagaEnfermedadCultivoId" columnName="PLAGA_ENFERMEDAD_CULTIVO_ID" columnDataType="NUMERIC" required="true" persisted="false" javaType="java.math.BigDecimal" keyAttribute="true"/>

         <directMapping attributeName="plagaMalezaEnfermedadId" payloadAttributeName="plagaMalezaEnfermedadId" columnName="PLAGA_MALEZA_ENFERMEDAD_ID" columnDataType="NUMERIC" required="false" persisted="false" javaType="java.math.BigDecimal" keyAttribute="false"/>

      </attributeMappings>

     

     

      <methods>

         <findAllMethod uri="/query/ExpertPlagaView.findAll" connectionName="Mobile" requestType="GET" secured="false" sendDataObjectAsPayload="false"

                        deleteLocalRows="false" payloadElementName="root">

            <headerParameter name="Content-Type" value="application/json"/>

         </findAllMethod>

      </methods>

   </classMappingDescriptor>

Entity:

public class ExpertPlagaView extends Entity {

    private BigDecimal actividadId;

    private BigDecimal empresaId;

    private String imagen;

    private String imagen2;

    private String imagen3;

    private String nombreCientifico;

    private String nombreVulgar;

    private BigDecimal plagaEnfermedadCultivoId;

    private BigDecimal plagaMalezaEnfermedadId;

On android device i have this error: java.lang.outofmemoryerror java heap space

Comments
Post Details
Added on Aug 19 2015
7 comments
859 views