Hi,
I'm developing my first application in Wicket, and I decided to attempt to
use Qwicket to speed things up.
I've got Wicket up and running, and developed a few pages to test things
such as tables, but now I need to link things up with a database.

So my applicationContext.xml file creates a SessionFactory with this code:

<bean id="sessionFactory" class="booking.BookingSessionFactory">
        <property name="dataSource"><ref local="dataSource"/></property>
        <property name="annotatedClasses">
                <list>
                        <value>booking.model.User</value>
                </list>
        </property>
        <property name="hibernateProperties">
                <props>
                        <prop 
key="hibernate.dialect">${hibernate.dialect}</prop>
                        <prop key="hibernate.connection.pool_size">5</prop>
                        <prop 
key="hibernate.show_sql">${hibernate.show_sql}</prop>
                        <prop key="hibernate.jdbc.batch_size">0</prop>
                        <prop 
key="hibernate.bytecode.use_reflection_optimizer">true</prop>
                                <prop
key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
                                <prop
key="hibernate.hibernate.cache.use_query_cache">true</prop>
                </props>
        </property>
</bean>

My file booking.model.User includes various annotations which came with the
Qwicket program.

Now the problem I get when trying to run the application through Tomcat
(within Eclipse) is as follows:
<snip>
INFO: using JDK 1.4 java.sql.Timestamp handling
20-Feb-2007 07:51:30
org.springframework.orm.hibernate3.LocalSessionFactoryBean
buildSessionFactory
INFO: Building new Hibernate SessionFactory
20-Feb-2007 07:51:31
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
INFO: Destroying singletons in
{org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[placeholderConfig,dataSource,sessionFactory,transactionManager,org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator,userService,eventService,BookingApplication];
root of BeanFactory hierarchy}
20-Feb-2007 07:51:31 org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sessionFactory' defined in class path resource
[applicationContext.xml]: Invocation of init method failed; nested exception
is java.lang.NoSuchFieldError: tableNameBinding
Caused by: java.lang.NoSuchFieldError: tableNameBinding
        at
org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:166)
        at
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:254)
</snip>

I have scoured the net trying to understand what 'Caused by:
java.lang.NoSuchFieldError: tableNameBinding' could be caused by, but am at
a loss!

Please can anyone help me with this? It might be something very simple that
I'm overlooking as I'm very new to this.

Thanks in advance,
Paul
-- 
View this message in context: 
http://www.nabble.com/Wicket-%2B-Spring-%2B-Hibernate-tf3257238.html#a9055827
Sent from the Wicket - Dev mailing list archive at Nabble.com.

Reply via email to