您的位置:首页 > 数据库

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

2013-05-14 15:21 706 查看

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




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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐