Hi , Using the product I got exception creating new user:
WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = form, page = qwicket.myapp.page.NewUserPage, path = 1:form.NewUserPage$NewUserForm, isVisible = true, isVersioned = true]] threw an exception
Root cause:
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
at qwicket.myapp.dao.impl.AbstractBasicHibernateDao.list(AbstractBasicHibernateDao.java:68)
at qwicket.myapp.dao.impl.UserDaoImpl.findByEmail(UserDaoImpl.java:15)
at qwicket.myapp.service.impl.UserServiceImpl.emailInUse(UserServiceImpl.java:52)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy16.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy17.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
at org.apache.wicket.proxy.$Proxy20.emailInUse(Unknown Source)
at qwicket.myapp.page.NewUserPage$NewUserForm.onSubmit(NewUserPage.java:100)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1275)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:769)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1094)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Complete stack:
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = form, page = qwicket.myapp.page.NewUserPage, path = 1:form.NewUserPage$NewUserForm, isVisible = true, isVersioned = true]] threw an exception
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:194)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1094)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1094)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:75)
at qwicket.myapp.dao.impl.AbstractBasicHibernateDao.list(AbstractBasicHibernateDao.java:68)
at qwicket.myapp.dao.impl.UserDaoImpl.findByEmail(UserDaoImpl.java:15)
at qwicket.myapp.service.impl.UserServiceImpl.emailInUse(UserServiceImpl.java:52)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy16.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy17.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
at org.apache.wicket.proxy.$Proxy20.emailInUse(Unknown Source)
at qwicket.myapp.page.NewUserPage$NewUserForm.onSubmit(NewUserPage.java:100)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1275)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:769)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1094)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
at qwicket.myapp.dao.impl.AbstractBasicHibernateDao.list(AbstractBasicHibernateDao.java:68)
at qwicket.myapp.dao.impl.UserDaoImpl.findByEmail(UserDaoImpl.java:15)
at qwicket.myapp.service.impl.UserServiceImpl.emailInUse(UserServiceImpl.java:52)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy16.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy17.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
at org.apache.wicket.proxy.$Proxy20.emailInUse(Unknown Source)
at qwicket.myapp.page.NewUserPage$NewUserForm.onSubmit(NewUserPage.java:100)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1275)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:769)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1094)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
at qwicket.myapp.dao.impl.AbstractBasicHibernateDao.list(AbstractBasicHibernateDao.java:68)
at qwicket.myapp.dao.impl.UserDaoImpl.findByEmail(UserDaoImpl.java:15)
at qwicket.myapp.service.impl.UserServiceImpl.emailInUse(UserServiceImpl.java:52)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy16.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy17.emailInUse(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
at org.apache.wicket.proxy.$Proxy20.emailInUse(Unknown Source)
at qwicket.myapp.page.NewUserPage$NewUserForm.onSubmit(NewUserPage.java:100)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1275)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:769)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1094)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
May be this is not a bug , but incorrect usage of the product.
Please advise
it sounds like you don't have the connection information correct in your configuration. Check the database connection info to make sure it's correct.