[jboss-user] [Beginners Corner] - jboss 3.2.1: identity management for sql server 2005

RCQ do-not-reply at jboss.com
Fri Apr 20 09:42:38 EDT 2007


hi all

our application was developed long time ago for postgres.
now we are porting it to sql server 2005.

now, in sql server, column id management is automatically done by the database. 

Therefore, i found the following on 
http://www.ubookcase.com/book/Sams/JBoss.4.0.The.Official.Guide/0672326485/ch11lev1sec11.html
anonymous wrote : 
  | mssql-fetch-key (org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand) JDBCSQLServerCreateCommand for Microsoft SQL Server uses the value from an IDENTITY columns. By default, it uses SELECT SCOPE_IDENTITY() to reduce the impact of triggers. You can override it with the pk-sql attribute (for example, for version 7).
  | 

so i added in standardjbosscmp-jdbc.xml the following (it was not yet present there)
anonymous wrote : 
  | <entity-command name="mssql-fetch-key"                class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand"/>	
  | 

But when i add that line in standardjbosscmp-jdbc.xml, i get the error below. 

anonymous wrote : 15:26:12,638 ERROR [EntityContainer] Starting failed
  | org.jboss.deployment.DeploymentException: Could not load class: org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreat
  | eCommand
  |         at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData.(JDBCEntityCommandMetaData.java:61)
  |         at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:239)
  |         at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:67)
  |         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:737)
  |         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:430)
  |         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:372)
  |         at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:170)
  |         at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
  |         at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
  |         at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
  |         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
  |         at $Proxy11.start(Unknown Source)
  |         at org.jboss.system.ServiceController.start(ServiceController.java:392)
  |         at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
  |         at $Proxy34.start(Unknown Source)
  |         at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
  |         at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
  |         at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
  |         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
  |         at $Proxy11.start(Unknown Source)
  |         at org.jboss.system.ServiceController.start(ServiceController.java:392)
  |         at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
  |         at $Proxy22.start(Unknown Source)
  |         at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:540)
  |         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
  |         at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:324)
  |         at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
  |         at $Proxy7.deploy(Unknown Source)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:20

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039270#4039270

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039270



More information about the jboss-user mailing list