随笔 - 2228  文章 - 4  评论 - 371  阅读 - 1109万

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.

posted on   duanxz  阅读(753)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
< 2013年5月 >
28 29 30 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示