Login Failure for Sybase connection
newtonm Oct 8, 2002 8:26 AMHi,
I'm having problems setting up jboss-3.0.2 to connect to my Sybase ASE 11.9.2 database. I've followed the instructions in 'Chapter 10 - Connecting to Databases and other Resource Managers' of the Getting Started pdf file and created a serice.xml file based on the sybase-service.xml file that comes in the <jboss_home>/docs/examples/jca/ directory.
I entered the following information:
<config-property name="ConnectionURL" type="java.lang.String">
jdbc:sybase:Tds:wmldnux19:2650/planIT_mark_dev
</config-property>
<config-property name="DriverClass" type="java.lang.String">
com.sybase.jdbc2.jdbc.SybDataSource
</config-property>
<config-property name="UserName" type="java.lang.String">
newtonm
</config-property>
<config-property name="Password" type="java.lang.String">
newtonm
</config-property>
I also entered the following lines in the login-config.xml file in <jboss_home>/server/default/conf directory:
<application-policy name = "SybaseDbRealm">
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">guest</module-option>
<module-option name = "userName">admin</module-option>
<module-option name = "password">123</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=SybaseDB</module-option>
</login-module>
</application-policy>
I then copied the jconn2.jar file to <jboss_home>/server/default/lib and the service.xml file to <jboss_home>/server/default/deploy.
This appears to work correctly but when I deploy my application by copying the ear file into <joss_home>/server/default/deploy I get the following error message:
2002-10-08 12:13:06,606 INFO [org.jboss.ejb.EjbModule] Starting
2002-10-08 12:13:06,622 DEBUG [org.jboss.ejb.EjbModule] Application.start(), start container: org.jboss.ejb.EntityContainer@6ee3ec
2002-10-08 12:13:06,622 DEBUG [org.jboss.ejb.EntityContainer] Begin java:comp/env for EJB: ProjectBudget
2002-10-08 12:13:06,622 DEBUG [org.jboss.ejb.EntityContainer] TCL: java.net.URLClassLoader@422a3b
2002-10-08 12:13:06,622 DEBUG [org.jboss.ejb.EntityContainer] End java:comp/env for EJB: ProjectBudget
2002-10-08 12:13:06,622 DEBUG [org.jboss.ejb.plugins.local.BaseLocalContainerInvoker] Bound EJBLocalHome of ProjectBudget to ProjectBudget
2002-10-08 12:13:06,622 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.ProjectBudget] Initializing CMP plugin for ProjectBudget
2002-10-08 12:13:07,044 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.ProjectBudget] Loading standardjbosscmp-jdbc.xml : file:/C:/jboss-3.0.2/server/default/conf/standardjbosscmp-jdbc.xml
2002-10-08 12:13:07,185 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.ProjectBudget] jar:file:/C:/jboss-3.0.2/server/default/tmp/deploy/server/default/deploy/planit.ear/61.planit.ear-contents/planit-ejb.jar!/META-INF/jbosscmp-jdbc.xml found. Overriding defaults
2002-10-08 12:13:07,419 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807
2002-10-08 12:13:07,419 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1034076037419, new next: 1034076037419
2002-10-08 12:13:07,419 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=admin, password=123}
2002-10-08 12:13:07,419 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Checking driver for URL: jdbc:sybase:Tds:wmldnux19:2650/planIT_mark_dev
2002-10-08 12:13:07,419 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver not yet registered for url: jdbc:sybase:Tds:wmldnux19:2650/planIT_mark_dev
2002-10-08 12:13:07,435 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver not yet registered for url: jdbc:sybase:Tds:wmldnux19:2650/planIT_mark_dev
2002-10-08 12:13:07,560 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver already registered for url: jdbc:sybase:Tds:wmldnux19:2650/planIT_mark_dev
2002-10-08 12:13:07,763 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
2002-10-08 12:13:07,763 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=true
2002-10-08 12:13:07,763 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2002-10-08 12:13:07,778 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:service=EJB,jndiName=ProjectBudget
org.jboss.deployment.DeploymentException: Error while fixing table name; - nested throwable: (org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).); - nested throwable: (org.jboss.resource.ResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).)))
at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:67)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:103)
and then every Entity EJB suffers the same error.
I have checked the login details numerous times and they are correct. I can log in using them from Forte, isql, XEmacs etc...
Could somebody please point me in the right direction to find out what is wrong?
thanks,
Mark