SetTimestamp in Oracle 9i

I have been having a few problems with 9i and their new timestamp data type. The latest has to do with java.sql.setTimestamp(int,String) - basically I can't get it to work. If I write a prepared statement like:
sql.append("insert into test_timestamp values('" + timestamp + "',null)");
where my NLS is set up OK and timestamp is:
java.sql.Timestamp timestamp = new java.sql.Timestamp(System.currentTimeMillis());
it will work OK. If I switch to:
sql.append("insert into test_timestamp values(?,null)");     
ps.setTimestamp(1, timestamp);
I lose my fractional seconds.
Any thoughts? Is this Oracle's driver doing this? Do I have to use a simpledateformat with setTimestamp?
-Lou

Oracle only supports a timestamp to seconds - millis are ignored.

Similar Messages

  • Setting attibutes to current datetime

    I'm using jdev 11.1.1.2 and am trying to set EO attrubtes default values for new records: one to the current date/time and another to a specific time in the current day. I've done seme searching on the forum but haven't found an answer that works for me. The nearest was
    setTimestamp(new oracle.jbo.domain.Date(new java.sql.Date(new java.util.Date().getTime())))
    which gives me the current date but the time is midnight.
    Could it be because I have imported something that conflicts (various tests mean I'm importing java.sql.Time, oracle.jbo.domain.Date, oracle.jbo.domain.Timestamp & org.joda.time.DateTime)?
    Could someone give me some guidance please or a suggestion of what to read?

    A few things to check.
    What's the type of the attribute? If you want it to include both date and time switch it from date to timestamp.
    For the default date and time you can specify a default value for the field (expression) to be adf.currentDateTime.
    Also check the format mask you provided for the field in the UI hints and make sure it includes the time.

  • NPE in Oracle 9.2.0.1 setTimestamp

    We recently encountered a situation where we got the following exception
    java.lang.NullPointerException
    at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)
    at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528)
    at oracle.jdbc.driver.OraclePreparedStatement.checkBindTypes(OraclePreparedStatement.java:3271)
    at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1133)
    at oracle.jdbc.driver.OraclePreparedStatement.setTimestamp(OraclePreparedStatement.java:2274)
    I decompiled the code for DBData.clearItem and found something kinda funny (see inline comments below)...
    public void clearItem(int i)
    if(m_dynamic && m_vector != null && i < m_vector.size())
    m_vector.removeElementAt(i);
    // Shouldn't this be
    // if (m_items == null || i >= m_items.length)
    if(m_items == null && i >= m_items.length)
    return;
    } else
    m_items[i] = null;
    return;
    Is there anyone I should contact in particular about this problem? Especially since we will need to distribute some fix to our customers.
    Thanks

    Well, heres my test (10g, for I dont have a 9.2.0.1.0, but I think it´d show the same result):
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select *
      2  from t1;
    ENO ENAME
       1 KARTHIK
    SQL> select *
      2  from t2;
    DNAME
    VENKATRAMAN
    SQL> select *
      2  from t1
      3  where eno in (select eno from t2);
    ENO ENAME
       1 KARTHIK
    SQL> alter table t2 add (eno number);
    Table altered.
    SQL> select *
      2  from t1
      3  where eno in (select eno from t2);
    no rows selected
    SQL> alter table t2 drop (eno);
    Table altered.
    SQL> select *
      2  from t1
      3  where eno in (select t2. eno from t2);
    where eno in (select t2. eno from t2)
    ERROR at line 3:
    ORA-00904: "T2"."ENO": invalid identifier
    SQL>
    But he is getting output of table T2 too se his last postI don´t think so, because he didn´t SELECT it. Would be nice to just copy & paste the output...
    Regards,
    Gerd

  • Error using setTimestamp and ojdbc14 against Oracle 7.3.4

    I am having a problem setting a timestamp value against Oracle 7.3.4 and Oracle 8.0.6 databases.
    Here's the code:
    public Tester
    (String passedUsername, String passedPassword, String passedHostName, String passedPort, String passedSID)
    throws SQLException {
    // Establish a database connection
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    } catch (ClassNotFoundException e) { throw new SQLException("Can't find class oracle.jdbc.driver.OracleDriver"); }
    StringBuffer myStringBuffer = new StringBuffer(50);
    myStringBuffer.append("jdbc:oracle:thin:@");
    myStringBuffer.append(passedHostName);
    myStringBuffer.append(":");
    myStringBuffer.append(passedPort);
    myStringBuffer.append(":");
    myStringBuffer.append(passedSID);
    Connection myConnection = DriverManager.getConnection(myStringBuffer.toString(), passedUsername, passedPassword);
    myConnection.setAutoCommit(false);
    // Insert the test record
    PreparedStatement myPreparedStatement = null;
    try {
    myPreparedStatement = myConnection.prepareStatement("insert into test_table(date_field) values (?)");
    myPreparedStatement.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
    myPreparedStatement.execute();
    } finally {
    if (myPreparedStatement != null) myPreparedStatement.close();
    Here's the error that occurs under Oracle 7.3.4:
    java.sql.SQLException: ORA-01024: invalid datatype in OCI call
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at Tester.<init>(Tester.java:46)
         at Tester.main(Tester.java:62)
    Here's the error that occurs under Oracle 8.0.6:
    java.sql.SQLException: ORA-03115: unsupported network datatype or representation
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at Tester.<init>(Tester.java:46)
         at Tester.main(Tester.java:62)
    Note that the table in the insert statement does not have to exist. You can even replace the statement with a garbage statement.
    The error is produced regardless.
    The code is being compiled under JDK 1.4
    I am using the latest version of the JDBC drivers (i.e. ojdbc14.jar)
    The code works fine under Oracle 8.1.7 and 9.0.1
    My code needs to access all four of these database version, sometimes concurrently, so I can only use a single driver class (i.e. I can't swap out ojdbc14.jar for classes12.zip).
    Any feedback would be appreciated!

    Hi,
    Only to say that we have the same problem like you:
    - Error ORA-01024 when connection to Oracle 8.0.1 on Sun Solaris
    - Error ORA-03115 when connection to Oracle 8.1.5 on Windows
    We are thinking about upgrading Oracle. Is it the only solution?
    Thank you

  • SetTimestamp in Tomcat + Oracle 9i ignores milliseconds

    Hi all,
    I have a problem when using setTimestamp in Tomcat + Oracle 9i becouse it ignores milliseconds in the database.
    It�s a J2EE app that runs on Tomcat and OC4J as a server and Postgres and Oracle 9i as a DDBB. It works OK with OC4J + Oracle but it ignores the milliseconds when I use Tomcat.
    I�m using setTimestamp(java.sql.Timestamp)
    Driver used is classes12.jar, jdk 1.4.1, ...
    Any Idea?
    Thanks

    1- try ojdb14.jar instead of classes12.jar
    2- add this to the context of your web app:
              <parameter>
                   <name>connectionProperties</name>
                   <value>oracle.jdbc.V8Compatible=true</value>
              </parameter>3- i don't think this is a tomcat problem:
    See http://www.databasejournal.com/features/oracle/article.php/2234501

  • Get date from Oracle when local time zone is different from Oracle time zon

    Hi!
    Local machine time zone= +2
    Oracle time zone= +1
    I set date to Oracle using java.sql.Date.
    From application I save date at 00:30 clock and send e.g. 28.06.2002, but in Oracle date is save as 27.06.2002 01:00 (hour=01 , I suppose that is because java.sql.Date hasn't time the Oracle set it time = time zone=+1) And when I get date from Oracle I get incorrect date. In SQL I don't use date masks. Maybe solution is to use java.sql.Timestamp object (when save date to Oracle) instead of java.sql.Date?
    But if I save date at e.g. 01:00 clock and send e.g. 28:06.2002 in Oracle, date is save as 28.06.2002 01:00 and when I read from Oracle I get correct date.
    Thank you.

    Hi!
    Local machine time zone= +2
    Oracle time zone= +1
    I set date to Oracle using java.sql.Date.
    From application I save date at 00:30 clock and send
    e.g. 28.06.2002, but in Oracle date is save as
    27.06.2002 01:00 (hour=01 , I suppose that is because
    java.sql.Date hasn't time the Oracle set it time =
    time zone=+1) Presumably you are using setTimestamp() to store the value. If you are explicitly using a varchar (string) then you will have to correct the timezone your self.
    And when I get date from Oracle I get
    incorrect date. In SQL I don't use date masks. Maybe
    solution is to use java.sql.Timestamp object (when
    save date to Oracle) instead of java.sql.Date?The method setDate/getDate store a 'date' which is not the same as a 'date and time' for which setTimestamp/getTimestamp are used.
    But if I save date at e.g. 01:00 clock and send e.g.
    28:06.2002 in Oracle, date is save as 28.06.2002
    01:00 and when I read from Oracle I get correct date.
    Thank you.

  • Oracle 8.1.5 - jdbc driver problem

    I am using Oracle8.1.5 (personal oracle) for database. I am trying to retrieve the data from JAVA(JDK 1.3). I use the following driver and its manager in the Java program:-
    DriverManager.registerDriver(new Oracle.jdbc.driver.OracleDriver());
    Class.forName("Oracle.jdbc.driver.OracleDriver");
    However Java is not getting compiled with the following error message:-
    Cannot resolve symbol:
    package: driver
    class: DriverManager
    I would request your goodselves to help me out. Thank you in anticipation.
    Regards,
    Sivaswamy

    Thanks for the reply.
    Have you tried manually taking the current time and
    converting it to the way Oracle is expecting it? If I embed a TO_DATE and format it, it works fine, but I want to stay database independent. Is that want you mean?
    Or how about using new java.util.Date() to get the
    current date?Not sure I follow you:
    --- insertStmt.setTimestamp(5, new java.sql.Date(System.currentTimeMillis()));
    Gives an error since setTimestamp expects a java.sql.Timestamp and
    --- insertStmt.setDate(5, new java.sql.Date(System.currentTimeMillis()));
    Only stores the date without the time.
    Thanks again,
    Todd

  • Oracle 9i and PreparedStatement Date Problem

    Hi, I am working with Oracle 9i and it's version of the classes12.zip driver and I am having difficulties in storing a date value using a PreparedStatement. I only care about the date, but I have tried going the Timestamp route as well and get the same results.
    The PreparedStatement's parameters are being set successfully (using setDate or setTimestamp) but when the executeUpdate method is invoked, the process hangs. If I remove the Date (or Timestamp) from the insert, all works as expected.
    Has anyone else came across this problem and if so, how did you get around this?
    Thanks!
    -Brian

    That certainly hasn't happened with any other database including Oracle 8.
    Perhaps you might want to take another look at your code to make sure that it really isn't hanging but instead appears to do so when an exception occurs.

  • Insert current date and time into Oracle date type field

    I have a JDBC current date and time insert into Oracle 9i that almost works. It submits the current date and a fixed time into the Oracle date type field. I am using Tomcat 6.0.20.
    For example if I insert the data at 7:24:04 PM on Feb 16, 2010 it will insert as: 16-Feb-2010 12:00:00 AM
    The date part works but the time always shows 12:00:00 AM no matter what date or time the data is inserted.
    Here is what I have for my JDBC inserts and I also tried something with DateFormat:
    PreparedStatement ps; Date mydate = new Date(new java.util.Date().getTime()); //insert statement here.... stmt.setDate(1,mydate);
    I also tried:
    PreparedStatement ps; java.sql.Timestamp mydate = new java.sql.Timestamp(new java.util.Date().getTime()); SimpleDateFormat fmt = new SimpleDateFormat(.... //insert statement here.... ps.setTimestamp(1,fmt.format(mydate));
    Both keep submitting the date into Oracle as 16-Feb-2010 12:00:00 AM
    Anyway to get the current date and time? For example if I insert the data at 7:24.04 pm today it should show as 16-Feb-2010 07:24.04 PM in Oracle.

    sportsMarkr wrote:
    Date mydate = new Date(new java.util.Date().getTime());Please see the javadocs for java.sql.Date and note the part that says "...to zero"
    [http://java.sun.com/javase/6/docs/api/java/sql/Date.html]
    If you want a date and time then use java.sql.Timestamp.

  • ......Trusted Recon With Oracle 11g Fail. All details explained

    Ok...... How can I delete this post? ---- > I resolve the issues......
    Hi, When I create the trusted Recon, connector sendme:
    ERROR [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' org.apache.struts.actions.DispatchAction - Request[CreateConnector] does not contain handler parameter named method
    follow by
    ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.SERVER - Class/Method: tcTableDataObj/setTimestamp encounter some problems: {1}
    java.lang.NullPointerException
         at com.thortech.xl.dataobj.tcDataSet.setTimestamp(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.setTimestamp(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.setTimestamp(Unknown Source)
         at com.thortech.xl.ddm.instance.visitor.ImportVisitor.visitStarted(Unknown Source)
    ===================================================================
    Hi, I think I need to re install the GTC or OIM because all works fine (Recon with AD, Exchange... DataBase Provisioning) But when Im try to Recon with Oracle Databse11g Fails.
    I read the manuals but nothing..... ok I do the next configs:
    - Generic Technology Connector
    - Create
    =========================*Step 1*=================
    Name                              ReconCity                         
    Transport Provider (Reconciliation)................Database Application Tables Reconciliation      
    Format Provider (Reconciliation).....................Database Application Tables Reconciliation      
    Trusted Source Reconciliation.........................Selected
    ========================*Step 2*==================
    Database Drive : oracle.jdbc.driver.OracleDriver
    Database URL : jdbc:oracle:thin:@192.168.1.101:1521:DFGOB
    Database User ID : system
    Database Pass......: my_pass
    parent Table/View
    Name.......................: Recon_Users
    Batch Size...............: All
    Stop Reconciliat
    ion Threshold..........: None
    Stop Threshold........: None
    Sourcedate Format: yyyy/MM/dd hh:mm:ss z
    Reconcile Deletion
    of Multival.................: "Selected"
    Reconciliation
    Type..........................: Full
    ========================*Step 3 (try 1)*===========
    SOURCE.................*RECON STAGING*.......................*OIM*
    USER_ID--------------> USER_ID -------------> User ID
    FIRTS_NAME--------> FIRST_NAME ----------> FIRST_NAME
    LAST_NAME---------> LAST_NAME ----------> . --> Yes, I map all fields to OIM
    PASSWORD----------> PASSWORD ---------> .
    EMAIL------------------> EMAIL ----------------> .
    STATUS---------------> STATUS --------------> .
    ..........|Xellerate |--> ORGANIZATION ------------> .
    ..........|End-User |------> EMPLOYEE TYPE -----> .
    ..........|Full-Time |-------> USER TYPE ------------> .
    - (STATUS values from my database table is: Active or Disabled)
    - ( I try (Enabled/Disabled) )
    For Fields USER_ID to STATUS
    (Edit option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: USER_ID
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required.....................: Selected
    For Fields ORGANIZATION to USER TYPE
    (Add option)
    Dataset........................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: ORGANIZATION
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only.............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required.....................: Selected
    Input
    Literal: Xellerate      
    ===After save on step 4 I go to Resource Manager-->Manage Scheduled task--> RUN NOW and the log send me
    DEBUG QuartzWorkerThread-4 XELLERATE.ADAPTERS - Class/Method: tcStructureUtil/getUserDefinedCols entered.
    ERROR QuartzWorkerThread-4 XELLERATE.APIS - Class/Method: tcReconciliationOperationsBean/ignoreEventData encounter some problems: {1}
    java.lang.NullPointerException
         at com.thortech.xl.dataobj.util.tcAttributeSource.getAttrColumnName(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getRuleElementWhere(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getRuleWhere(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getMatchedUserList(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getMatchedUserList(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEventData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperationsSession.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperations_gmh3ba_EOImpl.ignoreEvent(tcReconciliationOperations_gmh3ba_EOImpl.java:692)
         at Thor.API.Operations.tcReconciliationOperationsClient.ignoreEvent(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy62.ignoreEvent(Unknown Source)
         at com.thortech.xl.gc.runtime.GCScheduleTask.execute(Unknown Source)
         at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    ERROR QuartzWorkerThread-4 XELLERATE.GC.FRAMEWORKRECONCILIATION - Reconciliation Encountered error:
    Thor.API.Exceptions.tcAPIException: java.lang.NullPointerException
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEventData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperationsSession.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperations_gmh3ba_EOImpl.ignoreEvent(tcReconciliationOperations_gmh3ba_EOImpl.java:692)
         at Thor.API.Operations.tcReconciliationOperationsClient.ignoreEvent(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy62.ignoreEvent(Unknown Source)
         at com.thortech.xl.gc.runtime.GCScheduleTask.execute(Unknown Source)
         at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    WARN QuartzWorkerThread-4 XELLERATE.GC.FRAMEWORKRECONCILIATION - Though Reconciliation Scheduled task has encountered an error, Reconciliation Transport providers have been "ended" smoothly. Any provider operation that occurs during that "end" or "clean-up" phase would have been executed e.g. Data archival. In case you want that data to be a part of next Reconciliation execution, restore it from Staging. Provider logs must be containing details about storage entities that would have been archived
    ==========================================
    ========================*Step 3 (try 2)*==============
    SOURCE..................*RECON STAGING*....................*OIM*
    USER_ID--------------> USER_ID -------------> User ID
    FIRTS_NAME--------> FIRST_NAME ----------> FIRST_NAME
    LAST_NAME---------> LAST_NAME ----------> .
    PASSWORD----------> PASSWORD ----------> .
    EMAIL------------------> EMAIL -----------------> .
    ........|Xellerate |--> ORGANIZATION -------------> .
    ........|End-User |------> EMPLOYEE TYPE ------> .
    ........|Full-Time|-------> USER TYPE --------------> .
    ........|Active |------> SATUS -----------------> .
    - (On STATUS I try (*Active/Enabled/Disabled*) )
    For Fields USER_ID to EMAIL
    (Edit option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: USER_ID
    Mapping Action.........: Create mapping Without Transformation     
    Matching Only.............: Not Applicable
    Case-Insensitive.........: Not Applicable
    Data Type      *..............: String
    Required.......................: Selected
    For Fields ORGANIZATION to STATUS
    (Add option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name................: STATUS
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required......................: Selected
    Input
    Literal: Active      
    ===After save on step 4 I go to Resource Manager-->Manage Scheduled task--> RUN NOW and the log sende me the same ERRROR posted up.
    ===============Step 3 (try 3)=======================
    SOURCE...................*RECON STAGING*...................... OIM
    USER_ID--------------> USER_ID -----------> User ID
    FIRTS_NAME--------> FIRST_NAME ----------> FIRST_NAME
    LAST_NAME---------> LAST_NAME ----------> .
    PASSWORD----------> PASSWORD ----------> .
    EMAIL------------------> EMAIL ------------> .
    USER_STATUS----| T |--> USER_STATUS ---> .
    .....................................|
    .........................|Lookup.M4..|
    ............|Xellerate |--> ORGANIZATION ------------> .
    ............|End-User |------> EMPLOYEE TYPE ------> .
    ............|Full-Time |-------> USER TYPE -------------> .
    - (USER_STATUS have the next Values: True/False)
    For Fields USER_ID to EMAIL
    (Edit option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: USER_ID
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only.............: Not Applicable
    Case-Insensitive.........: Not Applicable
    Data Type      *..............: String
    Required......................: Selected
    For Fields ORGANIZATION to USER_TYPE
    (Add option)
    Dataset........................: Reconciliation Staging
    Child Dataset Name :           
    Field Name................: ORGANIZATION
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required.....................: Selected
    Input
    Literal: Xellerate
    Dataset.......................: Reconciliation Staging
    Child Dataset Name:           
    Field Name................: USER_STATUS
    Mapping Action.........: Create Mapping with Translation     
    Matching Only...........: Not Applicable
    Case-Insensitive.......: Not Applicable
    Data Type      *............: String
    Required....................: Selected
    Field Name USER_STATUS
    Input
    Dataset........:Source      
    Field Name :USER_STATUS
    Lookup Code Name
    Literal...........: Lookup.M4.Recon      
    ===============
    Lookup Definition
    Code : Lookup.M4Recon
    Field:
    Lookup Type(Selected)
    Required (Not Selected)
    Group: Object
    Lookup Code Info
    | Code Key | Decode |
    1 | True/False | Active/Disabled|
    ===After save on step 4 I go to Resource Manager-->Manage Scheduled task--> RUN NOW and the log sende me the same ERROR posted up.=============
    I hope you can help me, Thanks.....
    Edited by: user11296330 on Oct 18, 2009 8:55 PM
    Edited by: user11296330 on Oct 18, 2009 10:10 PM
    Edited by: user11296330 on Oct 19, 2009 3:33 PM
    Edited by: user11296330 on Oct 20, 2009 1:52 AM
    Edited by: user11296330 on Oct 21, 2009 9:08 AM
    Edited by: user11296330 on Nov 8, 2009 10:16 PM
    Edited by: user11296330 on Nov 8, 2009 10:20 PM

    Hi amigo I solve my problem with the next:
    OK, all above is good but in the manual they mistake something.... one step.
    (All succesful with --> ========================*Step 3 (try 2)*==============)
    1.- Ok, if you got every thing like above the last thing you need is follow the next link:
    http://www.oracle.com/technology/obe/fusion_middleware/im1014/oim/obe12_using_gtc_for_reconciliation/using_the_gtc.htm
    Go to: "Modifying the GTC" ( just do this part)
    Restart the OIM and Enjoy it.
    Good day Amigo.
    And don't forget on step three:
    Click the Edit icon of the User ID field of the OIM - User data set.
    b. On the Step 1: Provide Field Information page:
    - From the Mapping Action list, select Create Mapping Without Transformation.
    - Select Matching Only.
    - Click Continue.
    Mapping Information page, select Reconciliation
    Staging from the Dataset list, select EMPLOYEE_ID (your ID Field) from the Field Name
    list, and then click Continue.
    If something go bad, tell me the steps like I did with the log.... see ya
    Edited by: user11296330 on Nov 8, 2009 9:57 PM
    Edited by: user11296330 on Nov 8, 2009 10:21 PM

  • Inconsistency with setTimestamp & getTimestamp and DST

    Hi,
    how do I file a bug report on this website?!
    Well, our customer had serious problems on their website yesterday because of
    what seems to be a bug in oracle's JDBC drivers (version 8.1.7.1 against an
    8.1.7 database, running on Solaris on the production system, reproduced with
    linux). The example code below demonstrates the problem.
    In short, I insert a timestamp value 'October 27th, 2002 02:00 MET/DST', when I
    later retrieve it I get 'October 27th, 2002 02:00 MET' or one hour later. (In case
    you don't know: DST was switched off during the night 26th->27th).
    Bye,
         Peter
    * OracleBug.java
    * (C) 2002 [ t]ivano Software GmbH http://www.tivano.de/
    * Created on 28. Oktober 2002, 12:57
    * $Log: DataSourceTest.java,v $
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Timestamp;
    import java.sql.SQLException;
    /** Test for a possible oracle bug.
    * @author Peter Conrad
    * @version $Id$
    public class OracleBug {
    /** Creates a new instance of OracleBug */
    public OracleBug() {
    /** Usage: OracleBug <jdbc-url> */
    public static void main(String[] args) {
    if (args.length != 1) {
    System.err.println("Usage: OracleBug <jdbc-url>");
    System.err.println("DB user, password and other properties must");
    System.err.println("be provided as system properties. The Oracle");
    System.err.println("JDBC driver must be mentioned in jdbc.drivers");
    System.err.println();
    System.err.println("Example:");
    System.err.println("java -cp .:classes12.zip -Djdbc.drivers=oracle.jdbc.OracleDriver -Duser=test \\\n\t-Dpassword=test OracleBug jdbc:oracle:thin:@192.168.16.2:1521:TIVANO");
    return;
    Timestamp problem = new Timestamp(1035676800000L);
    try {
    Connection c = DriverManager.getConnection(args[0],
    System.getProperties());
    PreparedStatement p = c.prepareStatement("CREATE TABLE BugTest (ts DATE NOT NULL)");
    p.execute();
    p.close();
    p = c.prepareStatement("INSERT INTO BugTest (ts) VALUES (?)");
    p.setTimestamp(1, problem);
    p.execute();
    p.close();
    p = c.prepareStatement("SELECT * FROM BugTest WHERE ts = ?");
    p.setTimestamp(1, problem);
    ResultSet rs = p.executeQuery();
    if (rs.next()) {
    Timestamp ts = rs.getTimestamp(1);
    if (ts.equals(p)) {
    System.out.println("Everything's OK. Hum.");
    } else {
    System.out.println("Gotcha! DB returns " + ts.getTime()
    + " but we gave it " + problem.getTime()
    + "!");
    } else {
    System.out.println("Empty ResultSet! This shouldn't happen!");
    rs.close();
    p.close();
    p = c.prepareStatement("DROP TABLE BugTest");
    p.execute();
    p.close();
    c.close();
    } catch (Exception e) {
    e.printStackTrace();

    Hi Justin,
    thanks for your patience. :-)
    I forgot to mention that we're using the THIN driver, sorry.
    Here's the code I'm using to generate the timestamp. It is meant to generate a
    Timestamp that is unique for a particular day in our timezone. It works fine most of
    the time, only on October 27th it produced the timestamp I used in the example code,
    which doesn't work.
    public static Timestamp makeTimestamp(Date date) {
    Calendar local = Calendar.getInstance();
    Calendar gmt = Calendar.getInstance(java.util.TimeZone.
    getTimeZone("GMT+00"));
    local.setTime(date);
    gmt.clear();
    gmt.set(local.get(Calendar.YEAR), local.get(Calendar.MONTH),
    local.get(Calendar.DAY_OF_MONTH));
    return new Timestamp(gmt.getTime().getTime());
    But the important point is, I think, that the timestamp happens to be just before the
    switchover from MET/DST to MET. Meanwhile I have verified that other timestamps in the
    interval 2:00 AM - 3:00 AM on October 27th fail as well, while timestamps before
    and after that interval work fine.
    As to the support question: I'm of course prepared to pay if other people look for bugs
    in my code, or generally help fix things that I've done wrong. I'm not willing to pay
    them to fix something they've done wrong. So it boils down to "who's paying for
    finding out whose fault it is?". I've done my best to provide a very simple example proving
    that it's Oracle's fault (which has already cost me time and my employer money),
    and since it should be in the best interest of Oracle to find and fix bugs in their
    product I think they should at least give me a chance to prove it to them directly.
    (I suppose I don't get a refund if I buy a support contract just to prove them, and it
    turns out that I was right. Or do I? Will Oracle pay for the time I'm spending on
    that problem? :-)
    Bye,
         Peter

  • Preparedstatement problem in oracle jdbc 10.1.0, 10.2.0

    Hello,
    Im using oracle jdbc to connect oracle9.0.1.0.1
    i have a table like
    id-NUMBER
    RESULT-VARCHAR2(100)
    E_DATE-DATE
    STATE-VARCHAR2(1)
    when i write the code like
    "update TBMIS_AUDIT_ISSUE_PROJECT set RESULT=? , E_DATE=?      where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(1, "Test");using preparedstatement, the result column will not be updated correct(ex:%|st).
    but if i change the order of columns like:
    "update TBMIS_AUDIT_ISSUE_PROJECT set E_DATE=?  RESULT=?   where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(2, "Test");it will be correct.
    when i put the column which type is VARCHAR2 in the first place like:
    "update TBMIS_AUDIT_ISSUE_PROJECT set STATE=?, E_DATE=?  RESULT=?   where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(1, "1");the same, the state column will not be updated correct(ex:%)
    but result column will be correct
    looks something wrong in preparedstatement at jdbc 10.1.0 or 10.2.0
    it works well when the driver is jdbc 8.1.7(classes12.zip)
    or working without preparedstatement
    so. is it the bug? or something i missed
    thanks

    and..
    it happened when
    VARCHAR2( size ) less then 1829
    when varchar2 ( size > 1829)
    it doen not happend..
    my table scheme like this
    create table TBMIS_AUDIT  (
       ID                   NUMBER(10)                     not null,
       S_DATE               DATE,
       E_DATE               DATE,
       NOTE                 VARCHAR2(200),
       STATUS             VARCHAR2(1)
    );my code is
    String sql = "update TBMIS_AUDIT set  NOTE=? , S_DATE=?"
                    + ",  STATUS=? where ISSUE_NO=?";
    PreparedStatement pstmt = con.prepareStatement(sql);
    pstmt.setString(1, "ok!!");
    pstmt.setTimestamp(2, new Timestamp(System.currentTimeMillis()));
    pstmt.setString(3, "1");
    pstmt.setString(4, "1");the note column will be filled with some wrong character
    if NOTE is VARCHAR2(2000), it works well again..
    or changing E_DATE to Timestamp in oracle

  • Auto Increment ID Field Table in the Oracle Database (insert new record)

    I have been using the MySQL. And the ID field of the database table is AUTO INCREMENT. When I insert a new record into a database table, I can have a statement like:
       public void createThread( String receiver, String sender, String title,
                                 String lastPostMemberName, String threadTopic,
                                 String threadBody, Timestamp threadCreationDate,
                                 Timestamp threadLastPostDate, int threadType,
                                 int threadOption, int threadStatus, int threadViewCount,
                                 int threadReplyCount, int threadDuration )
                                 throws MessageDAOSysExceptionand I do not have to put the ID variable in the above method. The table will give the new record an ID number that is equivalent to the ID number of the last record plus one automatically.
    Now, I am inserting a new record into an Oracle database table. I am told that I cannot do what I am used to doing with the MySQL database.
    How do I revise the createThread method while I have no idea about what the next sequence number shall be?

    I am still very confused; in particular, the Java part. Let me try again.
    // This part is for the database table creation
    -- Component primary key sequence
    CREATE SEQUENCE dhsinfo_page_content_seq
        START WITH 0;
    -- Trigger for updating the Component primary key
    CREATE OR REPLACE TRIGGER DHSInfoPageContent_INSERT_TRIGGER
        BEFORE INSERT ON DHSInfoPageContent //DHSInfoPageContent is the table name
        FOR EACH ROW WHEN (new.ID IS NULL) // ID is the column name for auto increment
        BEGIN
            SELECT dhsinfo_page_content_seq.Nextval
            INTO :ID
            FROM DUAL;
        END;/I am uncertain what to do with my Java code. (I have been working with the MySQL. Changing to the Oracle makes me very confused.
       public void updateContent( int groupID, String pageName, int componentID,
                                  String content, Timestamp contentCreationDate )
                                   throws contentDAOSysException
       // The above Java statement does not have a value to insert into the ID column
       // in the DHSInfoPageContent table
          Connection conn = null;
          PreparedStatement stmt = null;
          // what to do with the INSERT INTO below.  Note the paramether ID.
          String insertSQL = "INSERT INTO DHSInfoPageContent( ID, GroupID, Name, ComponentID, Content, CreationDate ) VALUES (?, ?, ?, ?, ?, ?)";
          try
             conn = DBConnection.getDBConnection();
             stmt = conn.prepareStatement( insertSQL );
             stmt.setInt( 1, id ); // Is this Java statement redundant?
             stmt.setInt( 2, groupID );
             stmt.setString( 3, pageName );
             stmt.setInt( 4, componentID );
             stmt.setString( 5, content );
             stmt.setTimestamp( 6, contentCreationDate );
             stmt.executeUpdate();
           catch
           finally

  • Geting and setting date and time in oracle using jdbc

    can u send me a sample snippet which shows me how to set date and time to a column in oracle database where the column datatype is date.
    and also send me the sample code to get the date and time from the above said column
    thanks in advance

    If you want DATE with time normalized to midnight, use java.sql.Date. If you really want time, with hours/minutes/seconds/millis, use java.sql.Timestamp.
    As for the best way to interact with the database, use java.sql.PreparedStatement and its get/setDate and get/setTimestamp methods. Those will escape dates for you properly.
    Look for a JDBC tutorial on-line to see how to do this, or http://www.javaalmanac.com for the java.sql package examples.
    %

  • PreparedStatement.setTimestamp does not allo use of DATE index..

    (...although they' re not suposed be related)
    Hi;
    I use Oracle 10g with Java JDBC driver ojdbc14.jar and I have a PreparedStatement on which among other "bind" JDBC parameters I have a java.util.Date. The ORM that we use (Hibernate 2.0.3) passes this Date instance as a java.sql.Timestamp binding it with setTimestamp on the PreparedStatement.
    Interestingly enaugh, this way of binding the value does not make the database use the date column index, although the explain available from TOAD / Session browse, for instance, tells me the planner first demands an index scan there (it is possible i think that explain only operates on prepared SQL alone, disregarding value initial types and values). Doing a preparedStatement.setDate(value) instead, passing a java.sql.Date, uses the index and probably fully respects the Explain Plan that I have seen.
    I assure you I have done many tests, with exact same query, parameter types and values, session origination and environment and changing one thing at a time. The only thing that being changed enables the query to make use of the DATE column index and return under a second, compared to tens of seconds of full table scan with expensive function calls, is to replace the preparedStatement.setTimestamp with setDate.
    This can only be a JDBC bug, as far as I can tell. Do you know of this problem? What may be the cause?
    As a note, since I need to continue to use that version of Hibernate on that spot, I momentarily worked around this apparent bug by modifying the SQL WHERE clause in order to provide the DATE value as to_date function output from a String bind, so doing date_col = to_date('YYYY-MM-DD', :value) instead of date_col = :value. Works fain, but just a work around.
    Looking forward for your answer and suggestions,
    Nicu Marasoiu

    A few remarks:
    - Toad explain plans can be frought by implicit data type conversions.
    Generally speaking everything is treated as a varchar2.
    - You would need to show the plan from v$sql_plan.
    - It would be a JDBC bug if you can show 'correct' behavior from sql*plus, making sure you actually do use bind variables of the correct type (so VARIABLE foo date prior to running the SQL, the SELECT referencing :foo)
    - In the past I have observed strange CBO behavior because the date wasn't a complete date (ie time was missing). This can be rectified by function based indexes.
    - You probably can enable event 10053 in your JDBC session, or event 10046 level 12
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Time Machine Backup not possible (normal external Hard drive)

    Hi, has anyone else had the problem that after the Lion upgrade its not possible to even really access your external time machine? i have a 1TB Samsung HD103SI Media and when it tries to boot up it wont show in finder, i can see it in the disk drive

  • The transaction log for database 'SharePoint_Config' is full

    Hi all , I am very new to sharepoint. when i tried to remove a wsp file from central administration i got the message like The transaction log for database 'SharePoint_Config' is full. To find out why space in the log cannot be reused, see the log_re

  • Setup table vs Update table

    Hi, What is the difference between the setup table and update table? Kindly clarify. I really appreciate all your help. Thanks. Regards, Jon.

  • Hosting Email for Clients

    We are looking to start hosting email for our clients and need to find out more on the capabilities of Mac Server to fulfill that role. Can a single Mail server (Snow Leopard) accomplish this?

  • IBook G3 airport card not finding networks

    i have an iBook G3 that i have just put an airport card in, after installing the airport card it shows the card is installed but no networks have been found. i did some research online and it said to check the antena, make sure the card is inserted a