Unmarshalling from String to object

Iam using castor API . I want to Unmarshall a string to an xml object . I saw the methods of castor. But was confused.
Kindly help

Me funciono colocando el progID de la interfaz que genero jawin en el constructor de la clase que se genero, despues utilice los metodos y fue transparente:
Interfaz que genero jawin:::
public interface CodeIMG {
public static final GUID clsID = new GUID("{23435XCVDF2-6D62-6749- 8E00-00AS45GH87JU}");
public static final String progID = new String("ActivexPDF.CodeIMG");
la clase que genero jawin:::::::
public class _CodeWER extends DispatchPtr {
public int getTypeInfoToken() {
return 0;
static public final GUID proxyIID = new GUID("{632PHK77-6F0B-11D4-8PLD-00A024A31CC6}");
static public final int iidToken;
static {
iidToken = IdentityManager.registerProxy(proxyIID, _CodeWER.class);
public int getGuidToken() {
return iidToken;
* Creates empty _CodeWER Object
public _CodeWER() throws COMException {
super();
* Creates _CodeWER() Object with progID
public _CodeWER()(String progid) throws COMException {
super(progid);
* Queries interface of _CodeWER  Object
public _CodeWER()(IUnknown other) throws COMException {
super(other);
* Creates _CodeWER() Object with CLSID
public _CodeWER(GUID ClsID) throws COMException {
super(ClsID);
public boolean createImg(ObjectRef strChain, ObjectRef strFile) throws COMException {
return ((java.lang.Boolean) invokeN("createImg", new Object[]{strChain, strFile}, 2)).booleanValue();
Test de Prueba:::::::
public class TestDLL implements CodeIMG {
     public static void main(String[] args) {
          try {
               CodeWER pdf = new CodeWER ( clsID );               
               boolean ok = pdf.createImg(new ObjectRef("9999999"), new ObjectRef("C:\\image.bmp") );
               System.out.println("Lo generoi bien:: " + ok );
          } catch (COMException e) {
               e.printStackTrace();
Espero te sirva este ejemplito sencillo de jawin
Saludos!!!!!!!!!!!!
att juo

Similar Messages

  • Returning strings from OLE2 Word object (Forms 4.5)

    Below is an example of how to return string and numeric values from OLE2 objects. In this example the OLE2 object is a MS Word document, and I want to fetch all the bookmarks in the Document into a Forms 4.5 Varchar2. To do this I first need to get the count of bookmarks.
    Getting a string property from an OLE2 object is a common OLE2 requirement but is poorly documented. This is the ONLY way it can be done, as OLE2.INVOKE_CHAR returns a single character not a string. Use OLE2.INVOKE_OBJ, then OLE2.GET_CHAR_PROPERTY which does return a string, as shown below, to return a string from an OLE object (or OLE property).
    Also note how you can only get the child object from its parent, not the grandchild (etc) object, so multiple (cascading) GET_OBJ_PROPERTY calls are required.
    /* by: Marcus Anderson (Anderson Digital) (MarcusAnderson.info) */
    /* name: Get_Bookmarks */
    /* desc: Returns a double quoted CSV string containing the document*/
    /* bookmarks. CSV string will always contain a trailing comma*/
    /* EG: "Bookmark1","Bookmark2",Bookmark3",Bookmark4", */
    /*               NB: This requires that Bookmarks cannot contain " chr */
    PROCEDURE Get_Bookmarks (pout_text OUT VARCHAR2)
    IS
    v_text           VARCHAR2(80);
    v_num                         NUMBER(3);
         v_arglist OLE2.LIST_TYPE;
         v_Application     OLE2.OBJ_TYPE;
    v_ActiveDoc      OLE2.OBJ_TYPE;
    v_Bookmarks          OLE2.OBJ_TYPE;
    v_Item                    OLE2.OBJ_TYPE;
    v_i                              NUMBER(3);
    BEGIN
              v_Application     := LDWord.MyApplication; -- Word doc opened elsewhere
                   /* Set v_num = ActiveDocument.Bookmarks.Count */
    v_ActiveDoc := OLE2.GET_OBJ_PROPERTY (v_Application, 'ActiveDocument');
    v_Bookmarks := OLE2.GET_OBJ_PROPERTY (v_ActiveDoc , 'Bookmarks');
    v_num := OLE2.GET_NUM_PROPERTY (v_Bookmarks, 'Count'); -- NB: Returns numeric property
                   /* Build the output string, pout_text. */
    FOR v_i in 1..v_num LOOP
                        /* Set v_item = ActiveDocument.Bookmarks.Item(v_i) */
    v_arglist := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG (v_arglist, v_i);
    v_Item := OLE2.INVOKE_OBJ (v_Bookmarks, 'Item', v_arglist); -- NB: returns parent object (array element)
    OLE2.DESTROY_ARGLIST (v_arglist);
                        /* Set v_text = ActiveDocument.Bookmarks.Item(v_i).Name */
    v_text := OLE2.GET_CHAR_PROPERTY (v_Item, 'Name');                    -- NB: Returns string/varchar2 property
    pout_text := pout_text || '"' || v_text || '",' ;
    END LOOP;
    END;

    Please repost in the Forms discussion forum.
    - OTN

  • NX-OS snmp-trap strdata does not return string sent from device to object server

    NX-OS snmp-trap strdata does not return string sent from device to object server
    Applet was created:
        event manage applet TEST_VPC
        description "%ETHPORT-5-IF_DOWN_ADMIN_DOWN"
        event syslog occurs 1 priority 4 pattern "%ETHPORT-5-IF_DOWN_ADMIN_DOWN"
        action 1.0 snmp-trap strdata "Loopback0 is admin down"
    after event is generated (link admin down), trap is sent to snmp server, but string does not appear in received messages:
    2014-03-17T04:29:26: Debug: D-P_M-105-000: 1 trap in queue
    2014-03-17T04:29:26: Debug: D-P_M-105-000: V2/V3 trap/inform received
    2014-03-17T04:29:26: Information: I-P_M-104-000: Number of items in the trap queue is 0
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] ReqId: 1427018637
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] community: xxxx
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] IPaddress: x.x.x.x
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] PeerIPaddress: x.x.x.x
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] ReceivedPort: 162
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] ReceivedTime: 1395044966
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Protocol: UDP
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] SNMP_Version: 2
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] UpTime: 1166940388
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Uptime: 1:30:03.88
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.2.1.1.3.0: (1166940388) 135 days, 1:30:03.88
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] notify: .1.3.6.1.4.1.9.9.43.2.0.2
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.6.3.1.1.4.1.0: .1.3.6.1.4.1.9.9.43.2.0.2
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] OID1: .1.3.6.1.4.1.9.9.43.1.1.1.0
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1_raw: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1_text: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1_hex: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.4.1.9.9.43.1.1.1.0: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] OID2: .1.3.6.1.4.1.9.9.43.1.1.6.1.6.36
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2_raw: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2_text: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2_hex: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.4.1.9.9.43.1.1.6.1.6.36: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Node: xxx
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] PeerAddress: xxxx
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] EventCount: 360
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Processing alert {0 remaining} 
    please help figure this out

    This is a CISCO-CONFIG-MAN-MIB trap, not an EEM trap.  I don't think your EEM applet is being triggered since you have that priority argument in there.  Try removing that and leave the syslog pattern alone.  You will see the string as a varbind in the trap.

  • How can I get the value of a custom property from a resource object?

    I am trying to get the value(s) of a custom property, called "status" within a method. The method has an object of type IResource available to it.
    I have tried the following:
    PropertyName propName = new PropertyName("","status");
    value = res.getProperty(propName).toString();
    However, I am getting a NullPointerException when I try to create the PropertyName instance.
    Is there a better way to get the value of a specific property from a resource object?
    Thanks,
      Tom

    Thanks Praveen.
    I was missing the default namespace of "http://sapportals.com/xmlns/cm" - I thought I could just pass an empty string for the namespace, but it looks like I must always specifiy, even if it is default.
    Tom

  • Calling a method from a UICommand Object

    How do I call an action method from a UICommand object?
    I create a HtmlCommandLink in my backing bean, and I think I should be setting the action, but with what? The method takes a MethodBinding but I can't find much detail on how to get that. I just want to call a method like linkAction1_action() in the example below, but you cannot pass a method.
    public class Page1 extends AbstractPageBean {
      private HtmlPanelGroup panel = new HtmlPanelGroup();
      public HtmlPanelGroup getPanel() {
        return panel;
      public void setPanel(HtmlPanelGroup panel) {
        this.panel = panel;
      public Page1() {
        HtmlCommandLink link = new HtmlCommandLink();
        link.setAction(/* what do I put here */);
        this.panel.getChildren().add(link);
      public String linkAction1_action() {
        return "GoBack";
    }

    OK. A couple days later and I am able to answer my
    own question. Anyway, I will lay it out there for
    anyone interested. This worked for me...
    public class Page1 extends AbstractPageBean {
    private HtmlPanelGroup panel = new HtmlPanelGroup();
    public HtmlPanelGroup getPanel() {
    return panel;
    public void setPanel(HtmlPanelGroup panel) {
    this.panel = panel;
    public Page1() {
    HtmlCommandLink link = new HtmlCommandLink();
    link.setAction(
    FacesContext.getCurrentInstance()
    .getApplication()
    .createMethodBinding("#{Page1.linkAction1_action}",
    new Class[0]));
    this.panel.getChildren().add(link);
    public String linkAction1_action() {
    return "GoBack";
    Since you're setting the action from within the Page1 object, why don't you create a method binding manually? This will be much more performant that using the application to create and EL-based binding.
    Try:
    link.setAction(new MethodBinding()
          public Object invoke(FacesContext facesContext, Object[] objects) throws EvaluationException, MethodNotFoundException
            return linkAction1_action();
          public Class getType(FacesContext facesContext) throws MethodNotFoundException
            return String.class;
    });Note that you also avoid any naming convention - you do not require your Page1 object to be configured as a managed bean "Page1".

  • Error: The report source could not be retrieved from the state object.

    I have been trying to create a report in a JSF page. The relevant parts are below:
    Inside the JSP page, this is the code:
                  <jsp:useBean id="MyBean" class="com.nm.facade.rto.POJOViewerBean" scope="session" />
                    <jsp:setProperty name="MyBean" property="reportLocation" value="Report1.rpt" />
                   <v:reportPageViewer reportSource="#{MyBean.reportSource}"
                                           displayToolbarPrintButton="true"
                                           printMode="ActiveX"
                                           zoomPercentage="100"
                                           displayToolbarExportButton="true"
                                           displayToolbarRefreshButton="true"
                                           viewerName="My Viewer"
                   ></v:reportPageViewer>
    In the backing bean, this is the relevant code:
        public Object getReportSource() throws ReportSDKException
            if (propertiesChanged || reportSource == null)
                propertiesChanged = false;
                if (reportLocation == null)
                    throw new RuntimeException("The reportLocation property must be set before a report source is retrieved");
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.setReportAppServer(ReportClientDocument.inprocConnectionString);
                rcd.open(reportLocation, 0);
                DatabaseController dbc = rcd.getDatabaseController();
                //Create the POJO collection and populate it with data
                ReportData[] data =
                  new ReportData("B.B.", "King", 6, new Date(25, 9, 16)),
                    new ReportData("Muddy", "Waters", 7, new Date(15, 4, 4)),
                    new ReportData("John Lee", "Hooker", 8, new Date(16, 8, 16)),
                    new ReportData("Otis", "Rush", 9, new Date(34, 4, 29)),
                    new ReportData("Buddy", "Guy", 10, new Date(36, 7, 30))
                //Create the result set from the collection of POJOs
                POJOResultSetFactory factory = new POJOResultSetFactory(ReportData.class);
                factory.setVerbose(true);
                POJOResultSet results = factory.createResultSet(data);
                ResultSetMetaData metaData = results.getMetaData();
                //Set the resultset as the report datasource
                      //Get the table name from the 'Set Datasource Location' dialog in the Crystal Reports designer
                String reportTable = "getReportDataDataSource";
                dbc.setDataSource(results, reportTable, reportTable);       
                IReportSource reportSource = rcd.getReportSource();
                if (reportSource == null)
                    throw new RuntimeException("Unable to get a report source.");
            return reportSource;
    In the CRConfig.xml, this is what is there:
    <?xml version="1.0" encoding="utf-8"?>
    <CrystalReportEngine-configuration>
        <reportlocation>../reports</reportlocation>
        <timeout>0</timeout>
        <ExternalFunctionLibraryClassNames>
             <classname></classname>
        </ExternalFunctionLibraryClassNames>
    </CrystalReportEngine-configuration>
    The report template 'Report1.rpt' is packaged under WEB-INF/reports in the war file.
    When I try to generate the report by accessing the JSF page, I am getting an error: "The report source could not be retrieved from the state object. "
    I am not sure what is wrong. Can someone help me in resolving this issue?
    Edited by: renshai on Jul 9, 2009 3:21 AM

    My formatting gets lost and the message looks unintelligible. After some experimentation, I found that if the message exceeds some length, the formatting is removed. Since I couldn't find any way to delete this post, I made another post with the same subject. Please ignore this post and help me to find a solution for the problem posted in the other thread with the same subject. Thanks in advance.

  • Unable to read payload from the message object in XI

    Hello Guys,
    Please help me about my problem in XI version 7.0.im quite new here.
    im trying to test my config but error message occured. "Unable to read payload from the message object"
    when i checked the comm channel this is the error message :
    Error during database connection to the database URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor': com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "TRAVEL:SelectMethod=cursor" requested by the login. The login failed.'
    when i tried my login in sql it works...but in this message the login is failed..what shall i  do..
    Please advice.
    Thanks in advance
    aVaDuDz

    Hi
    Check with the connection string & Authorization of user you have used.
    MSSQL string is
    jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
    While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
    Thanks
    Gaurav

  • Unable to read payload from the message object

    Hi
    I have a scenario where i am send request to http receiver and getting the response. When I am testing through WFETCH it is working fine. But when i am testing through XI I am getting the follwoing error
    Unable to read payload from the message object
    I have tested the XI payload in mapping. I have done all kinds of testing but it is still giving the same error.
    One more strange thing is
    I have done one BPM scenario where Data is coming from Source to BPM( which is asyn) and then from it will go from BPM to Target (which is sync) But when I am checking the SXMB_MONI... it showing the messages like this
    Source to BPM
    Target to BPM
    Target to BPM.
    But i think it should show message like
    Source to BPM
    BPM to Target
    Target to BPM
    why i am getting the flo

    Hi
    Check with the connection string & Authorization of user you have used.
    MSSQL string is
    jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
    While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
    Thanks
    Gaurav

  • How to get InputStream from String ?

    Hi !
    I want to get InputStream object from String.
    String str = "balabalabala";
    InputStream stream = getInputStream(str);
    How to realize getInputStream(str) function ?
    Thanks!

    The preferred method nowadays is to use Readers and Writers for String data - hence StringReader(String). If you're going to operate on the InputStream directly, then I'd modify your code to use the Reader calls and go that route.
    If, however, you need to pass the InputStream to some other piece of API that requires an InputStream instead of a Reader, then the ByteArrayInputStream is probably your best bet. StringBufferInputStream is deprecated because it doesn't work reliably in the face of many character encodings.
    Speaking of encodings - never call Strng.getBytes() - always use the getBytes(character-encoding) version, so you KNOW what encoding you're getting!
    Grant

  • Loading JavaFX code from string

    Hi,
    Here is my JavaFX code that I put to the SimplePainter.fx file:
    import javafx.stage.*;
    import javafx.scene.*;
    import javafx.scene.paint.*;
    import javafx.scene.input.*;
    import javafx.scene.shape.*;
    var elements: PathElement[];
    Stage {
        title: "Simple Painter"
        scene: Scene {
            content: Group{
                content: [
                    Rectangle{
                        width: 400
                        height: 300
                        fill: Color.WHITE
                        onMousePressed: function( e: MouseEvent ):Void {
                                insert MoveTo {x : e.x, y : e.y } into elements;
                        onMouseDragged: function( e: MouseEvent ):Void {
                                insert LineTo {x : e.x, y : e.y } into elements;
                    Path{
                        stroke: Color.BLUE
                        elements: bind elements
    }I am trying to use the ScriptEngineManager to evaluate the SimplePainter file:
    import java.io.FileReader;
    import javax.script.ScriptEngineManager;
    var path = "C:/Temp/fx/SimplePainter.fx";
    var manager = new ScriptEngineManager();
    var engine = manager.getEngineByExtension("fx");
    engine.eval(new FileReader(path));It throws AssertionError:
    java.lang.AssertionError
    at com.sun.tools.javac.jvm.Gen.visitBreak(Gen.java:1631)
    at com.sun.tools.javac.tree.JCTree$JCBreak.accept(JCTree.java:1167)
    at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:679)
    at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:714)
    However the simple 'println("Hello World!")' code is invoked fine.
    Do I do something wrong?
    Is it possible to use JavaFX compile methods to execute a JavaFX code from string?
    Thanks in advance.

    I experimented with that a while ago with JavaFX 1.1, with success: [Creating JavaFX Classes from Java Classes then running?|http://forums.sun.com/thread.jspa?threadID=5368159]
    I tried again:
    import java.io.*;
    import com.sun.javafx.api.JavaFXScriptEngine;
    import javax.script.ScriptEngine;
    import javax.script.ScriptEngineManager;
    class RunJavaFXScript
      static String SCRIPT_NAME = "Test.fx";
      public static void main(String[] args)
        // Get the current directory
        File curDir = new File(".");
        // Get the script's file content
        BufferedReader reader = null;
        File fScript = new File(curDir.getAbsolutePath(), SCRIPT_NAME);
        System.out.println("Reading the " + fScript.getAbsolutePath() + " script");
        try
          reader = new BufferedReader(new FileReader(fScript));
        catch (FileNotFoundException e)
          System.err.println("File not found: " + fScript.getAbsolutePath());
          return;
        // Create a script on the fly
        String script = "function Demo() { println('Hello World!'); return 'It works!'; }";
        System.out.println("Getting the engines");
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByExtension("fx");
        System.out.println("Getting the generic ScriptEngine (by extension): " + engine);
        JavaFXScriptEngine fxEngine = (JavaFXScriptEngine) manager.getEngineByName("javafx");
        System.out.println("Getting the JavaFXScriptEngine: " + fxEngine);
        // Try to run it
        try
          System.out.println("Running the script read from a file: " + reader);
          Object readScript = engine.eval(reader);
          System.out.println("Running a built-in script");
          Object internalScript = fxEngine.eval(script);
          Object r = fxEngine.invokeFunction("Demo");
          System.out.println("Returned: " + (String) r);
        catch (Exception e)
          e.printStackTrace();
        finally
          try { reader.close(); } catch (IOException e) {}
    }Compiled with:
    javac -cp %JAVAFX_HOME%/lib/shared/javafxc.jar RunJavaFXScript.java(with JAVAFX_HOME pointing at javafx-sdk1.1)
    Ran with:
    java -cp %JAVAFX_HOME%/lib/shared/javafxc.jar;%JAVAFX_HOME%/lib/desktop/javafxgui.jar;%JAVAFX_HOME%/lib/desktop/Scenario.jar;. RunJavaFXScriptIt works:
    Reading the E:\Dev\PhiLhoSoft\Java\_QuickExperiments\.\Test.fx script
    Getting the engines
    Getting the generic ScriptEngine (by extension): com.sun.tools.javafx.script.JavaFXScriptEngineImpl@758fc9
    Getting the JavaFXScriptEngine: com.sun.tools.javafx.script.JavaFXScriptEngineImpl@1113708
    Running the script read from a file: java.io.BufferedReader@133f1d7
    Running a built-in script
    Hello World!
    Returned: It works!(and it shows a Stage with a small FX script showing an animation).
    Now, I try to do the same of JavaFX 1.2: same command line for compiling (except of course pointing to javafx-sdk1.2), run command is:
    java -cp . -Djava.ext.dirs=%JAVAFX_HOME%/lib/shared;%JAVAFX_HOME%/lib/desktop RunJavaFXScript(more jars to take in account, I take everything...)
    And when I run it I have:
    Reading the E:\Dev\PhiLhoSoft\Java\_QuickExperiments\.\Test.fx script
    Getting the engines
    Getting the generic ScriptEngine (by extension): com.sun.tools.javafx.script.JavaFXScriptEngineImpl@8813f2
    Getting the JavaFXScriptEngine: com.sun.tools.javafx.script.JavaFXScriptEngineImpl@1d58aae
    Running the script read from a file: java.io.BufferedReader@83cc67
    An exception has occurred in the OpenJavafx compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include the following diagnostic in your report and, if possible, the source code which triggered this problem.  Thank you.
    java.lang.AssertionError
            at com.sun.tools.javac.jvm.Gen.visitBreak(Gen.java:1631)
            at com.sun.tools.javac.tree.JCTree$JCBreak.accept(JCTree.java:1167)
            at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:679)
            at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:714)
            at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:700)
            at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:751)
            at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:735)
            at com.sun.tools.javac.jvm.Gen.visitSwitch(Gen.java:1210)
            at com.sun.tools.javac.tree.JCTree$JCSwitch.accept(JCTree.java:943)
            at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:679)
            at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:714)
            at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:700)
            at com.sun.tools.javac.jvm.Gen.genLoop(Gen.java:1076)
            at com.sun.tools.javac.jvm.Gen.visitForLoop(Gen.java:1047)
            at com.sun.tools.javac.tree.JCTree$JCForLoop.accept(JCTree.java:856)
    (and so on)So I have the same issue.
    Looks like something have been broken in 1.2... :-(
    Of course, the tested scripts compile without problem.
    If I put only my simple built-in script in the Test.fx file, it works... I can put an empty Stage in the script (it is displayed), but if I add an empty Scene to it, I have the same error.

  • Using strings as objects

    hi.
    i get user input of type string but if the string is the same as the name of an object is there any way of using the methods within that object.
    for example
    class Object{
    String name, description;
    Object(String nameIn, String descriptionIn){
    name=nameIn;
    description=descriptionIn;
    void showDescription(){
    System.out.println(description);
    when i create a new object
    Object brick = new Object("brick", "it's hard");
    and i get user input of type String
    "brick"
    how would i get
    brick.showDescription();
    i didn't think this was possible so i created an array of Objects
    Object objectHolder = new Object[10];
    but i couldn't figure out how to add the Object to the array when it was being created.
    class Object{
    String name, description;
    static Object objectHolder = new Object[10];
    int store=0;
    Object(String nameIn, String descriptionIn){
    name=nameIn;
    description=descriptionIn;
    objectHolder[store] = Object // this doesn't work, i want it to be
    // the Object that is being created
    store = store + 1;
    then i can compare the String to each Object.name in the array to find the Object, and then get the Object.showDescription
    what do you think?
    also i would like to know how to add the object to the array as it is being created even if you think it is not a good way of doing it.
    thanks

    First off, never ever name your objects "Object", since that is very, very confusing. The reason for this is because ALL objects are derived from java.lang.Object, and the less ambiguity with that name the better.
    Now, let's look at your object. We'll call it "DungeonObject" for lack of a better name.
    The "objectHolder" should probably not actually be inside of DungeonObject. Instead, make it external to your object.
    Let's assume you have a container object called "Dungeon" which makes use of DungeonObjects.
    You could write the following for Dungeon:
    public class Dungeon {
      DungeonObject[] objectHolder;
      int nIndex;
      public Dungeon(int nObjectSize) {  // constructor
        objectHolder = new DungeonObject[nObjectSize];
        nIndex = 0;
      private boolean addObject(DungeonObject obj) {
        if (nIndex < objectHolder.length) {
          objectHolder[nIndex++] = obj;
          return true;
        return false;
      public boolean createObject(String name, String desc) {
        return addObject(new DungeonObject(name, desc));
    }When you want to create an object, use createObject.
    The DungeonObject it references could be defined as:
    public class DungeonObject {
      String m_name;
      String m_description;
      public DungeonObject(String name, String description) {
        m_name = name;
        m_description = description;
      // add gets and sets as described in previous post

  • Help! How to convert an instance from java.lang.Object to a particula class

    * How to convert an instance from java.lang.Object class to a particular class
    witch is known only at the running time?
    Roster EJB component is make up of RosterHome, Roster and RosterBean.
    RosterHome is the home interface of Roster EJB.
    Roster is the remote interface of Roster EJB.
    RosterBean is the implement of Roster EJB.
    The following code segment is to invoke Roster EJB component.
    String jndiName="roster.RosterHome";
    javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
    Object objref = initial.lookup(jndiName);
    RosterHome home =
    (RosterHome)javax.rmi.PortableRemoteObject.narrow(objref,
    RosterHome.class);
    Roster myRoster = home.create();
    String team="T1"
    String player="Tom"
    myRoster.addPlayer(player,team);
    But, now, all the home interface, the remote interface and the JNDI Name of
    Roster EJB component are not been known at the compiling time. However They are
    known at the running time, throught reading from the XML config file.
    Questions:
    1,How to write code for this case ? or
    2,How to convert an instance from Object class to a particular class witch is known
    only at the running time?
    String jndiName="roster.RosterHome";// in fact, reads from XML file.
    String homeClassName="roster.RosterHome";// in fact, reads from XML file.
    String remoteClassName="roster.Roster";// in fact, reads from XML file.
    javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
    Object objref = initial.lookup(jndiName);
    Object objHome= javax.rmi.PortableRemoteObject.narrow(objref,
    Class.forName(homeClassName));
    /* how to do next?
    }

    I am not sure what you are trying to do. But at some point you should know which methods to call on the remote interfaces. Maybe the method names are stored in the XML file as well or you have a set of standard method names (also consider parameters).
    However, this can be solved by reflection. Look at the java.lang.reflect package, especially java.lang.reflect.Method, and also at java.lang.Class.
    If you are doing this on the app server:
    I've seen posts where people say that reflection is not permitted in EJB, but I don't think so. Check the EJB spec.
    If you are doing this in an application: reflection is always permitted. Probably also in applets and JSP.

  • Whats happening internally within the unflatten from string function?

    I am getting unflatten from string error intermitently in my program. I can't post the program to get help but essentially I am storing a GOOP object reference as a string. The reference is flattened to a string and stored upon creation, at a latter time the string is then unflatterned to retrieve the reference and then the data. This works most of the time but occansionaly the unflatterned from string function fails. Prior to passing the string to the function I am checking that the string isn't null. I am assuming something else is corrupting the string prior to passing to this fucntion and would like to know what would trigger the error in the function as it may help me realise what is happening
    prior.
    Cheers,
    Wayne

    Hi,
    It really seems strange this problem, but one thing that might be the cause is how you store the flatten string. You do not mention that. I have once had problems when storing GOOP references as a sting and passing them between test VIs in TestStand using a string parameters in TestStand. A flatten string might have special chars that not all applications (such as TestStand parameters) can handle that and just trunkate the string when such a char is present, mistakenly inteprets that as end of string. Have you tried to check that string length is the same?
    However to make sure you get rid of all problems with string termination, you really should cast your GOOP reference into something else. I would instead cast the reference to an U32, or
    if you want, to solve the string problem for other types than GOOP reference, then flatten the type into string and then convert the string to an array of U8 before storing it. This would by sure solve your problem.
    Regards,
    Mattias Ericsson
    Endevo
    Sweden
    Main developer of the new GOOP2 and GOOP Wizard 3.
    PS! Have you seen that there is a new GOOP release that also may handle inheritance? Please check out: http://www.endevo.se/default.asp?lang=eng and click on "Products". There are examples, demos and white papers describing the new GOOP Inheritance Toolkit.
    Attachments:
    CastRefExample.vi ‏18 KB

  • Create NSURL from string

    Hello!
    How create NSURL object from string witch contain spaces?
    Example: @"http://Bugaga/?My Posts"
    TIA

    Take a look at stringByAddingPercentEscapesUsingEncoding in NSString.

  • Error while deleting a row from the Entity Object

    Hi OAF Guys,
    i am unable to delete the newly created row from the entity object.
    let me explain my scenario.
    1. i have a table of which some of the columns are mandatory.
    2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
    3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
    Is there any workaround for this problem.
    Regards,
    Nagesh Manda.

    Hi Tapash,
    I am very sorry for not providing you the complete details of my scenario. Here i am explaining
    1. what code you have placed while creating the row and in validation method on EOImpl.
    while creating a new row i am initializing the primary key of the EO with the sequence value.
    2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
    its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
    3.How are you trying to delete the row ?
    while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
    The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
    Any way appreciate your help tapash.
    Regards,
    Nagesh Manda.

Maybe you are looking for

  • How i can assign multiple values to tabuler text item (Help)

    HI IM PROGRAMMING ONE FORM AND I PUT THERE TABULER TEXT ITEM I WANT ASSIGN 63 VALUES TO THIS TEXT ITEM ONE BY ONE BY CODE I MEAN PUT FIRST VALUE IN THE FIRST TEXT ITEM ROW THEN SECOND TO THE SECOND TEXT ITEM AND LIKE THIS UNTIL I REACH TO THE LAST I

  • Inserting objects from one PDF document to another in Acrobat XI

    When I copy objects using "Edit Text & Images" and insert it to another document, objects are insert in any place of document, but when document "A" have view "Fit to screen" and document "B" have same view and I copy object from A and insert  to B,

  • ITunes Purchase not transferring to iPod

    Before the 3.0 update when I downloaded a song via iTunes on my iPhone it was placed in the file Downloaded From iPhone. After the update it no longer does that. Can this be fixed or not?

  • Missing apps after reinstallation

    Hi, I reinstalled the Nokia Belle on N8 after there was some space issue based on recomnedation from Customer support i am missing Need for speed application. I checked in Nokia Ovi store app i can find it , if i restore my backup i will still be hav

  • Keyword visual placement

    How do I reset iphoto so that my keywords appear below each photo.  It is very cumbersome to have to click on each photo to see if I've keyed a photo to a keyword or not.  I used to be able to scan my recent imports and assign keywords very easily.