27 June 2008

Blob problem (oracle)

Problem
code: st.setBinaryStream(1,streamData,data.length)
while inserting blob .it will throw
ORA-01460: unimplemented or unreasonable conversion requested Exception

Problem root
oracle driver problem (ojdbc14.jar) if you are using oracle 9 driver or minor version driver (ojdbc14.jar) .it will happen

Solution

please download corresponding latest driver from oracle website

XmlBeans - ClassCastException

problem
while creating bean instance .it will throw
Exception in thread "main" java.lang.ClassCastException: com.javaorigin.xmlBean.SampleBean at com.javaorigin.xmlBean.SampleBean.SampleComplexBean.Factory.newInstance(Unknown Source)

Problem Root
This is java major and minor version problem .if you are using xmlbean 2.2.0 with jdk1.4.x
then it will happen

Solution
use latest jdk for compiling scemas (ex: use xmlBean2.2.0 with jdk1.5 )