1 Reply Latest reply on Aug 17, 2003 8:05 AM by juhalindfors

    CMP Deployment Problem

    forshahzaib

      I'm trying to run simple CMP in Jboss with MS Access for testing.

      and whenever I deploy the application I get this following exception:

      I'm not sure that JBOSS is configurable with MSAccess or not?

      This is like Ejb-jar.xml looks like --->


      <display-name>Product (CMP) Entity Bean</display- name>
      <ejb-name>Product</ejb-name>
      examples.ProductHome
      examples.Product
      <ejb-class>examples.ProductBean</ejb-class>
      <prim-key-class>java.lang.String</prim-key-class>
      <persistence-type>Container</persistence-type>
      false
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>products</abstract-schema-name>

      <cmp-field>
      <field-name>productID</field-name>
      </cmp-field>
      .....

      THis is my jbosscmp-jdbc looks like:

      <jbosscmp-jdbc>

      java:/MSAccessDS <datasource-mapping>MS SQLSERVER</datasource-mapping>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <pk-constraint>true</pk-constraint>


      <enterprise-beans>

      <ejb-name>Product</ejb-name>
      <table-name>products</table-name>

      <cmp-field>
      <field-name>productID</field-name>
      <colu......


      This is my msaccess-ds.xml in default\deploy dir:


      <local-tx-datasource>
      <jndi-name>MSAccessDS</jndi-name>
      <!-- format of URL is "jdbc:odbc:DSNNAME" -->
      <connection-url>jdbc:odbc:Accounts</connection-url>
      <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
      <user-name></user-name>

      </local-tx-datasource>



      Can any one tell me where am I wrong?

      [What is this exception mean?]
      10:19:11,843 INFO [EntityContainer] Starting
      10:19:57,140 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Connection timed out: connect; - nested throwable: (java.n
      et.ConnectException: Connection timed out: connect)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:316)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:247)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:219)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:203)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:74)

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.j
      ava:737)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:43
      0)
      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.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      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.GeneratedMethodAccessor6.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 $Proxy50.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      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.GeneratedMethodAccessor6.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

        • 1. Re: CMP Deployment Problem

          I've never used MS Access. It looks like it might not be accepting TCP/IP connections (or something else is preventing the entity container to connect to your Access instance).

          If you're just testing JBoss, you can use the hypersonic database that comes with the default distribution. That is already bound and operational under the java:/DefaultDS lookup name.

          -- Juha