[Ann] D.eval API v1.1

The D.eval API is for evaluating textual dynamic AS3 code
within Flex or Flash programs. It brings eval() capability to AS3
programming. And it is freeware now with v1.1.
The D.eval API supports a powerful embedded language with
these features:
(a) Supports all the AS3 expressions and statements,
including E4X. ('switch' support is new in v1.1)
(b) Can define user function in the dynamic code (new in
v1.1)
(c) Can interact with the calling host environment.
The library has been tested with Flex 3 and Flash CS3 (new in
v1.1). As usual, it comes with complete documentation and rich
examples. The examples can be viewed online, where Flex libraries
are linked in as RSLs to reduce their sizes (dramatically).
Another change between v1.1 and v1.0 is the package name: it
is now "r1.deval".
Why is it called D.eval? Because the whole API contains just
one class, "r1.deval.D", of which the most important method is the
static one, eval(). So you would use D.eval() or one of its
variants in your code.
The D.eval API is on Flex Exchange; or just visit
http://www.riaone.com/deval/
-------------------------------------------------------------------

First off, great work!
I was playing around with it and couldn't find a solution so
I was wondering if you could answer this. My goal is to dynamically
add sprites that the user can interact with. The problem seems to
be that I cannot define the listener functions dynamically. Any
solution to this?

Similar Messages

  • [Ann] D.eval() API brings eval() to Flex 2

    The D.eval() (read DEE-val) API is a SWC library for Flex 2
    applications to execute text strings of dynamic ActionScript
    expressions and programs.
    The language used in D.eval() is called Deval, a subset of
    ActionScript 3 (AS3). It supports all the AS3 expressions
    (including E4X) and most flow control statements; it can access any
    AS3 classes and functions; it does not define functions and
    classes. D.eval() opens a whole new world to Flex 2 applications
    and development.
    The current version is 1.0-Beta, which is fully functional.
    Check it out at [Adobe | Exchange | Flex | Libraries], or visit the
    web site at
    http://www.riaone.com/daseval/
    Have lots of fun with the D.eval() API!
    P.S. D.eval() was released under a different name about a
    month ago. It is renamed to D.eval() and the content is the
    same.

    I've been hit by the wmode issue with IFrames, when tested an
    application on Linux which floats a PDF over my Flex.
    The main reason that it work in Firefox on Linux was that
    there wasn't any support at the Firefox end, so there was no point
    in adding the feature... but it looks like Firefox contributors
    have finished the work needed in the last couple of weeks!:
    https://bugzilla.mozilla.org/show_bug.cgi?id=137189
    So hopefully we'll be seeing from platform floating IFrame
    support.
    There was also a pretty hardcore hack someone noticed Google
    were using which lets you float HTML content over Flash even on
    Linux, did you ever come across that? If not and you can't find it,
    I'll try and dig out a link.
    Floating IFrames floats my boat, provided it can produce
    consistant results across all platforms.
    There is an issue with dot pitch on windows though... try
    changing the DPI and see where the lovingly position frame ends
    up!

  • [Ann] DAS.eval() Library brings eval() to Flex 2

    The DAS.eval() (read DAS-eval) Library is a SWC library for
    Flex 2 applications to execute text strings of dynamic ActionScript
    expressions and programs.
    The language used in DAS.eval() is DAS — Dynamic
    ActionScript — a subset of ActionScript 3 (AS3). It supports
    all the AS3 expressions (including E4X) and most flow control
    statements; it can access any AS3 classes and functions; it does
    not define functions and classes. DAS.eval() opens a whole new
    world to Flex 2 application development.
    The current version is 1.0-Beta, which is fully functional.
    Check it out at
    Adobe | Exchange | Flex | Libraries
    or visit the web site
    http://www.flexisco.com/daseval/
    Have lots of fun with Dynamic ActionScripting (DASing)!
    -Ann

    The DAS.eval() (read DAS-eval) Library is a SWC library for
    Flex 2 applications to execute text strings of dynamic ActionScript
    expressions and programs.
    The language used in DAS.eval() is DAS — Dynamic
    ActionScript — a subset of ActionScript 3 (AS3). It supports
    all the AS3 expressions (including E4X) and most flow control
    statements; it can access any AS3 classes and functions; it does
    not define functions and classes. DAS.eval() opens a whole new
    world to Flex 2 application development.
    The current version is 1.0-Beta, which is fully functional.
    Check it out at
    Adobe | Exchange | Flex | Libraries
    or visit the web site
    http://www.flexisco.com/daseval/
    Have lots of fun with Dynamic ActionScripting (DASing)!
    -Ann

  • Is there any Java API equivalent to Javascript eval() method?

    Is there any Java API equivalent to Javascript eval() method?
    Regards
    Rakesh

    No there isn't however you can use Jython (or another scripting language of your choice) to reproduce this functionality.

  • Bootstrap.js script error during eval() "Error initializing JDF library"

    bootstrap.js script error during eval(). Everytime I open Adobe Acrobat 6.0 I recieve this error message once it loads up. I also recieve another error messeage while it is in the process of loading "There was an error while loading the plug-in "SaveAsXML.api.' This file was not found. I am wondering if this is why I cannot convert a file to PDF from word when I go to convert from file from adobe acrobat 6.0. It is vital to my business that I convert these files from Word. Even when I try to go to Adobe Distiller the error message "Error initializing JDF library"  pops up and will not allow me to convert my file to PDF  
    Thank you       

    Hello,
    I solved the problem (even if I really don't know how) :-/
    What I did :
    1. remove all the environnement variables for ORACLE : ORASID, ORACLE_SID, ORAHOME, ORACLE_HOME, ORACLE_BASE...
    (I don't know why I have so many variables...)
    2. I remove any varible of LANG (NLS_LANG, ORA_LANG...)
    3. I checked the rpm (it seems that some of the library where missing, for example libXtst.so.6)
    By the way, I installed the patch 6078836. Unzip the patch, it will create the library libdb.so.2. Move this file to /usr/lib
    4. I uninstall first the agent and the oms, then the database.
    5. I reinstalled everything and run the ConfigureGC.pl script. I had to go through the bug 7483221 (the script failed twice because of invalid login/password, ORA-01017). The procedure is described on several sites, I used this one :
    [http://www.idevelopment.info/data/Oracle/DBA_tips/Enterprise_Manager/OEM_10.shtml]
    I hope it will help you to complete the installation.
    Regards

  • JSObject.eval() works in IE, not in Netscape 6

    I've heard of the string you pass to eval() being too long so it takes a few seconds, but it doesn't work at all for me. And no errors in plug-in console.
    I am trying to manipulate form values and then force a submit. That should be possible in Netscape 6 right? It works fine in IE.
    Using jdk1.3 plug-in 1.3

    Hi,
    The plugin doesn't allow scripting of applets for Netscape.
    From http://java.sun.com/products/plugin/1.3/basics.faq.html :
    Q: Does Java Plug-in Software support scripting?
    A: Java Plug-in Software supports scripting of applets in Internet Explorer. However, such scripting is not available when using Java Plug-in Software in Navigator. Because of limitations in Netscape's plug-in API, scripting cannot be supported directly (through LiveConnect) in Navigator. We are working closely with Netscape to address this issue in a future release of Navigator.
    Regards,
    Kurt.

  • Questions and Answers for Ann Rosenberg for March 11 Webinar

    Hello,
    Please reply to this thread with any questions or discussion points related to Ann Rosenberg's Webinar on March 11, 8AM PST "Running a Successful BPM Practice for SAP Customers"
    [View the announcement page|https://www.sdn.sap.com/irj/scn/wiki?path=/display/events/annRosenbergWebinar-RunningaSuccessfulBPMPracticeforSAPCustomers%252CWedsMarch11%252C11AMEastern]for more information, or to register.
    About the speaker
    Ann Rosenberg is Global Practice Head for Business Process Management in SAP's Business Transformation Consulting Team.  Ms. Rosenberg has been with SAP since 2000, holds a Black Belt in Six Sigma, and an executive MBA from SIMI. She has extensive experience in setting up BPM competency centers, and helping IT departments execute transformational change to support process-oriented organizations. Ms. Rosenberg recently published the book Business Process Management - The SAP Roadmap.

    Hi Ashish,
    There are several options for you. With the process list that is part of the Process Desk, you can display all running, completed, and canceled processes that are relevant for you.  [Displaying Processes in the Process List|http://help.sap.com/saphelp_nwce711/helpdata/en/d1/6d5ee426da4a84951c5acad77a1911/content.htm ] 
    In addition, with SAP NetWeaver Administrator, if you have administrative rights to a process you can find out if the process completed successfully or not, who executed tasks in the process, what is the data in the process context, etc.  [Managing Processes and Tasks with SAP NetWeaver Administrator|http://help.sap.com/saphelp_nwce711/helpdata/en/58/c325d5323b447ebb9d020c7fbaa5be/content.htm]
    Currently there is not a public API for accessing the native process metadata, but this will come with wave 2.  However, if you have important process metrics that you would like to track today, you can always add an automated activity to your process model that posts process data to a web service.
    Kind regards,
    Michael
    Updated links

  • Problems with Java Scripting API

    Hello Everyone!
    Guys, I need help with Java scripting API. A problem is that I cannot understand how can I operate Java Object's fields and methods from the script language. I have chosen embedded javascript to work with. And I can get the fields and methods of in-box java classes (such as ArrayList for example), but I cannot work with methods and fields from my own classes!
    Here is an example:
    public class ScriptingExample {  
        class MyClass {  
            int myfield = 5;  
            int getInt() {return 7;}  
        public void runExample() {  
            ScriptEngineManager mgr = new ScriptEngineManager();  
            List<ScriptEngineFactory> factories = mgr.getEngineFactories();  
            ScriptEngineManager factory = new ScriptEngineManager();  
            ScriptEngine engine = factory.getEngineByName("JavaScript");  
            MyClass mc = new MyClass();  
            try{  
                engine.put("mc", mc);  
                engine.eval("print(mc.myfield); print(mc.getInt())"); // or engine.eval("print(mc.myfield)");
            } catch (Exception e) {e.printStackTrace();}  
    }  If I run the code with the commented part it prints "undefined" instead of "5".
    If I run the code as it is it prints error instead of "7":
    undefinedjavax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot find function getInt. (<Unknown source>#1) in <Unknown source> at line number 1
    at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
    at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
    at javax.script.AbstractScriptEngine.eval(Unknown Source)
    at solutiondatabase.ScriptingExample.runExample(ScriptingExample.java:26)
    at solutiondatabase.Main.main(Main.java:49)
    How can I fix it?

    Guys,
    please let me raise this topic because several new questions emerged.
    (1) How can I get all the variables created inside my engine?
    There are two kinds of variables: first kind is Java obejcts put inside the engine and second kind is the variables created in my script, such as 'var a = 4;'. How can I list all the variables of that two kinds?
    (2) Is there is a way to make 'import static' to the engine? I dont want to write MyClass.MyEnum.MyEnumItem every time. Also, I cannot put the whole enum into the engine with engine.put("MyEnum", MyEnum); I can put only enum items separately: engine.put("MyEnum", MyEnum.EnumItemA);. Thats why I ask about static import.
    (3) How can I cast engine variables back to java variables inside my java code?
    Here is my example:
    package mypackage;
    import java.util.ArrayList;
    import java.util.List;
    import javax.script.ScriptEngine;
    import javax.script.ScriptEngineFactory;
    import javax.script.ScriptEngineManager;
    public class Main
         public static void main(String[] args) throws Exception 
              ScriptEngineManager mgr = new ScriptEngineManager();
              List<ScriptEngineFactory> factories = mgr.getEngineFactories();
              ScriptEngineManager factory = new ScriptEngineManager();
              ScriptEngine engine = factory.getEngineByName("JavaScript");
              ArrayList<Double> myList = new ArrayList<Double>();
              myList.add(5.0);                    
              engine.put("MyList", myList);     
              engine.eval("MyVar = MyList.get(0);");
              System.out.println((Double)engine.get("MyVar"));
    }The result is:
    Exception in thread "main" java.lang.ClassCastException: sun.org.mozilla.javascript.internal.NativeJavaObject cannot be cast to java.lang.Double
    +     at mypackage.Main.main(Main.java:28)+
    Is it possible to retrieve my Double java object from the engine?
    Edited by: Dmitry_MSK on Aug 6, 2010 1:56 AM

  • Ann: North East Conference on MVC Frameworks and Struts in 3 weeks:

    Ann: North East Conference on MVC Frameworks and Struts in 3 weeks:
    Most people already know what MVC is, once you know what it is, here is the next step. Presenting will be the popular frameworks and components in use by 8 speakers:
    -Ted Husted – Author – Struts Chains/2.0 – the dominant framework in use, from Ziff Davis, to Apple Store to most large commercial sites.
    Husted.com
    -Rod Johnson – Author – EJB/Spring
    springFrameWork.com
    -Christophe Coenraets – Flex-MacroMedia - “back to rich UI w/SOA” (Great blog entry on Struts + Flex)
    markMe.com/cc
    -Howard Lewis Ship – Author – HiveMind (SOA, IOC, AOP) – commonly referred to as “the next big thing”
    javaTapestry.blogspot.com
    -Clinton Begin – DAO/iBatis/SQLMaps – the best DAO layer
    imo, used by Spring, jPetStore, basicPortal, etc.
    -Matt Raible – Author – displayTag/strutsMenu – (displayTag is my favorite J2EE component)
    Raibledesigns.com
    -Jason Carreira – WebWork 2
    freeroller.net/page/jCarreira
    - Vic Cekvenich – Author – basicPortal (J2EZ – easy and simple to customize application for membership, portal, cms, community, store, etc. using bestPractices for large, profitable commercial sites. )
    + more
    You will get a CD mailed to you once you register.
    April 3rd from 8AM to 7PM in NYC at nyhotel.com, next to MSG. Advertised in JDJ, NY Times, etc. My guess is that you won’t find half as many good sessions at Sun’s Java One.
    It $99 to register now at baseBeans.com, in a few day's price keeps going up.

    Hey Jan,
    Oracle's E-Business suite is moving to a JSF solution. This is really for three main reasons (abbreviated version):
    1) JSF is much more focused on the 'view' components. The component model has a clean separation of the component definition from its rendering. This, among many other things, allows us to provide a consistent development environment and APIs for developers building apps for browsers, mobile devices, telnet devices, etc.
    2) JSF has a better defined lifecycle. The JSF lifecycle maps much closer to the phases that enterprise applications need when processing data from a web application. We are able to easily extend this to add things not currently in the spec, like portlets, wireless, etc., as well as more easily plug new components into the framework.
    3) Once you remove the JSP tags & FormBean from Struts, all you are left with is the navigation. There is nothing special in the Struts navigation that would cause us to try to make the two technologies work together. In fact, the Faces navigation will not be robust enough in its current form to support the declarative navigation requirements for Oracle apps. We plan to extend the JSF navigation and then work to submit that back into the standards.
    Hope this helps,
    Ted Farrell
    Oracle Corporation.

  • Office 365 REST API - Mail, Calendar, Contacts Update

    UPDATE: We have announced General Availability of our REST APIs. The refreshed documentation which covers all the changes and much more is now available
    here.
    I wanted to share an update on our Mail, Calendar, Contacts REST API. Over the last few months we have been heads down updating the APIs. Most of the changes are a direct result of all the great feedback that we have received from
    customers like you and we are very excited about sharing these changes. 
    These changes are starting to light up in the service and we have already received questions/comments about them from some of you.
    Some of these changes are not backward compatible.  
    Due to versioning not yet implemented (but coming soon!), and these API’s being in preview, they might require simple updates to your code.
      Once versioning is in place, introducing non-backward compatible changes won’t impact your existing code. 
    Stay tuned for a full list of these changes along with the refreshed documentation and client libraries. 
    We have received a number of questions on some specific changes which I wanted to share a workaround for:
    1. Folder names after ../ews/odata/Me, such as Inbox, SentItems, DeletedItems, Drafts will additionally require a “Folders” in front of them in the URL.
    REST URL:
    Before  :
    https://outlook.office365.com/ews/odata/Me/Inbox
    Now      :
    https://outlook.office365.com/ews/odata/Me/Folders/Inbox
    .Net code sample:
    var messageResultsBefore = await (from i in client.Me.Inbox.Messages select i).ExecuteAsync();
    var messageResultsNow = await (from i in client.Me.Folders.GetById("Inbox").Messages select i).ExecuteAsync();
    2. The Namespace has been updated from "#Microsoft.Exchange.Services.OData.Model" to “Microsoft.OutlookServices” and hence the fully qualified type names have to be updated to reflect that. In most cases though, you do not need to provide the odata.type
    property as we can infer it based on where you make the post. For example, if you POST to ../Me/Contacts, we know you are trying to create a contact.
    3. Contacts changes: To make the API easier to use, we have replaced EmailAddress1, EmailAddress2, EmailAddress3 with a collection of a new type called EmailAddress. We have similarly also changed BusinessPhones, HomePhones to collections.
    Sample payload showing how to create a contact with EmailAddresses and BusinessPhones:
    "GivenName": "John", 
    "EmailAddresses": [    
    "Address": "[email protected]",
    "Name": "John"
    "BusinessPhones": [
    "123-456-7890" 
    4. Event Changes: The property Attendees now includes the type “EmailAddress”.
    Sample Event payload showing how to create an Event.
    "Subject": "Discuss the Calendar REST API", 
    "Body": {   
    "ContentType": "HTML",   
    "Content": "I think it will meet our requirements!" 
    "Start": "2014-07-02T18:00:00Z", 
    "End": "2014-07-02T19:00:00Z", 
    "Location": {     
    "DisplayName": "Conference Room 1"   
    "ShowAs": "Busy", 
    "Attendees": [   
    "EmailAddress": {
    "Name":"Alex Darrow",
    "Address": "[email protected]"
    "Type": "Required"   
    "EmailAddress": {
    "Name": "Anne Wallace",
    "Address": "[email protected]"
    "Type": "Optional"   
    "EmailAddress": {
    "Name": "Conference Room 1",
    "Address": "[email protected]"
    "Type": "Resource"   
    5. We have introduced a simple API for sending email called SendMail, and have removed the custom parameter MessageDisposition which was difficult to understand and discover.
    The sendmail action, takes two parameters, a required parameter which is the Message itself and an optional parameter, "SaveToSentItems" which by default is set to true.
    Sample Request to create and send email with one call:
    POST:
    https://outlook.office365.com/ews/odata/me/sendmail
    "Message":{   
    "Subject": "Have you seen this new Mail REST API?",   
    "Importance": "High",   
    "Body": {     
    "ContentType": "HTML",     
    "Content": "It looks awesome!"   
    "ToRecipients": [{         
    "EmailAddress": {           
    "Name": "John Doe",           
    "Address": "[email protected]"         
    If you are running into any issues please post on stackoverflow here:
    http://stackoverflow.com/questions/tagged/office365
    We apologize for any inconvenience and thank you for your continued feedback!

    Hi, 
    I was trying to create and update the calendar event using [POST] https://outlook.office365.com/api/v1.0/me/events and [PATCH] https://outlook.office365.com/api/v1.0/me/events/<eventId> respectively.
    When i try with poster or postman, I get this error
    {error: {code: "ErrorInvalidRequest" message: "Cannot read the request body."} }
    its not working . Any help will be appreciated.
    Note: GET events and DELETE Events are working. I think the API with payload is not working.

  • Scripting and reflection API questions

    hi all,
    what are the qualified class names of classes evaluated through the script engine?
    i.e. if i eval("class C {}"), how can i then myReflectionContext.findClass("C")
    if this is impossible, is there some other way of creating instances of fx classes
    defined through the scripting API, on the java side?
    when i try to define a public class, or a package through eval, i get a compile error.
    is this normal, and why does it happen?
    is it possible to build fx functions from java, where the invoke method of the function is
    defined in java? is there a standard/recommended way of doing so? my hack-around
    right now is to just eval an fx function which calls a java method.
    is it possible to instantiate fx vars and bind them to other vars from java?
    is it possible to programmatically construct entire fx class definitions from java?
    thanks for any tips

    The constructor will of course need an instance of Outer as a parameter.
    class Outer {
       class Inner {
       public static void main(String[] args) throws Throwable {
          Class innerClass = Class.forName( "Outer$Inner" );
          // ok, so now i got the class,
          // how can i create an instance.
          java.lang.reflect.Constructor innerConstructor=innerClass.getDeclaredConstructor(new Class[] {Outer.class});
          Object innerObject=innerConstructor.newInstance(new Object[] {new Outer()});
    }- Marcus

  • Critical issue with Berkeley Java API

    Hi
    While using Java API to access BDB, and when multiple requests are made at the same time, I am getting the following error:
    unable to allocate memory for mutex; resize mutex region
    Exception in thread "main" java.lang.OutOfMemoryError: Cannot allocate
    memory: unable to allocate memory for mutex; resize mutex region
    at com.sleepycat.db.internal.db_javaJNI.DbEnv_open(Native Method)
    at com.sleepycat.db.internal.DbEnv.open(DbEnv.java:317)
    at
    com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:3886)
    at com.sleepycat.db.Environment.<init>(Environment.java:93)
    at com.yht.util.BDBReader.createPrimaryDatabase(BDBReader.java:78)
    at com.yht.util.class5.cdr.CdrReader.<init>(CdrReader.java:78)
    at com.yht.util.class5.cdr.CdrReader.main(CdrReader.java:233)

    Hi,
    Is this issue critical enough not to [run a search on the forum|http://forums.oracle.com/forums/ann.jspa?annID=244] for the "unable to allocate memory for mutex; resize mutex region" error?
    Database in memory causing exception
    Re: Error message "Not Enough Space"
    Problem: unable to allocate memory for mutex; resize mutex region
    unable to allocate memory for mutex; resize mutex region
    The problem is caused by the incorrect configuration of the mutex region size. Increasing the number of mutexes by calling one of the two methods should fix it:
    http://www.oracle.com/technology/documentation/berkeley-db/db/java/com/sleepycat/db/EnvironmentConfig.html#setMutexIncrement%28int%29
    http://www.oracle.com/technology/documentation/berkeley-db/db/java/com/sleepycat/db/EnvironmentConfig.html#setMaxMutexes%28int%29
    Thanks,
    Bogdan Coman

  • Regd:org.apache.sling.api.scripting.ScriptEvaluationException: javax.servlet.ServletException

    Hi ,
    I'm getting the below exception while accessing the pages. It was working fine earlier..
    Any help on this please....???
    Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Error while executing script /libs/wcm/core/components/init/init.jsp
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInterna l(JspServletWrapper.java:563)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:499)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:443)
    at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter. java:59)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :233)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:85)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:453)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)
    ... 93 more
    Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/day/cq/wcm/api/WCMMode
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInterna l(JspServletWrapper.java:563)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:499)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:443)
    at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter. java:59)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :233)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:85)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:453)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:170)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:4 56)
    at com.day.cq.wcm.tags.IncludeTag.includeScript(IncludeTag.java:167)
    at com.day.cq.wcm.tags.IncludeTag.doEndTag(IncludeTag.java:87)
    at org.apache.jsp.apps.bt_com.components.wrapperpage.wrapperpage_jsp._jspx_meth_cq_005finclu de_005f0(wrapperpage_jsp.java:430)
    at org.apache.jsp.apps.bt_com.components.wrapperpage.wrapperpage_jsp._jspService(wrapperpage _jsp.java:238)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:420)
    ... 98 more
    Caused by: java.lang.NoClassDefFoundError: com/day/cq/wcm/api/WCMMode
    at org.apache.jsp.libs.wcm.core.components.init.init_jsp._jspService(init_jsp.java:152)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJs
    Thanks,
    Shankar .A

    Hi Shankar,
    Try to open Apache Felix Console -> Bundles tab:
    http://localhost:4502/system/console/bundles
    and find:
    -> Apache Sling Scripting JSP support -> try to stop this bundle and start it again
    -> Apache Sling Dynamic Class Loader Support-> try to stop this bundle and start it again
    Restarting both bundles should solve your problem.
    Regards,
    kasq

  • Perl API version v5.14.0 of Unix::Syslog does not match v5.16.0

    hello
    i have this error when i try to launch amavis
    etc/rc.d/amavisd restart
    :: Stopping amavisd daemon [FAIL]
    :: Starting amavisd daemon [BUSY] fetch_modules: error loading required module Unix/Syslog.pm:
    Perl API version v5.14.0 of Unix::Syslog does not match v5.16.0 at /usr/lib/perl5/core_perl/DynaLoader.pm line 213.
    Compilation failed in require at /usr/sbin/amavisd line 202.
    defined(@array) is deprecated at /usr/share/perl5/site_perl/Net/Server.pm line 211.
    (Maybe you should just omit the defined()?)
    ERROR: MISSING REQUIRED BASIC MODULES:
    Unix::Syslog
    BEGIN failed--compilation aborted at /usr/sbin/amavisd line 242.
    i recompiled Unix::Syslog but no change
    please help
    thks

    The helpful error message lets you know that the module you are trying to load was built for perl 5.14. Since you now have perl 5.16 the module is no longer binary compatible with the perl runtime and cannot be loaded. This applies to all XS modules which bridge C and perl code together. You must rebuild/reinstall the complaining modules.
    Here are some diagnoses.
    freaks:
    You didn't reinstall Unix::Syslog properly. Maybe the old version was installed with cpan and you installed the new packaged version, which is not being loaded. Modules installed with the cpan shell take precedence over packaged modules.
    disarmer:
    You have extra copies of Encode and IO modules installed. They are included with perl. Uninstall the unnecessary duplicates. The old IO.pm file is trying to load the newer (core) binary IO.so library. Maybe.
    nomorewindows:
    You have to reinstall the complaining modules the applications use.
    A script to find paths of loaded modules:
    [juster@artemis bin]$ cat pmpath
    #!/usr/bin/env perl
    $m = shift or die "usage: pmpath [module name]\n";
    eval "require $m" or die "pmpath: bad module: $!\n";
    $m =~ s{::}{/}g;
    print $INC{"$m.pm"}, "\n";
    All packaged modules from a foreign source, like the AUR, need to be rebuilt. Print out a list of them:
    pacman -Qml | awk '/_perl\/auto\/.+\.so$/ { print $1 }' | uniq
    Any perl XS modules installed with cpan need to be rebuilt. They are under /usr/lib/perl5/site_perl/auto. Look for .so files.
    edit: shorten the awk
    Last edited by juster (2012-06-05 04:23:33)

  • Snow Leopard Dashcode - dynamic data source for search via web API

    I'm making a dual product dashcode project, for safari and mobile safari. I have a dataSource that is a web API that takes a couple of variables to return results in JSON format. When the safari product launches, it's set up to ping the API with a set of parameters and populate an itemsList in my left sidebar. I have a search field above that itemsList. Now I can get the search field to:
    1. take the contents of the search field and construct a new URL from it.
    2. go out and ask for results from pinging the API via an XMLHTTPRequest.
    3. eval the contents and be ready to put it into the itemsList...
    the questions I have are:
    1. Where do I put the evaluated JSON results? DC.dataModel.dataSource.content ?
    2. What's the trigger to get my itemsList to reload the data?
    Here's the relevant search handler function code:
    function mySearchHandler(event)
    // Values you provide
    var searchFieldValue = document.getElementById("search"); // replace with ID of search field
    // Search field code
    searchFieldValue = searchFieldValue.value;
    // Values you provide
    // The feed to fetch
    var feedURL = "http://myurl.com/api.php?searchfortext="+ searchFieldValue + "&resultformat=json";
    var onloadHandler = function() { xmlLoaded(xmlRequest); }; // The function to call when the feed is loaded; currently calls the XMLHttpRequest load snippet
    // XMLHttpRequest setup code
    var xmlRequest = new XMLHttpRequest();
    xmlRequest.onload = onloadHandler;
    xmlRequest.open("GET", feedURL);
    xmlRequest.setRequestHeader("Cache-Control", "no-cache");
    xmlRequest.send(null);
    and then in my xmlLoaded function, I figured it would be something like this:
    function xmlLoaded(xmlRequest)
    if (xmlRequest.status == 200) {
    //' xmlRequest.responseText has what I want in it. Where do I put it? I thought it was here:
    DC.dataModel.dataSource.content = eval(xmlRequest.responseText);
    // or was it here? Neither of these seem to work.
    // DC.dataModel.itemsList.setContent(DC.dataModel.dataSource.content);
    // Then what, get the itemsList.object and tell it to reload itself... ? Doesn't work for me. :-
    document.getElementById("itemsList").object.reloadData();
    else {
    alert("Error fetching data: HTTP status " + xmlRequest.status);
    But... this doesn't work. I can evaluate DC.dataModel.dataSource.content and I can see my new search results sitting there. But I can't get my itemsList to refresh the display and load up what the web API gave it. How does this work in snow leopard dashcode?

    CrashPlan is a beast prone to ruining any other purpose on the server. I'd highly recommend moving it to it's own dedicated machine, like a mac mini. When I use CrashPlan that's my preference.
    You can find more information about mds by looking at it's man page, mds(8) and the man pages of it's related utility mdutil(1). Your mds database is likely corrupt. You have a few options. Wipe and reindex your metadata stores and/or turn indexing off on volumes that you don't need it.
    http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ 10.6/man8/mds.8.html
    http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ 10.6/man1/mdutil.1.html
    Gil

Maybe you are looking for