Oracle Number and Java Format Mask Issue

I have a oracle number column, in my view object it is of type BigDecimal and the query column type is NUMBER
I put the following format mask in the hints section
#####.00
with a format type of Number,
Yet when I run the application, I always get the following error
java.lang.NumberFormatException: For input string: "-3750.00"
Anyone any ideas why this does not work?
Regards
Orlando

Hi,
try with <af:convertNumber>
See:
http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_convertNumber.html
ADF 11.1.1.4.0 af:convertNumber not working with #,##,##,##,##,##,##0.00

Similar Messages

  • Convert Oracle date format masks to Java format masks

    Have an application based on Oracle that stores data in text form (for display) and in native date format. It is being migrated to another application with a Java based front end that can only use Java format masks to display the dates in the desired display format.
    Is there a way to translate the Oracle format masks to Java? I can do this in SQL or PL/SQL using the database or in Java.
    I really don't want to write detailed code to parse the masks, although if parsers are available to take an oracle mask into its metadata (minute, year, etc), it may be possible for me to write the code.
    This seems like something that must have been done many times over the years. I would prefer to reuse workable code rather than reinventing the wheel.
    To be clear, I do not need to alter data or convert dates shown in string form. Just the format masks so the new app will display dates in the same manner as the old app. Fortunately, both apps handle interpreting the format masks in their native technology, so it is just converting the format mask.

    kenmadsen wrote:
    Both applications have a varchar2 column and a date column. A date picker selects and returns the date in native format for storage and the application uses the mask to format the varchar2 column for display (and storage). The old application uses an Oracle date format mask DD-Mon-YYYY HH24:MI and the new application uses Java date masks (DD-MM-YYYY hh:mm). (I may not have the translation from HH24 to hh correct).
    The date column and the display column store the same information (a date), but one is stored natively and the other is displayed as the application administrator want the particular row to be formatted for display. (the mask is a column in the same table as the other 2 columns). Each row has characteristics (other columns) that determines what the data is and how it should be shown (some things need to show time; others only the date)
    So the problem is, when migrating, the new application cannot render the dates as the old app did because "Mon" is Oracle format, not Java format.
    No data is being converted in the migration, except for the mask itself. Both applications have the same record structure with respect to these columns and they both use the mask to generate the formatted varchar2 data for display in the application and storage.too bad you insist on try to describe with words rather than actual CODE.
    Please explain again why this is an Oracle problem & NOT a Java problem?
    Oracle RDBMS is a data repository & can't automagically change data content for you.

  • Few people are "Oracle ACE" and "Java Champion"

    Few people are "Oracle ACE" and "Java Champion"
    What's whose icon ?:|
    I think that icon should not be only one.
    For instance,I am Pro (I have 570 points) and "Oracle ACE".
    Therefore I hope that My icons are "Pro" and "Oracle ACE".

    BluShadow wrote:
    can't you create an icon with the Java character holding an Ace?It reminds me of award icons (achievements) one gets on Steam and Xbox Live. My favourite - the award of getting a fair number of WW2 tank commanders that pop head-out-of-turret, as an infantry rifleman (with a puny bolt action rifle). Satisfaction getting the commander of a crew that that hides inside the belly of an armoured beast, that tries to turn my comrades and me into roadkill or a 1000 pieces exploding bits (or pixels to be more accurate)... ;-)
    One option here could be a signature line - that lay bares one's claim to fame, knowledge and experience. This is often standardise by community agreement on some web forums (the gamer ones often include clan tags and titles with h/w specs). Or something like GeekCode.
    Never really fancied that myself - but it could be fun putting an Oracle based geekcode together. ;-)

  • Oracle.exe and java.exe are running my CPU 100% under XP Prof SP3

    11gR1
    oracle.exe and java.exe are running 100% CPU
    I have increased virtual memory to 4 gig
    I have defragmented the drive.
    I checked the drive for errors.
    I am searching the whole drive for viruses
    I do not have the problem with Redhat Fedora 12 running 11gR1
    I have 1 gig of RAM but cannot install release 2 because the installer expects
    1 gig + 1

    ooops!!! left that off...sorry
    XP Prof SP3 32 bit..*.no problem with Redhat Fedora 12 running MySQL and 11gR1*
    1 gig RAM Dell precision W/S 1.5 Gig rate 74 GiG SCSI HD 15000 RPM
    Don't pass out but I am also running MySQL server 5.1.41 and MS SQL Server Express 2008.
    Lucky it didn't catch fire
    I installed XP prof months ago but this CPU domination occurred only starting last night!
    However slow everything works in 11gR1
    sqlplus myname/password and then select rows from table
    sqldeveloper
    PHP web sites
    I've had plenty of trouble with Java running slow and hogging memory!
    Edited by: landonmkelsey on May 2, 2010 12:21 PM
    Edited by: landonmkelsey on May 2, 2010 12:24 PM
    Let me guess...stop services for MySQL and MS SQL Server and see what happens!
    Edited by: landonmkelsey on May 2, 2010 12:26 PM

  • Oracle Linux and Java 7u10

    Hi all,
    I installed Oracle Linux Server 6.3 selecting "software Development System" (java 1.6.0 comes with it).
    but I need to use Java 1.7
    So I downloaded jdk-7u10-linux-x64.rpm
    when I try to install it, I get the following error.
    Unpacking JAR files...
         rt.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/rt.pack
         jsse.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/jsse.pack
         charsets.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/charsets.pack
         localedata.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/ext/localedata.pack
    I can't uninstall java 1.6 because other rpm uses it.
    Can someone tell me what the "proper" way to install Oracle Linux and Java 1.7 should be?
    OR is there a Oracle Linux Server 6.4 coming out soon with Java 1.7 as its default package set ;-)
    thanks in advance,
    c.w.

    You can ignore the errors. The files named in the error lines do not exist in the rpm package, but are there as .jar files
    The following works under Oracle Linux 6.3 x86_64 (and probably other versions).
    1. Open the following URL in a web browser on your PC:
    <pre>
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    </pre>
    2. Click the JDK download button, accept the license agreement and download the JDE rpm package.
    3. Copy the following file to your Oracle Linux server (SFTP):
    <pre>
    jdk-7u10-linux-x64.rpm
    </pre>
    4. Login as root and use the YUM utility to install the RPM package.
    <pre>
    # yum install ./jdk-7u10-linux-x64.rpm
    </pre>
    5. Register the new installed java version, then change your default Java:
    <pre>
    # alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_10/bin/java 2
    # alternatives --config java
    </pre>
    Display your default Java version:
    <pre>
    # java -version
    java version "1.7.0_10"
    Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
    </pre>

  • Problem Querying Oracle Forms Using a Date Field and a Format Mask

    Hello,
    We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
    We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
    We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
    - The Oracle Database version we are running is Release 10.1.0.5.0.
    - The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
    Thanks,
    Kris

    There is no obvious reason that I can see.
    Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem.

  • Oracle 8i And Java

    I have JDK 1.5 Update 1 installed in my system and have Oracle 8.1.7 database . I have successfully connected both using ODBC data sources in my Windows XP SP2. Can i connect them using URL address, like we can do in Oracle 9i and later databases of Oracle.
    thanks in advance
    Sujeet

    hi all!
    by this im stopping my question as i solved it today. i was not using the url format, so was the problem giving starnge messages.
    solution :
    if using JDK 1.4.2 download ojdbc14.jar and set it on ur classpath. url format is as shown below :
    jdbc:oracle:thin:@<host>:<port1521>:<sid>
    write the following sample code.........
    import java.sql.*;
    class Preeti
         public static void main(String[] args) throws SQLException
              Connection con;
              DatabaseMetaData meta;
              String url = "jdbc:oracle:thin:@sujeet:1521:ram";
              String user = "scott";
              String password = "tiger";
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              con = DriverManager.getConnection(url, user, password);
              Statement stmt = con.createStatement();
              ResultSet rst = stmt.executeQuery("select * from emp");
              meta = con.getMetaData();
              System.out.println("Got Results............");
              System.out.println("DBMS : " + meta.getDatabaseProductName());
              //System.out.println("Version : " + meta.getDatabaseMajorVersion());
              System.out.println("JDBC Driver Name : " + meta.getDriverName());
              System.out.println("JDBC Driver Version : " + meta.getDriverVersion());
              while(rst.next())
                   System.out.println(rst.getString(1));
              con.close();
    }

  • Oracle Text and Java (jsp)

    Hi,
    I stored files( pdf,word) in blob column. I created index (INSO_FILTER) and i would like to query the files.
    String sword="test";
    String query = "Select COMPID,CREATED,NAME,CVNUMBER from COMPANYCV" + " where contains(CV,' "+sword+" ') > 0 " ;
    System.out.println(query);
    ResultSet rs = stmt.executeQuery(query);
    works fine i get the compid,date,number and filename of the stored file in the blob column. This info is displayed als a link(url). ie. <A HREF="ShowCv.jsp?NAME=doc1.pdf...... So when the user clicks on it, the appropriate program opens (word,acrobat reader) and the content of the file is shown.
    But i also want to know how many times the word test" is found in each of the documents? How can i do this in java (jsp)?
    And i want to highlight to word that is searched for in the document? Any help on doing this ( examples)? The doc should open in the browswer( html -version) and words
    should be highlighted.
    plz help!
    ps.
    if i use:
    select score(1),NAME,COMPID from COMPANYCV where contains(CV, 'BLOB',1 ) > 0 order by score(1) desc
    i get:
    100,Test2.doc,4
    39,Test1.doc,5
    the score is 39 with Test1.doc! But the word blob is not present in that document. What does the "score" realy mean?
    thx

    ok so far so good. Here is what i did;
    filter-> html
    I created a table filterresult:
    query_id number
    document clob
    in sql:
    begin
    ctx_doc.filter('cvindex', 30, 'filterresult',0,FALSE);
    end;
    so now the word document with pk=30 is stored in de blob column as html.
    in my jsp i call:
    String sql= "SELECT DOCUMENT FROM FILTERRESULT WHERE QUERY_ID=0";
    //System.out.println(sql);
    rs = stmt.executeQuery(sql);
    while(rs.next()){
    clob=((OracleResultSet)rs).getCLOB(1);
    is=clob.getAsciiStream();
    int pos=0;
    int length=0;
    byte[] b = new byte[clob.getChunkSize()];
    while((length=is.read(b))!= -1){
    pos+=length;
    os.write(b);
    and the word document shows up in html in my browser!
    I created another table:
    table highlightresults(
    query_id number
    offset number
    length number
    highlight->
    in sql:
    begin
    ctx_doc.highlight('cvindex', 30, 'steven','highlightresults');
    end;
    i want to highlight the word "steven" in the word doc with pk=30.
    I got no error on excecuting this, but how do i combine the 2 thins: how can i open the filtered word document (html) with the highlights shown in a color??
    plz help!
    also; can someone give me and exampple on how to call these sql statements, like:"begin
    ctx_doc.highlight('cvindex', 30, 'steven','highlightresults');
    end; " in my JSP (java) page!
    thank you

  • Oracle Timestamp and java.util.date

    Greetings,
    【Enviroment】
    oracle 10g Express
    jdbc 10.2.0.1.0 thin driver
    windows Xp professinal
    【problem】
    I fetched a value of timestamp.
    And I faced An Error that "java.sql.SQLException: Cannot set lastup_dt: incompatible types."
    We define data type of lastup_dt is timestamp on Oracle.
    And We define the data type of lastup_dt of javaBean is java.util.date.
    And Ocurr SQLException at result = rsh.handle(rs);
    How Can I avoid it?
    public Object query(Connection conn, String sql, Object[] params,
    ResultSetHandler rsh) throws SQLException {
    PreparedStatement stmt = null;
    ResultSet rs = null;
    Object result = null;
    try {
    stmt = this.prepareStatement(conn, sql);
    this.fillStatement(stmt, params);
    rs = this.wrap(stmt.executeQuery());
    result = rsh.handle(rs);
    } catch (SQLException e) {
    this.rethrow(e, sql, params);
    } finally {
    try {
    close(rs);
    } finally {
    close(stmt);
    return result;
    Any help I appreciate it.
    Thank you.

    As long as you have the long representation of the time you can create a new java.util.Date:
    new java.util.Date(ts.getTime())

  • DelimitedData and Date Format Mask

    I am using desformat=DelimitedData to generate a Report with Version6.
    Although the date Format Mask is DD-MON-RRRR the date in the report is 11-NOV-34. What can I do?
    Thanks in advance
    Yvonne

    Hi Pieter,
    This does looks like a Bug. Please contact Oracle Support to assist you in getting the right patch or otherwise.
    Regards
    Oracle Reports Team.

  • Help: Date Format Mask Issue year 0004 instead of 2004

    Hi,
    I set Date Format Mask as MM/DD/YYYY for a date field. However, when user enter
    12/31/04 the result turned out as 12/31/0004
    Of course, I'd like user put 12/31/2004, but 12/31/04 leads to 12/31/0004 has to be stopped.
    Any suggestions?
    Thank you in advance.
    Jimmy

    Thank you very much Francois and it works for me.
    Jimmy

  • Version Control for Oracle Reports and Java

    Hi
    I have a Reports and Java development enviroment and I need version control for both. In JDeveloper there is only support for CVS and SVN. Does report have support for CVS and SVN?. What can I choose to offer Java and Reports version control?
    Regards,
    Néstor Boscán

    Hello,
    You might find neXtep Designer helpful, depending on what you need. It is a free database development environment based on the concept of version control. You will work in a dedicated version control repository in which you can import any existing database through reverse synchronization. Once imported, you will gain control over the lifecycle of your database model all along your developments. The tool will generate SQL scripts resulting from the delta between any 2 versions, allowing you to automate SQL generation. It also provide a delivery mechanism and an installer program which can automate deployment of the changes on a target database.
    The product is based on the Eclipse platform and provides features like graphical data model, dependency management, SQL clients, powerful SQL editors for stored code development and currently supports Oracle, MySql and PostgreSql. You will find more information here :
    http://www.nextep-softwares.com
    Also have a look at the WIKI for more detailed information about the product, the concepts and the reasons why we created neXtep.
    Hope this helps,
    Christophe

  • Oracle Lite and Java 1.3

    Some preliminary testing of Java 1.3 against Oracle Lite 8.1.5 causes an fatal crash that won't allow me to debug through and suspends both the VM and my debugger/IDE for Java.
    Can anyone confirm if it is possible to run Olite and Java 1.3? Same code works great in OLite and Java 1.2.2, and crash doesn't seem to be OS specific (tested under NT and 2000).
    Cheers, DJ

    When you put your code in a try block and print the exception, what does it say:
    String driver = getDriverFromConfigurationFile();
    try
    Class.forName(driver);
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    Second option is to use DataSource instead.

  • JDeveloper IDE Tool - Thank you Oracle/Sun and Java community

    I am sure it has been done many times over within the JDeveloper community discussion but I felt compelled
    to stop, think and acknowledge the efforts here.
    To Oracle, Sun and others that have contributed to this software and resources a huge THANK YOU!
    I started in this business as a COBOL programmer on the mainframe where the only option for you to learn
    was to use a school or company mainframe to code. if you didn't have either your only
    option was reviewing code in textbooks.
    These tools are amazing for how much power they give those of us interested in furthering our skills but
    limited in financial resources. The effort is staggering to me. Just lookng at the release notes and bug
    fixes for the versions of this tool I am absolutely floored.
    Your efforts are greatly appreciated. I hope that the open source concept continues. I applaud and urge
    you to continue your efforts. You are all doing a wonderful thing really. In a time where the trend is to
    charge charge charge for anything we do on our Droids and Iphones it is good to see a humane effort
    flourish.
    Brian Quinn
    IT Application Developer
    Edited by: 814126 on Nov 21, 2010 8:40 AM

    Always bear in mind that there is no such thing in life, called a free lunch.
    I quote:
    "Even if something appears to be free, there is always a cost to the person or to society as a whole even though that cost may be hidden or distributed.
    For example, as Heinlein has one of his characters point out, a bar offering a free lunch will likely charge more for its drinks."
    http://en.wikipedia.org/wiki/There_ain%27t_no_such_thing_as_a_free_lunch
    NA
    http://nickaiva.blogspot.com

  • Deploying Oracle Express and Java Application in one installation

    Is there a way to deploy a Java application using Oracle express as the back end in one installation? So in other words, rather than installing oracle express separately from the application, we are looking to install from one executable including both the java application and all the necessary components for oracle express to run.
    Your help is greatly appreciated.
    Thank you,
    Mahmoud

    Hello,
    you can install the database using a response file. Depending on the installer of your Java application you could create a kind of meta-installer that creates a response file for the database as well as one response/parameter file for your application installer and hence run both in one step.
    See the [url http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm#BABCCGCF]corresponding section of the Installation Guide for details on the response file.
    -Udo

Maybe you are looking for

  • Excise materials given by customer

    Is it possible to take the customer material (Exciseable) for doing value addition. thru MB1C for which our company should take the credit of Rawmaterials(Exciseable) . Taxes paid on this RM should be given credit on FERT. If i use MB1C how the %'s o

  • Adobe reader 10.1.2 could not open the file '/C/WINDOWS'

    since adobe reader 10.1.2 urls don't work in pdf files to folders. C:\WINDOWS\xy.xls   ok C:\WINDOWS not ok > adobe reader 10.1.2 could not open the file '/C/WINDOWS' C:\WINDOWS ok > with deactivated protected mode no problems with 9.5.0 or 10.1.1 wi

  • Mkinitcpio and Knoppix

    Hi, I want to clone a running Archlinux system into a VMWARE Server Image. I've done backups with rsync for so long and it worked every time I needed to clone or restore a system. But now I'm running into some difficulties I cannot solve. I started t

  • PanelBinding and JBO-35001

    Hello, we got a problem. We are using ADF with JClient-technologie and MDI Client-Server forms. We build a JPanel with the JDeveloper-Wizard and put that in an JInternalFrame which is invoked by a JDesktopPane. That works... But if we create the same

  • Migrate from Exchange Server 2010 sp3 to 2013 sp1

    I have one Exchange Server 2010 SP3 server (300 mailboxes) installed on Windows Server 2008 R2 SP1 with three major roles on it (CAS, MB and HT) - typical installation. Edge Transport server is not installed thus for controlling of mail flow Symantec