3 Replies Latest reply on Nov 11, 2002 10:52 AM by Markus

    Saving 500k String in Hypersonic?

    Markus Newbie

      Hi,

      I want to save a string of max 500k in my CMP2 bean. But it seems that Hypersonic isn't able to save such large data. I've tried to do it using LONGVARCHAR but this doesn't work.
      Is there a possibility to set the maximum data of LONGVARCHAR to 500k? Or do I have to use another database?

      Thanks for your help,
      Markus

        • 1. Re: Saving 500k String in Hypersonic?
          Juha Lindfors Master

          how about using CLOB? does hypersonic support that type?

          • 2. Re: Saving 500k String in Hypersonic?
            Markus Newbie

            Hypersonic knows the following datatypes:

            INTEGER
            DOUBLE
            FLOAT
            VARCHAR
            VARCHAR_IGNORECASE
            CHAR
            LONGVARCHAR
            DATE
            TIME
            TIMESTAMP
            DECIMAL
            NUMERIC
            BIT
            TINYINT
            SMALLINT
            BIGINT
            REAL
            BINARY
            VARBINARY
            LONGVARBINARY
            OTHER | OBJECT

            • 3. Re: Saving 500k String in Hypersonic?
              Markus Newbie

              I've tried LONGVARCHAR, LONGVARBINARY and OBJECT but I always get the following Exception:

              javax.ejb.CreateException: Could not create Entity:java.sql.SQLException: Connection is broken
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:199)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:450)
              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.createHome(EntityContainer.java:728)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
              java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1116)
              at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)


              I've also tried to add the following lines to the xdoclet definition of the get method (I've used LONGVARCHAR etc., too):

              * @jboss:sql-type LONGVARBINARY (1000000)
              *
              * @jboss:jdbc-type LONGVARBINARY


              It sets the LONGVARBINARY but not the size....