Cfchart and JSON string representation

I am trying to pass a JSON string representation for the attribute "plotarea" in this way :
<cfchart
chartWidth="800"
chartHeight="600"
showLegend="yes"
format="png"
title="Commandes"
plotarea='#{"margin-top":"dynamic"}#' >
But I got following error :
Error casting an object of type to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
Is there any documentation explaining how to use "JSON string representation" in cfchart attributes ?

Code_Worm wrote:
Is it possible for me to call my toString method of Manager class within Branch class?Sure as long as it is public. There is no magic or any difference in regards to the toString method to any other method that you create. So somewhere in your Branch class you have:
String blah = manager.toString();

Similar Messages

  • CFChart and XML string

    Hi,
    The CF7 docs say that you can pass a stylesheet to the
    WebCharts3D application by inserting either an XML string or the
    path to an XML file into the "style" attribute of the
    <cfchart> tag. I have use a file path many times, and it
    works fine.
    But I am not able to insert an XML string into the attribute
    without an error. The error is "system cannot find file specified,"
    so it appears as if the application looks for a file, rather than a
    string, regardless.
    I need to set values in the stylesheet dynamically, so I need
    to build the XML and pass it in on the fly. I have output the XML
    and it appears perfectly valid. I have read the contents of a
    working XML stylesheet file into a string and inserted that string
    into the "style" attribute. But it produces the error noted.
    Has anyone been able to pass a string to the "style"
    attribute successfully, and if so, could you pass along some tips?
    Thanks,
    Tom McNeer

    What is the DB version?

  • Calling a method via String representation of instance

    Is it possible to call a method of a specific (and already existing) instance of a class using a string representation of the instance?

    By "String representation of an instance," I simply mean a string that has the same format as a normal method call would have. So where a method would normally be called like this:
    ClassX itsInstance = new ClassX();
    itsInstance.methodX();
    The string representation would be:
    String instanceName = "itsInstance";
    And there would be some way of using this string to call the method referred to by instanceName.
    The idea here is that I want to use the existing instance, whereas using reflection, as below, would create a new instance:
    String className = "X";
    String methodName = "print";
    Class xClass = Class.forName(className);
    Method xMethod = xClass.getMethod(methodName,null);
    Object object = xClass.newInstance();
    xMethod.invoke(object,null);

  • Send a json string to an HTTP in labview

    Hi,
    I need to assing values to an HTTP site by sending a json string, I have been trying using the HTTP client PUT vi with no success, does anyone have an easy way of sending a json string to an HTTP site in labview thru the PUT method???
    Thank you

    What have you tried?
    This should work as a basic example:
    If you have LabVIEW 2013 or newer, there are built-in VIs for encoding/decoding JSON strings to/from LabVIEW clusters.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Adding a JSON string to an outbound RESTful call in OSB 11.1.1.6

    Inside my Proxy Service Message Flow (OSB 11.1.1.6) I have generated a JSON string and stored it in a variable named $jsonReq.
    In my Routing action, I point to a Business Service whose Service Type is "Messaging Service" with both Request/Response Message Types as "Text".
    What is the proper way to assign the $jsonReq variable's contents to the outbound request body (I am doing a POST)?
    I have tried a number of configurations, but to no avail (though I see the JSON contents when I dump it out in a Log action), such as:
    Insert
    Expression: $jsonReq
    Location: as first child of
    XPath: .
    In Variable: outbound
    Please advise.
    Thank you,
    Michael

    Hello Prabu,
    Thank you for the suggestion. Assigning it to the body didn't work. I changed my configuration to this:
    Insert
    Expression: $jsonReq
    Location: as first child of
    XPath: .
    In Variable: outbound
    The net effect that I can see via the Test Console invocation tracing is that the change from:
    RouteToMyBusinessService -> Message Context Changes -> changed $body
    <soap:Body xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <!-- our original body from the proxy service inbound SOAP message -->
    </soap:Body>
    to
    RouteToMyBusinessService -> Message Context Changes -> changed $body
    <soap:Body xmlns:soap="http://www.w3.org/2003/05/soap-envelope"/>
    I know that the $jsonReq has data in it (per a log statement I made: <Jun 6, 2013 7:55:40 AM CDT> <Debug> <ALSB Logging> <BEA-000000> < [RouteToSCCreateBAMLabsProfileBusSvc, null, null, REQUEST] Inserted {"firstName":"string","lastName":"s","email":"stringstring","Login":"string","timeZone":"America/Montevideo","address":{"streetOne":"string","streetTwo":"string","city":"string","state":"st","zipCode":"string","country":"string"},"equipment":{"e":{"type":"Bed","code":"string","serial":"string","sku":"string","version":"string","dateOfPurchase":"2013-11-23T08:44:07"}}} into body> ).
    So why would the body be empty when I use the Insert action listed above?
    On a side note, is there only one 'body' variable in a proxy message flow? How do I distinguish between the body of the incoming request, the body of the [transformed] outgoing business service request, the body of the business service response and the body of the [transformed] proxy service response?
    Thanks again,
    Michael

  • Rest method that can support request/responce in both xml and json formats

    Hi,
    I want  to create rest method that can support request/responce in both xml and json formats.
    I am trying in bellow way, but its not working getting error.
    any idea on this?
    Code in IService.cs :
    [OperationContract]       
    [WebGet(UriTemplate = "/Login/{UserID}/{Password}")]
    Responce Login(string UserID, string Password);
    Code in Service.cs :
    public Responce Login(string UserID, string Password)
                try
                    objResponce = new Responce();
                    objResponce.MessageType = Responce.ResponceType.Warning.ToString();
                    string Con = GetConnectionString(UserID, Password);  //Method to check valid user or not
                    if (Con.Trim().Length != 0)            
                        objResponce.Message = "you have logged in Successfully";                   
                    else
                        objResponce.Message = "Please Enter Valid UserID,Password";                
                catch (Exception ex)
                    through ex;             
                return objResponce;
    My Config settings :
    <services>
          <service name="OnePointAPI.OnePointAPIService">
               <endpoint address="JSON" binding="webHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webJSON" ></endpoint>
               <endpoint address="XML" binding="basicHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webXML" ></endpoint>     
          </service>   
     </services>
     <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="webJSON">
              <webHttp defaultOutgoingResponseFormat="Json"/>
            </behavior>
            <behavior name="webXML">
              <webHttp defaultOutgoingResponseFormat="Xml" />
            </behavior>
          </endpointBehaviors>
     </behaviors>  
    Anwar Shaik

    In several days (in the 19th) i will lecture at
    SQLSaturday #360 and my last demo (hopefully I will have the time) is
    Full implementation of JSON, I will show several function using JSON serializer and deserializer, and as mentioned full implementation including fast
    indexes on JSON column (finding specific Node in 10 million rows
    in less then a second). If you want to wait, then I will publish it latter probably, or you can come the lecture if you want :-)
    * I am using Json.NET framework, by the way.
    regarding your question, all you need is to find a nice serializer/deserializer framework (you can use
    Json.NET framework) in order to do what you are looking for (if I understand what you asked)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Problem - insert JSON string into table in CLR function

    Hi
    I create a CLR function to insert JSON string into table.
    With this line 
    mt = JsonConvert.DeserializeObject<MyTable>(jsonStr.ToString());
    The class is OK (no error), but when I try to add the Assembly in Microsoft SQL Server Management Studio, it has error :
    Assembly 'newtonsoft.json, version=4.5.0.0, culture=neutral, publickeytoken=30ad4fe6b2a6aeed.' was not found in the SQL catalog.
    (I have Newtonsoft.Json in the Reference)
    Please help !
    Thanks

    Hi Bob
    Could you elaborate a bit more?
    I think the code is ok. The problem is when I deploy the Visual Studio creates/alters the assembly, and get the error
    Error:  SQL72014: .Net SqlClient Data Provider: Msg 6503, Level 16, State 12, Line 1 Assembly 'newtonsoft.json, version=6.0.0.0, culture=neutral, publickeytoken=30ad4fe6b2a6aeed.' was not found in the SQL catalog.
    ALTER ASSEMBLY [Database1]
        FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C0103000DE411540000000000000000E00002210B010B000012000000060000000000008E3000000020000000400000000000100020000000020000040000000000000006000000000000000080000000020000000000000300608500001000001000000000100000100000000000001000000000000000000000003C3000004F00000000400000A802000000000000000000000000000000000000006000000C000000042F00001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E7465787400000094100000002000000012000000020000000000000000000000000000200000602E72737263000000A8020000004000000004000000140000000000000000000000000000400000402E72656C6F6300000C0000000060000000020000001800000000000000000000000000004
    An error occurred while the batch was being executed.
    Done building project "Database1.sqlproj" -- FAILED.
    This is my FillRow function. Without the bold line, the everything is fine. I can create the assembly, then create the SQL function. Done. When I call select from the SQL function, it returns 10 rows as expected.
    public static IEnumerable getTable(SqlString jsonStr)
            ArrayList resultCollection = new ArrayList();
            MyTable mt;
            //mt = JsonConvert.DeserializeObject<MyTable>(jsonStr.ToString());
            int c = 1;
            while (c < 10)
                mt = new MyTable();
                mt.GlobalId = c.ToString();
                mt.DateSet = "DS=!=" + c.ToString();
                mt.Timestamp = "TS==" + c.ToString();
                mt.PartnerId = "PI==" + c.ToString();
                mt.PartnerUserId = "PUI=" + c.ToString();
                mt.UserIP = "UIP=" + c.ToString();
                mt.UserAgent = "UG=" + c.ToString();
                mt.Referer = "R=" + c.ToString();
                resultCollection.Add(mt);
                c++;
            //resultCollection.Add(mt);
            return resultCollection;

  • XML Nodeset to String representation

    I'm trying to assign/cast an XML nodeset to a string and retain all of the element tags in the string representation. I've tried using the string(), getNodeValue(), and get-content-as-string() expression functions, but all appear to strip the element tags from the string output. Anyone have an idea how to go about this?
    Thanks,
    Peter

    Oddly enough, this transform did the trick...
    <xsl:template match="/">
    <ns0:Blahqueue>
    <blahInstance>
    <xsl:value-of select="orcl:get-content-as-string(/mstns:blahSchema)"/>
    </blahInstance>
    </ns0:Blahqueue>
    </xsl:template>

  • Problem after upgrade 11.1.1.6 - "Invalid JSON String"

    Dear All,
    after upgrade OBIEE to 11.1.1.6 I'm receiving an error message: "Invalid JSON string: 0 {t:1}:" when I'm trying to populate Dashboards, Catalog or even Help option.
    I've check with firebug that POST data are send and in fact I'm getting all data in a background - server response is correct,
    but instead of getting a correct view I have "Invalid JSON string :0 {t:1}:" message. Message comes from res/b_mozilla/common.js file.
    Cache has been also cleared.
    Any ideas what went wrong?
    Thanks'
    Regards.
    Edited by: user623575 on Mar 29, 2012 1:13 AM

    Hi,
    The error message "Invalid JSON string: 0 {t:4}" due to your Analytics Application was not re-deployed properly and also sometimes your javascript is still 11.1.1.5 version catched.
    1) to resolve this issues can you please Clear the browser cache and re-load the page or log in to OBIEE.
    2)if its not working then try to Re-deploy the Analytics Application, using the file $Middleware_Home\Oracle_BI1\bifoundation\jee\analytics.ear
    know Bug Ref:
    This is a known bug in OBIEE 11.1.1.6.0
    BUG:13845528 - UPGRADING TO 11.1.1.6, ANALYTICS DOES NOT WORK IN FIREFOX 10.0.2 ON WINDOWS 7 PC
    Please refer the below doc
    OBIEE 11g: Error: "Invalid JSON string: 0 {t:4}" Logging into OBIEE 11.1.1.6.0 after Upgrade [ID 1439063.1]
    Thanks
    Deva

  • Storing JSON string into Oracle table

    Hi,
    What is appropriate way to store JSON string into Oracle table?
    Regards
    Peter

    If JSON becomes more popular, ORACLE might write data cartridge extension for JSONDB (in the same way as XMLDB).
    Till then CLOB and NCLOB is your best choice, and leave the parsing in your application layer.

  • Numeric Value to String representation

    Hi!
    I was wondering if there was an easy way to getting the String representation of a number (specifically an integer). I am trying to format a message that would be like this:
    Three (3) records have been updated.
    Getting the (3) is easy, but my problem is getting the word Three. There are numerous records, which means an Array would be close to impossible coz it will take time to produce an output.
    Is there an easy way? (1 = One, 2 = Two,..., 20 = Twenty)
    Thanks!

    I'd guess that a switch statement will be about as fast as anything else, since it's a static structure and the compiler should be able to optimize it effectively.
    int number = setMeToAValue;
    switch (number) {
        case 0:  System.out.println("zero"); break;
        case 1:  System.out.println("one"); break;
        case 2:  System.out.println("two"); break;
        case 3:  System.out.println("three"); break;
        case 4:  System.out.println("four"); break;
        case 5:  System.out.println("five"); break;
        case 6:  System.out.println("six"); break;
        case 7:  System.out.println("seven"); break;
        case 8:  System.out.println("eight"); break;
        case 9:  System.out.println("nine"); break;
        case 10: System.out.println("ten"); break;
        case 11: System.out.println("eleven"); break;
        case 12: System.out.println("twelve"); break;
        case 19  System.out.println("nineteen"); break;
        case 20  System.out.println("twenty"); break;
        case 30  System.out.println("thirty"); break;
        case 40  System.out.println("forty"); break;
    To get 21 go after the parts and concantenate them. case 20 + case 1 produces 21, etc

  • Parse JSON string

    Hi,
    I'm parsing this JSON string with the libs in org.json and I can't understand why I get the output below into the log.
    ArrayList<String> al = new ArrayList<String>();
    JSONObject demo = new JSONObject("{\"00408C88A2E6\":{\"id\":\"00408C88A2E6\",\"name\":\"Lab\"},\"00408C91188B\":{\"id\":\"00408C91188B\",\"name\":\"Lab1\"},\"00408C944B99\":{\"id\":\"00408C944B99\",\"name\":\"Lato1\"},\"00408C944BA0\":{\"id\":\"00408C944BA0\",\"name\":\"Lato\"}}");
    Iterator<String> iterator =  demo.keys();
    while (iterator.hasNext() ){     
         al.add((String)iterator.next());
         Log.i(LOG_TAG, "size al into while " + al.size());
         Log.i(LOG_TAG, "MAC " + iterator.next() + " for the user " + userId);
    }Log output
    07-12 08:55:34.056: INFO/parse(285): size al into while 1
    07-12 08:55:34.056: INFO/parse(285): MAC 00408C91188B for the user nweb
    07-12 08:55:34.066: INFO/parse(285): size al into while 2
    07-12 08:55:34.066: INFO/parse(285): MAC 00408C944B99 for the user nweb
    07-12 08:55:34.066: INFO/parse(285): size al 2Should not have 4 elements in my ArrayList?
    Thank you

    mlipreri wrote:
    Thank you, I'm really new on this and it's a newbie error, I wasted 2 days for it :)In those two days, did you ever take the time to read the javadocs of the classes you are using?
    If not, then that would be a big improvement right there that will seriously shorten the times you have to struggle, plus give you more possibility to resolve issues yourself.
    [http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/|http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/]

  • Naive Bayes Training - CLOB as output data type for JSON string?

    Hello everyone,
    My training model outputs a large JSON string that doesn't fit into one row, so the string is split across multiple rows. Default - or only possible output data type for that matter - is varchar according to the official documentation on PAL. Is there any chance I could use CLOB for the output?
    Regards
    Henry

    The property you provided is for applying an NB model, not for building one.
    For build, you should have used Sample_NaiveBayesBuild property file.
    I ran the NB apply sample program with your property, and was able to get past the point where you have problem.
    Please double check if you really used the property you provided and if it matches to the program you wanted to use.

  • HttpSevice and JSON question

    Is there a way to send a JSON string as my HttpService request data without setting a parameter value? For example, I know I can do something like:
    var params:Object = new Object();            
    params.param1 = jsonStringValues;
    myService.send(params);
    The problem is the web service I'm calling is only looking for the jsonStringValues, not param1 = jsonStringValue so I need to do something like:
    myService.send(jsonStringValues);
    thanks

    From what I gather if I have a file that looks like this:
         "firstName": "John",
         "lastName": "Smith"
    }Than I have to have a class that looks like this:
    class Person
         String firstName;
         String lastName;
    }and my code is this line:
    Gson gson = new Gson();
            Person p= gson.fromJson(new BufferedReader(new FileReader(fileName)), Person.class);The problem then, obviously, is if I have spaces in the fields, I haves spaces in my variable names. I tried using _ or just ignoring the spaces entirely but, that didn't work.
    Edited by: JFactor2004 on May 25, 2010 7:40 PM

  • Hex string and normal string concatenat​e issue

    Hello,
    what i have is a hex string and a normal string which i want to concatenate into one string.  the problem is that in the output concatenated string you need to select either "normal display" or  "hex display" in the properties.  the problem is if you select hex display then the normal string is converted into hex and if you select normal display then the hex value is not correct.  is there a way to display the hex value in normal display mode?
    attached is a vi showing the problem
    Attachments:
    hex to string.vi ‏7 KB

    lfoitek wrote: ...  i am creating a state machine and then translating it into string representation ... i just can't figure out how to do the conversions to display the correct output.
    If by "correct output", you mean you want something like 4bytes (0xBADDF00D) converted to 8bytes ("BADDF00D" in normal display), then there are several ways ...
    Message Edited by Donald on 08-31-2006 04:17 PM
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."
    Attachments:
    HexHeadaches.jpg ‏24 KB

Maybe you are looking for

  • ORA-01401 error on char column with oracle oci driver

    Hello, We found a potential bug in the kodo.jdbc.sql.OracleDictionary class shipped as source with Kodo: In newer Kodo versions (at least in 3.3.4), the method public void setString (PreparedStatement stmnt, int idx, String val,          Column col)

  • Third party software

    Is there a community or thread to get feedback on 3rd party software/freeware for Mac? I typically check Version  tracker & that has reviews. I just heard about blu-raytracker.com & they have a new download to catalog your BDs on your Mac.  I cannot

  • Screen keeps rotating a pain in the rear. How do I stop

    the screen rotates on its own. I reset it (difficult) and it will rotate back. How do I make it stop,

  • Some keys on my Hp notebook just stopped working...HELP!!!

    The left Shift key, the Z,X,C,V,M, Space key and comma.

  • Amarok amarok 2.7.0-3 won't start

    When I run " [teeha]$  amarok" it gives: amarok: symbol lookup error: /usr/lib/libamaroklib.so.1: undefined symbol: _ZN11KListWidget17mouseReleaseEventEP11QMouseEvent Search on google says it might be taglib problem: taglib 1.8-1 The return of " ldd