This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

I have developed the project using spring web services and wsdl generated automatically..when i tested wsdl using soap ui tool getting the above error.The response has to get from the database.I am using mysql for the connection.for the databse connection i am facing the problem.please help me for database connection in web services and what are the classes required for connection.In the console it is shown as like below but the response in soapui is failed.

Comment

org.springframework.beans.factory.BeanInitializati onException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [file/jdbc.properties] cannot be opened because it does not exist
at org.springframework.beans.factory.config.PropertyR esourceConfigurer.postProcessBeanFactory(PropertyR esourceConfigurer.java:78)
at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:553)
at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:527)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:362)
at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 02)
at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:316 )
at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:282)
at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.j ava:160)
at org.apache.catalina.core.StandardWrapper.initServl et(StandardWrapper.java:1228)
at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1147)
at org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:836)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:269)

Why are you using spring?! In your code you do everything not to use spring...

Start by fixing your configuration and use spring properly.

1. Configure your datasource in a spring xml file (or javaconfig)
2. Use dependency injection instead of ugly lookups
3. Instead of plain JDBC use a JdbcTemplate
4. Please sanity your code and remove the StringBuilders, they only make your code unreadable without any added benefit (no you don't get any performance gains by using it not in this case).
4a (Use slf4j as a logging facede instead of commons logging that can do the concat for you by using placeholders.

Currently I have no idea not without seeing the whole codebase and how everything works.