Using Weblogic 8.1, Oracle 8i and Weblogic's jDriver JDBC driver, a simple EJB program throws the following exception when a new entity bean is created.
java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column".
</p>
The primary key field of the table is a NUMBER field. The field is defined as java.lang.Integer in the entity bean. The same program can be deployed to OC4J and JBoss with out problems at all.
Any help would be appreciated! Thanks in advance!
Vincent.
</p>
Discussions
EJB programming & troubleshooting: Help! Weblogic8.1 and Oracle 8i caused ORA-01461 exception
-
Help! Weblogic8.1 and Oracle 8i caused ORA-01461 exception (2 messages)
- Posted by: C.T. Wong
- Posted on: December 15 2003 04:15 EST
Threaded Messages (2)
- reply by Alex Pisarev on December 19 2003 04:08 EST
- Help! Weblogic8.1 and Oracle 8i caused ORA-01461 exception by Roman Smatana on February 19 2004 12:20 EST
-
reply[ Go to top ]
- Posted by: Alex Pisarev
- Posted on: December 19 2003 04:08 EST
- in response to C.T. Wong
Vincent,
Looks like JDBC driver maps Java Integer to Oracle LONG somehow (and that is quite strange!).
Probably, the best option of generation primary keys would be to use Oracle sequence and use Automatic sequence-based key generator which is supported by Weblogic. That will definetely sort out your problem.
Alex -
Help! Weblogic8.1 and Oracle 8i caused ORA-01461 exception[ Go to top ]
- Posted by: Roman Smatana
- Posted on: February 19 2004 12:20 EST
- in response to C.T. Wong
Are you convinced that You use correct Oracle driver, while Weblogic is up. WLS 8.1 adds in CLASSPATH ojdbc.jar ,which is latest oracle driver for Oracle 9>. Check it out and replace with classes12.jar.