deserialization jsonHelper.fromJSON null

I'm trying to deserialize my REST/JSON Webservice in the MAF with the following method:

public void fetchProvDetails() {}

RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter ();

restServiceAdapter.clearRequestProperties ();

restServiceAdapter.setConnectionName ("testRest"); URL connection created with this name

restServiceAdapter.setRequestType (RestServiceAdapter.REQUEST_TYPE_GET);

restServiceAdapter.addRequestProperty ("Content-Type", "application/json");

restServiceAdapter.addRequestProperty ("accept", "application/json; Charset = UTF-8 ");"

restServiceAdapter.setRetryLimit (0);

restServiceAdapter.setRequestURI("/ords/apex_040200/ichip/test1/"); "

Response string;

JSONBeanSerializationHelper jsonHelper = new JSONBeanSerializationHelper();

try {}

answer = restServiceAdapter.send(""); Call the GET operation

ProvinceList responseObject = (ProvinceList) jsonHelper.fromJSON (ProvinceList.class, response);

JSONArray provJSONList = responseObject.getProvinceJSONList ();

If (provJSONList! = null)

restTest = "provJSONList:"+ provJSONList.length ();.

on the other

restTest = ' provJSONList is null: ' + response;

etc...

but I get so null for provJSONList and I don't know how to find out why, I print the results for the response JSON string returned and I recover data:

{'next': {'$ref' ":"https://lnxpbcodev01:7002 / ADR, apex_040200, ichip, test1 /? page = 1""}, "items": [{"ch_province_id": 1, "abbreviation": 'AB', 'name': "Alberta", "details": "* Starter content * created_by ','": 'ICHIPSYS_DEV', 'creation_date': "2012-06 - 19 T 18: 09:06Z edited_by ',' ': 'ICHIPSYS_DEV', 'edit_date':" 2013-05 - 17 T 18: 11:31Z "}, {"ch_province_id": 2,"abbreviation": 'BC', 'name': 'British Colombia', 'details':" * Starter content * created_by ',' ': 'ICHIPSYS_DEV', 'creation_date': "2012-06 - 19 T 18: 09:06Z edited_by" "}]} {,' ":"ICHIPSYS_DEV","edit_date":" 2013-05 - 17 T 18: 11:31Z "}, etc.

My ProvinceList class is as follows:

public class ProvinceList {}

private JSONArray provinceJSONList;

{} public void setProvinceJSONList (JSONArray provinceJSONList)

this.provinceJSONList = provinceJSONList;

}

public JSONArray getProvinceJSONList() {}

Return provinceJSONList;

}

public ProvinceList() {}

Super();

}

}

Did I miss something in my code (I'm new on this)?  I should wait get a JSONArray right deserialization of jsonHelper.fromJSON return?

Thought about it, was to get a JSONObject first, then get the JSONArray of the object itself:

....

answer = restServiceAdapter.send(""); Call the GET operation

JSONObject responseObject = (JSONObject) jsonHelper.fromJSON (JSONObject.class, response);

If (responseObject! = null) {}

JSONArray jArray = responseObject.getJSONArray ('items');

RESTJSONProvince provObject;

JSONObject jsonObj;

ArrayList provArray = new ArrayList();

for (int i = 0; i)< jarray.length();="" i++)="">

provObject = new RESTJSONProvince();

jsonObj = (JSONObject) jArray.get (i);

provObject = (RESTJSONProvince) jsonHelper.fromJSON (RESTJSONProvince.class, jsonObj);

provArray.add (provObject);

_provList = (RESTJSONProvince []) provArray.toArray (RESTJSONProvince [provArray.size ()]) of new;

}

}

....

Tags: Oracle Mobile

Similar Questions

  • MAF: Migration post SSL Exception of 2.0.1-&gt; 2.1.2 MAF MAF

    Hello Oracle Community:

    I migrated my app to work from 2.0.1 to 2.1.2 MAF MAF (JDK 7 + JDK 8 |) JDev 12.1.3.0)

    "I have the following Java SSLHandshakeException" ""ERROR: Transport REST – java.io.IOException: Unsupported record version SSLv2Hello '

    Please let know us a solution so I can get in line with the new framework that I received a small window to make.

    The URI is to return a 200 response when I test it in the browser.  Which means that my API returns the JSON object without error.  My MAF application, however, (post migration) is to return a 400 response. Things go wrong in the RestTransportLayer.

    UPDATE: " " , It seems, the problem is that JDK8 clients can not connect to the SSL2 server with the default provider (SSLv2 is deprecated for a long time). To force the server to use SSL3 (or another more secure protocol)" -lots of comment below

    Can you tell me what you think?

    =========================

    [FINE - oracle.adfmf.framework - RestServiceAdapterImpl - getConnectionRefAndSetSecurity] LoginConn connection: LoginConn

    [FINE - oracle.adfmf.framework - RestServiceAdapterImpl - getConnectionRefAndSetSecurity] in getConnectionRefAndSetSecurity LoginConn

    [INFO - oracle.adfmf.framework - RestTransportLayer - getConnection] Treatment "POST request.

    [INFO - oracle.adfmf.framework - RestTransportLayer - getConnection] Treatment "POST request.

    [FINE - oracle.adfmf.framework - HttpServiceConnection - HttpServiceConnection] Sync is not enabled; using standard HttpConnection

    [FINER - oracle.adfmf.framework - RestTransportLayer - getHttpConnection] Have a connection.

    [FINE - oracle.adfmf.framework - RestTransportLayer - getHttpConnection] establishes the connection to https://api.corporation.com:8002 / myast/restlogin/login? username = UserName & password = password

    [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] credStoreKey = [null]

    Parameter [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] (HTTP Version: HTTP / 1.1)

    Parameter [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] (Accept-Encoding: identity; q = 1.0, gzip; q = 0.5, *; q = 0)

    Parameter [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] (Cookie: null)

    Parameter [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] (Accept: application / json; charset = UTF - 8)

    Parameter [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] (Accept-Encoding: identity; q = 1.0, gzip; q = 0.5, *; q = 0)

    Parameter [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] (HTTP Version: HTTP / 1.1)

    Parameter [FINE - oracle.adfmf.framework - RestTransportLayer - setCustomHeaders] (Content-Type: application / json)

    [FINE - oracle.adfmf.framework - RestTransportLayer - getHttpConnection] Define a full custom headers

    [FINE - oracle.adfmf.framework - RestTransportLayer - getHttpConnection] Define base complete auth headers

    [FINE - oracle.adfmf.framework - RestTransportLayer - getHttpConnection] Method of application for complete adjustment

    [FINE - oracle.adfmf.framework - RestTransportLayer - sendReceiveBytes] Checking to see if we need to send data to the server.

    [FINE - oracle.adfmf.framework - RestTransportLayer - getInputStream] Process request response

    [SEVERE - oracle.adfmf.framework - RestTransportLayer - readResponse] Exception reading response: java.io.IOException: record version not supported SSLv2Hello

    [WARNING - oracle.adfmf.framework - RestServiceAdapterImpl - sendReceiveBytes] ERROR: REST Transport - java.io.IOException: record version not supported SSLv2Hello

    java.io.IOException: record version not supported SSLv2Hello

    at oracle.microedition.io.HttpConnectionImpl.getResponseCode (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestTransportLayer.readResponse (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestTransportLayer.sendReceiveBytes (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestTransportLayer.sendReceive (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestServiceAdapterImpl.sendReceive (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestServiceAdapterImpl.send (unknown Source)

    at com.astcorporation.myAST.mobile.RestServicesHelper.send(RestServicesHelper.java:115)

    at com.astcorporation.myAST.mobile.LoginHelper.LoginAction(LoginHelper.java:57)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at de.odysseus.el.tree.impl.ast.AstProperty.invoke (unknown Source)

    at de.odysseus.el.tree.impl.ast.AstEval.invoke (unknown Source)

    at de.odysseus.el.TreeMethodExpression.invoke (unknown Source)

    at oracle.adfmf.framework.api.Model.evaluateMethodExpression (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at oracle.adfmf.framework.contract.adf.application.GenericInvokeRequestHandler.invoke (unknown Source)

    at oracle.adfmf.framework.contract.adf.application.GenericInvokeRequestHandler.invoke (unknown Source)

    at oracle.adfmf.framework.contract.adf.application.GenericInvokeRequestHandler.process (unknown Source)

    at oracle.adfmf.framework.FeatureContext.handle (unknown Source)

    at oracle.adfmf.framework.AdfChannel.handle (unknown Source)

    at com.oracle.vm.channel.impl.VMChannelImpl.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    -------------------------

    [SEVERE - oracle.adfmf.application - RestServicesHelper - send] #! Exception in RestServiceAdaptersend() error

    ERROR [oracle.adfmf.framework.exception.AdfException] - record version not supported SSLv2Hello

    at oracle.adfmf.dc.ws.rest.RestTransportLayer.sendReceiveBytes (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestTransportLayer.sendReceive (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestServiceAdapterImpl.sendReceive (unknown Source)

    at oracle.adfmf.dc.ws.rest.RestServiceAdapterImpl.send (unknown Source)

    at com.astcorporation.myAST.mobile.RestServicesHelper.send(RestServicesHelper.java:115)

    at com.astcorporation.myAST.mobile.LoginHelper.LoginAction(LoginHelper.java:57)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at de.odysseus.el.tree.impl.ast.AstProperty.invoke (unknown Source)

    at de.odysseus.el.tree.impl.ast.AstEval.invoke (unknown Source)

    at de.odysseus.el.TreeMethodExpression.invoke (unknown Source)

    at oracle.adfmf.framework.api.Model.evaluateMethodExpression (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at oracle.adfmf.framework.contract.adf.application.GenericInvokeRequestHandler.invoke (unknown Source)

    at oracle.adfmf.framework.contract.adf.application.GenericInvokeRequestHandler.invoke (unknown Source)

    at oracle.adfmf.framework.contract.adf.application.GenericInvokeRequestHandler.process (unknown Source)

    at oracle.adfmf.framework.FeatureContext.handle (unknown Source)

    at oracle.adfmf.framework.AdfChannel.handle (unknown Source)

    at com.oracle.vm.channel.impl.VMChannelImpl.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    [FINE - oracle.adfmf.application - LoginHelper - LoginAction] # The response in LoginHelper:400 Codes

    ========================================

    import java.util.Map;

    Import oracle.adfmf.dc.ws.rest.RestServiceAdapter;

    Import oracle.adfmf.framework.api.AdfmfContainerUtilities;

    Import oracle.adfmf.framework.api.JSONBeanSerializationHelper;

    Import oracle.adfmf.json.JSONObject;

    Import oracle.adfmf.util.Utility;

    public class LoginHelper {}

    private String userName;

    private String password;

    public LoginHelper() {}

    }

    {} public void setUserName (String userName)

    Me.username = username;

    }

    public String getUserName() {}

    Returns the user name;

    }

    public void setPassword (String password) {}

    This.password = password;

    }

    public String getPassword() {}

    return the password;

    }

    public String LoginAction() {}

    Response string;

    SecureToken string = "";

    String jsessionID = "";

    User user = new User();

    If (AdfmfContainerUtilities.invokeContainerJavaScriptFunction (Constants.DEBUG))

    "CustomLogin.phone", "navigator.notification.alert."

    New Object() {"LoginHelper @ Work... »}) ;

    RestServicesHelper restHelper = new RestServicesHelper();

    restHelper.init ("LoginConn", RestServiceAdapter.REQUEST_TYPE_POST);

    restHelper.setRequestURI (username, password);

    JSONBeanSerializationHelper jsonHelper = new JSONBeanSerializationHelper();

    Map headers = restHelper.getHeaders ();

    try {}

    response = restHelper.send ();

    If (Constants.DEBUG) Utility.ApplicationLogger.fine ("# response in LoginHelper code:" + restHelper.getHTTPStatusCodes ());

    If (restHelper.getHTTPStatusCodes () == 200) {}

    If (Constants.DEBUG) System.out.println ("# Login response:" + response);

    LoginResponse responseObject = (LoginResponse) jsonHelper.fromJSON (LoginResponse.class, response);

    JSONObject loggedInUser = (JSONObject) responseObject.getUserContext () .get ("loggedInUser");

    Set-up user information

    user.setEmployeeId ((Integer) loggedInUser.get ("employeeId"));

    secureToken = (String) responseObject.getSecureToken () .get ("secObjValue");

    jsessionID = (String) headers.get("set-cookie");

    Write in detail on behalf of table DBase "employeeDB."

    DBUtility.initDB ();

    DBUtility.writeValue (Constants.KEY_EMP_ID, () user.getEmployeeId m:System.NET.SocketAddress.ToString ());

    DBUtility.writeValue (Constants.KEY_SECURE_TOKEN, secureToken);

    DBUtility.writeValue (Constants.KEY_JSESSION_ID, jsessionID);

    DBUtility.writeValue (Constants.KEY_USER_NAME, username);

    () AdfmfContainerUtilities.invokeContainerJavaScriptFunction

    "CustomLogin.phone", "navigator.notification.alert."

    (New Object() {"successful connection!'});

    Successful login: go to the springboard!

    AdfmfContainerUtilities.gotoSpringboard ();

    } ElseIf (restHelper.getHTTPStatusCodes () == 500) {}

    If (Constants.DEBUG) System.out.println ("# Login response:" + response);

    () AdfmfContainerUtilities.invokeContainerJavaScriptFunction

    "CustomLogin.phone", "navigator.notification.alert."

    New Object() {"the system is broken. Please try again later. »}) ;

    } else {}

    AdfmfContainerUtilities.invokeContainerJavaScriptFunction

    ('CustomLogin.phone', 'navigator.notification.alert',

    (New Object() {"username/password invalid name!"});

    }

    } catch (System.Exception e)

    {

    System.out.println ("#!") EXCEPTION in LoginUserBean LIFTING. = 200 ");

    If (restHelper.getHTTPStatusCodes () == 500)

    AdfmfContainerUtilities.invokeContainerJavaScriptFunction

    ('CustomLogin.phone', 'navigator.notification.alert',

    New Object() {"the system is broken. Please try again after some time"});

    Utility.ApplicationLogger.severe ("Error message");

    e.printStackTrace ();

    }

    Returns a null value.

    }

    }

    Hello.

    To be honest with you, I don't know if it is possible to change the behavior on the client side. You the best solution is to configure the server to use SSL 3.0 or, ideally, TLS. Relying on older versions of the protocols of security is a bad idea, because they are your most vulnerable backend.

    Best regards

    Frédéric Desbiens

    Senior Product Manager

    Mobility and Cloud oracle

    Twitter: @BlueberryCoder

    blog: http://blogs.oracle.com/blueberry

  • [Need help] Command execution error: null java.lang.ClassCastException - HQAPI

    Hello

    I need your support on the following error, I got from hqapi when I try to «./hqapi.sh alertdefinition sync. My order is:

    # cat ad10100.xml

    <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >
    < AlertDefinitionResponse >
    Success of < status > < / status >
    < AlertDefinition mtime = ctime "1331204852666" = "1331204068642" id = "10100" name = "Fs [/] ok" description = "Filesystem sotto soglia critica" priority = "2" enabled = "true" active = "true" frequency = "0" count = "0" range = "0" willRecover = "false" notifyFiltered = "false" controlFiltered = "false" >
    < resource id = "10910" name = "/ dev/map/VolGroup00-LogVol00 of HR-client Linux file system mounted on / (local/ext3)" / >
    < AlertCondition required = "true" type = "1" thresholdValue = "50.0" thresholdComparator = "" & lt; "thresholdMetric ="Use %"/ >"
    < AlertAction id = "10101" className="org.hyperic.hq.measurement.action.MetricAlertAction"/ >
    < / AlertDefinition >
    < / AlertDefinitionResponse >

    # cat ad10100.xml | SH hqapi.sh alertdefinition sync

    Command execution error: null
    java.lang.ClassCastException
    at java.lang.Class.cast(Class.java:2990)
    at org.hyperic.hq.hqapi1.XmlUtil.deserialize(XmlUtil.java:64)
    at org.hyperic.hq.hqapi1.tools.AlertDefinitionCommand.sync(AlertDefinitionCommand.java:439)
    at org.hyperic.hq.hqapi1.tools.AlertDefinitionCommand.handleCommand(AlertDefinitionCommand.java:152)
    at org.hyperic.hq.hqapi1.tools.Shell.dispatchCommand(Shell.java:245)
    at org.hyperic.hq.hqapi1.tools.Shell.main(Shell.java:260)

    I have tested the following workaround but unsuccessfully:

    -try d'utiliser./hqapi.sh instead hqapi.sh sh

    -try to use different java bin (mine is/usr/java/default jdk6_u31), I tried /opt/hyperic/server-4.5.3/jre/bin/

    -Try sh hqapi.sh alertdefinition sync - file = ad10100.xml

    -try to change the XML, removal of State <>success < / status >

    HQAPI version: hqapi1-client - 4.3.0

    Hyperic HQ version: 4.5.3 - GA

    I need to synchronize alertdefinitions based on XML files please help me around this error.

    Thank you very much.

    Claudio

    Trying some updates for automatic alert via the script API definition, I met this problem as well. No matter what I did, it seemed that this class cast exception would be thrown. I downloaded the Github source HQAPI and started searching. I found that the error was in the call to the XmlUtils.deserialize method, which has invoked a JAXBContext to select the class of the object to return, after analysis of the XML. The code that calls the method waits get an object that can be cast to the type AlertDefinitionsResponse, but he returned to an object that must be cast to type AlertDefinitionResponse.

    After a bit of investigation, I realized that JAXB is the context of the node root XML data. Because the root node is AlertDefinitionResponse, he always returned an object of this type, instead of the expected AlertDefinitionsResponse type. Currently, the only way I found to get around this problem is to change the node root to AlertDefinitionsResponse. So, sync-able XML would look like the following, based on XML of the original poster.



         Success
        
            

            
            
        

    I raise a question on the Github repository so that officials are aware of this problem.

    EDIT: The problem has been discussed here

  • implement PofSerializer, serialize/deserialize not invoked

    Hello

    I have an object of a certain type that I want to put in coherence and a serializer for the type that implements PofSerializer. When I put/get the subject to consistency, I expect to serialize/deserialize methods to call. But I breakpoints in the serializer class and I see that these overridden methods are not called. Can you help me with this? I'll put here the classes and configurations:
    public class Item extends CacheItem {
         private String guid;
         private String cvc;
         
         public String getGuid() {
              return guid;
         }
         public void setGuid(String guid) {
              this.guid = guid;
         }
         public String getCvc() {
              return cvc;
         }
         public void setCvc(String cvc) {
              this.cvc = cvc;
         }
    }
    The serializer:
    public class CacheItemSerializer implements PofSerializer {
    
         @Override
         public Object deserialize(PofReader reader) throws IOException {
              Item item = new CardCacheItem();
              item.setCvc(reader.readString(0));
              item.setGuid(reader.readString(1));
              item.setAcc(reader.readInt(2));
              item.setAm(reader.readDouble(3));
              reader.readRemainder();
              return item;
         }
    
         @Override
         public void serialize(PofWriter writer, Object o) throws IOException {
              Item item = (Item) o;
              writer.writeString(0, item.getCvc());
              writer.writeString(0, item.getGuid());
              writer.writeInt(2, item.getAcc());
              writer.writeDouble(3, item.getAm());
              writer.writeRemainder(null);
         }
    } 
    In these two methods above I breakpoints and that they are not called.

    The pof file - config.xml:
    <user-type-list>
          <include>coherence-pof-config.xml</include>
    
          <!-- User types must be above 1000 -->
          <user-type>
             <type-id>2001</type-id>
                <class-name>com.betfair.site.coherence.entities.Item</class-name>
                <serializer>
                    <class-name>com.betfair.site.coherence.serializers.CacheItemSerializer</class-name>
                </serializer>
            </user-type>
        </user-type-list>
    I initialize the cache like this:
    CacheFactory.ensureCluster();
    namedCache = CacheFactory.getCache(cacheName);
    And then call put / get on the namedCache object.

    I have the following arguments:
    -Dtangosol.pof.enabled = true
    -Dtangosol.pof.config = pof-config. XML
    And in the console, I see it load the pof file.

    It's on all the configurations that I do. Am I missing something?

    Published by: user11200171 on January 25, 2013 13:03

    Hello

    just had a quick glance, but maybe your POF config is wrong. The name of the class that you want to serialize format POF is "Item", while the name in config POF you is 'CardCacheItem '.
    Make sure that the class full name in the correct POF (i.e. your item class belongs to the com.betfair.site.coherence.entities package).

    Also, make sure that your config POF file is used by your client and your server.

    Please, I beg you, shout if it did not help.

    Thank you

  • Aggregator - high memory use of node Cache Server because of deserialization

    Hi all

    We are currently on version 3.5.3 consistency and have the following configuration:
    Cache Key : Long ID
    
    Cache Value :
    CacheData {
      Set<Long> refIds1;
      Set<Long> refIds2;
      Set<String> refIds3;
    }
    After loading the data cache, we're indexing the following:
    cache.addIndex( new ReflectionExtractor( "refIds1" ), false, null );
    cache.addIndex( new ReflectionExtractor( "refIds2" ), true, null );
    cache.addIndex( new ReflectionExtractor( "refIds3" ), false, null );
    We had a requirement to collect all the refIds2 of the cache for the following criteria:
    #1. Key cache match
    #2. All matches refIds1
    #3. All matches refIds3

    We have implemented the following custom aggregator:
    CustomAggregator extends AbstractComparableAggregator implements com.tangosol.io.pof.PortableObject {
    
      @Override
      public Object aggregate( Set values )
      {
        Set<Long> resultRefIds2 = new HashSet<Long>();
        for(Entry entry : (Set<InvocableMap.Entry>)values)
        {
          CacheData data = (ProductGroup)entry.getValue() ;
          resultRefIds2.addAll( data.getRefIds2() );
        }
        return resultRefIds2 ;
      }
      
      public Object aggregateResults( Collection results )
      {
        Set<Long> localRefIds2 = new HashSet<Long>();
        if( null != results && results.size() > 0 )
        {
         List<ImmutableArrayList> immutableProductGroupArrayList = new ArrayList<ImmutableArrayList>( results );
         for( int immutableArrayCnt = 0; immutableArrayCnt < immutableProductGroupArrayList.size(); immutableArrayCnt++ )
         {
           localRefIds2.addAll( immutableProductGroupArrayList.get( immutableArrayCnt ) );
         }
        } 
        return localRefIds2;
      }
      
    }
    Following code retrieves the results:
    Filter[] filters = new Filter[3];
    filters[0] = new InFilter( new KeyExtractor( IdentityExtractor.INSTANCE ), inputKeys );
    filters[1] = new ContainsAnyFilter( "refIds1", inputRefIds1 );
    filters[2] = new ContainsAnyFilter( "refIds3", inputRefIds3 );
    Filter filter = new AllFilter( filters ) ;
    CustomAggregator aggregator = new CustomAggregator();
    Set<Long> refIds2 = (Set<Long>)cache.aggregate( filter, aggregator );
    While we are the results as expected, when entries returns all the criteria of the cache cached to the aggregator, we see many memory due to the deserialization use cached data.

    Snippet aggregator:
        for(Entry entry : (Set<InvocableMap.Entry>)values)
        {
          CacheData data = (ProductGroup)entry.getValue() ;
          resultRefIds2.addAll( data.getRefIds2() );
        }
    #1. Is there a better way to achieve the same results without having to deserialize data in the cache.
    #2. Since we are already indexed data that we are aggregation, is possible to use the indexed data by grouping, rather than extract the cache.

    Thanks in advance
    Avinash Gagnon

    Published by: 972073 on November 19, 2012 12:43

    Hi Avinash,

    You can avoid the deserialization of objects using indices.
    Instead of calling mapEntry.getValue (), use the mapEntry.extract (...) method. If passed Extractor is indexed, attribute is taken between the index.

    Kind regards
    Alexey

  • Why transactional cache deserializes the PortableObjects in a call to put ()?

    I use a single transactional cache and I put PortableObjects in it. The cache contains an index to a string. the Pof object has 3 fields - long, String and byte [].

    I had a breakpoint in my PortableObject constructor in debugging my code and realized that consistency TransactionalCacheWorker wire deserializes the PortableObjects as soon as it receives the order to the customer.

    It is worth noting that my tests are on a single JAVA virtual machine - putter and cache are in the same JVM.

    I have 1 index on the second string field. However, I noticed in the stacktrace (debugging my code) this consistency was another clue indexed on ValuesKeyExtractor... and I suspect that this index is originally my PortableObject be deserialized on the side of the cache. Ideally my index that uses a PofExtractor should not have required a deserialize. Fix?

    In addition, none of the cache.entrySet (filter) operations managed because of this error below. Relevant code snippets and screenshots below:
    (Wrapped: Failed request execution for TransactionalCache service on Member(Id=1, Timestamp=2011-11-29 10:57:00.518, ....,
     Role=IntellijRtCommandLineWrapper)) java.lang.UnsupportedOperationException: PofExtractor must be used with POF-encoded Binary entries; the Map Entry is not a BinaryEntry
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onAggregateFilterRequest(PartitionedCache.CDB:66)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$AggregateFilterRequest.run(PartitionedCache.CDB:1)
         at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)
         at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
         at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.UnsupportedOperationException: PofExtractor must be used with POF-encoded Binary entries; the Map Entry is not a BinaryEntry
         at com.tangosol.util.extractor.PofExtractor.extractInternal(PofExtractor.java:175)
         at com.tangosol.util.extractor.PofExtractor.extractFromEntry(PofExtractor.java:146)
         at com.tangosol.util.InvocableMapHelper.extractFromEntry(InvocableMapHelper.java:294)
         at com.tangosol.util.SimpleMapEntry.extract(SimpleMapEntry.java:168)
         at com.tangosol.util.filter.ExtractorFilter.evaluateEntry(ExtractorFilter.java:94)
         at com.tangosol.util.InvocableMapHelper.evaluateEntry(InvocableMapHelper.java:262)
         at com.tangosol.coherence.transaction.internal.FilterWrapper.evaluateEntry(FilterWrapper.java:135)
         at com.tangosol.util.InvocableMapHelper.evaluateEntry(InvocableMapHelper.java:262)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.createQueryResult(PartitionedCache.CDB:84)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.query(PartitionedCache.CDB:72)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onAggregateFilterRequest(PartitionedCache.CDB:27)
         ... 6 more
    Add indexes:
            this.extIdExtractor = new PofExtractor(String.class, 1);
    
            begin();
            try {
                getTxnCache().addIndex(this.extIdExtractor, false, null);
            }
            finally {
                commit();
            }
    Query:
        Set<Entry> set = getTxnCache().entrySet(new EqualsFilter(extIdExtractor, extId));
    Excerpt from PortableObject:
        @Override
        public void readExternal(PofReader pofReader) throws IOException {
            id = pofReader.readLong(0);
            extId = pofReader.readString(1);
            bytes = pofReader.readByteArray(2);
        }
    
        @Override
        public void writeExternal(PofWriter pofWriter) throws IOException {
            pofWriter.writeLong(0, id);
            pofWriter.writeString(1, extId);
            pofWriter.writeByteArray(2, bytes);
        }

    Hello

    Even with POF objects an index can give great performance to your queries gains. Without indexes, each query has swept all of the cache and check the fields used by the filters of the POF value for each entry to see if it matches - a bit like an on a full table scan database. Yes, POF can be more effective than deserialization, but get much better performance, lower you the garbage and the lowest CPU utilization using indices.

    None of this responsive Ashwin original question.

    You have configured your cache to use a serializer POF?

    JK

  • Aggregator avoiding deserialization

    Hello
    I have just a few performance tests on consistency and a serialized POF to a simple command object that has a few fields. There is a method that returns the sum of 2 of these fields (GetValue)

    The method is indexed:
    ReflectionExtractor extValue = new ReflectionExtractor ("getValue");
    cache.addIndex (extValue, false, null);


    I already tested a DoubleSum aggregator:
    dResult = null cache.aggregate ((Filter) (Double), new DoubleSum ("getValue"));

    but it occurs to me that the aggregation can be deserialization of the object to execute the getValue method - is this the case even if the method is in the index?

    If this is the case, how can I avoid deserialization? I was thinking maybe a custom aggregator that uses POFExtractors to get the raw values and add them - is that reasonable/feasible?

    Thank you
    Chris

    Published by: user8887846 on 29-Sep-2010 02:07

    The POF Extractor use no index, but allows possibly speed up the CREATION of the index (maybe a consistency support person can confirm if this is the case) as the whole object need not be deserialized during the insert in order to generate the index information...

    At least, I think you mainly use PofExtractor if creating an index for an attribute is expensive given the advantage (lets say for some queries rather rare). In this case, it can be potentially more effective than using a normal reflection based Extractor since no deserialization is necessary...

    If you specify a POF Extractor when you create an index I would have taken (this is not verified!) that the index would be used if you do one query with a filter using the extractor POF. If you are using however an extractor of reflection to create the index and then use an extractor of POF (for the same attribute) the index probably NOT would serve as coherence uses equality on the extractors specified to determine if an index can be used or not, and I guess (a lot of guessing here!) that a POFExtractor and an extractor of reflection (for the same attribute) are not equal to each other...

    / Magnus

    Published by: MagnusE on September 30, 2010 11:11

  • Auto unblocking "null" Apple Watch

    My Apple Watch connects my rMBP and everything with macOS Sierra very well, but when my watch sends me a notification says "null" unlocked by this Apple Watch. How to replace the text "null"?

    Solved it for me by signing in and out of the iCloud on mac + iphone then restart all 3.

  • Siri in him sending text with the value 'NULL '.

    When I say, "Siri, text my wife, 'X', ' Siri responds correctly,"here is your message to Jill: 'X'. "" "  "Ready to send it?"  I say 'Yes' and sends the message.  As soon as I get a text from my carrier saying the recipient of the message was invalid.  100% of the time, I see that Siri has sent a text with the value NULL.

    I tried to restart my phone.  I tried to remove and re-add my contacts.  Anyone else having this problem?  Someone knows how to solve?

    If it's by the carrier, you should contact them and see what they receive in return for their side. Ive had Siri send messages for me and I have never seen this one IOS.

  • Talk to the text sent by 'null '.

    When I try and talk to the text of my husband, it continues to send "null" while Siri said she looks and she is sending.  It works with my two other friends who have iPhones.  Suggestions?  I already turned my phone market.

    I guess "speak text" means:

    • You use Siri to send a message.
    • You send it to an iPhone.
    • The message is sent using iMessage (which may or may not be true, even if your husband has an iPhone).
    • The message is not part of a thread existing, but is actually starting a new message thread.

    So presumably, you call Siri to send a message to your husband's iPhone and dictate the content of the message to Siri.

    Assuming that it actually sent via iMessage (blue bubble), check the settings > Messages > Send and receive > start new Conversations on and see it is set correctly.

  • Siri sends texts to null

    Siri frequently sends texts to a "null" contact no listing in contacts, ineffective reboot.

    To help us help you, can you give us some information?  Siri just done this voluntarily at random?  Did you Siri (somehow) when this happens?  You dictate a text message when this happens?  You have a "null" contact in your contacts list?  Anything you think would be useful.  Without any further information, is the general solution of these kinds of problems:

    1. restart,
    2. reset,
    3. restore from a backup, and
    4. Restore as new.

    In that order.

    Restart your iPhone, iPad or iPod touch - Apple Support

    Restore your iPhone, iPad or iPod touch from a backup - Apple Support

    How to clear your iOS device and then set up as a new device or restore from backups - Apple Support

  • Null message dated 31/12/1969

    Periodically a message null - no object of /, content - with a date of 12/31/1969, appears in a folder randomly. View source shows nothing. I can delete the message.

    I renamed the original records which gave me bad, created new ones with the right names, copied the contents of the old files to the new and deleted msf etc. as described. So far so good.
    We will close and we will see if it reappears.
    Thank you for your excellent advice.

  • Backup problem: iMacG5.sparsebundle could not be accessed error null

    Hello

    I have an iMac G5, 27 "; Processor - 3.4 GHz Intel Core 17; Memory - 4 GB 1333 MHz DDR3; Software - OS X 10.9.5 (13F1808)

    Since yesterday, it was not able to Time Machine backup.

    The initial error was "iMac that G5.sparsebundle could not be found (error-1).

    I found a few tips here and there followed:-unplug TC; go to network/SystemPreferences, renew the DHCP lease

    Still did not work.

    Is passed to the next stage of advice:-open the TM preferences panel, remove the TC list of backup destinations, add in

    Still did not work.

    Error message has now changed to "iMac that G5.sparsebundle could not be found (error (null)).

    Is this a defective Time Capsule?  (This is the conclusion, in other similar post, I found that my error message ('null') is different from that of this post).

    Thanks for any advice,

    Lori

    I would ask here if I were you iMac (PPC)

  • How can I delete a data: / / (null) we Marshals.gov of the browser Chrome on an iPad?

    I have an iPad Air and my browser Chrome was completely blocked from use with a likely virus. The description of ' Data: / / (null) we Marshals.gov ' to block the iPhone or iPad. Virus blocking US Marshals.gov data: / / (null) on iPhone or iPad is in fact one of these fake Scam FBI site called FBI moneypak virus, virus from the FBI, U.S. Department of Justice virus or malware security NSA. Popup of crime Marshals.gov US focuses on the mobile device user US iPhone or iPad.

    I would like to get a resolution from a source other than Yoo security for this issue as they declare that "it is ONLY $56 USD 69.95 $ 20% to only once with complete fix guaranteed. You can pay here:https://safecart.com/yoosecurity/yoocare/specialoffer and once you have finished the payment, then we can move forward. »

    Yoo Security Web site: Similarly, this malware blocker disguises US Marshals. Gov to send a $ 500 fine online through the use of the fake warning message to accuse people of doing illegal activities and to require those inexperienced prepaid card, but in reality most of the cases, mobile users did nothing illegal things online. Once we Marshals.gov data: / / (null) virus is downloaded in Apple defrost as the iPhone or iPad, it will show soon fake message warning U.S. Marshals crime to take over the entire screen for iPhone or iPad, saying your Apple ID and your mobile device has been blocked for security reasons. On top of this long US Marshals gov article message warning screen, it shows you real country, city, location details, and then he accuses you of listening * things, pirated, video music download and use or dissemination of protected, content that violates '' law of copyright and related rights. '' For these reasons, your mobile iPhone or iPad is locked as a punishment and it should also send a 500 dollar fine within 24 to 72 hours.

    When inexperienced users, iPhone or iPad are this data: / / (null) we Marshals.gov popping up on their mobile device, they will be freaked out at death and worried if police or FBI police Provost is going to catch him. They don't not think about this issue and note that U.S. Marshals fine warning is one thing to scam. Inexperienced users will soon buy a prepaid card and send money as the rogue application. Disguise the Government Department legitimate as this U.S. Marshals Gov or Department of Justice, police as the police FBI or authentic police is their tactic perfect incentive for cyber con man scamming people for money. A lot of people feel scared and guilty when they see such a policy solemn right WARNING notification showing on their device even if they have nothing wrong to commit a crime and violating the articles of the law. Because it looks very real and legitimate, and can also alert us Marshals.gov data: / / (null)' t be closed or output, these null warning message data to manage successfully to extort big money recently. US Marshals.gov data: / / (null) malware is categorized as a kind of Trojan horse malware, it also provides the ability to access personal information like bank account online, credit card, passwords or data trades etc. It is very dangerous for the security of the information. To remove this Marshals.gov we blocker earlier is a good idea to help protect the security of personal information.

    If we Marshals.gov warning message is displayed on your iPhone or iPad and you had an alert javascript fined, your device is infected withUS Marshals.gov scam malware, it will be difficult for you to remove it completely with antivirus, because there is no antivirus perfect for killing threats on iPhone or iPad and also this malware US Marshals scam is very delicate and can escape from security applications. In this case, manually remove with sufficient expertise online is the best way for users of iphone or compressed completely eliminate it.

    Main symptoms of US Marshals.gov data: / / (null) on iPhone or iPad

    1. it is designed to lock the iPhone or iPad and ask you to pay a fine of $ 500 to unlock your device. In fact, it's just a big scam.

    2. it locks your Apple device, claiming that you have violated the law of the local office by visiting illegal information online.

    3. as soon as this data: / / (null) we Marshals.gov target your Apple device, it totally blocks your access to the Internet and prevents you from doing anything here.

    4. it allows cybercriminals remote access to your iphone/ipad device from Apple to steal your personal information and other sensitive information.

    If you find all of the symptoms listed above showing on your iPhone, or your iPad, your device must be suffered with a malware infection (which can be this warning crime U.S. Marshals, Mandiant USA Cyber Security virus, Department of Justice Virus, Ukash Paysafecard Virus, virus notice of warning from the FBI, the virus of the Australian Federal Police and RCMP Ukash virus etc.) that blocks your access to your device. Welcome to contact Experts Online YooSecurity for manual removal guide. Also, we will provide a short removal guide below for reading and writing device.

    Please tell us how to eliminate viruses and get unlocked Chrome. Thank you!

    Start by looking at this trick:

    Phony 'technical support' / 'ransomware' popups and web pages

  • TypeError: Error #1009: cannot access a property or method of a null object reference?

    Mr President.
    I updated firefox and always this type of problem
    every time I tried to open the flash game site iam getting this question. sometimes IE browser cannot open it too much.
    "".... TypeError: Error #1009: cannot access a property or method of a null object reference.
    to ASGames / fun_Menu)
    to ASGames / frame2)
    at flash.display::MovieClip/gotoAndStop()
    to WeddingTianaDressup_fla::Timeline_102 / playGames ()... » »

    but the same site can be opened in other browsers in the same pc... but the same site a user goes to another computer on the browser firefox itself. How do not know where is the problem... ?
    so please, some can help hu?

    Dear Sir.
    Thanks for your answer...! I did what you said but it doesn't work. new iam having the same problem...!

Maybe you are looking for