• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.0 Error  RSS feed

 
Rahul JG
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to deploy an Entity (Order) having a dependent object associated with it (Address)
(Example from Professional EJB -> Pg 190 -> Wrox Publications).
However when I try to create the Order bean, I get the following error
java.rmi.RemoteException: EJB Exception:; nested exception is:
javax.ejb.EJBException
- with nested exception:
[java.sql.SQLException: ORA-01401: inserted value too large for column
]
java.sql.SQLException: ORA-01401: inserted value too large for column
<<no stack trace available>>

I tried to debug and found out that the control goes upto the ejbPostCreate() method.
The table structure is as follows:
ORDERID NOT NULL VARCHAR2(50)
CUSTNAME VARCHAR2(50)
ADDRESS VARCHAR2(100)
Below is the line of code for the create method
Order order = orderHome.create("1" ,"Rahul Gokhale", new AddressValueObject("some road", "some city", 733402));
Environment:
Weblogic 6.0 upgraded for EJB 2.0 using the patch from BEA
Oracle 8i
Any clues as to why this might be happening???
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, your address column is too small. Try changing it to 1000 bytes and see if that helps.
Kyle
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!