Using RichOutputText value in a java class

Hi to everybody. I'm using Jdeveloper 11g and I'm developing an application that shows a tree in a jsp page. The java class that implements tree component need to receive a value written in a RichOutputText in the same Jsp page. Is it possible to do it? If yes, how can i realize it?
Thank's a lot

The problem is that when i try to pass RichOutputText value to the java class that implements the tree, one error occurs:
Root cause of ServletException.
com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: view.TreeNouns2. *(name of class that implements the tree)*
     at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:193)
     at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105)
     at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:369)
     at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
     at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88)
     Truncated. see log file for complete stacktrace
java.lang.NullPointerException
     at edu.smu.tspell.wordnet.impl.file.TextTranslator.translateToDatabaseFormat(TextTranslator.java:77)
     at edu.smu.tspell.wordnet.impl.file.SenseIndexReader.getLemmaEntries(SenseIndexReader.java:150)
     at edu.smu.tspell.wordnet.impl.file.WordFormLookup.loadSynsets(WordFormLookup.java:274)
     at edu.smu.tspell.wordnet.impl.file.WordFormLookup.getSynsets(WordFormLookup.java:230)
     at edu.smu.tspell.wordnet.impl.file.WordFormLookup.getSynsets(WordFormLookup.java:172)
i don't know how I can do it. Help me please.
Regards

Similar Messages

  • Mapping Value Objects to Java Classes

    Hi All,
    I have one Java Class:
    public class MyBean {
        private ArrayList numbers;
    I have created one mapping value object for the same in Flex:
    package vo
        import mx.collections.ArrayCollection;
        [RemoteClass(alias="com.tcs.example.MyBean")]
        public class MyBean
            public function MyBean()
            public var numbers:ArrayCollection;
    but when I fetch the object using Remote Object, the returned object has "numbers" as null even though I'm returning from Java a filled ArrayList.
    Does any one know Why is it happening and what should I do for this.
    Thanks in advance

    Do you have getNumbers and setNumbers methods on your java bean?
    Try to activate the logs on blazeDS to see what's going on.

  • Accessing env-entry value from a java class

    Hi,
    I have my env-entry element declared in ejb-jar.xml like this
    <env-entry>
    <env-entry-name>ConfigFile</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>centaur</env-entry-value>
    </env-entry>
    and if I access that value from the EJB of that ejb-jar.xml, it is giving the right value. But when I am trying to retrieve the same from a java class, that is throwing exception "javax.naming.NameNotFoundException: Unable to resolve 'ConfigFile' Resolved ; remaining name 'ConfigFile'"
    I think this is because env-entry has access to only EJB to maintain security?
    or can env-entry elemenets cab be accessed outside the EJB and some thing I am doing wrong here?
    can some one help me here?

    Hey Frank,
    The JCo, DI API and DB are all on PL 18. I have found that the error only occurs for one business partner, and that business partner had a service contract added to it the day before the error started to occur. Also the business partner in question is the only business partner with a service contract which would explain why it is the only one experiencing these problems. It could be a coincidence but I will let you know what the outcome is.
    Carla

  • How to return Values from Oracle Object Type to Java Class Object

    Hello,
    i have created an Oracle Object Types in the Database. Then i created Java classes with "jpub" of these types. Here is an example of the type.
    CREATE OR REPLACE TYPE person_type AS OBJECT
    ID NUMBER,
    vorname VARCHAR2(30),
    nachname VARCHAR2(30),
    geburtstag DATE,
    CONSTRUCTOR FUNCTION person_type RETURN SELF AS RESULT,
    CONSTRUCTOR FUNCTION person_type(p_id NUMBER) RETURN SELF AS RESULT,
    CONSTRUCTOR FUNCTION person_type(p_vorname VARCHAR2,
    p_nachname VARCHAR2,
    p_geburtstag DATE) RETURN SELF AS RESULT,
    MEMBER FUNCTION object_exists(p_id NUMBER) RETURN BOOLEAN,
    MEMBER PROCEDURE load_object(p_id NUMBER),
    MEMBER PROCEDURE save_object,
    MEMBER PROCEDURE insert_object,
    MEMBER PROCEDURE update_object,
    MEMBER PROCEDURE delete_object
    MEMBER PROCEDURE load_object(p_id NUMBER) IS
    BEGIN
    SELECT p.id, p.vorname, p.nachname, p.geburtstag
    INTO SELF.ID, SELF.vorname, self.nachname, SELF.geburtstag
    FROM person p
    WHERE p.id = p_id;
    END;
    My problem is, that if i use the member function "load_object" from my java app it doesnt return the selected values to the java class and i dont know why. I use the java class like this:
    PersonObjectType p = new PersonObjectType();
    p.load_object(4);
    There is a reocrd in the database with id = 4 and the function will execute successful. But if i try to use "p.getVorname()" i always get "NULL". Can someone tell me how to do that?
    Thanks a lot.
    Edited by: NTbc on 13.07.2010 15:36
    Edited by: NTbc on 13.07.2010 15:36

    CallableStatement =
    "DECLARE
    a person_type;
    BEGIN
    a.load_object(4);
    ? := a;
    END;"
    And register as an out parameter.
    Edited by: michael76 on 14.07.2010 05:01

  • Can not locate Java class using JNI within C++ DLL

    I am using trying to use JNI to call a Java class from C++. The Java class uses JMS to send messages to a JMS message queue. At first I coded the C++ in a console application that created the JavaVM and used JNI to access the Java class. All worked fine. Then I called the Java class using JNI from threads and ran into the problem of the Java class not able to locate the JMS related classes. This was solved by placing the following line in the constructor of the Java class.
    Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
    Then I moved the JNI code from a console application to a DLL in specific an extension DLL that is called by SQL Server or Oracle server. The DLL will use JNI to call the Java class and send messages to a JMS message queue.
    The problem I am having now when the DLL code is called by SQL Server the call to
    JNI_CreateJavaVM
    appears to work correctly but the call to find the Java class using
    jvmEnv->FindClass(pName)
    fails. It appears the is a class loading problem which occurs due to the fact JNI is called from a DLL. When the VM is created I pass the class path information using the statement
    -Djava.class.path=
    And as I stated before it all works when running from a console application. I am new to JNI and really need help in the form of some sample code that will solve this problem. I believe I need to somehow load the classpath information from the DLL but I can not find examples on how to do this using JNI. I have tried several ways using URLClassLoader and getSystemClassLoader from JNI and either it does not work or it crashes very badly.
    I used the following code to determine what the existing class path is and the string returns empty.
    jcls = jvmEnv->FindClass("java/lang/System");
    jmid = jvmEnv->GetStaticMethodID(jcls, "getProperty", "(Ljava/lang/String;)Ljava/lang/String;");
    jstrClassPath = jvmEnv->NewStringUTF("java.class.path");
    jstr = (jstring)jvmEnv->CallStaticObjectMethod(jcls, jmid, jstrClassPath);
    m_jstr = (jstring)jvmEnv->NewGlobalRef(jstr);
    pstr = jvmEnv->GetStringUTFChars(m_jstr, 0);
    Can anyone please help with example code that will solve this problem. Thanks in advance for any help.
    Charles�

    I have determined the problem occurs when the application/component is compiled using VC 6.0. The test application was compiled using VC 7.1 and works correctly by locating the class path information. If the test application is compiled using VC 6.0 it has the same problem.
    The jvm.dll I am using is version 1.4.2.80. Currently this is not an option to compile all the applications that use JNI using VC 7.1 so can someone please tell me how to solve this problem.

  • Urgent !!!!!!!!!!!! regarding CREATE JAVA CLASS USING BFILE

    We have Oracle 8.1.7 spatial database. We got to load some java classes into the database. We would like to make it as the java programs to be loaded from a client system into the oracle server. I am using CREATE DIRECTORY command to create a directory object (say suppose \\prav\loadjavaclasses\. Then using the CREATE OR REPLACE JAVA CLASS USING BFILE (object_name, 'CLASSNAME.CLASS'). This .class file is in the network identified by prav which in turn has a shared directory (full privileges) loadjavaclasses folder. Can you please help in this regard.
    Please mail me to [email protected]
    thanks in advance
    SudhaSrikanthan
    null

    use loadjava

  • How can I use JVM  instructions from Java classes?

    Hello,
    I want to use JVM instructions in my Java classes. How can I achieve this?
    Should I include a library to my project or something else?

    What on earth are you talking about?

  • How to read static variable defined java class from flex?

    This is a beginner question. If I use remoteClass to map a java class and a flex class, how can I access a static variable defined in java class from the flex code?
    Thanks!

    Static propeties are by default ignored in the blazeds for serialization. You can try using another global property in the java bean which maps to the value stored in the static property( Hopefully it should work)
    eg,
    public String instanceValue = ClassName.staticValue;
    Ref: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_3.ht ml

  • Set image path in java class library

    Hi,
    I created a java class library project and made .jar file. My java class library contains .jpg files in separete folder named as Images. My .jar file contains list of classes and image folder also but when i am using .jar file in applet. java class library is working but images are not shown. Let me know how to create imageicon to show images also in the class library

    ImageIcon icon = new ImageIcon(getClass().getResource(path-to-file));

  • How to import java Classes in report Builder

    Hi, I want to import classes from a jar file into Report Builder (10 g). I'm not able to find my JAR in -- Program --> Import Java Classes option.
    I have set the classpath pointing to my JAR.

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • How to import java Classes in report Builder 10g

    How to import java Classes in report Builder 10g .....
    Arshad

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • To Unable to Import Customize Java classes in Report Builder 10g

    Hi,
    In Report Builder 10g , I am trying to load image from Remote server
    URL:"http://imagecache5.art.com/p/LRG/15/1544/1ABDD00Z/muhammad-ali-vs-sonny-liston.jpg"
    Steps did in Report Builder 10g
    1.In Report Builder Created a Formula column with
    Datatype : Character
    Read from File: Yes
    File Format: Image
    In Formula columns trying to Unable to Import Customize Java classes.
    To read methods from Java classes.
    Please help on this.
    Ranga

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • How can i have a refrence of a java class object instance in my c++ project

    Hi!
    How can i have a refrence of a java class object instance in my c++ project. Is there a way?

    hahaxia wrote:
    The second question is the big one. The first question is half of the problem of "c++ to java" invocation and access. But the other half which is "java to c++ " invocation and access is still not solved. jni only provide the "java to c++ " DLL invocation Wrong,
    Using JNI your java classes can have methods implemented in C/C++.
    Using JNI you can call java classes.
    There is no other possible interaction between C++ and java, so it does it all.

  • XJC Tool - For building Java classes from Schema

    Hi all,
    I am using XJC tool for Building java classes from Schema.
    Can we have any other tool for generating java classes from Schema?
    Thanks in advance,
    typurohit

    Solved my own problem and forgot to post the answer: the "xsd:import" is also considered as a targetNamespace, so each xsd:import needs a package specified as well when using oracg. It would be helpful if the Oracle documentation had stated that, but it does not point this out.

  • Assign value in a inner class

    Suppose, we have the following two classes.
    public class test{
    final trythis t;
    t = null;
    doMethod(t); // because of this, t has to be assigned a null value
    (new Thread(){public void run(){
        t = new trythis();  // t is assigned twice
      }}).start();
    class trythis{
    trythis(){
    t seems to have to be defined as final, but final instance cannot be set in the inner class.
    Does anyone know how to solve this problem?
    Thanks

    As the local variable has a lifetime of the executing method's
    duration, you must ensure the innerclass (which has a longer lifetime)
    has access to it by declaring it final.This is not quite exact. All this is due to the way inner classes are implemented. An inner class maintains the contents of the outer local variables used in two ways:
    - If it is primitive, use the value verbatim (so the class has no relationship to the outer variable, it just uses the same number, so the local var needs to be final or else there could be surprises for a programmer who would think that changing the local var would also change the value used in the inner class)
    - If it is a reference, copy it as a class member, and use that one wherever needed. For similar reasons as above, the two references have to be in sync, so the local var has to be final (the inner var can't change anyway)
    This apply only to local variables because class members are accessible through a secret reference of the enclosing object passed in the constructor of the inner class. Static members are anyway accessible.
    <teacher's mode off/>
    <sorry for that, but someone might find the explanation useful :-)/>
    By the way, the OP can get the value "t" out of the inner class by providing a special Thread subclass, ie
    class MyThread extends Thread {
      public void run() {
        t = something;
      trythis t;
    MyThread thread = new MyThread();
    thread.start();
    thread.join();
    thread.t; //This is accessibleI'm not sure if this would be preferable to the array approach (which is ), but it is useful to know your alternatives

Maybe you are looking for