ORA-01858 error in Application but not in sqlpluss

Hi.
I have this query that runs nicely in sqlpluss and the SQL Commands that came with Expressedition 10g, but when I put it in a report region it produce:
report error:
ORA-01858: a non-numeric character was found where a numeric was expected
query:
SELECT temae.temae, NVL(antall,0) Antall
FROM temae LEFT OUTER JOIN (SELECT temae, count(temae) as antall
FROM okeiko
WHERE person = :P3_PERSON and dag >= to_date(DECODE(SIGN(to_char(current_date,'mm')-5),
-1, to_date('01-NOV-'||to_char(current_date,'yy'))-365,
0, to_date('01-MAY-'||to_char(current_date,'yy')),
1, DECODE(SIGN(to_char(current_date,'mm')-10),
-1,to_date('01-MAY-'||to_char(current_date,'yy')),
0,to_date('01-MAY-'||to_char(current_date,'yy')),
1,to_date('01-NOV-'||to_char(current_date,'yy')))),'dd-mon-yy')
GROUP BY temae) p
ON temae.id = p.temae
where antall > 0
ORDER BY NVL(antall,0) DESC, temae.type, temae.temae
Before I added the decode part for the date it looked like this, and worked nice in the application:
SELECT temae.temae, NVL(antall,0) Antall
FROM temae LEFT OUTER JOIN (SELECT temae, count(temae) as antall
FROM okeiko
WHERE person = :P3_PERSON and dag > to_date('30-apr-06','dd-mon-yy')
GROUP BY temae) p
ON temae.id = p.temae
where antall > 0
ORDER BY NVL(antall,0) DESC, temae.type, temae.temae
This is the data structure
SQL> describe temae
Name Null? Type
ID NOT NULL NUMBER
TEMAE VARCHAR2(20)
TYPE NUMBER
Then it worked nicely in the application to.
SQL> describe okeiko;
Name Null? Type
ID NOT NULL NUMBER
PERSON NOT NULL NUMBER
TEMAE NOT NULL NUMBER
SENSEI NUMBER
REMARK VARCHAR2(4000)
DAG NOT NULL DATE
Can anyone se why application is complaining?
BTW report region also complains to_date('01-may-06','dd-mon-yy') does not have a valid month.

Marius,
I am not sure but try this:
SELECT   temae.temae, NVL (antall, 0) antall
    FROM temae LEFT OUTER JOIN (SELECT   temae, COUNT (temae) AS antall
                                    FROM okeiko
                                   WHERE person = :p3_person
                                     AND dag >=
                                            TO_DATE
                                               (DECODE
                                                   (SIGN
                                                       (  TO_CHAR
                                                                (CURRENT_DATE,
                                                                 'mm'
                                                        - 5
                                                    -1, TO_DATE
                                                          (   '01-NOV-'
                                                           || TO_CHAR
                                                                 (CURRENT_DATE,
                                                                  'yy'
                                                     - 365,
                                                    0, TO_DATE
                                                       (   '01-MAY-'
                                                        || TO_CHAR
                                                                (CURRENT_DATE,
                                                                 'yy'
                                                    1, DECODE
                                                       (SIGN
                                                           (  TO_CHAR
                                                                 (CURRENT_DATE,
                                                                  'mm'
                                                            - 10
                                                        -1, TO_DATE
                                                           (   '01-MAY-'
                                                            || TO_CHAR
                                                                  (CURRENT_DATE,
                                                                   'yy'
                                                        0, TO_DATE
                                                           (   '01-MAY-'
                                                            || TO_CHAR
                                                                  (CURRENT_DATE,
                                                                   'yy'
                                                        1, TO_DATE
                                                           (   '01-NOV-'
                                                            || TO_CHAR
                                                                  (CURRENT_DATE,
                                                                   'yy'
                                GROUP BY temae) p ON temae.ID = p.temae
   WHERE antall > 0
ORDER BY NVL (antall, 0) DESC, temae.TYPE, temae.temaeI took out the formating of your to_date function.
Denes Kubicek

Similar Messages

  • Trying to install itunes on win 8.1.  keep getting error apple application support not found.  asks me to uninstall and install itunes.  i tried several times and keep getting same error.

    trying to install itunes on win 8.1.  keep getting error apple application support not found.  asks me to uninstall and install itunes.  i tried several times and keep getting same error.

    With the Error 2, let's try a standalone Apple Application Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of the issue.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR suitable for your PC (there's a 32-bit Windows version and a 64-bit Windows version):
    http://www.rarlab.com/download.htm
    Right-click the iTunesSetup.exe (or iTunes64Setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleApplicationSupport.msi to do a standalone AAS install.
    Does it install properly for you? If so, see if iTunes will launch without the error now.
    If instead you get an error message during the install, let us know what it says. (Precise text, please.)

  • Did download OS X Mountain Lion and see the features in my applications, but not reflecting in my APPS purchases.

    did download OS X Mountain Lion and see the features in my applications, but not reflecting in my APPS purchases.
    also this takes huge amount of time, almost 10 hours to download, even using 3G Net connection.

    Hi kiwirudy,
    I've had the same problem more than once since I started trying to download my 14 April purchase of OS X Mountain Lion.
    I found a property list called manifest.plist in my ~/Library/Application Support/AppStore folder which had a Boolean property called failed checked. I unchecked it and afterwards I was able to resume my download.
    Here are some steps I've found useful:
    Close the Mac App Store.
    make a copy of the  ~/Library/Application Support/AppStore folder. For some strange reason the Mac App Store likes to just delete it in some circumstances, which will mean that one has to start one's download again from the very beginning.
    Double click on the manifest.plist in one's ~/Library/Application Support/AppStore folder.
    This should open it in Property List Editor.
    Expand all the nodes (holding down the alt key and clicking on the highest collapsed node should do it.
    Find a key called failed of type Boolean and uncheck it.
    Save the manifest.plist and close it.
    Open the Mac App Store.
    The red message "an error has occured" should now be gone and one should be able to resume one's download.
    In the event that the ~/Library/Application Support/AppStore folder gets deleted:
    start the download again (it will start from the beginning), pause it and close the Mac App Store.
    copy your backup copy of the pkg file back to its sub-folder (it's a numbered folder in the ~/Library/Application Support/AppStore folder).
    Open the Mac App Store and resume your download.
    It should continue from where it left off.
    This has worked for me so far. I'm holding my breath. Don't know if I'll still be alive when it's finished.
    Regards
    Nic
    Message was edited by: n c h

  • Why would code work for an application but not an applet?

    Hey there,
    i'm trying to build a java ftp upload applet. I'm using the enterprisedt ftp class.
    The code works fine when i run it as an application but not when i put it in the applet. The applet has been signed and is running off a plug in. I get no error messages, just nothing happens.
    Would really appreciate some comments.
    regards
    hagen
    the code
    FTPClient ftp = new FTPClient("****");
    ftp.login("user1", "***");
    ftp.put("C:/INSTALL.log","test.log");

    hi
    im a manuel, from argentina
    i would appreciate too much if you can give me that piece of code
    i need for a site, an applet that could read files the visitor chosse from his pc and then upload that files to a server
    is it possible?? you could help me ?
    i think i need to sing my applet alright? how i do this? how it cost??
    if anyone can give my a bit of code, to star�t programming, ill be very happy!
    thanks!
    mi mail: [email protected]

  • TS5376 HI, I installed Itunes on my computer. When i wanted to open the application, it gives error "Apple Application Support not found" "Error 2 (Windows error 2)"

    HI, I installed Itunes on my computer. When i wanted to open the application, it gives error "Apple Application Support not found" "Error 2 (Windows error 2)"

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    The section Install missing components has advice on breaking down the iTunes installer into the individual .msi files which might prove useful if a component such as Apple Application Support won't install normally.
    tt2

  • On imac 10.6.8 using current version of Aperture.  How can I access the Aperture Library  on my external hard drive that I use with time machine for backup?  I can only access the application but not the library..

    On imac 10.6.8 using current version of Aperture.  How can I access the Aperture Library  on my external hard drive that I use with time machine for backup?  I can only access the application but not the library..

    Go into Time Machine (the program not the bundle on the extrnal disk) and using Time Machine's browser go to the Folder where the library lives. You could look in the library bundle in Time Machine but that won't really tell you much,
    If you want to make sure it truely has backed up your library you will need to restore it and open the restored library with Aperture.
    If all this still has you confused you need to read up on Time Machine in order to get a feel for how it works, for what it is doing and for how to restore files from it.

  • SpryHiddenRegion error in IE7 but not FireFox

    Here is a copy of the code and the errors I get. Does anyone
    have any ideas why this would happen in IE only?
    <div spry:region='dsPages' class="SpryHiddenRegion"
    style="height:350px; overflow:auto;">
    <div spry:state='loading'>Loading data...</div>
    <div spry:state='error'>Failed to load
    data.</div>
    <table spry:state='ready' class="mylist">
    <tr id="top">
    <th onClick="dsPages.sort('id');">ID</th>
    <th onClick="dsPages.sort('name');">NAME</th>
    </tr>
    <tbody spry:repeatchildren='dsPages'
    spry:choose="choose">
    <tr spry:when="{id} == selectedID"
    class="SelectedLastClass" id="{ds_RowID}"
    onClick="dsPages.setCurrentRow('{ds_RowID}');pagesSelect({id});"
    spry:hover='HoverClass' spry:select='SelectedClass'>
    <td>{id}  </td>
    <td>{name}  </td>
    </tr>
    <tr spry:default="default" id="{ds_RowID}"
    onClick="dsPages.setCurrentRow('{ds_RowID}');pagesSelect({id});"
    spry:hover='HoverClass' spry:select='SelectedClass'>
    <td>{id}  </td>
    <td>{name}  </td>
    </tr>
    </tbody>
    </table>
    </div>
    ERROR:
    expected ':'
    and
    Spry.Data.updateRegion(spryregion1) caught an exception:
    [object Error]
    Thanks for your help.
    Jim

    i have reduced the code to the following:
    <script type="text/javascript">
    dsPages = new
    Spry.Data.XMLDataSet('views/pages/getdata_pages.cfm',
    '/dataset/row', {useCache: false});
    </script>
    <div spry:region='dsPages' class="SpryHiddenRegion"
    style="height:350px; overflow:auto;">
    <div spry:state='loading'>Loading data...</div>
    <div spry:state='error'>Failed to load
    data.</div>
    <table spry:state='ready' class="mylist">
    </table>
    </div>
    and i get the following error in IE but not FireFox:
    Spry.Data.updateRegion(spryregion1) caught an exception:
    [object Error]

  • ORA-01858 error from Apex Report on working/valid underlying query

    After two days of searching these forums and AskTom, I think I need to post the following problem.
    I have what seems to be a valid view of some data created as follows (with an apology for the formatting - doesn't seem to be a way of using a fixed font here):
    CREATE OR REPLACE FORCE VIEW "PRICING_CAPABILITY"."POW_EXEC_SUMM010" ("Item",
    "Jul-09", "Aug-09", "Sep-09", "Oct-09", "Nov-09", "Dec-09", "Jan-10",
    "Feb-10", "Mar-10", "Apr-10", "May-10", "Jun-10", "YTD")
    AS
    SELECT
    "Item",
    SUM(DECODE("ItemMonth",'Jul-09',"ItemValue",0)) "Jul-09",
    SUM(DECODE("ItemMonth",'Aug-09',"ItemValue",0)) "Aug-09",
    SUM(DECODE("ItemMonth",'Sep-09',"ItemValue",0)) "Sep-09",
    SUM(DECODE("ItemMonth",'Oct-09',"ItemValue",0)) "Oct-09",
    SUM(DECODE("ItemMonth",'Nov-09',"ItemValue",0)) "Nov-09",
    SUM(DECODE("ItemMonth",'Dec-09',"ItemValue",0)) "Dec-09",
    SUM(DECODE("ItemMonth",'Jan-10',"ItemValue",0)) "Jan-10",
    SUM(DECODE("ItemMonth",'Feb-10',"ItemValue",0)) "Feb-10",
    SUM(DECODE("ItemMonth",'Mar-10',"ItemValue",0)) "Mar-10",
    SUM(DECODE("ItemMonth",'Apr-10',"ItemValue",0)) "Apr-10",
    SUM(DECODE("ItemMonth",'May-10',"ItemValue",0)) "May-10",
    SUM(DECODE("ItemMonth",'Jun-10',"ItemValue",0)) "Jun-10",
    SUM("ItemValue") AS "YTD"
    FROM
    SELECT
    'New Proposals Received' AS "Item",
    TO_CHAR(t1.scope_received,'Mon-RR') AS "ItemMonth",
    COUNT(*) AS "ItemValue",
    10 AS "SortOrder"
    FROM
    PRICING_CAPABILITY.POW_DATA t1
    WHERE
    t1.scope_received IS NOT NULL
    AND extract(YEAR FROM t1.scope_received) IN (2009,2010)
    AND t1.scope_received >= '01-JUL-2009'
    GROUP BY
    'New Proposals Received',
    TO_CHAR(t1.scope_received,'Mon-RR'),
    10
    UNION
    SELECT
    'New Proposals Completed' AS "Item",
    TO_CHAR(t2.pricing_approval,'Mon-RR') AS "ItemMonth",
    COUNT(*) AS "ItemValue",
    20 AS "SortOrder"
    FROM
    PRICING_CAPABILITY.POW_DATA t1
    JOIN PRICING_CAPABILITY.POW_LAST_HISTORY t2
    ON
    t1.POW_DATA_ID = t2.POW_DATA_ID
    WHERE
    t2.pricing_approval IS NOT NULL
    AND extract(YEAR FROM t2.pricing_approval) IN (2009,2010)
    AND t2.pricing_approval >= '01-JUL-2009'
    GROUP BY
    'New Proposals Completed',
    TO_CHAR(t2.pricing_approval,'Mon-RR')
    GROUP BY
    "Item",
    "SortOrder"
    ORDER BY
    "SortOrder" ;
    This view works, ie produces the right results when run (ie select * from ...) in SQL Developer and in the SQL Workshop section of Apex.
    But when I attempt to produce an Apex report using it as the source of data, I get the following error:
    ORA-01858: a non-numeric character was found where a numeric was expected
    The error is displayed before any part of the report itself is displayed, ie the Region Header is displayed and then the error message.
    So far, anything I've been able to find on the forums or AskTom suggests that it is probably due to a date conversion problem. But the aim here is to summarise dated records by month, so I'm extracted the year and month elements of the date values, converting them to strings (using TO_CHAR), and then using the resulting 'Mon-YY' strings to group the results.
    If there is a better way, I'm interested.
    But I don't understand why Apex seems to be rejecting what appear to be valid results from a valid working query.
    Any ideas? Suggestions?
    Cheers,
    Peter

    Thanks again, Flavio. I'm learning and I appreciate your patience.
    The solution you provided is very similar to the one I came up with after your previous message, but I didn't have the NLS_DATE_LANGUAGE parameter. I'll go back and try it.
    I appreciate your explanation re Apex not needing to know and Oracle assuming that the client knows what it is doing, but it puzzles me more.
    The way that I originally had things, I think, was consistent with what you have explained, but it didn't work. To make it clear:
    1 I had an Oracle view that had no parameters and contained the date literal in the where clause and worked fine in both SQL Developer and in the Apex SQL Workshop.
    2 The view did not return any date values. Aside from the column headings and the first column (of character strings), the body of the table comprised integer values only.
    3 So, when Apex called the view, I would have expected the Oracle server to independently execute the view and return the (dateless) results to Apex, which would then present the unmodified results in a standard report. This is, I think, what SQL Developer and the Apex SQL Workshop appear to have successfully done.
    My expectation seems to be consistent with at least some of your explanation (ie [Oracle assumes] "+that the client knows what it is doing+" and "+apex doesn't need to know anything about the underlying query+"), but is not consistent with actual experience, where Apex seems to know that the underlying query contains a date literal and unsuccessfully (and unnecessarily) attempts to interpret it.
    I'm obviously missing something about how Apex and Oracle interact in this situation. While I don't need to know - as I have a working solution now - it is valuable to understand how things work. Makes life easier and more productive.
    Cheers,
    Peter

  • The following is working as a Java application but not as a DynPro App

    Hello,
    Please have a look at the following code:
    URL testURL = new URL("http://<host>/error.txt");
    HttpURLConnection c = (HttpURLConnection)(testURL.openConnection());
    c.setDoInput(true);
    c.setDoOutput(true);
    c.setRequestProperty("Connection","Keep-Alive");
    c.setRequestProperty("Proxy-Connection","Keep-Alive");
    c.setRequestMethod("GET");
    c.setUseCaches(false);
    c.connect();
    int cl = c.getContentLength();
    DataInputStream dis = new DataInputStream(c.getInputStream());
    This code is working well when I run it as an independent Java application but when I "plant" this code on a DynPro application I receive an I/O Exception at this line:
    DataInputStream dis = new DataInputStream(c.getInputStream());
    Can anyone please tell me why?

    503 error means a bit different thing. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    <i><b>10.5.4 503 Service Unavailable</b>
    The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
          Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.
    </i>
    Can you track requests from both stand-alone Java and WD application via some HTTP tunneling tool to check differences in headers, encoding, etc?
    VS

  • IPAD restores applications but not data or files associated with applications

    1) Today Itunes prompted me to update the OS on the IPAD.
    2) It warned me to back up IPAD before I did.  I did
    3) I updated software.
    4) It returned with an error saying it could not install software and I must restore to facotry settings
    5) I resotored to factory settings
    6) After that I attempted to restore contents of my IPAD from Itunes on my Windows 7 machine. 
    7) It restored only music but no applications and no other information
    8) I spent all day on the phone with Apple Support who managed to get the applications restored by going through one by one and syncing.
    9) It took a few hours
    10) After I finished I noticed that files/documents associated with various applications like Kindle, Goodreader, Penultimate Notes were missing on the IPAD.
    11) I have made a few phone calls to Apple and thy claim the following: "Apple is not responsible for restoring files or data associated with any applications, only the application itself.  It is your responsibility to contact the application developer to get your files restored."  This sounds patently absurd to me. I spent half an hour explaining the absurdity of this claim to the Apple representatives but they are firm and non-wavering in this opinion.  One even claimed that restoring does not restore applications which of course is not correct.
    12) I gave them the example of MS Word on MacBook Pro. If I save/back up on another machine and then restore back to the original machine I would expect to be able to see the Word files I had created and saved.  That in particular the failure to view them would not be Microsoft's responsibility but Apple's.  They disagreed saying it would be between me and Microsoft and the Apple devices had nothign to do with saving or successful restoring.
    13) So I have lost all e-books purchased on Kindle, plus all documents saved on Goodreader application, notebooks on Penultimate applications, and my children’s drawings on their drawing applications.  Apple Support say I should contact each application vendor to try and recover the missing data.  They refuse to tell me how to get it from ITUNES backup stored on my Windows 7 machine as they say it will not be there. 
    They have asked me to write to
    Apple Customer Support,
    Holly Hill,
    Cork,
    Ireland
    quoting case number 319718819.

    Did you try restoring from a backup of the iPad? If you have a backup with all of your app data and files, that should restore all of that content to the device.
    No - restoring does not restore applications. You have to either sync the applications back from iTunes on your computer, or you can download them again, BUT ... All of your data, files and device settings are stored in your backup. Do you have a backup in iTunes .... Edit>Preferences>Devices - that should show you all of your iDevice backups.

  • ORA-29534 error for Class can not be resolved

    HI,
    I am trying to load and resolve a third party jar file which has some JMS classes. But while using the loadjava utility,
    "loadjava -u scott/tiger@dbname -r -v -genmissing weblogic.jar"
    i get "ORA-29534: referenced object <Class Name> could not be resolved" error for most of the classes.
    This Jar file has around 15000 classes definitions and it takes almost a complete day to load and resolve it. Even after taking so much of time it is unable to resolve all the classes and give a runtime exception Class can not be resolved for some class.( i have created the oracle java stored procedure successfully)
    I need a help on this very urgently...
    Thanks in advance....
    Sachin

    Sachin,
    There are many possible causes for the error you are getting, for example:
    1. The DBMS_JAVA package is corrupt.
    (Have you previously successfully loaded JARs -- or even java classes -- into the database?)
    2. A java version mismatch.
    (What Oracle database version are you using, and what java version is your JAR file compatible with?)
    You say,
    Surely they are loaded but not resolvedIs this a question, or a statement? Have you verified that the classes are loaded and not resolved? I use the following query for this:
    select DBMS_LONGNAME(OBJECT_NAME), STATUS
      from USER_OBJECTS
    where OBJECT_TYPE like 'JAVA%'The value for the STATUS column should be 'VALID'.
    I'm only guessing, but you may find more information (regarding the error you are getting) in the Oracle log files. Have you checked them?
    Have you tried searching the MetaLink Web site?
    http://metalink.oracle.com
    (Search for "ORA-29516", perhaps.)
    Good Luck,
    Avi.

  • Error in Solaris but not in Windows

    I have an application that is reading from a database, cleaning the results of all html tags, and writing to a new database. It all works fine on a Windows machine with jdk1.3. However, it throws the error I have attached to the message on the Solaris box. It has to do with the html cleaning. When I take it out, it works on both machines. Why though. Here is the code for the html cleaning and the error: 5 Dukes to whoever can help.
    Code:
          * Removes the html formatting for a string and stores it in a file
          * @return java.lang.String
          * @param htmlText java.lang.String
          * @param outputText java.lang.String
         public static String removeHtml(String htmlText) throws IOException     
              String returnValue = "";
              EditorKit kit = new HTMLEditorKit();          
              Document doc = kit.createDefaultDocument();          
              // The Document class does not yet handle charset's properly.          
              doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);          
              try          
                   // Create a reader on the HTML content.     
                   Reader rd = new StringReader(htmlText);
                   // Parse the HTML.               
                   kit.read(rd, doc, 0);               
                   //Write the cleaned text to file
                   //writeOutputFile(doc, outputFile);     
                   //Set returnValue to cleaned text
                   returnValue = doc.getText(0, doc.getLength()).toString();
              catch (Exception e)          
                   e.printStackTrace();          
              return returnValue;
         }Error:
    java.lang.NoClassDefFoundError: sun/awt/motif/MToolkit
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:142)
    at java.awt.Toolkit$2.run(Toolkit.java:533)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:524)
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1179)
    at java.awt.EventQueue.isDispatchThread(EventQueue.java:534)
    at javax.swing.text.StyleContext.reclaim(StyleContext.java(Compiled Code))
    at javax.swing.text.StyleContext.reclaim(StyleContext.java(Compiled Code))
    at javax.swing.text.AbstractDocument$AbstractElement.finalize(AbstractDocument.java(Compiled Code))
    at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
    at java.lang.ref.Finalizer.runFinalizer(Finalizer.java(Compiled Code))
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java(Compiled C

    Here is the code where I am calling the html cleaner method. This works fine in a Windows env but fails in Solaris. If I comment out the call to removeHtml(value).trim it will work. It will even work if I make a different call removeHtml("string to strip") from the main method. Why would it work in one place but not the other in Solaris, and why would it always work in Windows? Does anybody have any ideas?
               while (rs.next ()) {
                    for (int i = 1; i <= columnCount; ++i) {
                        String value = rs.getString (i);
                        if (rs.wasNull ()){
                            value = "<null>";
                        String columnName = rsmd.getColumnName(i).trim();
                        if(clean&&(columnName.equalsIgnoreCase("DESC")
                                  ||columnName.equalsIgnoreCase("HEADER")
                                  ||columnName.equalsIgnoreCase("TEXT")))
                             //Clean the text
                             //value = removeHtml(value).trim(); //remove html markup
                             value = value.replace('\n', ','); //remove new lines
                             value = value.replace('\r', ','); //remove carriage returns
                             value = replaceString(value, "&mdash", "-"); //remove dash markup
                           outputBuffer.append (value.trim());                      
                        outputBuffer.append ("||");
                    outputBuffer.append ("{{NEWLINE}}");
                }

  • Insert BLOB error in IAS but not in JDeveloper

    Hi
    Our application have a Servlet who executes an INSERT using a PrepareStatement (created by the Transaction of an ApplciationModule)
    In Jdeveloper (10.1.2) this works OK
    But when deploy it in the IAS (904) we have an error:
    java.sql.SQLException: Io exception: Connection reset
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:345)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2094)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1986)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2697)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
    at com.asorco.sgie.controller.servlets.general.Archivo.uploadFile(Archivo.java:176)
    at com.asorco.sgie.controller.servlets.general.Archivo.doPost(Archivo.java:118)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:733)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.ja
    va:192)
    at java.lang.Thread.run(Thread.java:534)
    In the IAS, Im using the jars used in JDeveloper (classes12.jar, classes12dms.jar, nls_classes12.jar).
    Any knows the reason?
    Thank you!

              The effect to use <jsp:forward> or RequestDispatcher.forward is different between
              BEA and Tomcat (even Websphere). Weblogic stores the output in a buffer, before
              the buffer reaches the limit, you can call those forward methods without obvious
              problems. Tomcat (and Websphere I ever tested) is not so tolerable. If you have
              send out something via Servlet writer or JSPWriter, or have something like HTML
              tags/text before forwards, chances are big to encounter the exceptions you have.
              So I use more include methods to assemble my JSPs and servlets, for the purpose
              of portability.
              "Aidan Monroe" <[email protected]> wrote:
              >
              >I have a .war file that runs perfectly in WebLogic 7.0. Today I tried
              >to run that
              >same .war in Tomcat 4.0.6. Unfortunately, it did not run. I get the following
              >error:
              >
              >java.lang.IllegalStateException: Cannot forward after response has been
              >committed
              >
              >Now, I know what this error means, but I don't know why I would get it
              >when I
              >run in Tomcat but not WebLogic. Does WebLogic do something to "insulate"
              >me from
              >this error that perhaps Tomcat does not do?
              >
              >Aidan
              >
              

  • Lession 3 oca sql fundamental doubts on ora -01858 error

    SELECT last_name, hire_date
       FROM   employees
       WHERE  hire_date = TO_DATE('May 24, 1999', 'fxMonth DD, YYYY');
       books mention it will leave a error (ora-01858 which is an non-numeric error )but the statement running perfectly while
    by deleting that "fx"-prefix gives an error called ora-01861.
    i am confused here??can anyone show me the right way?

    Hi,
    The outcome depends on your NLS settings. Probably yours are set to something different than AMERICAN. In you language the month of May may then have a different number of characters(?)
    That's why you hit the ORA-01861 with the FX Format Model, and something else without. (Can't see why you should get ORA-01858, though)
    Regards
    Peter

  • Handling ORA-01858 error

    hi every body,
    How can i handle exception ora-01858 without
    using when others then null;
    I want something
    like
    when user_definded =ora-01858 then null;
    when others then
    v_ErrorNumber := SQLCODE;
    v_ErrorText := SUBSTR(SQLERRM, 1, 2000);

    in fact ,
    I use a procadure that insert values into a table.
    I want that when it reaches an ORA-01858 , then the error is ignored and continue
    to insert others values,
    but now , when I reach error it stops, how to deal with it ?
    CREATE OR REPLACE PROCEDURE INSERT_SWAP_FIXINGS (l_num number)
    as
    v_date varchar2(20);
    v_swap varchar2(1000);
    conn utl_tcp.connection;
    p pls_integer;
    line varchar2(4000);
    v_ErrorNumber NUMBER; -- Variable to hold the error number
    v_ErrorText VARCHAR2(200); -- Variable to hold the error message text
    e_Non_Numeric EXCEPTION;
    PRAGMA EXCEPTION_INIT(e_Non_Numeric , -1858);
    begin
    select trunc(sysdate) -l_num into v_date from dual;
    select regexp_replace (stringAgg(ticker),',','|') ||';' into v_swap from SWAP_DESC ;
    conn := utl_tcp.open_connection(remote_host=>'MY_H0ST',remote_port=>123156);
    p := utl_tcp.write_line(conn, v_swap);
    p := utl_tcp.write_line(conn, 'PX_Last;');
    p := utl_tcp.write_line(conn, v_date );
    p := utl_tcp.write_line(conn,';');
    p := utl_tcp.write_line(conn, v_date);
    p := utl_tcp.write_line(conn, '>');
    begin
    loop
    line := utl_tcp.get_line(conn, TRUE);
    if get_token(line,2) like '%N/A%' then
    dbms_output.put_line(get_token(line,1)||','||get_token(line,2));
    dbms_output.put_line(line);
    insert into TMP_SWAP_FIXINGS
    values (get_token(line,1),to_date(get_token(line,2),'DD/MM/YYYY'));
    else
    insert into swap_fixings values (get_token(line,1),to_date(get_token(line,2),'DD/MM/YYYY'),get_token(line,3));
    end if;
    end loop;
    EXCEPTION
    WHEN utl_tcp.end_of_input THEN
    NULL;
    end;
    utl_tcp.close_connection(conn);
    commit;
    declare
    ligne varchar2(2000);
    corps varchar2(7000);
    begin
    ligne :=' DATA SWAP INSERTION : '
    || UTL_TCP.crlf || UTL_TCP.crlf
    || RPAD ('TICKER',30,' ')
    || RPAD ('INFO_DATE',40,' ')
    || RPAD ('LAST_PRICE',10,' ');
    corps := ligne || UTL_TCP.crlf;
    for x in (select ticker,to_char(info_date,'DD/MM/YYYY') "INFO_DATE",LAST_PRICE from SWAP_FIXINGS where trunc(info_date) = v_date)
    loop
    ligne :=
    RPAD (x.TICKER, 30, ' ')
    ||RPAD (x.info_date,40 ,' ')
    ||RPAD (x.LAST_PRICE,10,' ');
    corps := corps || ligne || UTL_TCP.crlf;
    end loop;
    corps := '<pre>' || corps || '</pre>';
    debug(corps);
    end;
    EXCEPTION
    WHEN e_Non_Numeric then
    null;
    when OTHERS THEN
    v_ErrorNumber := SQLCODE;
    v_ErrorText := SUBSTR(SQLERRM, 1, 200);
    declare
    ligne varchar2(2000);
    corps varchar2(7000);
    begin
    ligne := RPAD (v_ErrorText, 200, ' ');
    corps := corps || ligne || UTL_TCP.crlf;
    corps := '<pre>' || corps || '</pre>';
    debug(corps);
    end;
    end;
    /

Maybe you are looking for