【发布时间】:2011-10-20 05:56:05
【问题描述】:
我需要在应用程序上下文加载之前创建 hssldb。我找到了如何用 spring-modules-sandbox 做到这一点 http://forum.springsource.org/showthread.php?14419-HSQL-server-wrapped-into-a-Spring-bean&p=19830#post19830
添加maven依赖:
<dependency>
<groupId>org.springmodules</groupId>
<artifactId>spring-modules-sandbox</artifactId>
<version>0.8</version>
</dependency>
编译时得到以下警告:
Downloading: http://10.10.1.33:8081/nexus/content/groups/public/org/springmodules/spring-modules-sandbox/0.8/spring-modules-sandbox-0.8.pom
[WARNING] The POM for org.springmodules:spring-modules-sandbox:jar:0.8 is missing, no dependency information available
但成功了。 然后尝试使用bean:
<bean id="dataBase" class="org.springmodules.db.hsqldb.ServerBean" scope="singleton" lazy-init="false">
<!--<property name="dataSource" ref="idtSimulatorDataSource" >-->
<!--<!–<ref local=""/>–>--> <!--<!–
<ref local= "idtSimulatorDataSource"/>–>--> <!--</property>-->
<property name="serverProperties" >
<props>
<prop key="server.port">9101</prop>
<prop key="server.database.0">./idt_simulatorsdb</prop>
<prop key="server.dbname.0">idt_simulatorsdb</prop>
</props>
</property>
</bean>
在appcontext加载过程中报错:
java.lang.NoClassDefFoundError: org/hsqldb/HsqlProperties
google 没有帮助,真的需要帮助
【问题讨论】:
标签: java spring javabeans hsqldb