jboss5 启动时报HsqlException:length must be specified in type definition:VARBINARY错误

https://community.jboss.org/message/585994

EJBTimerService error on JBoss5 start up - without applications

此问题已回答

Hi

I just starting to use JBoss5 with HSQLDB2.0.1 rc 3. Just installed and configured JBoss and HSQLDB, without any deployment of application.

This is what I get in the log of server startup:

16:49:17,405 ERROR [AbstractKernelController] Error installing to Start: name=jboss.ejb:persistencePolicy=database,service=EJBTimerService state=Create mode=Manual requiredState=Installed

java.sql.SQLException: length must be specified in type definition: VARBINARY

at org.hsqldb.jdbc.Util.sqlException(Util.java:215)

at org.hsqldb.jdbc.JDBCStatement.fetchResult(JDBCStatement.java:1826)

at org.hsqldb.jdbc.JDBCStatement.executeUpdate(JDBCStatement.java:207)

at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:249)

at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.createTableIfNotExists(GeneralPurposeDatabasePersistencePlugin.java:175)

at org.jboss.ejb.txtimer.DatabasePersistencePolicy.startService(DatabasePersistencePolicy.java:104)

at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)

at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)

...

 

and then:

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.ejb:service=EJBTimerService" is missing the following dependencies:
    Dependency "jboss.ejb:persistencePolicy=database,service=EJBTimerService" (should be in state "Create", but is actually in state "**ERROR**")
  DEPLOYMENTS IN ERROR:
  Deployment "jboss.ejb:persistencePolicy=database,service=EJBTimerService" is in error due to the following reason(s): org.hsqldb.HsqlException: length must be specified in type definition: VARBINARY, **ERROR**

 

Any help would be really appreciated
 

正确回答  作者 jaikiran pai  开启 Feb 8, 2011 2:35 AM
jaikiran pai

Can you try this:

 

- Open the JBOSS_HOME/server/< servername>/conf/standardjbosscmp-jdbc.xml in a text editor

- Search for the "Hypersonic SQL" type-mappping in that file. It will look something like this:

 

<type-mapping>
         <name>Hypersonic SQL</name>
         <row-locking-template/>
         ...



         <mapping>
            <java-type>java.lang.Object</java-type>
            <!-- hsqldb only supports directly serializable objects for sql type OBJECT -->
            <jdbc-type>VARBINARY</jdbc-type>
            <sql-type>VARBINARY</sql-type>
         </mapping>
...

      </type-mapping>

 

Try changing it to:

 

<type-mapping>
         <name>Hypersonic SQL</name>
         <row-locking-template/>
         ...



         <mapping>
            <java-type>java.lang.Object</java-type>
            <!-- hsqldb only supports directly serializable objects for sql type OBJECT -->
            <jdbc-type>VARBINARY</jdbc-type>
            <sql-type>VARBINARY(1024)</sql-type>
         </mapping>
...

      </type-mapping>

 

See the change in the sql-type value. I set the length randomly to 1024.

 

After this change, restart the server and see if it works.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值