SQL functions ExistsNode and Extract cannot work in Servlet...

Following lines are codes of servlet:
package cbr;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.io.*;
import oracle.xml.parser.v2.*;
import org.xml.sax.*;
import org.w3c.dom.*;
import oracle.jdbc.driver.*;
import oracle.sql.*;
import oracle.xdb.XMLType;
public class TestConnection extends HttpServlet
// Use the get command to recall the servlet
public void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException, java.io.IOException
// Set the content type of the response
resp.setContentType("text/html");
// Create a PrintWriter object
java.io.PrintWriter out =
new java.io.PrintWriter(resp.getOutputStream());
// Print the HTML header option
out.println("<html>");
out.println("<head>");
out.println("<title>Test Connection</title>");
out.println("</head>");
out.println("<h2><center>");
out.println("Test Connection");
out.println("</center></h2>");
out.println("<br>");
          Connection conn = null;
          Statement s = null;
          ResultSet rset = null;
          try
               DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
               conn =
                    DriverManager.getConnection("jdbc:oracle:thin:@cbr.comp.polyu.edu.hk:1521:cbr", "system", "system");
               s = conn.createStatement();
               OraclePreparedStatement stmt;
               String qryStr = "SELECT xmlCase FROM xmlCaseBase WHERE xmlCase.existsNode('/test/New_co_name4') = 0 AND xmlCase.extract('/test/New_co_name3/newClass/newClass_GROUP/@New_name').getStringVal() = 'football' AND problemDomainID = 'test'";
               rset = s.executeQuery(qryStr);
catch (Exception ex) {
// Send the error back to the client
out.println("Exception!");
ex.printStackTrace(out);
//rc = false;
finally {
try {
// Always close properly
if (rset != null) {
rset.close();
if (s != null) {
s.close();
if (conn != null) {
conn.close();
catch (Exception ex) {
// Ignore any errors here
// Close stream
out.println("</html>");
out.flush();
out.close();
public void init(ServletConfig cfg)
throws ServletException
super.init(cfg);
public void destroy()
super.destroy();
It cannot work and has the following error message:
Exception! java.sql.SQLException: ORA-00904: invalid column name at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java, Compiled Code) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java, Compiled Code) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java, Compiled Code) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java, Compiled Code) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java, Compiled Code) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java, Compiled Code) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java, Compiled Code) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java, Compiled Code) at cbr.TestConnection.doGet(TestConnection.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code) at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code)
Would you please help me to investigate the problem and give me a solution? Thanks a lot!

Hi,
Just now I tried reproducing your problem on sp3/sp4/6.5, and for me it works fine.
You can find all mappings in "<Application server>/6.0/CCS0/HTTPAPI/ServletPatternTrans" node of registry. Just make sure that your mapping entry is there, otherwise you can add it here (see the mapping of FortuneServlet for the format) and restart the iAS and web-server (plugin) after that.
Please feel free to ask further questions.
Sanjeev,
Developer Support, Sun ONE Application Server-India.

Similar Messages

  • My problem is- when I touch color picker all functions stop and I cannot do enything  even exit.

    My problem is- when I touch color picker all functions stop and I cannot do enything  even exit.

    What operating and version of photoshop are you using?
    It sounds like the color picker dialog is opening off screen and that's why photoshop seems to lock up.
    (you should be able to press the Esc key to dismiss the the hidden color picker dialog)
    Do you have or had dual monitors?
    Have you changed the screen resolution recently?
    Anyway, resetting the photoshop preferences will probably gets things working again:
    http://forums.adobe.com/thread/375776?tstart=0

  • Hello! I have a printer,Canon MP250 and I bought a new MacBookPro with Maverick and I cannot work this printer

    Hello! I have a printer,Canon MP250 and I bought a new MacBookPro with Maverick and I cannot work this printer with the driver that came with the printer and I've tried to find an update but with no success, can you help me?
    Thanks!!

    you can try resetting the network settings in settings or you can try doing a reset - hold down the home/power button together until you see the apple logo and then release.  Then wait for the phone to boot back up.  You won't lose any data.

  • Sql Query need to extract the Work Flow information from Hyperion Planning

    Can Any one give me the sql query to extract the Work flow from Hyperion Planning in 11.1.2.1.
    I can extract from the Hyperion Planning but it is not in required format again I need to do lot of formating. I need the information as per the flow structure is showing linke in one perticular planning unit in all coloumn format. Hence only sql query will help me to extract this kind of information. could any one provide the sql query to extract this kind of request.
    Thanks in Advance.
    Edited by: 987185 on Feb 9, 2013 10:57 PM

    If you have a look at the data models in - http://www.oracle.com/technetwork/middleware/bi-foundation/epm-data-models-11121-354684.zip
    There is the structure of the planning application tables, have a look at the HSP_PM_* tables
    Alternatively you can look at extracting the information using LCM.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Pl/Sql web service and collections not working

    Hello
    I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
    WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
    but I don't think this is the source of the problem.
    When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
    In the DOS window for the OC4J I get the following error :
    2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
    Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
    ng target: pxWsLang.WsLangUser.
    The PL/SQL code is as follows :
    Object:
    CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
    NR NUMBER(3),
    SYMBOL VARCHAR2(2)
    Collection:
    CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
    Package body :
    create or replace package body PAM_TEST is
    function CursorTest return Pam_LanguageTable is
    Res_LangTable PAM_LanguageTable;
    cursor cur is select * from stc_languages;
    begin
    Res_LangTable := new PAM_LanguageTable();
    for Rec in cur loop
    Res_LangTable.Extend(1);
    Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
    (Rec.NR,
    Rec.SYMBOL
    end loop;
    Return Res_LangTable;
    end;
    end;
    I'm using JDeveloper version 10.1.3.1.0.3984
    How can I get this to work ? (without using Apache Axis or other tools :-)
    Is it supposed to work ?
    Many Thanks
    Paul

    Hi,
    for the "error creating target" problem I found the solution here:
    [WS from a PL/SQL package]: Error creating target
    Hope this helps.
    Regards,
    Patrik

  • I recently upgraded to 4.o, then reinstalled 3.6.17 (then upgraded to 3.6.18) & have since encountered many problems. Facebook doesn't function properly, and I cannot watch video on the NYT website. Please help!

    I cannot make any comments on Facebook & I cannot view video on the NY Times website. On some other websites I cannot scroll through slideshows. This seems to be strictly a Firefox issue: none of these problems occur on Safari or Chrome.
    I'm on a Mac OS 10.6.8. Everything worked before this change. To rectify, per instruction, I have cleared history, cookies & cache; updated Adobe flash; started in Safe Mode & tested all extensions; upgraded and tested all plug-ins and add-ons; created and tested new profile. I do NOT want to upgrade to 4.0 or 5.o. I've spent weeks trying to repair this to no avail; (it shouldn't be this hard. I've been a Firefox user since its inception, but Chrome is looking like my only alternative.) Can anyone please help?

    In my case it seems that Firefox just doesn't "see" (or can't find?) the coupon printer application anymore after the FF update. (and yes, my add-ons are enabled - to answer the tech support people's first question).
    For me, the coupon printer doesn't even show up in my Firefox "Add-Ons" list anymore. Is that what people typically see when they're saying the coupon printer "doesn't work" with FF? The coupon printer was visible on the add-ons list before my FF update, and now it's totally Gone! It seems that Firefox just doesn't "see" (or can't find?) the coupon printer application anymore since the FF update.
    When I'm on the coupons.com site and I click "print coupons", it tells me I haven't installed the application. But it Is installed on my computer, I can see it in my folders, and it works on IE, so it's definitely there.
    BTW - I have uninstalled/reinstalled the coupon printer application. I have tried all the suggestions on the Mozilla help/forum sites, as well as the Coupons.com web site. I have closed and re-started Firefox after the installation. I have also shut down and restarted my pc after installation. I tried installing the application with Firefox open, and tried it again with Firefox closed. I've even cleared out all my cookies/history associated with Coupons.com.
    ... I can't think of anything else to try, except for the "solution" of using IE for coupons.
    If it Really is a problem on the Coupon.com end of things, do you think it's worth it if we bombard the coupons.com support team with messages saying they need to fix the problem? (or just a waste of time?) ;(

  • Exchange 2010 calendar(free and busy) cannot work

    Hi All
    We have a new setup exchange 2010 server. 
    Everything(Webmail, outlook, autodiscover, out_of_office) is working fine.
    When the user check other user calendar,  it is not work(no matter in Outlook 2010 or OWA), is there any idea?
    Thanks

    Hi there
    All the user is located in the same site.
    The most weird problem is the user using the OWA for checking their own free and busy, it is show no information.
    I have tried o use remote connectivity analyzer and the test-outlookwebservice
    RunspaceId : b08124f2-b525-4e34-93f0-ca3c6c7134a9
    Id         : 1011
    Type       : Error
    Message    : When querying Availability for the recipient e-mail address abc@xxx, the following error code and 
                 message were received: ErrorServiceDiscoveryFailed:Unable to find a Client Access server that can serve a 
                 request for an intraforest mailbox <abc>SMTP:abc@xxx.
    RunspaceId : b08124f2-b525-4e34-93f0-ca3c6c7134a9
    Id         : 1025
    Type       : Error
    Message    : [EXCH] Error contacting the AS service at https://xxx/EWS/Exchange.asmx. Elapsed time was
                  12 milliseconds.
    RunspaceId : b08124f2-b525-4e34-93f0-ca3c6c7134a9
    Id         : 1013
    Type       : Error
    Message    : When contacting https://xxx/EWS/Exchange.asmx received the error The request failed with a
                 n empty response.
    RunspaceId : b08124f2-b525-4e34-93f0-ca3c6c7134a9
    Id         : 1025
    Type       : Error
    Message    : [EXPR] Error contacting the AS service at https://xxx/EWS/Exchange.asmx. Elapsed time was 
                 249 milliseconds.
    But those ews path can be reach when using the browser
    Thanks

  • MAC OS 10.3.9 - Application and Safari cannot work after the latest updates

    Hi
    Really need help!
    Last Sat, did a software updates for my Mac Powerbk G4, MAC OS 10.3.9 and after the updates, I cannot access my application folder, document folder as well as the Safari browser.
    The moment I click on it, it refresh the desktop by itself without enter into the intended folder.
    I am not sure if any of you encounter this, I need advice and solution real quick.
    Can anyone help?
    Kirk

    Try deleting the /Home/Library/Preferences/com.apple.finder.plist file, then restart the computer.

  • Drag and Relate cannot work

    When I open BP Master Data and try to drag Customer Code to Sales Order the following message appears : No Matching Record found "(SDRO) (ODBC -2028) [Message 131-183].
    Actually these record should be exist.
    Currenty use SAP 2005 A SP01 PL46.

    Please make sure to choose collation setting of: SQL_Latin1_General_CP1_CI_AS when installing MSSQL 2005 Server.
    In order to check what the collation is set to in your server, please
    run the following query:
    Collation of your Server:
    select SERVERPROPERTY ('collation')
    Expected answer : SQL_Latin1_General_CP1_CI_AS
    Change the Collation Setting on the MSSQL Master Database only whenthe MSSQL Server is effectedby Note 987436
    In case you have already installed the MSSQL 2005 server with anycollation other than SQL_Latin1_General_CP1_CI_AS please follow thesteps below:
    1.Run the following query on the master database to check what collation you are using .
    select SERVERPROPERTY ('collation')
    2.It should be
    SQL_Latin1_General_CP1_CI_AS(if you get the above then the collation is correct , otherwise please proceed as follows)
    3.Backup SBO-Common & Company DB's and de-attach them from the SQL server.
    4.Insert the SQL 2005 CD in the drive.
    5.Go to start run and type in the following path.
    Start/Run C:\Temp_install\SQL2005\SQLEVAL\Servers\setup.exe /qb
    INSTANCENAME=MSSQLSERVERREINSTALL=SQL_Engine
    REBUILDDATABASE=1 SAPWD=*****
    SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS
    6. Run 1st query from to double check that you have the correct collation.
    7. Attach the SBO-Common.
    8. Attach Company DB
    C:\Temp_install\SQL2005\SQLEVAL = this represents the path to the SQL Server installation files, so please change to your appropriate path!
    INSTANCENAME=MSSQLSERVER = This is the default instance,if you have another instance please change it here!
    SAPWD=***** = Change to your SA passwordhere!
    Hope this information clarifies your query on how to change collation settings.

  • My mac has de- activated adobe flash and I cannot work out how to re-activate flash ?

    I'm using firefox 18.01 and OSX 10.6.8.
    I just got this window come up saying adobe have de-activated flash for my safety?
    How can I re activate it ?
    Thanks

    Please update to Flash 11.5, you are using Flash 10.2 which is horribly insecure and out of date. http://get.adobe.com/flashplayer/download/?installer=Flash_Player_11_for_Mac_OS_X_10.6_-_10.8&os=OSX&browser_type=Gecko&browser_dist=Firefox

  • Remote functions stick and do not work, then work and TV goes crazy doing catch up.

    We have put new batteries in remote.  Reset box.  Or is this normal.....drives us crazy - send help. 

    This sounds like you may have signal issues. If you can't eliminate any excess splitters, you may need to have a tech out. Also make sure all connections are tight.

  • Bg_absence_duration sql function not working in Self Services

    I Have SQl Function registered and used in formula BG_ABSENCE_DURATION, it is working fine in the professional forms, but in "Leave management" form in self services it gives error:
    PER_EMP_NUMBER not found at line 231 of bg_absence_duration Cause: a sql select statement obtained from application dictionary return no rows when executed.
    Edited by: Elrefai on May 29, 2013 10:11 PM

    Hi Jay,
    were you finally able to access DFF in BG_ABSENCE_DURATION , did the following piece of code worked ?
    IF ABS_INFORMATION_CATEGORY = 'CA'
    THEN
    (If ABS_INFORMATION3 = 'Half Day'
    THEN
    ( IF date_start = date_end THEN
    (deduct_days = 0.5
    days_between = days_between - deduct_days
    duration = to_char(days_between) return duration, invalid_msg
    ELSE
    ( duration = 'FAILED'
    invalid_msg = 'Half day leave can be applied only for a day'
    return duration, invalid_msg

  • I transferred pictures over from my computer to my iPhone 5 and now i cannot delete them on the phone and cannot work out how to delete them from my phone by the computer?

    I trasferred pictures over from my computer to my iPhone 5 and now i cannot delete these pictures from my phone, and i cannot work out how to delete them from my phone by the computer as the pictures do not show up in my files on the computer, how can i remove them i have over 400 pictures that need removing?

    If you have a Mac with iPhoto, plug the iPhone in and open iPhoto. Choose to import the photos. Once they have been imported, there should be an option to "Remove Imported Photos from Device". Choose this.

  • OneNote Windows 8.1 App Changed to Chinese and Cannot Work Out How to Change to English

    Hello
    Since upgrading my Surface Tablet from Windows 8 to 8.1 the OneNote app has changed to Chinese and I cannot work out how to change it back.
    Everything else appears to be in English including the desktop version of OneNote 2013 and only the OneNote app appears to be affected.
    The tablet is set to English UK in the regional settings and I have already tired removing and reinstalling the app but it is still in Chinese.
    I have just upgraded to the Surface 2 and after signing in with my Microsoft account, the OneNote app is in Chinese on here as well.
    I have tried all the settings but it is a bit difficult as I can't understand what they say.
    Any help would be appreciated.
    Thanks
    Robin
    Robin Wilson

    Hello Tony
    I purchased both the Surface 1 from John Lewis (department store) and the Surface 2 from PC World.
    The surface 1 was fine until installing Windows 8.1 preview and this is when it changed to Chinese.
    The regional settings are set correctly to UK so I am unsure how to get it back to something I can understand.
    The app is in Chinese on my Windows 8.1 PCs as well at home and at work but all are set to UK. It seems to change as soon as I sign in with my Microsoft account so I don't think the issue is a surface RT issue although it may have originated from there.
    I have tried the option to uninstall it from all synced PCs and then install it again but it just installs in Chinese again.
    OneNote 2013 doesn't seem to have this problem and it is only the MX/App version.
    Thanks
    Robin
    Robin Wilson

  • Passing Multiple Values from a worksheet to PL/SQL function.

    Hi All,
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    I will try to explain the scenario:
    We have a crosstab report that showing all the customer details, deposit sum of a customer in each date in a date range selected. With the customer details we are showing the Rank of a customer based on the deposit in the latest date selected. Filtering is based on the rank, ie Top50 or Top60 etc.( As I said rank is calculating based on the deposit in the latest date).This is working fine.
    Now the new requirement is to : For example, in Top50 report, list all the customers, who were in the Top50 list, in any of the dates selected. We are able to display the daywise rank, but when giving a condition like daywiserank <= 50, the result becomes uncertain. Some blank lines, wrong amounts etc..
    As a work around we tried to find out the rank in a PL/SQL function. But the issue there is : we have some multiple value parameters used in the worksheet.
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    Or any other work arounds for the scenario explained?
    Reagrds,
    Jeneesh

    Hi Russ,
    Thanks for the response.
    Russ Proudman wrote:
    1. I thought there was an analytical function similar to rank - or maybe an option of rank - that if there are duplicate records to have them all considered the same rank. So if you had 3 records all the same as rank=2 then a condition saying where rank=2 would return the 3 records. You could check into this.
    We are already using DENSE_RANK. But the issue is the output contains incorrect null values nd repeated rows.
    We got it solved as I explained in the previous post. But will that AGGREGATION MODE setting ( Which discoverer says - not recommended) have any issue? I mean side effects?
    Russ Proudman wrote:
    2. Another thought is that you can create a PL/SQL routine - that's called from a SQL function registered in Discoverer - where a table is created that does the first part of your query. Then a worksheet is created to use the data from that table. So, in essence, the table would have your top50 ranked customers. Then you can write any kind of worksheet against that table. However, DBAs are loath to allow tables - that they didn't create! - many times in a PROD environment.
    Here also the same problem will occur: as the top 50 will depend upon the parameters. I cannot pass those parameters to PL/SQL Function.And storing the top50 ( itmay be top100 or to 150 also) for all combinations of the parameters is impossible
    Russ Proudman wrote:
    3. Finally, are you sure you're rank function is correct in that if you're getting blank lines, maybe the 'over' part is not considering all columns needed to determine the rank?
    Yes the query we are using is correct. The output QUERY of discoverer gives correct results in Sqlplus.
    Regards,
    Jeneesh

Maybe you are looking for

  • Gmail won't open in Firefox (and I've already reset it and deleted prefs.js)

    Gmail won't open in Firefox. I get this error: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. Steps I've taken: 1) Reset Firefox preferences 2) D

  • Screen dims and multi-language "restart" message appears

    Currently, every time Safari is used, the entire screen dims and a multi-language (German, Chinese, etc.) message comes on the screen saying that I must physically power down my machine and restart. No error message is given, nor are any other option

  • Browser closing when opening PDF output in Apps

    Hello, When opening the concurrent request/report output (for PDF output), the browser just closes. The PDF output were generated thru XML Publisher (reports converted in XML Publisher - rtf). PDF is defined in the Viewer Options/ System Options(View

  • Debug of package results in ORA-30683

    I'm having a problem trying to debug any package with SQL Developer. Environment : Windows SQLDeveloper 1.1 to Unix database with SID "eai" It's returning the following error messages :- Connecting to the database eai. Executing PL/SQL: ALTER SESSION

  • Declaring Distributed, Replicated and Optimistic caches.

    Is looks like the methods to declare specific types of caches in Java are now deprecated. Link: [http://download.oracle.com/otn_hosted_doc/coherence/342/com/tangosol/net/CacheFactory.html#getCache(java.lang.String,%20java.lang.ClassLoader)] Can you s