java - Nested Servlet exception while accessing Relational Data using JDBC with Spring -


I am following this document -

After setting up, and creating a jdbc template -

  SimpleDriverDataSource dataSource = New SimpleDriverDataSource (); DataSource.setDriverClass (com.mysql.jdbc.Driver.class); DataSource.setUsername ("user name"); DataSource.setUrl ("JDBC: mysql: /uel.to.connect.the.db"); DataSource.setPassword ("password"); JdbcTemplate jdbcTemplate = new JdbcTemplate (dataSource);  

When I'm trying to create a specific query -

  list & gt; GameBean & gt; Result = jdbcTemplate.query ( "Select" * Games, New RowMapper & LT; GameBean & gt; () {@Override public GameBean mapRow (ResultSet rs, int ROWNUM) SQLException {GameBean GB = throws new GameBean () ; Gb.setGameId (GetInt ("GameId"); gb.setGameName (rsgetstring ("GameName"); Return GB;}});  

I have noted an error "JDBC connection could not get,"

  org.springframework.jdbc. CannotGetJdbcConnectionException: Could not find JDBC connection; Nested exception is java.sql.SQLException: user access denied to social_devuser'@'10.55.200.1 '(using password: YES) org.springframework.jdbc.datasource.DataSourceUtils.getConnection (DataSourceUtils.java:80) org. Springframework Jbkkkorkjbktemplete.aksekyute (Jbktempletekjawa:382) Orgkspringfrmevorkkjbkkkorkjbktempletekkweri (Jbktempletekjawa:456) Orgkspringfrmevorkkjbkkkorkjbktempletekkweri (Jbktempletekjawa:464) com.service.games.dao.GamesDao.getAllGames (GamesDao.java:26) com.service.games.SpringServiceController.getGreeting (SpringServiceController.java:24) sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) sun.reflect. Natyvemethodaksesrimpl Kinvoke (Natyvemethodaksesrimplkjawa:57) Sunkriflektkdelegtingmethodaksesrimplkinvoke (Delegtingmethodaksesrimplkjawa:43) Jawaklangkriflektkmethdkinvoke (Methdkjawa:606) Orgkspringfrmevorkkvebkmethdksport. InvocableHandlerMethod Kinvok (Invekblhandlr method. Java 14) o Rg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest (InvocableHandlerMethod.java:132) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableH AndlerMethod.invokeAndHandle (universalist modehandler method.javaoti4) org.springframework.web. Servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod (RequestMappingHandlerAdapter.java:748) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal (RequestMappingHandlerAdapter.java:689) org.springframework.web.servlet. Mvc.method.AbstractHandlerMethodAdapter.handle (AbstractsHandmitter Editor.java.83) org.springframework.web.servlet.DispatcherServlet.doDispatch (DispatcherServlet.java:945) org.springframework.web.servlet.DispatcherServlet.doService (DispatcherServlet.java:876 ) Orgkspringfrmevorkkvebksserwletkfrmevorksserwletkprosssrekuast (Frmevorksserwletkjawa:93l) Orgkspringfrmevorkkvebksserwletkfrmevorksserwletkdoget (Frmevorksserwletkjawa:822) Jvksksserwlet.actiteepikhttpsserwletksrvis (Httpsserwletkjawa 620) Orgkspringfrmevorkkvebksserwletkfrmevorksserwletksrvis (Frmevorksserwletkjawa:807) Jvksksserwlet.actiteepikhttpsserwletksrvis (Httpsserwletkjawa:727) Orgkapachektomkatkvebsoketksrhwarkvsfailtrkdofiltr (WsFilter.java:52)  

Can anyone tell me what can I miss here?

You must properly configure for your MySQL schema:

  java.sql.SQLException: user access denied 'social_devuser'@'10.55.200.1' (using password: YES)  

maybe you've specified your config Inaccurate name / password or you have not been given access to that user from 10.55.200.1 IP address


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -