Simple JNI string passing test from example crashes

Greetings
I am trying to get the following to work:
JNIEXPORT void JNICALL
Java_src_torchtechnologies_excubitore_ExcubitoreController_initialize (JNIEnv *jenv, jobject job, jstring dialog_name)
const char str = (jenv)->GetStringUTFChars(jenv, dialog_name, 0);
(*jenv)->ReleaseStringUTFChars(env, dialog_name, str);
The class is:
public class ExcubitoreController {
public native void initialize(String dialog_file_name);
static {
System.loadLibrary("excubitore");
public static void main(String[] args) {
ExcubitoreController a = new ExcubitoreController();
     String dialog_file_name = "test.dlg";
a.initialize(dialog_file_name);
This is all very simple and right out of the examples. It compiles OK, it loads OK, but it throws signal 11 (segmentation fault) and dumps. I've been beating on it for hours and can't make any progress. Can anybody offer a suggestion?
Thanks
Mike

Which JNI call crashes -- GetStringUTFChars or ReleaseStringUTFChars? Or does it work if you comment out both to make the native method a no-op?

Similar Messages

  • Passing / parsing XML String IN / OUT from PL / SQL package

    Hello, People !
    I am wondering where can I find exact info (with code sample) about following :
    We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
    and the return some kind of cursor thru I can loop and insert data into
    different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
    I looked online many site for related info - can't find what I am looking
    for - seems like should be a common question.
    Thanx a lot !

    Hello, People !
    I am wondering where can I find exact info (with code sample) about following :
    We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
    and the return some kind of cursor thru I can loop and insert data into
    different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
    I looked online many site for related info - can't find what I am looking
    for - seems like should be a common question.
    Thanx a lot !

  • FM to read files starting with TEST(for example) from Unix server

    Hi all,
    Is there a FM to read all the files which start with TEST (for example) from the Unix server?
    Requirement is if we put TEST* in the selection screen for the filename, it should read all the files which start with TEST from the default Unix path.
    Thanks and regards,
    Anishur

    Function Modules
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful.........
    Minal

  • Anyone can prove JNI is safe? My application crashes after many calls.

    I heard that JNI is not safe. In fact I made an application base on many JNI calls.
    C level is API supplied by IBM. And I was told the C API is tested and safe.
    Java application and JNI calls is writen by myself. It crashed after about 3000 times call. I tried other JDK and other OS. On some platform, the thread hold there after many calls. No error, no crash. But others crashed even early.
    Here's my JNI call's code:
    JNIEXPORT void JNICALL Java_com_ibm_mm_sdk_cim_internal_PServiceFACImp_cEvaluate
    (JNIEnv *env, jclass jobj, jlong jhandle, jstring jmanualedListFilename, jstring jclassedListFileName, jstring jresultFilename){
         char *manualedListFilename = jstringToWindows(env, jmanualedListFilename);
         char *classedListFileName = jstringToWindows(env, jclassedListFileName);
         char *resultFilename = jstringToWindows(env, jresultFilename);
         int rc;                         // API return code
         void* handle;               // FAC Handle
         // convert C pointer from java long type
         handle = (void*)jhandle;
         rc = KmFAC_Evaluate(
              handle,                                   // FAC Handle
              (char*)manualedListFilename,     // File name of list of files
              (char*)classedListFileName,          // File name of list of files
              (char*)resultFilename               // Result file
         if (manualedListFilename)
              free(manualedListFilename);
         if (classedListFileName)
              free(classedListFileName);
         if (resultFilename)
              free(resultFilename);
         if (rc != KM_RC_OK) {
              //Throw exception
              jclass exceptClass;          // JNI exception class
              char errorMsg[256];          // Used to build error msg for exceptions
              jmethodID methodid;          // Exception constructor method id
              sprintf(errorMsg, "KmFAC_Evaluate() [CKM=%d]", (int)rc);
              exceptClass = env->FindClass("com/ibm/mm/sdk/cim/DKServiceExceptionCIM");
              methodid = env->GetMethodID(exceptClass,"<init>","(Ljava/lang/String;II)V");
              jstring str = env->NewStringUTF(errorMsg);
              jthrowable excobj = (jthrowable)env->NewObject(exceptClass,methodid,str,100, (int)rc);
              env->Throw(excobj);
         return;

    I agree with fury88. Try the code below it works fine!
    // **************** Java portion ************************
    public class Test {
    // Load the dll that exports functions callable from java
    static {System.loadLibrary("TestImp");}
    // Imported function declarations
    public native void print(String msg);
    public void Test() {
    public static void main(String [] args) {
    Test t = new Test();
    // Printf example
         t.print("->Testing JNI - Hello from c++\n");
    // **************** Windows portion - TestImp.dll **********************
    // Exported function
    JNIEXPORT void JNICALL Java_Test_print(JNIEnv *env, jobject obj, jstring msg)
    const char *str = env->GetStringUTFChars(msg, 0);
    printf("%s\n", str);
    env->ReleaseStringUTFChars(msg, str);
    // Entry point
    BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
         switch(ul_reason_for_call)
              case DLL_PROCESS_ATTACH:
                   return TRUE;
              case DLL_PROCESS_DETACH:
                   return TRUE;
    return TRUE;
    }

  • Just need a simple client sending message to server example????

    Im trying to find a simple client-server example, where i can put the client on one laptop, server on the other and pass messages from the client to the server.
    I've been trying to follow examples and ive had problems with policies, stubs(?) etc etc
    Would someone please be able to provide me with an example i can follow and show me how to setup a policy. Im not a business user, i just want to learn how to make a simple message-sending app with RMI

    Ok! rmiregistry is working (i think), ie no error messages.
    But, when i execute i now get this:
    init:
    deps-jar:
    compile:
    run:
    Server exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.lang.ClassNotFoundException: test.hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.lang.ClassNotFoundException: test.hello
            at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
            at sun.rmi.transport.Transport$1.run(Transport.java:159)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:619)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
            at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
            at test.Server.main(Server.java:33)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.lang.ClassNotFoundException: test.hello
            at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
            at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
            at sun.rmi.transport.Transport$1.run(Transport.java:159)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassNotFoundException: test.hello
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:711)
            at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:655)
            at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:592)
            at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
            at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
            at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
            at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
            ... 12 more

  • ADF: Passing parameters from one page to another using setPropertyListener

    Hi,
    I'm trying to find a simple way to pass a parameter from one page to another.
    On the first page I have a table, the second page is a history page, showing the change history of rows from the table on the first page.
    In the table on the first page there's a unique column (an order number), the value of which is never changed for a given row.
    What I would like is to be able to pass the order number from the currently selected row of the first page on to the history page, making the history page show only the history for the given order number.
    Using the task-flow for the history page, I've defined an input parameter (an order number), defined a criteria and so on. I've tested the functionality of this in the Application Module, and it seems to work.
    My problem is passing the order number from the first page to the second.
    I've created a Managed Bean, with a variable for the current order number, including accessors. On the table on the first page, I've created a contextMenu, and added an Item called "Show history" with an action that navigated from the first to the second page (a control flow I've defined in adfc-config). I've included a setPropertyListener in the "Show history" item. I've set the "From" property of the setPropertyListener to "#{row.ordernumber.attributeValue}" and the "To" property to point at the order variable in the Managed Bean. Finally, I created a new page for the history, dragged the history task flow onto this page as a region, using the Managed Bean order variable as input parameter.
    The result is this: When I bring up the context menu from a row in the table on the first page and select "Show history", I get this error: "The class 'java.lang.String' does not have the property 'attributeValue'."
    That's a bit puzzling to me, seeing as I used the Expression Builder to fill out the "From" property. I've tried using "inputValue" instead of "attributeValue", but that simply changes the error message to: "The class 'java.lang.String' does not have the property 'inputValue'."
    What am I doing wrong?
    Regards,
    Andreas

    Hi Timo and Puthanampatti,
    I actually tried something similar to what you have suggested before starting this thread, but still got an error. What I hadn't spent a lot of time investigating initially was that it gave a DIFFERENT error. But after reading Timo's suggestion, I went back to this other error and found out that it was connected to my Managed Bean. For some reason, I had made the mistake of giving the bean the same name (in adfc-config) as the actual java class. And this leads to a circular reference error (that I would only get to see when I didn't get the java.lang.String error first).
    Having fixed this, I can successfully pass my parameter from one page to another (with the "From" property of the setPropertyListener set to "#{row.ordernumber}").
    Thanks for your time,
    Andreas

  • How to pass events from enclosed JApplet to enclosing JFrame?

    Perhaps a bit of an obscure problem, but I have an application here that involves displaying JApplets within a JFrame. As long as I do nothing to give the displayed JApplet focus, I am able to use keyboard shortcuts to access my various JMenu items. However, the moment I interact with the JApplet and it gets focus (say, by entering text in a JTextField), those keyboard shortcuts no longer work.
    I imagine what's happening is that the JApplet assumes that it must be the root component and does not pass events up to the superclass. Is there any way to allow the events to be passed on from the JApplet to the enclosing JFrame? Is this even possible?
    Any help would be greatly anticipated.
    - Fromage

    Hi FTD,
    I just about get your example; it is like a containment hierarchy right - one current, one proposed?
    If it is required that there is only one base class to maintain, I am positive this can be satisfied. I suppose our ideas are similar... the point I was trying to make though is that you can implement you AnalysisClasses independent of the top-level container it resides in. The JApplet itself perhaps just needs to handle/marshal <applet> parameters (if any) while the JFrame has only JFrame specific initalisation to take care of - this can feasibly be done from the main method of the AnalysisClass. Effectively you get:
    JFrame --> JDesktopPane --> JInternalFrame x 3 --> AnalysisClass
    or
    JApplet --> AnalysisClass
    I do not fully understand what role the BaseGUIClass has... in my example, I have omitted it assuming its functionality could be redistributed to AnalysisClass or one of JInternalFrame or JApplet. Does it contain a lot of initialisation code and therefore am I wrong to make this assumption?
    'The application GUI itself is simple...', would this be the AnalysisClass and does this mean it can be dropped into a JFrame or JApplet and manage itself? If so, but not to annoy you, I would still recommend the JInternalFrames.
    I think it would frustrate me quite a bit if my superiors were rigid... it is very possible to implement this so that there is only one version of a class to maintain. The question is how much programming is required to achieve this. In my opinon, not a lot; perhaps with respect to your bosses/dealines, too much.
    Here's an idea:
    public class ApplicationGUI extends JApplet
        public void initialise()
            AnalysisClass tool = null;
            switch (Integer.parseInt(getParameter("toolType")))
                case 1:
                    tool = ....
                break;
                case 2:
                    tool = ....
                break;
                case 3:
                    tool = ....
                break;
            if (tool != null)
                setContentPane(tool);
        public void start()
        public void stop()
        public void destroy()
        public static void main(String[] args)
            JFrame jFrame = new JFrame("Application Name");
            JDesktopPane jDesktop = new JDesktopPane();
            JInternalFrame jiFrame1 = new JInternalFrame("Tool 1", true, true, true, true);
            JInternalFrame jiFrame2 = new JInternalFrame("Tool 2", true, true, true, true);
            JInternalFrame jiFrame3 = new JInternalFrame("Tool 3", true, true, true, true);       
            jDesktop.add(jiFrame1);
            jDesktop.add(jiFrame2);
            jDesktop.add(jiFrame3);
            jFrame.setContentPane(jDesktop);
            jFrame.setVisible(true);
    }BTW if you managed to add the JApplet to a JPanel, why couldn't you add it to the JFrame?
    Kind regards,
    Darren
    ps. are you based in England?
    pps. apologises for making your name sound like STD, lol
    ppps. apologies for posting code when you prob don't want it... I am at work, bored.

  • Passing data from page to page: clarification requested

    Hello,
    I found an old post by craig.mcc which suggests:
    "When using JavaServer Faces, your best design strategy is to pretend that there is no such thing as a URL -- that should be an invisible implementation detail, which merely adds complexity if you expose it. Instead, if you need to pass information from one page to another, you should store it as a request/session/application scope attribute (as appropriate) where the destination resource (the "LogIn.jsf" page in this case) can retrieve it via a value binding expression."
    Can anyone clarify "store it as a request/session/application scope attribute"? I'm just not entirely sure what he's referring to, or how it might look.
    Thanks,
    Ryan

    Ryan, here is what I did:
    (To use your example)
    <h:form>
    <h:command_link action="submit"
         actionListener="#{MyBean.commandListener}">
    <f:parameter name="param1" value="value1" />
    <f:parameter name="param2" value="value2" />
    </h:command_link>
    </h:form >
    The Backing Bean Method would look like:
    public void commandListener( ActionEvent evt ) {
    String param1, param2;
    UICommand command = (UICommand)evt.getComponent();
    List commandChildren = command.getChildren();
    for ( Iterator it = commandChildren.iterator(); it.hasNext(); ) {
    UIComponent child = (UIComponent) it.next();
    if ( child instanceof UIParameter ) {
    String parmName = (String) ( (UIParameter)child ).getName();
    String parmValue = (String) ( (UIParameter)child ).getValue();
    if ( parmName.equals("param1") )
    _param1 = parmValue;
    else if ( parmName.equals("param2") )
    _param2 = parmValue;
    } // end-of-for-loop     
    // Other processing on param1 and param2 ........
    And you would have a Navigation-rule that maps the action outcome of "submit" to "test.jsp".

  • Passing Information From Socket to GUI

    Hi, I'm making a chat client, but I'm having trouble passing information from server's input stream to my GUI. I made two threads, one for sending and one for receiving, and I start them both when I click "connect" after I log in to the server. So what happens is I run my program, the frame appears as I want it to, and then I click connect, and after a little wait the button "unclicks" (or w/e) and nothing happens. I don't know why I am not receiving the messages from the server. If I make the program "GUI-less" it works, I can both send and receive messages via the console. But in the GUI, where I am sending/receiving via my two TextAreas, it doesn't work. Here's my code:
    (I apologize ahead of time for posting so much code in a thread, I tried to cut it down as best as I could.)
    BotWindow class (GUI) - Action Listeners
    public void createProps() {
            outText.setLineWrap(true);  //Text Areas
            outText.setForeground(Color.white);
            outText.setBackground(Color.blue);
            outText.setEditable(false);
            inText.setLineWrap(true);
            inText.setForeground(Color.white);
            connect.addActionListener(this);    //Action Listeners
            disc.addActionListener(this);
            submit.addActionListener(this);
    BotWindow class (GUI) - actionPerformed for connect/disc
    public void actionPerformed(ActionEvent evt) {
            JButton src = (JButton)evt.getSource();
            if(src == connect) {
                try {
                    bnet = new BattleNet("useast.battle.net");
                    bnet.logIn("dynobot1", "test");
                catch(Exception error) {
                    System.out.println(error);
            if(src == disc) {
                try {
                    BattleNet bnet = new BattleNet("useast.battle.net");
                    bnet.logOut();
                catch(Exception error) {
                    System.out.println(error);
    BattleNet class
    import java.io.*;
    import java.net.*;
    public class BattleNet extends SendAndReceive {
        Socket sock;
        InputStream in;
        OutputStream out;
        Send send;
        Receive receive;
        public BattleNet(String server) {
            try {
                sock = new Socket(server, 6112);
                in = sock.getInputStream();
                out = sock.getOutputStream();
                send = new Send(this.out);
                receive = new Receive(this.in);
            catch(Exception error) {
                System.out.println(error);
        public void logIn(String username, String password) {
            byte[] u = username.getBytes();
            byte[] p = password.getBytes();
            try {
                out.write((byte) 0x03);
                out.write((byte) 0x04);
                out.write(u);
                out.write((byte) 0x0a);
                out.write(p);
                out.write((byte) 0x0a);
                receive.start();
                send.start();
            catch(IOException e) {
                System.out.println(e);
        public void logOut() {
            try {
                sock.close();
                in.close();
                out.close();
            catch(Exception error) {
                System.out.println(error);
    SendAndReceive class (with Threads as subclasses)
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class SendAndReceive implements ActionListener {
        JButton src = null; 
        public SendAndReceive() {} 
        public void actionPerformed(ActionEvent evt) {
            src = (JButton)evt.getSource();
    class Send extends Thread {
        OutputStream out;
        SendAndReceive sr = new SendAndReceive();
        BotWindow bw = new BotWindow();
        public Send(OutputStream inputOut) {
            out = inputOut;
        public void run() {
            if(sr.src == bw.submit) {
                String newLine = "\n";
                String messageOut = bw.inText.getText();
                bw.outText.setText(bw.outText.getText() + newLine + messageOut);
                byte[] m = messageOut.getBytes();
                try {
                    out.write((byte) 0x05);
                    out.write(m);
                catch(IOException e) {
                    System.out.println(e);
                String blank = "";
                bw.inText.setText(blank);
                sr.src = null;
    class Receive extends Thread {
        InputStream in;
        SendAndReceive sr = new SendAndReceive();
        BotWindow bw;
        public Receive(InputStream inputIn) {
            in = inputIn;
            bw = new BotWindow();
        public void run() {
            while(true) {  //thinking of doing while(sr.src != bw.submit)
                try {
                    bw.outText.setText(bw.outText.getText() + (char)in.read());
                catch(IOException e) {
                    System.out.println(e);
    }So, to repeat my question, why isn't my GUI receiving the data being passed to it from the BattleNet socket? Also, am I taking the right approach on separating the send and receive methods and is my threading correct?

    Just Look at this code...
    while(true) {  //thinking of doing while(sr.src != bw.submit)
    try {
    bw.outText.setText(bw.outText.getText() + (char)in.read());
    catch(IOException e) {
    System.out.println(e);
    The problematic area is this code itself.
    Try to read text Line by Line basis. You can do this by using readLine() rather than read().
    The modified code should be like this:
    while(true) {  //thinking of doing while(sr.src != bw.submit)
    try {
    String TextRead=in.readLine();
    String Prev_text=bw.outText.getText();
    String new_Text=Prev_text + new_Text;
    bw.outText.setText(new_Text);
    catch(IOException e) {
    System.out.println(e);
    This would make the code easy to read and modify.
    I have faced these kindaa problems during my JAVA project coding. However they have been solved by using a much simpler approach like the one I have used. Although they do the same thing, but anyhow it provides a better result for reasons quite unknown to me!!!

  • Unable to pass variables from IRPT to on demand MDO in MII v12.2

    Hi all,
    Here is what I am trying to achieve - to pass an order input value from front end and fetch the results through on demand MDO.
    STEP 1: Created a BLS transaction with input parameter order and tested it to get Output XML - SUCCESSFUL.
    STEP 2: Created an On-Demand MDO object pointing to the BLS transaction, tested it by passing the value to input parameter in Dynamic Query Parameters - SUCCESSFUL.
    STEP 3: Created an MDO Query Template in SELECT mode pointing to the MDO object created, there are 2 things which I noticed. when I pass the value to OBJECT PARAMETER, it worked fine and when I pass it to PARAMETERS it Doest not work. I just used the object parameter because it worked for me.
    STEP 4: Created an Applet with MDO Query Template and Grid Display template. Tried passing the value using setParam(1, order). I found 3 different variations:
         Result 1: If Object Parameter in MDO Query is not set to any default value - "No Data Available" is seen on applet.
         Result 2: If Object Parameter is set to some valid default value say 123, irrespective of what I pass from UI setParam, I always see the data of 123.
         Result 3: If Object Parameter is set to some valid default value say 123 and in addition to that, I add Filter expression [val1] = [ param (dot)1 ] in my MDO select query, then when I pass 123 from UI, I see the result and when I pass someother input I see empty table, however now I can see the columns with empty table.
    Can someone tell me where I am going wrong?
    Any help is highly appreciated.

    Hi Michael,
    I am using the ramup version 12.2 and want to explore all the new features available in 12.2 and came downloaded the example project of MII 12.2 avaiable here. while doing that I came across an example of onDemand MDO query for pulling the data from Tag quieries and making it dymanic by passing speed or quality or perfomance parameters, however it just showed me only quality results always, I coudn't test it properly because it was a tag query so I created my own scenario and it didnt work from UI as expected.
    so wanted to know if I am going wrong somewhere before I conclud it is a bug.

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

  • Error when passing data from app server...

    Hello Experts,
    I am encountering an error when trying to pass data from application server
    to my internal table. Below is the error:
    "You cannot convert the character set"
    Hope you can help me guys.Thank you and take care!

    Hi  ,
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures. The code is base on uploading a simple txt file.
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.
    Reward  points if it is usefull ..
    Girish

  • Passing parameters from 1 jsp to another

    1. Passing String parameter P2 from Filter.jsp to POLGENMA106.jsp thro'
    <instance of NavigatorBar>.setTargetUrl
    ("POLGENMA106.jsp?P2=<%=strTitle%>")
    2. Problem faced :
    Value is not passed properly.
    3. Reason :
    When I press Next record in the NavigatorBar,
    the string "POLGENMA106.jsp?P2<%=strTitle%>" gets appended with
    "?<View name>_NAVIGATE=NEXT" internally instead of "&<View name>_NAVIGATE=NEXT" assuming that we r not passing any paramters.
    Is there any method by which we can pass paramters explicitly after instantiating NavigatorBar bean.
    4. Code in Filter.jsp:-
    <% strTitle = request.getParameter("P2"); %>
    <center><h2><%=strTitle%></h2></center>
    <jsp:useBean id="RowQuery" class="oracle.jbo.html.databeans.RowsetNavigator" scope="request">
    <%
    Object[] params = new Object[1]; params[0] = strVSCode;
    RowQuery.initialize(application, session , request, response, out, "pol_PMode_Pol_PModeModule.
    ComVsStaticValueView1"); RowQuery.setReleaseApplicationResources
    (true);
    RowQuery.getRowSet().getViewObject().setWhereClauseParams(params);
    RowQuery.getRowSet().getViewObject().executeQuery();
    RowQuery.getRowSet().first();
    %>
    </jsp:useBean>
    <jsp:useBean class="oracle.jbo.html.databeans.NavigatorBar" id="tb" scope="request" />
    <%
    tb.setTargetUrl("POLGENMA106.jsp?P2=<%=strTitle%>");
    tb.initialize(application,session, request,response,out,"pol_PMode_Pol_PModeModule.ComVsStaticValueView1");
    String sImageBase = (String)session.getValue("ImageBase");
    tb.getContainer().setImageBase(sImageBase);
    tb.getContainer().addSeparator(sImageBase + "/FNDIWDVD.gif");
    tb.getContainer().addButton(sImageBase + "/query.gif" , "ComVsStaticValueView1_Query.jsp", "Go to Query Form");
    tb.getContainer().addButton(sImageBase + "/browse.gif" , "ComVsStaticValueView1_Browse.jsp", "Go to Browse Form");
    tb.getContainer().addButton(sImageBase + "/addnew.gif" , "ComVsStaticValueView1_Insert.jsp", "Insert a New Record");
    tb.getContainer().addButton(sImageBase + "/editrec.gif" , "ComVsStaticValueView1_Edit.jsp", "Edit Current Record");
    tb.render();
    %>
    <br>
    One way of doing this is to put P2 in the session so that it can be accessed by POLGENMA106.jsp but this method is not preferable.
    Please Clarify.
    thanks,
    Archana
    null

    John Jdev :Are you using JDeveloper 3.0 or 3.1?
    ... I assume 3.0.
    Archana : Yes.
    Jdev : Are you trying to test this within JDeveloper 3.0?
    ... I assume so, but if not...please let me know.
    Archana : No, Iam not testing it within Jdev 3.0. I've deployed it in Java Web server 2.0 and Iam getting these parameters from the request.
    Jdev : You should note that JDeveloper 3.0
    supports running and debugging ONE JSP, not
    chained JSP/Servlets.
    Archana : Okay. But I din't test it using Jdev. Actually the NavigatorBar bean appends the implicit parameters "<view name>_NAVIGATE" to the JSP name specified in the setTargetUrl(), without checking if the string supplied to setTargetUrl() has a paramter already, that is the problem. So instead of appending "&<view name>_NAVIGATE", it goes as "?<view name>_NAVIGATE".
    Kindly provide a solution for this.
    Thank U !
    null

  • Passing variables from php to flash and the opposite

    Hi guys, im trying weeks now to solve this problem but nothing yet
    If someone could just tell me how to pass variables from flash to php and the opposite i would be thankful!!! Please help!

    I have recently had to learn this, so this may not be the best way but it worked for me
    I suggest looking at the code below stripping out everything you don't need (e.g. the databse stuff) and just get a simple string going back and forward
    have a go and post any problems here and I'll try and help
    in flash i have
    private function getBalanceAndXP():void
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "getBalance";
              variables.fbid = userID;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.addEventListener(Event.COMPLETE, onBalanceComplete);
              loader.load(request);
    private function onBalanceComplete(e:Event):void
              var loader:URLLoader = e.target as URLLoader;
              loader.removeEventListener(Event.COMPLETE, onBalanceComplete);
              var variables:URLVariables = new URLVariables(loader.data);
              _balance = parseInt(variables.balance); // class variable
              _experience = parseInt(variables.experience); // class variable
    public function setBalanceAndXP(balance:int, experience:int):void
                _balance = balance;
              _experience = experience;
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "setBalance";
              variables.fbid = userID;
              variables.balance = _balance;
              variables.experience = _experience;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.load(request);
    and then I have my php file
    <?php
    $func = $_POST["func"];
    $fbid = $_POST["fbid"];
    $balance = $_POST["balance"];
    $experience = $_POST["experience"];
    $numVariables = 0;
    $link = mysql_connect("localhost","username","password");
    mysql_select_db("databaseName");
    if ($func == "getBalance")
              getBalance($fbid);
    else if ($func == "setBalance")
              setBalance($fbid, $balance, $experience);
    mysql_close($link);
    function getBalance($fbid)
              $query = "SELECT balance, experience FROM tableName WHERE fbid = '".$fbid."'";
              $result = mysql_query($query);
              $row = mysql_fetch_row($result);
              writeVariable("balance", $row[0]);
              writeVariable("experience", $row[1]);
    function setBalance($fbid, $balance, $experience)
              $query = "UPDATE tableName SET balance = ".$balance.", experience = ".$experience." WHERE fbid ='".$fbid."'";
              mysql_query($query);
    function writeVariable( $name, $value )
              global $numVariables;
              if ( $numVariables > 0 )
                        echo "&";
              echo $name . "=" . urlencode($value);
              $numVariables++;
    ?>

  • Passing variables from Applescript to bash

    Hello,
    I'm trying to pass variables from Applescript to bash using the following code
    #!/bin/bash
    osascript <<EOF
    tell application "SystemUIServer"
    set username to text returned of (display dialog "Enter your name" with icon caution default answer ""  buttons{"Continue"})
    set macname to text returned of (display dialog "Enter name of your Mac" with icon caution default answer ""  buttons{"Continue"})
    do shell script "export USERNAME=" & quoted form of username & " && export MACNAME=" & quoted form of macname
    end tell
    EOF
    echo "USERNAME is $USERNAME, MACNAME is $MACNAME"
    but no luck
    Mac-mini:Downloads admin$./new.command
    USERNAME is , MACNAME is
    Any help would be greatly appreciated.

    I just realized you are returning 2 variables.  That can still be handled by echoing/printing the values, you just have to parse the output, or use other tricks.
    VALUES=( $(osascript -e '...') )
    This would make VALUES an array, with each array element containing one space separate return value from osascript
    USERNAME=${VALUES[0]}
    MACNAME=${VALUES[1]}
    If USERNAME or MACNAME could have spaces in them, you would need to use some kind of separator character.  For example if you use @ as the separator you could do something like:
    VALUES=$(osascript -e '...')
    USERNAME=${VALUES%@*}
    MACNAME=${VALUES#*@}
    which will %@* will delete everything starting with the @ til the end of the string, and #*@ will delete everything from the beginning of the upto and including the @.
    Another trick is to have the return values be properly formed shell variable assignments such as
    print "USERNAME='your user name' MACNAME='Your Mac Name' " -- I'm making this up as I do not really know Applescript, so you will have to figure out how to get Applescript to print something that looks like
    USERNAME='your user name' MACNAME='Your Mac Name'
    In your shell script you have code that looks like:
    VALUES=$(osascript -e '...')
    eval $VALUES
    The eval will execute whatever is stored in $VALUES, and if that happens to look exactly like shell variable assignments, you get the variables created in the current shell context, where can use them.

Maybe you are looking for

  • Working with xml data collections (sequences)

    Dear all, a database adapter in my BPEL process returns the following xml data structure: Schema: <xs:element name="MGroupsCollection" type="MGroupsCollection"/> <xs:complexType name="MGroupsCollection"> <xs:sequence> <xs:element name="MGroups" type=

  • Socket read time out

    Hi, A java class I use is connecting to another system via socket. This always works fine when using Java 1.3. However my database installation forces me to use Java 1.2.1 where the same code fails. Does anybody know of a workaround to this problem?

  • Order Import program run very slow

    Hi I use Order Import program to create sale order from tables interface.But it run very slow,about two hours for one record. How can i do it run fast? Thanks

  • Osd lock out and other issues

    My monitor has suddenly started waking up on its own when the computer isn't on. it keeps having "OSD lockout" message constantly going off and on. The tab for adjusting things such as brightness and all other settings keeps flashing on and off. I do

  • Import to library

    I am trying to import photos which my daughter has in her iphoto library '08 into my iphoto '08 library.  She burned these photos to a dvd and gave it to me.  When I select the files on the disk and "import to library" I can see the photos as they ar