0 Replies Latest reply on Mar 21, 2004 10:05 AM by neva

    Problem when including the datasource xml file in ear

    neva

      Hello,

      I have an application that works fine when I put the datasource xml file in the deployment folder of JBoss. However, I tried to remove that DS xml file from there and included it into the application.ear file. This is where I get a deployment error.
      I get the following:

      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MySqlDS; - nested throwable: (javax.naming.NameNotFoundException: MySqlDS not bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:115)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:438)
      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.GeneratedMethodAccessor366.invoke(Unknown Source)
      ......................... org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      Caused by: javax.naming.NameNotFoundException: MySqlDS not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:112)
      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

      does that mean that I MUST have the datasource xml file in the deployment folder
      of xml before I can deploy my application? if not, then how can I do it. I need to
      have all my application wrapped up in the ear file only..
      Thanks in advance...bye