Problems with Java Scripting API

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

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

Similar Messages

  • Problem with Java Script after upgrade from BW 3.5 to BI7

    Dear Colleagues,
    We're facing the issue with Java Script after upgrade of BW 3.5 to BI7.
    Just after update we checked the basic functionality and it occured that some of web templates that use Java Script don't work. They generate seelction screen, but after selection the screen becomes blank without any error messages.
    We're currently stucked since web templates weren't converted to BI7 version so they should work exactly as before the upgrade.
    We compared the Java code with other environment that was not upgraded - it's perfectly the same.
    The only explanation that comes to my mind is that some Java Script settings on the server level were changed during the upgrade but I have no idea where I can check that.
    Thanks in advance for any suggestions,
    Andrzej Bobula

    Hi Deepu,
    Thanks, it was great to read your reply and then few minutes later talk to you live on SDN Day!
    Unfortunately, http cache clean-up did not help. But there is another funny thing I found - for exactly the same 3.5 webtemplate html code returned from WebAS 3.5 was different then from 7.0.
    Unfortunately, this editor does not allow to paste complete code, even in CODE brackets, but here are main differences:
    <b>3.5</b>
       if (navigator.appName == "Microsoft Internet Explorer")
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=1&REQUEST_NO=1&CMD=GET_TEMPLATE"
    name="Content">
    and
    <b>7.0</b>
       if (navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=8&REQUEST_NO=0&CMD=GET_TEMPLATE"
    name="Content" 0nLoad="javascript:loadTitle()">
    (I intentionaly put 0 i/o o in 0nLoad, otherwise Forum's editor does not accept the text.
    How about SAP's claim that technical upgrade from 3.x to 7.0 changes nothing?
    Regards,
    Vitaliy

  • Problem with java communication api for gsm modem port

    Hi,every body
        Am using gsm modem in my project previously my linux is 32bit with 32 bit jvm of sun that time there was no problem at the time of working with gsm modem port .But now am using 64bit linux then 32bit files are not supporting to communicate with gsm modem port .How can i get java communication api for unix 64bit ,64bit jvm of sun.please any body help me ...i am searching in sun/oracle also for downloading java communication files of 64bit jvm but i didn't get the link... i need bellow java communication api files.
           ex:1)libLinuxSerialParallel.so
                2)javax.comm.properties
                3)comm.jar
                4)commtest.jar

    Moderator Action:
    This duplicate cross-post is locked.
    Stay with your original post.
    https://forums.oracle.com/thread/2602063
    (... and your hijack reply to a third thread has been removed.)

  • Problem with Java Communication API

    hi
    I installed the Java Communication API on win32 platform (as per the guidelines)
    Now when I try to run the sample program 'Blackbox' for the serial port, I get an error (in fact an exception is generated inside main function in BlackBox.class file)
    I tried the SimpleRead.java example but that too generated the same exception
    Can anybody help me out.... I am a novice with Java Comm API

    I tried running the sample BlackBox program provided for serial port and now it says
    No Serial Ports Found!
    I verified that both comm.jar and javax.comm.properties are in the <JDK>\lib directory.
    Actually, I am using netBeans IDE 1.4 and I used the C:\J2SDK folder installed with netBeans for the Java Communicaion API
    plz help.

  • Problem with java logging API

    Hi there
    It`s the first time I`m using (I have to use) the standard java logging API.
    My need is to integrate it in an existing web-application based on struts.
    So my first step was to include the following code into an Struts Action-class:
    FileHandler file = new FileHandler("/pathToLogFile/myLogFile.log",true);
    file.setFormatter(new SimpleFormatter());
    logger.info("create info");
    By intention is to have exactly one log-file for the whole application, but indeed I'm getting multiple log-files, even for each request of one and the same Action/Servlet class, like
    myLogFile.log
    myLogFile.log.1
    myLogFile.log.2
    myLogFile.log.3
    Why does using append=true not work in the constructor of "FileHandler"
    Do I have to close the FileHandler each time I've used it?
    Is this a known issue?
    Thanks for any responds!

    @ Stone.li
    First, thanks for your answer.
    perhaps my question was quite confusing .... but my need is just
    to establish the logging API in an existing Web-Application and to have exactly one log-file for the whole application. This means I would have to provide in each servlet a FileHandler referencing to the log-file. I thought it would be part of the job of the logging API to synchronise this file access.

  • Problem with Java Print API ( awt ) : Migrated from 1.1 to 1.4

    We had migrated an application ( applet based) from Java 1.1.8 to java 1.4.
    We use the java.awt.print apis for printing data from our applications.
    There is difference in print quality after the migration. For e.g. if the data frame had a scroll bar when taken print out, the scroll bar was not visible in java1.1 version application but is being printed with java1.4 version.
    We are unable to find the cause of this problem. Any help in this regard would be of great help.
    Thanks in advance.

    Hi,
    thanks, this solved the problem.
    Thank you.
    Best regards,
    Peter

  • Problems with Java Script in Browsers...

    My problem is that almost no webpage with any kind of javascript is running any more i always get errors like this:
    Event thread: onmouseup
    Error:
    name: ReferenceError
    message: Statement on line 205: Reference to undefined variable: No such variable 'dd'
    Backtrace:
    Line 205 of linked script >Webpage with *.js<
    var d = dd.selectedIndex + 1;
    Line 459 of linked script >Webpage with *.js<
    var departDate = getDepartDate();
    In unknown script
    submitForm();
    At unknown location
    {event handler trampoline}
    I have reinstalled java several times always the same problem i tried IE6 and Opera but it seems Java is causing the problems
    Please help !!!!

    Either you don't understand the difference between java and javascript
    http://www.dannyg.com/ref/javavsjavascript.html
    or we don't understand how you are using java. All those errors look like javascript errors.

  • Having problem with Java Communication API

    I am using this code to list the port that i have but it does not return any thing. when i compile and run nothing is printed out. i think either its not going in while loop but if i remove while loop it returns NULL. so i think its not recognizing any PORTS. i want to detect a modem port as i want to make a voice mail software. I am jsut starting by listing, opening and listening to the ports. Please help me ASAP. Thank you.
    import javax.comm.*;
    import java.util.*;
    public class PortLister {
    public static void main(String[] args) {
    Enumeration e = CommPortIdentifier.getPortIdentifiers();
    while (e.hasMoreElements()) {
    System.out.println((CommPortIdentifier) e.nextElement());
    }

    Go back where you downloaded the API and read the FAQ. I think it's the question number 2.

  • Captivate 5: Problems with Java Scripts - Trying to Jump to a certain slide on Different Project

    I have the code here I researched for Captivate 5 to jump to a certain slide in a different project, this code was attempted to be used in both projects seperately and simultaniously:
    function GetSlideParam(){
    if(window.location.href.indexOf('?slide=') != -1) {
      var startIndex = window.location.href.indexOf('?slide=' ) + 7;
      var URL = window.location.href.toString();
      var slideNumber = URL.substring(startIndex);
      if(slideNumber != '' || slideNumber != undefined){
       setTimeout(function(){NavigateToSlide(slideNumber);}, 200);
    function NavigateToSlide(requestedSlide){
    var cpObj = document.Captivate;
    cpObj.cpEISetValue('cpCmndGotoSlide',requestedSlide - 1);
    cpObj.cpEISetValue('rdcmndResume',1);
    GetSlideParam();
    Here's my on success URL file in the button properties that was needed to jump to that certain slide according to my research:
    (my project to jump to).htm?slide=2
    In the end, it didn't work and just jumped to slide 1 on the other project no matter what I tried to do or how I altered the script and the project button and slide properties... Please Help... Just thought maybe you guys would know some more about scripting, that's why I'm asking you guys this regardless of it being a Captivate question because the Captivate Specialists couldn't answer my question being clueless about the scripting part of it.

    Tframe01 wrote:
    ... Just thought maybe you guys would know some more about scripting, that's why I'm asking you guys this regardless of it being a Captivate question because the Captivate Specialists couldn't answer my question being clueless about the scripting part of it.
    So the InDesign Scripting Forum is the place to ask about Javascript -- for any other program? Well, paint me red and call me Admiral Ackbar, I didn't see that one coming.
    Are you (and with you those "Captivate Specialists") aware of the fact that
    var slideNumber = URL.substring(startIndex);
    will return a text string, not a number? And so this next operation will (silently) fail, and return some default number instead (most likely, 0)?
    (stuff --) requestedSlide - 1
    If you already knew this, you will have to be more clear on what happens now, what you'd like to happen, and what Captivate actually is supposed to do (since I have no idea what it is).

  • I get repeated error messages about there being a problem with Java Script when visiting various web sites

    The message pops up repeatedly at various web sites and I can x it out and eventually they will stop but when I goe to a different page in that web site, this occurs again. The message is as follows "Error:Document.get elements by Tag Name (""head") [0] is undefined

    Hi,
    Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    Choose to [https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode#w_safe-mode-window_2 Start in Safe Mode].
    To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.
    If it is good in the Firefox Safe Mode, your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Alternatively you may also want to Reset Firefox and start afresh.
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!'''

  • Problem with Java 3D API help!

    hellow people,
    i'm working working on a 3D game project. My program compiles fine but when it runs it gives me the following error:
    Java 3D ERROR : wglGetExtensionsStringARB not support !
    - The specified procedure could not be found.
    Fallback to use standard ChoosePixelFormat.
    Java 3D ERROR : OpenGL 1.2 or better is required (GL_VERSION=1.1)
    Exception in thread "J3D-Renderer-1" java.lang.IllegalStateException: GL_VERSION
            at javax.media.j3d.Canvas3D.createNewContext(Native Method)
            at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2429)
            at javax.media.j3d.Renderer.doWork(Renderer.java:747)
            at javax.media.j3d.J3dThread.run(J3dThread.java:250)I tried installing the latest version of openGL , but it still gives the same error.
    I'm using GeForce4 MX Intergrated Graphics card on windows pro.

    This should be posted in the Java 3D forum. I had the same problem. I had to install directX to fix it. :(

  • Problem With JAVA Script | Dreamweaver CS5

    Hello There,
                       I am trying to edit my website pages footer css icons for social media presence. It's unable to proceed for display changes which is we have created. We developing plain html website here ( http://www.swiftswebservices.com ) If possible please provide best suggestion here to resolve this problem.
    Thanks & Regards.

    This is a static site that you have developed? It looks and behaves very much like a Wordpress site, but I can see that you are not linking to PHP pages. And besides that confusion, I don't really understand your question - what do you mean by "...unable to proceed for display changes..."?

  • More problems with java query API - getExcerpt fails

    If I write my code this way, everything works:
    mySearchRequest.setQuery(new oracle.ultrasearch.query.Contains(searchString, metadata));
    But if I do this, Document.getExcerpt() starts returning null for the same search hits:
    mySearchRequest.setQuery(
    new oracle.ultrasearch.query.And(
    new oracle.ultrasearch.query.Contains(searchString, metadata),
    new oracle.ultrasearch.query.From(metadata.getGroup(groupToSearch))
    Does anybody know how to make this work? I need to limit my searches by groups so that I don't have to create a new UltraSearch Instance for every single web site that has to be crawled (I have several).
    Troy

    Well, I finally discovered he solution on my own, by reverse-engineering Oracle's own search.jsp (which does not use Oracle's custom tag library, btw) (probably because same doesn't really work, or at least it doesn't what's in the documentation doesn't work) (which isn't surprising).
    You have to do the "From" part of the query as an "attribute filter".
    oracle.ultrasearch.query.Query searchQuery=
    new oracle.ultrasearch.query.Contains(searchString, metadata);
    oracle.ultrasearch.query.Query attrQuery=
    new oracle.ultrasearch.query.From(metadata.getGroup(groupToSearch));
    oracle.ultrasearch.query.Request searchRequest=new oracle.ultrasearch.query.Request();
    searchRequest.setQuery(searchQuery);
    searchRequest.setFilter (attrQuery);
    Maybe that will do somebody some good somewhere...
    Troy

  • Problem with java script

    hii,
    i have taken textboxes in for loop.i want to do that if the values in the textboxes are 0,and if the user clicks the textbox then that textbox value
    should disappear.if the value is not 0 then it should not disappear.
    i got it,but i also want that if the user clicks on another textbox and the above one does not given any value then it should take automatically as 0.i am not getting it.
    if any body knows,tell me.
    i am sending the code.
    i have taken for loop in jsp like
    <%
    for(int i=0;i<10;i++)
    %>
    <input type="text" name="box" value='0' size="6" onClick="fnTest('<%=i%>')"><br>
    <%
    %>
    the function is
    function fnTest(str)
    //alert("Str value"+str);
    if(formHeader.box[str].value=='0')
    formHeader.box[str].value=' ';
    thanx

    Dear pavuluri,
    Nice meeting again..
    did u remember our Previous Code....
    Add
    onclick="javascript:chkfor0(this);" onblur="javascript:chkfor0(this);"in
    <input type="text" name="box" value='0' size="6" onClick="fnTest('<%=i%>')"><br>
    add the mentioned code in ur loop
    now ur loop looks like
    <%
    for(int i=0;i<10;i++)
    %>
    <input type="text" name="box" value='0' size="6" onClick="fnTest('<%=i%>');chkfor0(this);" onblur="javascript:chkfor0(this);" ><br>
    <%
    %>don't forget to add the JS code
    function chkfor0( ctrl )
         if( ctrl .value == '' )
              ctrl .value = 0;
    }AE

  • [End of TNS data channel] with Java SDO API (JDBC thin 9.0.1.2.1)

    Hello folks,
    Environment:
    Win2K, 1.2GHz Intel, 500MB RAM, Oracle 9i, Oracle JDBC Thin (9.0.1.2.1), JDK1.3
    Our data in the DB is 2-D. It consists of SDO LineString geometries. We use SRID = 8307.
    I run into this problem with Java SDO API. I got this exception: "Io exception: End of TNS data channel"
    when I try to execute query that uses the SDO_RELATE function:
    SELECT e.shape
    FROM edge e
    WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry( 2003, 8307, NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(-125.8,49.9,-125.6,49.9,-125.6,50.0,-125.8,50.0,-125.8,49.9) ),
    'mask=ANYINTERACT querytype=WINDOW') = 'TRUE'
    If I use SDO_FILTER instead of SDO_RELATE it works!
    Here is how I execute the query in Java:
    public int executeSpatialQuery(OracleConnection conn, String spatialQuery) throws Exception
    int numberOfGeometries = 0;
    conn.setDefaultRowPrefetch(1000);
    Statement ps = conn.createStatement();
    ResultSet rs = ps.executeQuery(spatialQuery);
    while (rs.next()) {
    numberOfGeometries++;
    rs.close();
    ps.close();
    return numberOfGeometries;
    Note: I was playing with the "conn.setDefaultRowPrefetch(n)" method hoping that there might be something to do with that but with no success.
    Any help will be much appreciated. Thank you.
    GKK

    Hello folks,
    Here is what I've done:
    1. Created a "mini" Realtional model (modelB) which mimics exactly our existing "big" Realtional model (modelA). The tables, sequences, indices, etc. in modelB have been created in exactly the same fashion we'd created the corresponding entities in modelA. The only difference is that I preceeded the entities in our test modelB with "TEST_".
    2. Populated the modelB with 1298 Lakes (3993 edges in total) in exatly the same fashion we use to populate our modelA - using a Data Loader based on Java SDO API.
    3. Indexed the test modelB in exactly the same fashion as modelA.
    4. Ran the query:
    SELECT e.shape FROM test_edge e WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry(
    2003,
    8307,
    NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(
    -123.80833332065798,48.58352678668598,
    -123.80833332065798,48.675352618459506,
    -123.65050767229724,48.675352618459506,
    -123.65050767229724,48.58352678668598,
    -123.80833332065798,48.58352678668598
    ), 'mask=ANYINTERACT querytype=WINDOW'
    ) = 'TRUE'
    in SQL*PLUS and it worked fine (retrieved a bunch of geometries)!
    Ran the same query in the Daniel Geringer's OraTest utility and it worked this time and returned:
    TIME : 1.222 seconds, TOTAL FETCH TIME 267 ROWS
    Ran the query with our JCS Query Plug-In and it worked fine!
    ANALYSIS
    ========
    ModelA
    ======
    - 59652 Lakes and 178764 edges
    - it's properly indexed
    - its SDO layers and geometries are valid
    - when we count the number of related SDO geometries for this query we get:
    SQL> SELECT count(e.shape) FROM edge e WHERE SDO_RELATE(e.shape,
    2 mdsys.sdo_geometry(
    3 2003,
    4 8307,
    5 NULL,
    6 mdsys.sdo_elem_info_array(1,1003,1),
    7 mdsys.sdo_ordinate_array(
    8 -123.80833332065798,48.58352678668598,
    9 -123.80833332065798,48.675352618459506,
    10 -123.65050767229724,48.675352618459506,
    11 -123.65050767229724,48.58352678668598,
    12 -123.80833332065798,48.58352678668598
    13 )
    14 ), 'mask=ANYINTERACT querytype=WINDOW'
    15 ) = 'TRUE';
    COUNT(E.SHAPE)
    267
    - when we run the following query via the Java SDO API:
    SELECT e.shape FROM edge e WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry(
    2003,
    8307,
    NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(
    -123.80833332065798,48.58352678668598,
    -123.80833332065798,48.675352618459506,
    -123.65050767229724,48.675352618459506,
    -123.65050767229724,48.58352678668598,
    -123.80833332065798,48.58352678668598
    ), 'mask=ANYINTERACT querytype=WINDOW'
    ) = 'TRUE'
    it FAILS with: "TNS end of communaction channel"!
    ModelB
    ======
    - 1298 Lakes and 3993 edges
    - it's properly indexed
    - its SDO layers and geometries are valid
    - when we count the number of related SDO geometries for this query we get:
    SQL> SELECT count(e.shape) FROM test_edge e WHERE SDO_RELATE(e.shape,
    2 mdsys.sdo_geometry(
    3 2003,
    4 8307,
    5 NULL,
    6 mdsys.sdo_elem_info_array(1,1003,1),
    7 mdsys.sdo_ordinate_array(
    8 -123.80833332065798,48.58352678668598,
    9 -123.80833332065798,48.675352618459506,
    10 -123.65050767229724,48.675352618459506,
    11 -123.65050767229724,48.58352678668598,
    12 -123.80833332065798,48.58352678668598
    13 )
    14 ), 'mask=ANYINTERACT querytype=WINDOW'
    15 ) = 'TRUE';
    COUNT(E.SHAPE)
    267
    - when we run the following query via the Java SDO API:
    SELECT e.shape FROM test_edge e WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry(
    2003,
    8307,
    NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(
    -123.80833332065798,48.58352678668598,
    -123.80833332065798,48.675352618459506,
    -123.65050767229724,48.675352618459506,
    -123.65050767229724,48.58352678668598,
    -123.80833332065798,48.58352678668598
    ), 'mask=ANYINTERACT querytype=WINDOW'
    ) = 'TRUE'
    it SUCCESSFULLY returns the related geometries!
    So, what can we make of all this? We know that there exists a model for which the SDO_RELATE works via the Java SDO API. This model is a subset (w.r.t. the data set) of our original model in which we detected the "TNS end of communication channel problem". The environment we used for these tests is exactly the same: JDBC Thin driver (version 9.0.1.0.0), Oracle9i Enterprise Edition (Release 9.0.1.2.1 - Production).
    One can think that the problem lies in the Oracle Object-Realational or Oracle Spatial but the fact that we can successfully execute the same SDO_RELATE queries in SQL*PLUS rejects this possibility. Perhaps it depends on the amount of data passed to the JDBC driver and the fashion in which it handles it! In our test above we had RELATED 267 geometries. We know that there exist SDO_RELATE queries that run successfully with modelA, but those are queries which ONLY retrieve an EMPTY set of RELATED geometries. In other words we don't get the "TNS end of communication channel" because NO data gets fetched from the server to the client! As soon as we find a SDO_RELATE query which retrieves (RELATES) at least 1 geometry that runs successfully in SQL*PLUS and run it via the Java SDO API - it FAILS! This means that no matter what volume of data is fetched from the server-JDBCThin-SDOAPI-client as long as there is ANY data, the query FAILS in modelA.
    Perhaps something internally in the Oracle 9i Server happens that prevent the data being fetch to the JDBCThin for that particular modelA. But what that might be?
    Very peculiar problem!
    Regards,
    Georgi

Maybe you are looking for

  • I entered the wrong Mac id on my iTouch and I cant figure out how to change it.

    I just opened an Ipod touch and tried to register it.  I made a mistake on the apple id on the imessage part of the settings and I believe this is not allowing me to use the messaging as it may not recognize my id.  How do I fix it. Thank you

  • Third Party Jars in OIM 11G

    Hi All, I am trying to invoke a web service stub to call create() functionality. From the stand alone program(with out integrating with OIM server), if I just run it from eclipse, I am able to create the user in target system. If I try to invoke thro

  • Using BLOBs in Delphi

    Hi, when i want to active a table in delphi that contains a BLOB field, it through an exception with message like 'Field Type not supported' How can I show an image saved in Oracle database with Delphi (version 7) plz add codes if u can...

  • Drop box folder has no icon

    I am under the impression (since I have never truly seen it) that when a folder becomes a drop box, there is a tiny arrow that appears on the folder icon such as this: Mine is simply a plain folder. Does the icon appear when another user fills the dr

  • M Series code for Labview

    I am using the PXI-6230 on Linux.  I downloaded the MHDDK for NI-Visa, and the code uses C, along with some examples that are in C.  There are some good examples, but I need working code that will work in Labview.  Are there some examples that people