Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Application not connecting to database

Author  Topic 

runnerpaul
Starting Member

24 Posts

Posted - 2013-06-24 : 06:02:06
Hi,

I have a problem with an application connecting to the db with the user sunrise. I get the below errors in the application logs. Does this mean anything to anybody?

quote:
013-06-19 20:43:05,625 INFO com.sunrisesw.puma.database.ConnectionPool.a - Database Parameters
2013-06-19 20:43:05,625 INFO com.sunrisesw.puma.database.ConnectionPool.a - Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
2013-06-19 20:43:05,640 INFO com.sunrisesw.puma.database.ConnectionPool.a - Server URL = jdbc:sqlserver://10.4.0.249:1433;DatabaseName=Sostenuto;
2013-06-19 20:43:05,640 INFO com.sunrisesw.puma.database.ConnectionPool.a - Login = sunrise
2013-06-19 20:43:05,640 INFO com.sunrisesw.puma.database.ConnectionPool.a - Driver Type = 4
2013-06-19 20:43:05,640 INFO com.sunrisesw.puma.database.ConnectionPool.a - Minimum Connectionse = 10
2013-06-19 20:43:05,640 INFO com.sunrisesw.puma.database.ConnectionPool.a - Increment Connections By = 2
2013-06-19 20:43:06,062 FATAL com.sunrisesw.puma.database.ConnectionPool.<init> - Database driver initialisation failed:
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'sunrise'.)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at com.sunrisesw.puma.database.b.<init>(Unknown Source)
at com.sunrisesw.puma.database.ConnectionPool.<init>(Unknown Source)
at com.sunrisesw.puma.database.c.<clinit>(Unknown Source)
at com.sunrisesw.puma.database.DBSQLAdapter.singleSelect(Unknown Source)
at com.sunrisesw.puma.router.Router.populateMapping(Unknown Source)
at com.sunrisesw.puma.router.Router.getInstance(Unknown Source)
at com.sunrisesw.puma.presentation.AdminServlet.init(Unknown Source)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1133)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:787)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:183)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'sunrise'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2529)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1905)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1893)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1045)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
... 33 more
2013-06-19 20:43:06,078 FATAL com.sunrisesw.puma.database.c.<clinit> - Init static block
com.sunrisesw.puma.util.errorhandler.SysException
at com.sunrisesw.puma.database.ConnectionPool.<init>(Unknown Source)
at com.sunrisesw.puma.database.c.<clinit>(Unknown Source)
at com.sunrisesw.puma.database.DBSQLAdapter.singleSelect(Unknown Source)
at com.sunrisesw.puma.router.Router.populateMapping(Unknown Source)
at com.sunrisesw.puma.router.Router.getInstance(Unknown Source)
at com.sunrisesw.puma.presentation.AdminServlet.init(Unknown Source)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1133)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:787)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:183)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)


As far as I can see the security exists on the SQL Server.

Does anybody have any ideas as to why this isn't connecting?

Cheers
Paul

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-24 : 06:11:14
have you enabled mixed mode?

http://support.microsoft.com/kb/555332

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

runnerpaul
Starting Member

24 Posts

Posted - 2013-06-24 : 06:23:37
It is enabled. I just realised that 'Allow remote connections to this server' is not ticked. Could this be the issue? The appliocation sits on a different server on the same domain.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-24 : 06:49:17
Enable remote connections setting cannot be reason for your error. It seems to be related to permissions for the username used. You could give it a try too if you want.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

runnerpaul
Starting Member

24 Posts

Posted - 2013-06-24 : 07:24:18
Ah, perhaps the password was wrong on the SQL login. I have updated it to the correct password but won't be able to test if this works until later.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-24 : 12:30:15
ok...let us know how you got on!

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -