4 Replies Latest reply on Oct 4, 2002 6:17 AM by Markus

    @jboss:sql-type creates SAXParseException

    Markus Newbie

      Hi,

      I've tried to save a 200kB String in an entity bean (cmp2). Because of the default VARCHAR limit in the Hypersonic DB I've written the following code:

      /**
      * @ejb:persistent-field
      *
      * @jboss:column-name name="I_THUMBNAIL"
      * @jboss:sql-type VARCHAR(400000)
      **/
      public abstract String getThumbnail();
      public abstract void setThumbnail(String pThumbnail );


      Now the following code is generated by XDoclet in the jaws.xml and jbosscmp-jdbc.xml for this cmp-field:

      <cmp-field>
      <field-name>thumbnail</field-name>
      <column-name>I_THUMBNAIL</column-name>
      <sql-type>VARCHAR(400000)</sql-type>
      </cmp-field>



      But now the deployment of this bean doesn't work any more:

      19:12:32,628 ERROR [XmlFileLoader] File file:/J:/jbosstomcat/server/default/tmp/deploy/server/default/deploy/bookshop.jar/82.bookshop.jar!/META-INF/jbosscmp-jdbc.xml process error. Line: 381. Error message:
      org.xml.sax.SAXParseException: In Element "cmp-field" ist hier "sql-type" nicht zulässig.
      at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
      at org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(ValidatingParser.java:349)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1317)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
      at [...]


      The SAXParseException is something like: "sql-type" is not permitted in element "cmp-field"


      Can someone help me? Is there a fault in the XDoclet Docu?

      Thanks,
      Markus