1 2 Previous Next 17 Replies Latest reply on Sep 18, 2002 7:11 PM by Mark Kent

    Oracle BLOBs and JBoss patches

    Mark Kent Newbie

      We are using JBoss 2.4.3 with JDK 1.3 and Oracle 8.1.6 and the thin Oracle driver (classes111.zip).

      While implementing a new table with a Blob column I was unable to save data to the table. I found and Oracle/CMP patch for 2.4.4/8.1.7 (Request 525663) and have applied it with mixed results.

      I can now save data to the Oracle table (including the Blob column), but I'm getting exceptions trying to read the data back to my CMP bean with a findAll() method. The exception being thrown is an "UndeclaredThrowableException" and upon further digging and outputting of exception messages:

      catch( UndeclaredThrowableException e )
      { out.println( e.getUndeclaredThrowable() ); }

      I get this message: "java.io.NotSerializableException: oracle.sql.BLOB"

      Like I said, I can save the data, just not read it. I can see where similar issues have been discussed at length in other topics, but at least I'm able to save my data (now, after the patches were made).

      Anyone have any suggestions?

        • 1. Re: Oracle BLOBs and JBoss patches
          Alex Sauve Newbie

          I am having the same issue with Oracle 8.1.7 and Jboss 3.0... Please see my thread of "saving objects in Oracle 8 with JBoss 3" which I posted not too long ago... Well I have been on this issue for the last 2 weeks and I tried everything... Post numerous pleas for help and nothing, not even a nibble... You can try to use a LONG RAW but Oracle is saying that it should not be used, and there can only be one per table... Well my boss finally gave in and we are going with a purchased app server much to my dismay... But JBoss and Oracle don't get along...

          If you find a fix please do post it...

          Later,
          Alex

          • 2. Re: Oracle BLOBs and JBoss patches
            Mark Kent Newbie

            Strangely, I cannot see anything in my logfiles that point to an error other than the one I dug out of the "UndeclaredThrowableException" (and that one was hiding -- no mention in the logfiles).

            I'm gonna keep trying as there has to be a solution for this (using the Blob column). Otherwise, our solution is to "break apart" the long string data into managable "String" (varchar2) chunks and save them separately and re-assemble them when needed. *blech*

            One thing I have not verified though, is the actual data in my Oracle Blob column. In SQL*Plus, I cannot display the contents of the column to ensure that my patched 2.4.3 version actually saved the data correctly.

            • 3. Re: Oracle BLOBs and JBoss patches
              Mark Kent Newbie

              One other thing...

              Asuave, have you gotten the latest CVS HEAD of 3.0 and checked for these applied patches? I got one this morning, but the file I checked, JDBCCommand.java, did not have the referenced patched lines included.

              • 4. Re: Oracle BLOBs and JBoss patches
                Dain Sundstrom Master

                I applied the patch to JBossCMP only in Branch_3_0 and HEAD. I'm not sure it acutally works with 8 and I there have emails about it definately working with 9.

                If it actualy works with 8, I can apply it to JAWS (I don't work on JAWS but I can do it anyway).

                • 5. Re: Oracle BLOBs and JBoss patches
                  Mark Kent Newbie

                  Dain,

                  I just got the latest CVS version and did find the changes in the CMP part. I was looking in the wrong section (JAWS). We are going to try this out ourselves for JAWS, so unless you're just feeling frisky, I'll let you know how it works on our end... Thanks for the input!

                  • 6. Re: Oracle BLOBs and JBoss patches
                    Alex Sauve Newbie

                    I am trying this on the JBOSS 3.0 final therefore I believe that the patches that you are refering to are applied in that load... If there is anything that you want me to try, I would be glad to do it...


                    Later,
                    Alex

                    • 7. Re: Oracle BLOBs and JBoss patches
                      Mark Kent Newbie

                      Dain, Asuave,

                      I have checked out the 3.0 version and made the patches to the appropriate files, and can build 3.0 successfully. However, I'm having trouble getting JBoss 3.0 to start without errors. The first I see is:

                      2002-06-24 15:52:39,766 DEBUG [org.jboss.ejb.EJBDeployer] Verifying njar:file:/usr/local/jboss-3.0.0/server/default/tmp/deploy/server/default/de
                      ploy/jetty-plugin.sar/42.jetty-plugin.sar^/org.mortbay.jetty.jar
                      2002-06-24 15:52:39,802 ERROR [org.jboss.ejb.EJBDeployer] Verfiy failed
                      java.lang.NoClassDefFoundError: javax/ejb/EntityBean
                      at java.lang.ClassLoader.defineClass0(Native Method)
                      at java.lang.ClassLoader.defineClass(ClassLoader.java:496)

                      I know that discussion of this start error is off-topic for this area os I'll likely move it to there.

                      Dain, would you mind applying the patch code to the JAWS files as well? I'd like to know that it is patched correctly and that it wasn't just me that did it wrong causing my compiled version to not start correctly.

                      • 8. Re: Oracle BLOBs and JBoss patches
                        Dain Sundstrom Master

                        It looks like you have a half committed snapshot. Try updating the source again, and doing a clean build.

                        I'll apply the patch later the week, before the 3.0.1 release.

                        • 9. Re: Oracle BLOBs and JBoss patches
                          Kuba Nowakowski Newbie

                          Hi

                          Have you tested it before committed changes???

                          The problem is still there

                          regards
                          Kuba

                          • 10. Re: Oracle BLOBs and JBoss patches
                            Dain Sundstrom Master

                            I don't have Oracle, so I commit the changes and ask people to test the changed source. I have had several reports that say this is fixed for Oracle 8. Oracle 9 is still broken, because they rebroke their drivers in a new and inproved way.

                            What is the exact problem you are seeing? Are you using JBoss 3.0.1? Are you using JBossCMP or JAWS?

                            • 11. Re: Oracle BLOBs and JBoss patches
                              Brad Leupen Newbie

                              hey,

                              i am having the exact same problem with Oracle 9i and Jboss 3.0.0/Jboss 3.0.1. It keeps throwing an "Invalid Column Type" exception no matter if i set the Object type mapping to "BLOB", "LONG RAW", or "RAW(255)". Here is a portion of my stack trace:

                              javax.ejb.EJBException: Internal error setting parameters for field launchDates; CausedByException is:
                              Invalid column type
                              at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:289)
                              at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:262)
                              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:192)
                              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)
                              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
                              at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
                              at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
                              at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              Does the 3.0.1 release contain the relevant patch? Will this patch even help with Oracle 9i or am i just SOL?

                              b

                              • 12. Re: Oracle BLOBs and JBoss patches
                                Brad Leupen Newbie

                                hey,

                                i am having the exact same problem with Oracle 9i and Jboss 3.0.0/Jboss 3.0.1. It keeps throwing an "Invalid Column Type" exception no matter if i set the Object type mapping to "BLOB", "LONG RAW", or "RAW(255)". Here is a portion of my stack trace:

                                javax.ejb.EJBException: Internal error setting parameters for field launchDates; CausedByException is:
                                Invalid column type
                                at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:289)
                                at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:262)
                                at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:192)
                                at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)
                                at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
                                at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
                                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
                                at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                                Does the 3.0.1 release contain the relevant patch? Will this patch even help with Oracle 9i or am i just SOL?

                                b

                                • 13. Re: Oracle BLOBs and JBoss patches
                                  Brad Leupen Newbie

                                  sorry about the double post! the launchDates property that i am trying to save is of type java.util.ArrayList.

                                  it seems to me that persisting an Entity EJB property that is a serializable object is a very basic task. Has anyone succeeded in making this work with Oracle 9i?!

                                  b

                                  • 14. Re: Oracle BLOBs and JBoss patches
                                    Dain Sundstrom Master

                                    I agree that this is a basic task, but Oracle has never produced a standards complient JDBC driver. This works for Oracle 8, but not 9, as Oracle has seen fit to introduce all new bugs in Oracle 9i.

                                    This will eventualy be fixed, but it is not a high priorty for me. If you want to take shot at fixing it, I'll be more then willing to help, but I ask to you be serious before sending me an email (have offered help to severl people who never came through). The fix is also not simple because we have a policy of not including JDBC driver extensions in the jboss code, so this has to be implemented as a pluggable interface.

                                    1 2 Previous Next