Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Database issue; Migrating from weblogic 6 to 9

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi: I am migrating application from weblogic 6 to weblogic 9 and the database is 10. There is a database code in the application that calls stored procedure to save some kind of information. The same code works prefectly fine on weblogic 6; however if I run the same code on weblogic 9. It breaks down and I get following exception "java.sql.SQLException: ORA-01861: literal does not match format string".

I am sure there is no problem in the code becasue that works on weblogic 6 but ONLY breaks in case weblogic 9. So I am gussing it might be compatibility issue, I might be using incorrect version of drivers. I have put odbc14.jar file in lib folder, I dont what else I am missing.

Also I have strong feeling that it is something with Date parameters.

FYI I am also pasting the code:


callstmnt = con.prepareCall("{call JAM_UPD_PG.MOD_PAY_PR(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
callstmnt.registerOutParameter(1, Types.INTEGER);
callstmnt.setInt(1,(new Integer(8048)).intValue());
callstmnt.setInt(2,(new Integer(9)).intValue());
callstmnt.setString(3,"MONEY");
callstmnt.setString(4,"0");
Timestamp timeNow = new Timestamp(System.currentTimeMillis());

callstmnt.setString(5, "19700101010000");
//callstmnt.setDate(6,date_created_sql);
//callstmnt.setTimestamp(5, timeNow);

callstmnt.setString(6, "19700101010000");
//callstmnt.setTimestamp(6, timeNow);

//callstmnt.setTimestamp(7, ts1);
callstmnt.setString(7, "19700101010000");
//callstmnt.setTimestamp(7, timeNow);

callstmnt.setString(8,"John.S.Clancy");
callstmnt.setString(9,"FXU");
callstmnt.setString(10,"IBM ");
callstmnt.setString(11,"FAIRLAWN");
callstmnt.setString(12,"ACTIVE");
callstmnt.setString(13,"40 Broadway Ave");
callstmnt.setString(14, "");
callstmnt.setString(15, "");

callstmnt.setInt(16, 0);
callstmnt.setString(17,"");
callstmnt.setString(18,"Fair Lawn");
callstmnt.setString(19, "NJ");
callstmnt.setString(20, "Bergen");
callstmnt.setString(21, "07410");
callstmnt.setString(22,"");
callstmnt.setString(23,"US");
callstmnt.setString(24,"");
callstmnt.setString(25,"");
callstmnt.setString(26,"");
callstmnt.setString(27,"");
callstmnt.setString(28,"");
callstmnt.setString(29,"");
callstmnt.setString(30,"");
callstmnt.setString(31,"");
callstmnt.setString(32,"");
callstmnt.setString(33,"");
callstmnt.setString(34,"");
callstmnt.setString(35,"");
callstmnt.setString(36,"");
callstmnt.setString(37,"");
callstmnt.setString(38,"");
callstmnt.setString(39,"");
callstmnt.setString(40,"");
callstmnt.setString(41,"");
callstmnt.setString(42,"");


callstmnt.setString(43,"");
callstmnt.setString(44,"");

callstmnt.setString(45,"");

callstmnt.setString(46, "");
callstmnt.setString(47, "");
callstmnt.setString(48, "");
callstmnt.setString(49, "");
callstmnt.setString(50, "");
callstmnt.setString(51, "");
callstmnt.setString(52, "");
callstmnt.setString(53, "");


callstmnt.setString(54, "");
callstmnt.setString(55, "");
callstmnt.setString(56, "");
callstmnt.setString(57, "");
callstmnt.setString(58, "");
callstmnt.setString(59, "");
callstmnt.setString(60, "");
callstmnt.setString(61, "");
callstmnt.setString(62, "");
callstmnt.setString(63, "");
callstmnt.setString(64, "");
callstmnt.setString(65, "");



callstmnt.registerOutParameter(66, Types.VARCHAR);
callstmnt.registerOutParameter(67, Types.VARCHAR);


callstmnt.setString(68, " ");
callstmnt.setString(69, " ");
callstmnt.setString(70, " ");
callstmnt.setString(71, " ");
callstmnt.setString(72, " ");
callstmnt.setString(73, " ");
callstmnt.setString(74, " ");
callstmnt.setString(75, " ");
callstmnt.setString(76, " ");


callstmnt.setString(77, " ");

callstmnt.execute();
 
TigerJeet Singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is complete exception from the dummy page

java.sql.SQLException: ORA-01861: literal does not match format string
ORA-06512: at line 1

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:954)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3422)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:73)
at jsp_servlet._apps._facilities.__facility_test_bikram._jspService(__facility_test_bikram.java:225)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3214
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic