9 Replies Latest reply on Sep 20, 2008 5:12 AM by jaikiran

    Deployment dependency on datasource problem

      Hello.

      I am trying to port an existing app from JBossAS 4.2.3.GA to 5.0.0.CR1. I cannot seem to get the deployer to resolve dependencies on the datasource. I'm sure its a simple problem, but for the life of me I cannot get my app to deploy.

      I have simplified the app down to just one @Service bean to demonstrate the problem. The relevant parts of code are extracted as follows (business logic removed for clarity):

      MigrationServiceBean.java:

      @Service (objectName = "vieo.ccs:service=Migration")
      @Depends({"jboss.jca:service=DataSourceBinding,name=DefaultDS"})
      @Management(StartupService.class)
      public class MigrationServiceBean implements StartupService {
      
       @Resource(mappedName="java:/DefaultDS")
       private DataSource datasource;
      
       public void create() throws Exception {
       }
      
       public void destroy() {
       }
      
       public void start() throws Exception {
       }
      
       public void stop() {
       }
      }
      


      default-ds.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <datasources>
       <local-tx-datasource>
       <jndi-name>DefaultDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost:5432/jb5test</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>postgres</user-name>
       <password>p0stgres</password>
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
       <metadata>
       <type-mapping>PostgreSQL 8.0</type-mapping>
       </metadata>
       <!-- minimum connection pool size -->
       <min-pool-size>5</min-pool-size>
       <!-- maximum connection pool size -->
       <max-pool-size>30</max-pool-size>
       </local-tx-datasource>
      </datasources>
      


      The default-ds.xml is deployed separately from the app in the server/all/deploy/ directory. The bean is packaged inside a jar file (StartupService.jar) inside an ear file (vieo-ccs-infrastructure.ear) which is also deployed to the same directory.

      The application.xml file for the .ear file is as follows:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
      <application>
       <display-name>Test app</display-name>
       <description>Test app</description>
       <module>
       <ejb>StartupService.jar</ejb>
       </module>
      </application>
      


      This is the error message I get from JBoss:


      2008-09-17 12:05:59,495 5328 INFO [org.jboss.web.WebService] (main:) Using RMI server codebase: http://192.168.100.33:8083/
      2008-09-17 12:05:59,542 5375 DEBUG [org.jnp.server.NamingBeanImpl] (main:) Using NamingServer: org.jnp.server.NamingServer@10e2558
      2008-09-17 12:05:59,542 5375 DEBUG [org.jnp.server.NamingBeanImpl] (main:) Installed global NamingServer: org.jnp.server.NamingServer@10e2558
      2008-09-17 12:05:59,557 5390 DEBUG [org.jnp.server.NamingBeanImpl] (main:) InitialContext Environment:
      2008-09-17 12:05:59,557 5390 DEBUG [org.jnp.server.NamingBeanImpl] (main:) key=java.naming.factory.initial, value(java.lang.String)=org.jboss.iiop.naming.ORBInitialContextFactory
      2008-09-17 12:05:59,557 5390 DEBUG [org.jnp.server.NamingBeanImpl] (main:) key=java.naming.factory.url.pkgs, value(java.lang.String)=org.jboss.naming:org.jnp.interfaces
      2008-09-17 12:06:06,620 12453 WARN [org.jboss.system.deployers.HackClassloaderMetaDataDeployer] (main:) FIXME Using loader repository config: jboss.console:sar=console-mgr.sar for vfsfile:/C:/install/jboss-5.0.0.CR1/server/all/deploy/management/console-mgr.sar/ use classloading metadata not loader repository config
      2008-09-17 12:06:09,682 15515 INFO [org.jboss.aop.deployers.AspectDeployer] (main:) Deploying xml into org.jboss.aop.AspectManager@1d8e081 for BaseClassLoader@af84e{vfsfile:/C:/install/jboss-5.0.0.CR1/server/all/deploy/ejb3-interceptors-aop.xml}
      2008-09-17 12:06:09,745 15578 INFO [org.jboss.aop.deployers.AspectDeployer] (main:) Deploying AOP annotations into org.jboss.aop.AspectManager@1d8e081 for BaseClassLoader@fc644a{vfszip:/C:/install/jboss-5.0.0.CR1/server/all/deploy/cluster/jbossweb-cluster.aop}
      2008-09-17 12:06:09,745 15578 INFO [org.jboss.aop.deployers.AspectDeployer] (main:) Deploying xml into org.jboss.aop.AspectManager@1d8e081 for BaseClassLoader@fc644a{vfszip:/C:/install/jboss-5.0.0.CR1/server/all/deploy/cluster/jbossweb-cluster.aop}
      2008-09-17 12:06:26,511 32344 INFO [org.jboss.invocation.unified.server.UnifiedInvokerHA] (main:) Service name is jboss:service=invoker,type=unifiedha
      2008-09-17 12:06:27,120 32953 INFO [org.jboss.iiop.CorbaNamingService] (main:) CORBA Naming Started
      2008-09-17 12:06:30,151 35984 INFO [org.jboss.mx.remoting.service.JMXConnectorServerService] (main:) JMX Connector server: service:jmx:rmi://192.168.100.33/jndi/rmi://192.168.100.33:1090/jmxconnector
      2008-09-17 12:06:30,323 36156 INFO [org.jboss.mail.MailService] (main:) Mail Service bound to java:/Mail
      2008-09-17 12:06:30,745 36578 INFO [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] (main:) SNMP agent going active
      2008-09-17 12:06:30,854 36687 DEBUG [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Creating jboss:service=TransactionManager
      2008-09-17 12:06:30,854 36687 DEBUG [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Created jboss:service=TransactionManager
      2008-09-17 12:06:30,870 36703 DEBUG [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Starting jboss:service=TransactionManager
      2008-09-17 12:06:30,870 36703 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) JBossTS Transaction Service (JTA version) - JBoss Inc.
      2008-09-17 12:06:30,870 36703 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Setting up property manager MBean and JMX layer
      2008-09-17 12:06:31,011 36844 DEBUG [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (main:) [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_1] - Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 4175
      2008-09-17 12:06:31,026 36859 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (main:) TransactionStatusManagerItem - host: 192.168.100.33 port: 4175
      2008-09-17 12:06:31,026 36859 DEBUG [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (main:) [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_3] - TransactionStatusManager started on port 4175 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
      2008-09-17 12:06:31,057 36890 DEBUG [com.arjuna.ats.tsmx.logging.tsmxLogger] (main:) Registering mbean for module 'arjuna'
      2008-09-17 12:06:31,057 36890 DEBUG [com.arjuna.ats.tsmx.logging.tsmxLogger] (main:) Initialising JMX agent com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl
      2008-09-17 12:06:31,057 36890 DEBUG [com.arjuna.ats.tsmx.logging.tsmxLogger] (main:) Registering mbean for module 'jta'
      2008-09-17 12:06:31,073 36906 DEBUG [com.arjuna.ats.tsmx.logging.tsmxLogger] (main:) Registering mbean for module 'txoj'
      2008-09-17 12:06:31,089 36922 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Starting recovery manager
      2008-09-17 12:06:31,104 36937 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (main:)
      --- Start RecoveryActivators
      2008-09-17 12:06:31,120 36953 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-18:)
      --- ExpiredEntryMonitor ----Wed, 17 Sep 2008 12:06:31----
      2008-09-17 12:06:31,261 37094 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] (main:) [com.arjuna.ats.internal.jta.recovery.noxanodes] No XA recovery nodes specified. Will only recover saved states.
      2008-09-17 12:06:31,261 37094 DEBUG [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (main:) [com.arjuna.ats.internal.arjuna.recovery.ready] RecoveryManagerImple is ready on port 4,179
      2008-09-17 12:06:31,261 37094 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Recovery manager started
      2008-09-17 12:06:31,261 37094 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Binding TransactionManager JNDI Reference
      2008-09-17 12:06:31,276 37109 DEBUG [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main:) Started jboss:service=TransactionManager
      2008-09-17 12:06:31,511 37344 INFO [org.apache.catalina.core.AprLifecycleListener] (main:) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: c:\install\jdk1.5.0_12\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;c:\ant-1.7.0\bin;C:\install\postgres-8.2\bin;C:\install\agntctrl.win_ia32-TPTP-4.4.0.3\bin;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\Subversion;C:\Program Files\TortoiseSVN\bin;
      2008-09-17 12:06:31,557 37390 INFO [org.apache.coyote.http11.Http11Protocol] (main:) Initializing Coyote HTTP/1.1 on http-192.168.100.33-8080
      2008-09-17 12:06:31,557 37390 INFO [org.apache.coyote.ajp.AjpProtocol] (main:) Initializing Coyote AJP/1.3 on ajp-192.168.100.33-8009
      2008-09-17 12:06:31,557 37390 INFO [org.apache.catalina.startup.Catalina] (main:) Initialization processed in 133 ms
      2008-09-17 12:06:31,557 37390 INFO [org.apache.catalina.core.StandardService] (main:) Starting service jboss.web
      2008-09-17 12:06:31,557 37390 INFO [org.apache.catalina.core.StandardEngine] (main:) Starting Servlet Engine: JBoss Web/2.1.1.CR3
      2008-09-17 12:06:31,604 37437 INFO [org.apache.catalina.startup.Catalina] (main:) Server startup in 36 ms
      2008-09-17 12:06:32,214 38047 DEBUG [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-18:) [com.arjuna.ats.internal.arjuna.recovery.TransactionStatusConnector_6] - Failed to establish connection to server
      2008-09-17 12:06:32,214 38047 DEBUG [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-18:) [com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner_3] - Removing old transaction status manager item -3f579bdf:1031:48d081c5:0
      2008-09-17 12:06:32,245 38078 INFO [org.jboss.resource.deployers.RARDeployment] (main:) Required license terms exist, view vfszip:/C:/install/jboss-5.0.0.CR1/server/all/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
      2008-09-17 12:06:32,245 38078 INFO [org.jboss.resource.deployers.RARDeployment] (main:) Required license terms exist, view vfszip:/C:/install/jboss-5.0.0.CR1/server/all/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
      2008-09-17 12:06:32,276 38109 INFO [org.jboss.resource.deployers.RARDeployment] (main:) Required license terms exist, view vfszip:/C:/install/jboss-5.0.0.CR1/server/all/deploy/jms-ra.rar/META-INF/ra.xml
      2008-09-17 12:06:32,276 38109 INFO [org.jboss.resource.deployers.RARDeployment] (main:) Required license terms exist, view vfszip:/C:/install/jboss-5.0.0.CR1/server/all/deploy/mail-ra.rar/META-INF/ra.xml
      2008-09-17 12:06:32,307 38140 INFO [org.jboss.resource.deployers.RARDeployment] (main:) Required license terms exist, view vfszip:/C:/install/jboss-5.0.0.CR1/server/all/deploy/quartz-ra.rar/META-INF/ra.xml
      2008-09-17 12:06:32,401 38234 INFO [org.quartz.simpl.SimpleThreadPool] (main:) Job execution threads will use class loader of thread: main
      2008-09-17 12:06:32,432 38265 INFO [org.quartz.core.QuartzScheduler] (main:) Quartz Scheduler v.1.5.2 created.
      2008-09-17 12:06:32,432 38265 INFO [org.quartz.simpl.RAMJobStore] (main:) RAMJobStore initialized.
      2008-09-17 12:06:32,448 38281 INFO [org.quartz.impl.StdSchedulerFactory] (main:) Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
      2008-09-17 12:06:32,448 38281 INFO [org.quartz.impl.StdSchedulerFactory] (main:) Quartz scheduler version: 1.5.2
      2008-09-17 12:06:32,448 38281 INFO [org.quartz.core.QuartzScheduler] (main:) Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
      2008-09-17 12:06:32,667 38500 WARN [org.jboss.ejb3.Ejb3AnnotationHandler] (main:) JBMETA-4: did not find any bean meta data for annotation bean MigrationServiceBean, will create some
      2008-09-17 12:06:32,729 38562 INFO [STDOUT] (main:) ======> Creating interceptor metadata bridge
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) Created KernelDeployment for: StartupService.jar
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) installing bean: jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) with dependencies:
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) and demands:
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) jboss.jca:service=DataSourceBinding,name=DefaultDS
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) jboss.ejb:service=EJBTimerService
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) and supplies:
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) Class:com.vieo.ccs.startup.StartupService
      2008-09-17 12:06:33,089 38922 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main:) Added bean(jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3) to KernelDeployment of: StartupService.jar
      2008-09-17 12:06:33,182 39015 WARN [org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB] (main:) Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData@8624c777{MigrationServiceBean}
      2008-09-17 12:06:34,245 40078 INFO [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] (main:) Initializing partition DefaultPartition
      2008-09-17 12:06:34,307 40140 INFO [STDOUT] (JBoss System Threads(1)-3:)
      -------------------------------------------------------
      GMS: address is 192.168.100.33:7800
      -------------------------------------------------------
      2008-09-17 12:06:34,370 40203 INFO [STDOUT] (main:)
      -------------------------------------------------------
      GMS: address is 192.168.100.33:7800
      -------------------------------------------------------
      2008-09-17 12:06:37,339 43172 INFO [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] (JBoss System Threads(1)-3:) Number of cluster members: 1
      2008-09-17 12:06:37,339 43172 INFO [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] (JBoss System Threads(1)-3:) Other members: 0
      2008-09-17 12:06:37,370 43203 INFO [org.jboss.cache.RPCManagerImpl] (main:) Received new cluster view: [192.168.100.33:7800|0] [192.168.100.33:7800]
      2008-09-17 12:06:37,401 43234 INFO [org.jboss.cache.RPCManagerImpl] (main:) Cache local address is 192.168.100.33:7800
      2008-09-17 12:06:37,432 43265 INFO [org.jboss.cache.CacheImpl.DefaultPartition-HAPartitionCache] (main:) JBoss Cache version: JBossCache 'Alegrias' 2.1.1.GA
      2008-09-17 12:06:37,432 43265 INFO [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] (main:) Fetching serviceState (will wait for 30000 milliseconds):
      2008-09-17 12:06:37,432 43265 INFO [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] (main:) State could not be retrieved (we are the first member in group)
      2008-09-17 12:06:37,511 43344 INFO [org.jboss.ha.jndi.HANamingService] (main:) Started HAJNDI bootstrap; jnpPort=1100, backlog=50, bindAddress=/192.168.100.33
      2008-09-17 12:06:37,979 43812 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main:) JBoss Web Services - Stack Native Core
      2008-09-17 12:06:37,979 43812 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main:) 3.0.2.GA
      2008-09-17 12:06:38,886 44719 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main:) deploy, ctxPath=/jbossws, vfsUrl=jbossws.sar/jbossws-management.war
      2008-09-17 12:06:39,198 45031 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main:) deploy, ctxPath=/web-console, vfsUrl=management/console-mgr.sar/web-console.war
      2008-09-17 12:06:39,464 45297 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main:) deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
      2008-09-17 12:06:39,511 45344 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main:) deploy, ctxPath=/, vfsUrl=ROOT.war
      2008-09-17 12:06:39,542 45375 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main:) deploy, ctxPath=/invoker, vfsUrl=httpha-invoker.sar/invoker.war
      2008-09-17 12:06:39,604 45437 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main:) deploy, ctxPath=/juddi, vfsUrl=juddi-service.sar/juddi.war
      2008-09-17 12:06:39,682 45515 INFO [org.apache.juddi.registry.RegistryServlet] (main:) Loading jUDDI configuration.
      2008-09-17 12:06:39,682 45515 INFO [org.apache.juddi.registry.RegistryServlet] (main:) Resources loaded from: /WEB-INF/juddi.properties
      2008-09-17 12:06:39,682 45515 INFO [org.apache.juddi.registry.RegistryServlet] (main:) Initializing jUDDI components.
      2008-09-17 12:06:39,776 45609 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main:) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      2008-09-17 12:06:40,182 46015 INFO [org.quartz.simpl.SimpleThreadPool] (main:) Job execution threads will use class loader of thread: main
      2008-09-17 12:06:40,182 46015 INFO [org.quartz.core.QuartzScheduler] (main:) Quartz Scheduler v.1.5.2 created.
      2008-09-17 12:06:40,182 46015 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Using db table-based data access locking (synchronization).
      2008-09-17 12:06:40,198 46031 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Removed 0 Volatile Trigger(s).
      2008-09-17 12:06:40,198 46031 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Removed 0 Volatile Job(s).
      2008-09-17 12:06:40,198 46031 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) JobStoreCMT initialized.
      2008-09-17 12:06:40,198 46031 INFO [org.quartz.impl.StdSchedulerFactory] (main:) Quartz scheduler 'JBossEJB3QuartzScheduler' initialized from an externally provided properties instance.
      2008-09-17 12:06:40,198 46031 INFO [org.quartz.impl.StdSchedulerFactory] (main:) Quartz scheduler version: 1.5.2
      2008-09-17 12:06:40,198 46031 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Freed 0 triggers from 'acquired' / 'blocked' state.
      2008-09-17 12:06:40,214 46047 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Recovering 0 jobs that were in-progress at the time of the last shut-down.
      2008-09-17 12:06:40,214 46047 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Recovery complete.
      2008-09-17 12:06:40,214 46047 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Removed 0 'complete' triggers.
      2008-09-17 12:06:40,214 46047 INFO [org.quartz.impl.jdbcjobstore.JobStoreCMT] (main:) Removed 0 stale fired job entries.
      2008-09-17 12:06:40,214 46047 INFO [org.quartz.core.QuartzScheduler] (main:) Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED started.
      2008-09-17 12:06:40,464 46297 INFO [org.jboss.jms.server.ServerPeer] (main:) JBoss Messaging 1.4.1.CR1 server [1] started
      2008-09-17 12:06:40,682 46515 INFO [STDOUT] (main:)
      -------------------------------------------------------
      GMS: address is 192.168.100.33:7830
      -------------------------------------------------------
      2008-09-17 12:06:43,683 49516 INFO [org.jboss.messaging.core.impl.postoffice.GroupMember] (main:) org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener@e99e got new view [192.168.100.33:7830|0] [192.168.100.33:7830], old view is null
      2008-09-17 12:06:43,683 49516 INFO [org.jboss.messaging.core.impl.postoffice.GroupMember] (main:) I am (192.168.100.33:7830)
      2008-09-17 12:06:43,683 49516 INFO [org.jboss.messaging.core.impl.postoffice.GroupMember] (main:) New Members : 1 ([192.168.100.33:7830])
      2008-09-17 12:06:43,683 49516 INFO [org.jboss.messaging.core.impl.postoffice.GroupMember] (main:) All Members : 1 ([192.168.100.33:7830])
      2008-09-17 12:06:43,698 49531 INFO [STDOUT] (main:)
      -------------------------------------------------------
      GMS: address is 192.168.100.33:7820
      -------------------------------------------------------
      2008-09-17 12:06:46,808 52641 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main:) Connector bisocket://192.168.100.33:4457 has leasing enabled, lease period 10000 milliseconds
      2008-09-17 12:06:46,808 52641 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main:) org.jboss.jms.server.connectionfactory.ConnectionFactory@537945 started
      2008-09-17 12:06:47,479 53312 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main:) Connector bisocket://192.168.100.33:4457 has leasing enabled, lease period 10000 milliseconds
      2008-09-17 12:06:47,479 53312 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main:) org.jboss.jms.server.connectionfactory.ConnectionFactory@1d816e0 started
      2008-09-17 12:06:47,479 53312 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main:) Connector bisocket://192.168.100.33:4457 has leasing enabled, lease period 10000 milliseconds
      2008-09-17 12:06:47,479 53312 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main:) org.jboss.jms.server.connectionfactory.ConnectionFactory@1121f65 started
      2008-09-17 12:06:47,511 53344 INFO [org.jboss.jms.server.destination.QueueService] (main:) Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      2008-09-17 12:06:47,511 53344 INFO [org.jboss.jms.server.destination.QueueService] (main:) Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      2008-09-17 12:06:47,526 53359 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main:) Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      2008-09-17 12:06:47,683 53516 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main:) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

      jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3
      -> <UNKNOWN jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3>{Described:** UNRESOLVED Demands 'jboss.jca:service=DataSourceBinding,name=DefaultDS' **}


      *** CONTEXTS IN ERROR: Name -> Error

      <UNKNOWN jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3> -> ** UNRESOLVED Demands 'jboss.jca:service=DataSourceBinding,name=DefaultDS' **


      2008-09-17 12:06:47,683 53516 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-19:) Periodic recovery - first pass <Wed, 17 Sep 2008 12:06:47>
      2008-09-17 12:06:47,683 53516 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-19:) StatusModule: first pass
      2008-09-17 12:06:47,683 53516 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] (Thread-19:) [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
      2008-09-17 12:06:47,683 53516 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] (Thread-19:) [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
      2008-09-17 12:06:47,698 53531 INFO [org.apache.coyote.http11.Http11Protocol] (main:) Starting Coyote HTTP/1.1 on http-192.168.100.33-8080
      2008-09-17 12:06:47,714 53547 INFO [org.apache.coyote.ajp.AjpProtocol] (main:) Starting Coyote AJP/1.3 on ajp-192.168.100.33-8009
      2008-09-17 12:06:47,714 53547 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main:) JBoss (Microcontainer) [5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200806301254)] Started in 53s:532ms


      Does anyone have any idea why my MigrationServiceBean fails to deploy?

      The crazy thing is that "jboss.jca:service=DataSourceBinding,name=DefaultDS" is listed as started in the jmx-console, and furthermore the other services that are dependent on it (JBM and quartz) are able to create their database schemas just fine!

      Am I missing something?

        • 1. Re: Deployment dependency on datasource problem
          jaikiran

           

          @Depends({"jboss.jca:service=DataSourceBinding,name=DefaultDS"})


          1) I haven't given it a try, but remove this @Depends from the service and deploy the application. The datasources are deployed first and then the EAR files. So without that @Depends too you should be able to deploy this fine.

          OR

          2) Remove the @Depends and package the default-ds.xml inside the EAR file (at the root of the EAR). Also introduce a jboss-app.xml with the following module:
          <jboss-app>
          
          <module>
           <service>default-ds.xml</service>
           </module>
          
          </jboss-app>
          


          Place the jboss-app.xml inside the META-INF folder of the EAR.


          • 2. Re: Deployment dependency on datasource problem

             


            2) Remove the @Depends and package the default-ds.xml inside the EAR file (at the root of the EAR). Also introduce a jboss-app.xml with the following module:


            I can't do this because I need DefaultDS for the other standard JBoss services too (such as JBoss Messaging, quartz, etc).


            1) I haven't given it a try, but remove this @Depends from the service and deploy the application. The datasources are deployed first and then the EAR files. So without that @Depends too you should be able to deploy this fine.


            I don't think that helps. Even after removing the @Depends the server tries to deploy my service BEFORE the datasource that it is dependent on.

            For example this error:

            2008-09-17 18:09:02,663 38938 INFO [org.jboss.ejb3.EJBContainer] (main:) STARTED EJB: com.vieo.ccs.startup.impl.MigrationServiceBean ejbName: MigrationServiceBean
            2008-09-17 18:09:02,710 38985 ERROR [STDERR] (main:) java.lang.RuntimeException: Unable to inject jndi dependency: env/com.vieo.ccs.startup.impl.MigrationServiceBean/datasource into property com.vieo.ccs.startup.impl.MigrationServiceBean.dat
            asource: MigrationDS not bound


            is logged 7 seconds before the datasource is started!:


            2008-09-17 18:09:09,476 45751 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main:) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MigrationDS' to JNDI name 'java:MigrationDS'


            Either way, I also need to get the @Depends annotation working against datasources for other reasons.

            Specifically, I run two datasources, MigrationDS and DefaultDS as follows:

            1. MigrationServiceBean is dependent on MigrationDS, and takes care of schema validation/migration when the server starts.
            2. DefaultDS is dependent on MigrationServiceBean to ensure that none of the system or application services start until the migration process is complete.

            To implement this I need working @Depends annotations, and the weird thing is this exact setup works fine with JBoss 4.2.3!

            Any other ideas?

            • 3. Re: Deployment dependency on datasource problem
              jaikiran

              I just gave this a try on CR1:

              package org.myapp.service;
              
              import org.jboss.ejb3.annotation.Depends;
              import org.jboss.ejb3.annotation.Service;
              
              @Service
              @Depends ({"jboss.jca:name=DefaultDS,service=DataSourceBinding"})
              public class MyServiceImpl implements MyService {
              
               public String sayHelloService(String user) {
               System.out.println("From service - Hello " + user);
               return "From service - Hello " + user;
               }
              
              }
              


              The DefaultDS is configured through the hsqldb-ds.xml that comes shipped with JBoss AS. I packaged this @Service in a jar file inside and EAR and placed it in the deploy folder and started JBoss. The dependency was identified and the @Service was installed after the datasource got deployed:

              ===============================================================================
              
               JBoss Bootstrap Environment
              
               JBOSS_HOME: D:\jboss-5.0.0.CR1
              
               JAVA: C:\jdk1.5.0_10\bin\java
              
               JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
              
               CLASSPATH: D:\jboss-5.0.0.CR1\bin\run.jar
              
              ===============================================================================
              
              16:16:18,489 INFO [ServerImpl] Starting JBoss (Microcontainer)...
              16:16:18,489 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200806301254)
              16:16:18,489 INFO [ServerImpl] Home Dir: D:\jboss-5.0.0.CR1
              16:16:18,489 INFO [ServerImpl] Home URL: file:/D:/jboss-5.0.0.CR1/
              16:16:18,489 INFO [ServerImpl] Library URL: file:/D:/jboss-5.0.0.CR1/lib/
              16:16:18,489 INFO [ServerImpl] Patch URL: null
              16:16:18,489 INFO [ServerImpl] Server Name: jaikiran
              16:16:18,489 INFO [ServerImpl] Server Home Dir: D:\jboss-5.0.0.CR1\server\jaikiran
              16:16:18,489 INFO [ServerImpl] Server Home URL: file:/D:/jboss-5.0.0.CR1/server/jaikiran/
              16:16:18,489 INFO [ServerImpl] Server Data Dir: D:\jboss-5.0.0.CR1\server\jaikiran\data
              16:16:18,489 INFO [ServerImpl] Server Temp Dir: D:\jboss-5.0.0.CR1\server\jaikiran\tmp
              16:16:18,489 INFO [ServerImpl] Server Config URL: file:/D:/jboss-5.0.0.CR1/server/jaikiran/conf/
              16:16:18,489 INFO [ServerImpl] Server Library URL: file:/D:/jboss-5.0.0.CR1/server/jaikiran/lib/
              16:16:18,489 INFO [ServerImpl] Root Deployment Filename: jboss-service.xml
              16:16:19,551 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/D:/jboss-5.0.0.CR1/server/jaikiran/conf/bootstrap.xml
              16:16:22,208 INFO [CopyMechanism] VFS temp dir: D:\jboss-5.0.0.CR1\server\jaikiran\tmp
              16:16:22,208 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
              16:16:27,442 INFO [ServerInfo] Java version: 1.5.0_10,Sun Microsystems Inc.
              16:16:27,442 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_10-b03,Sun Microsystems Inc.
              16:16:27,442 INFO [ServerInfo] OS-System: Windows 2003 5.2,x86
              16:16:27,520 INFO [JMXKernel] Legacy JMX core initialized
              16:16:30,583 INFO [MetaDataAwareProfile] Using profile root:D:\jboss-5.0.0.CR1\server\jaikiran
              16:16:33,630 INFO [WebService] Using RMI server codebase: http://ps3346:8083/
              16:16:53,021 WARN [HackClassloaderMetaDataDeployer] FIXME Using loader repository config: jboss.console:sar=console-mgr.sar for vfsfile:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/management/console-mgr.sar/ use classloading metadata not loader repository config
              16:16:53,834 INFO [AspectDeployer] Deploying xml into org.jboss.aop.AspectManager@6f3870 for BaseClassLoader@1347df0{vfsfile:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/ejb3-interceptors-aop.xml}
              16:17:34,585 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://ps3346/jndi/rmi://ps3346:1090/jmxconnector
              16:17:34,835 INFO [MailService] Mail Service bound to java:/Mail
              16:17:34,898 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
              16:17:36,773 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
              16:17:36,773 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
              16:17:37,445 INFO [TransactionManagerService] Starting recovery manager
              16:17:37,757 INFO [TransactionManagerService] Recovery manager started
              16:17:37,757 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
              16:17:38,336 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\jdk1.5.0_10\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\jdk1.5.0_10\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\MSSQL\90\Tools\binn\;C:\MSSQL\90\DTS\Binn\;C:\MSSQL\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;
              16:17:38,492 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
              16:17:38,507 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-8009
              16:17:38,507 INFO [Catalina] Initialization processed in 392 ms
              16:17:38,507 INFO [StandardService] Starting service jboss.web
              16:17:38,507 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.1.CR3
              16:17:38,695 INFO [Catalina] Server startup in 188 ms
              16:17:39,070 INFO [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
              16:17:39,101 INFO [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
              16:17:39,148 INFO [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/jms-ra.rar/META-INF/ra.xml
              16:17:39,164 INFO [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/mail-ra.rar/META-INF/ra.xml
              16:17:39,211 INFO [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/quartz-ra.rar/META-INF/ra.xml
              16:17:39,398 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
              16:17:39,492 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
              16:17:39,492 INFO [RAMJobStore] RAMJobStore initialized.
              16:17:39,507 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
              16:17:39,507 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
              16:17:39,507 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
              16:17:40,867 WARN [Ejb3AnnotationHandler] JBMETA-4: did not find any bean meta data for annotation bean MyServiceImpl, will create some
              16:17:41,008 INFO [STDOUT] ======> Creating interceptor metadata bridge
               16:17:43,492 INFO [JBossASKernel] Created KernelDeployment for: myapp_ejb3.jar
               16:17:43,508 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=SecurityDomain.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3
               16:17:43,508 INFO [JBossASKernel] with dependencies:
               16:17:43,508 INFO [JBossASKernel] and demands:
               16:17:43,508 INFO [JBossASKernel] jboss.jca:name=DefaultDS,service=DataSourceBinding
               16:17:43,508 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
               16:17:43,508 INFO [JBossASKernel] and supplies:
               16:17:43,508 INFO [JBossASKernel] Class:org.myapp.service.MyService
               16:17:43,508 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=SecurityDomain.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3) to KernelDeployment of: myapp_ejb3.jar
               16:17:43,570 WARN [WebServiceDeployerEJB] Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData@50d40109{MyServiceImpl}
              16:17:43,695 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
              16:17:43,695 INFO [NativeServerConfig] 3.0.2.GA
              16:17:46,101 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
              16:17:46,758 INFO [TomcatDeployment] deploy, ctxPath=/web-console, vfsUrl=management/console-mgr.sar/web-console.war
              16:17:47,383 INFO [TomcatDeployment] deploy, ctxPath=/AjaxDemo, vfsUrl=AjaxDemo.war
              16:17:47,477 INFO [TomcatDeployment] deploy, ctxPath=/invoker, vfsUrl=http-invoker.sar/invoker.war
              16:17:47,680 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
              16:17:47,727 INFO [TomcatDeployment] deploy, ctxPath=/jbossws, vfsUrl=jbossws.sar/jbossws-management.war
              16:17:47,977 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
               16:17:48,820 WARN [QuartzTimerServiceFactory] sql failed: CREATE TABLE QRTZ_JOB_DETAILS(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP))
              16:17:48,914 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
              16:17:48,914 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
              16:17:48,914 INFO [JobStoreCMT] Using db table-based data access locking (synchronization).
              16:17:48,930 INFO [JobStoreCMT] Removed 0 Volatile Trigger(s).
              16:17:48,930 INFO [JobStoreCMT] Removed 0 Volatile Job(s).
              16:17:48,930 INFO [JobStoreCMT] JobStoreCMT initialized.
              16:17:48,945 INFO [StdSchedulerFactory] Quartz scheduler 'JBossEJB3QuartzScheduler' initialized from an externally provided properties instance.
              16:17:48,945 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
              16:17:48,945 INFO [JobStoreCMT] Freed 0 triggers from 'acquired' / 'blocked' state.
              16:17:48,945 INFO [JobStoreCMT] Recovering 0 jobs that were in-progress at the time of the last shut-down.
              16:17:48,945 INFO [JobStoreCMT] Recovery complete.
              16:17:48,945 INFO [JobStoreCMT] Removed 0 'complete' triggers.
              16:17:48,945 INFO [JobStoreCMT] Removed 0 stale fired job entries.
              16:17:48,961 INFO [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED started.
              16:17:49,352 INFO [ServerPeer] JBoss Messaging 1.4.1.CR1 server [0] started
              16:17:49,570 INFO [QueueService] Queue[queue/jboss/mpee/local/processedmessage, name=mpee_processedmessage] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,586 INFO [QueueService] Queue[/queue/testQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,586 INFO [TopicService] Topic[topic/jboss/mpee/local/serviceproviderupdatesrequests, name=mpee_serviceproviderupdatesrequests] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,586 INFO [QueueService] Queue[/queue/PrivateDLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,602 INFO [TopicService] Topic[/topic/testDistributedTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,883 INFO [ConnectionFactory] Connector bisocket://ps3346:4457 has leasing enabled, lease period 10000 milliseconds
              16:17:49,883 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@65f00a started
              16:17:49,898 INFO [QueueService] Queue[queue/jboss/mpee/local/notification, name=mpee_notification] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,898 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,898 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,898 INFO [TopicService] Topic[/topic/TopicWithOwnRedeliveryDelay] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,898 INFO [TopicService] Topic[/topic/securedTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,914 INFO [QueueService] Queue[/queue/QueueWithOwnDLQAndExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,914 INFO [QueueService] Queue[/queue/PrivateExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,914 INFO [ConnectionFactory] Connector bisocket://ps3346:4457 has leasing enabled, lease period 10000 milliseconds
              16:17:49,914 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@136b0 started
              16:17:49,930 INFO [TopicService] Topic[/topic/testTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,945 INFO [QueueService] Queue[queue/jboss/mpee/local/sendsmsmessage, name=mpee_sendsmsmessage] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,945 INFO [QueueService] Queue[/queue/A] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,945 INFO [TopicService] Topic[/topic/TopicWithOwnDLQAndExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
              16:17:49,945 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
              16:17:49,945 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
              16:17:49,945 INFO [ConnectionFactory] Connector bisocket://ps3346:4457 has leasing enabled, lease period 10000 milliseconds
              16:17:49,945 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@2d5f10 started
              16:17:49,961 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
              16:17:50,336 INFO [EJBContainer] STARTED EJB: org.myapp.service.MyServiceImpl ejbName: MyServiceImpl
               16:17:50,461 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=SecurityDomain.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3,type=ManagementInterface
               16:17:50,461 INFO [JBossASKernel] with dependencies:
               16:17:50,461 INFO [JBossASKernel] and demands:
               16:17:50,461 INFO [JBossASKernel] jboss.jca:name=DefaultDS,service=DataSourceBinding
               16:17:50,461 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
               16:17:50,461 INFO [JBossASKernel] and supplies:
               16:17:50,461 INFO [JBossASKernel] Class:org.myapp.service.MyService
               16:17:50,461 INFO [JBossASKernel] Installing bean(jboss.j2ee:ear=SecurityDomain.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3,type=ManagementInterface) into kernel
               16:17:51,149 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
              16:17:51,180 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009
              16:17:51,211 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200806301254)] Started in 1m:32s:707ms
              


              Can you provide more details about your application?

              1) What is the name of the EAR file?
              2) What is the name of the -ds.xml file?
              3) Have you done any changes to the JBoss setup after you downloaded it?
              4) Please post the entire console logs for the sample application that you are trying out.


              • 4. Re: Deployment dependency on datasource problem

                Since JBoss 5.0.0.CR2 has just been released, I downloaded it and tried again. It seems that things have improved slightly, but it is still broken in parts.

                Here are a couple of things that I noticed:

                1. In my code I have a @Depends line in the form:

                @Depends({"jboss.jca:service=DataSourceBinding,name=DefaultDS"})
                

                With this line, my @Service bean still fails to deploy, as per my previous post. However, if I reverse the ordering of the 'name' and 'service' fields in the @Depends line, it works!!:
                @Depends ({"jboss.jca:name=DefaultDS,service=DataSourceBinding"})
                


                This is very strange! The first ordering after all is how the dependency is specified for all the standard jboss services (for example, look at ejb3-timer-service.xml, or uuid-key-generator.sar/META-INF/jboss-service.xml), and it used to work fine in JBoss 4.2.3.GA.


                2. I'm now seeing a separate problem whereby if I add the @Management life-cycle annotation to the @Service bean, the bean fails to deploy:


                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) java.lang.RuntimeException: Problem registering @Management interface for @Service class com.vieo.ccs.startup.impl.MigrationServiceBean
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:629)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:228)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:858)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at java.lang.reflect.Method.invoke(Method.java:585)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:124)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1024)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1056)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                2008-09-18 15:17:23,041 38829 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.Main.boot(Main.java:209)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.Main$1.run(Main.java:544)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at java.lang.Thread.run(Thread.java:595)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) Caused by: java.lang.RuntimeException: javax.management.MBeanException
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.deployers.JBossASKernel.installMBean(JBossASKernel.java:181)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:603)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) ... 51 more
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) Caused by: javax.management.MBeanException
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:219)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.deployers.JBossASKernel.invokeOptionalMethod(JBossASKernel.java:287)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.deployers.JBossASKernel.installMBean(JBossASKernel.java:176)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) ... 52 more
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.interceptors.container.ContainerMethodInvocation.setTargetObject(ContainerMethodInvocation.java:120)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceContainer.populateInvocation(ServiceContainer.java:491)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:389)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:361)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)
                2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) ... 56 more
                2008-09-18 15:17:23,057 38845 WARN [org.jboss.ejb3.deployers.JBossASKernel] (main:) stop on jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3,type=ManagementInterface failed
                javax.management.MBeanException
                at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:219)
                at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                at org.jboss.ejb3.deployers.JBossASKernel.invokeOptionalMethod(JBossASKernel.java:287)
                at org.jboss.ejb3.deployers.JBossASKernel.uninstallMBean(JBossASKernel.java:220)
                at org.jboss.ejb3.service.ServiceContainer.unregisterManagementInterface(ServiceContainer.java:637)
                at org.jboss.ejb3.service.ServiceContainer.lockedStop(ServiceContainer.java:253)
                at org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:237)
                at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:858)
                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:585)
                at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
                at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
                at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:124)
                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1024)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1056)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
                at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
                at org.jboss.Main.boot(Main.java:209)
                at org.jboss.Main$1.run(Main.java:544)
                at java.lang.Thread.run(Thread.java:595)
                Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject
                at org.jboss.ejb3.interceptors.container.ContainerMethodInvocation.setTargetObject(ContainerMethodInvocation.java:120)
                at org.jboss.ejb3.service.ServiceContainer.populateInvocation(ServiceContainer.java:491)
                at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:389)
                at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:361)
                at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)
                ... 57 more
                2008-09-18 15:17:23,073 38861 WARN [org.jboss.ejb3.deployers.JBossASKernel] (main:) destroy on jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3,type=ManagementInterface failed
                javax.management.MBeanException
                at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:219)
                at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                at org.jboss.ejb3.deployers.JBossASKernel.invokeOptionalMethod(JBossASKernel.java:287)
                at org.jboss.ejb3.deployers.JBossASKernel.uninstallMBean(JBossASKernel.java:228)
                at org.jboss.ejb3.service.ServiceContainer.unregisterManagementInterface(ServiceContainer.java:637)
                at org.jboss.ejb3.service.ServiceContainer.lockedStop(ServiceContainer.java:253)
                at org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:237)
                at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:858)
                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:585)
                at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
                at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
                at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:124)
                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1024)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1056)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
                at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
                at org.jboss.Main.boot(Main.java:209)
                at org.jboss.Main$1.run(Main.java:544)
                at java.lang.Thread.run(Thread.java:595)
                Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject
                at org.jboss.ejb3.interceptors.container.ContainerMethodInvocation.setTargetObject(ContainerMethodInvocation.java:120)
                at org.jboss.ejb3.service.ServiceContainer.populateInvocation(ServiceContainer.java:491)
                at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:389)
                at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:361)
                at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)
                ... 57 more
                2008-09-18 15:17:23,088 38876 INFO [org.jboss.ejb3.EJBContainer] (main:) STOPPED EJB: com.vieo.ccs.startup.impl.MigrationServiceBean ejbName: MigrationServiceBean


                jaikiran, can you please try your bean again but with a @Management annotation as well? For example:

                MigrationServiceBean.java:
                @Service (objectName = "vieo.ccs:service=Migration")
                @Depends({"jboss.jca:name=DefaultDS,service=DataSourceBinding"})
                @Management(MigrationService.class)
                public class MigrationServiceBean implements MigrationService {
                 private static final Logger logger = new Logger(MigrationServiceBean.class);
                
                 @Resource(mappedName="java:/DefaultDS")
                 private DataSource datasource;
                
                 public void create() throws Exception {
                 logger.info("create()");
                 }
                
                 public void destroy() {
                 logger.info("destroy()");
                 }
                
                 public void start() throws Exception {
                 logger.info("start()");
                 }
                
                 public void stop() {
                 logger.info("stop()");
                 }
                }
                


                MigrationService.java:
                public interface MigrationService {
                 void create() throws Exception;
                 void start() throws Exception;
                 void stop();
                 void destroy();
                }
                


                I'm fairly sure it is this issue rearing its ugly head:

                https://jira.jboss.org/jira/browse/EJBTHREE-1430

                This is a bit of a showstopper it seems. I wonder why noone else seems to have noticed it?

                Again, these results are with JBossAS 5.0.0.CR2, using the postgres configuration for datasource, messaging and ejb3 timer service.

                • 5. Re: Deployment dependency on datasource problem
                  jaikiran

                  Now that CR2 has been released i guess its no point trying on CR1. Let me download the latest version and see what the issue is (if any).

                  But going by this exception:

                  Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject


                  It does seem that its related to https://jira.jboss.org/jira/browse/EJBTHREE-1430 (which by the way is still open and hence not available in CR2).



                  • 6. Re: Deployment dependency on datasource problem
                    jaikiran

                     

                    "scotto" wrote:


                    1. In my code I have a @Depends line in the form:
                    @Depends({"jboss.jca:service=DataSourceBinding,name=DefaultDS"})
                    

                    With this line, my @Service bean still fails to deploy, as per my previous post. However, if I reverse the ordering of the 'name' and 'service' fields in the @Depends line, it works!!:
                    @Depends ({"jboss.jca:name=DefaultDS,service=DataSourceBinding"})
                    




                    You are right. I see this problem too. Even on CR2.

                    "scotto" wrote:

                    2. I'm now seeing a separate problem whereby if I add the @Management life-cycle annotation to the @Service bean, the bean fails to deploy:


                    2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject
                    2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at org.jboss.ejb3.interceptors.container.ContainerMethodInvocation.setTargetObject(ContainerMethodInvocation.java:120)
                    2008-09-18 15:17:23,057 38845 ERROR [STDERR] (main:) at


                    jaikiran, can you please try your bean again but with a @Management annotation as well? For example:

                    MigrationServiceBean.java:
                    @Service (objectName = "vieo.ccs:service=Migration")
                    @Depends({"jboss.jca:name=DefaultDS,service=DataSourceBinding"})
                    @Management(MigrationService.class)
                    public class MigrationServiceBean implements MigrationService {
                     private static final Logger logger = new Logger(MigrationServiceBean.class);
                    
                     @Resource(mappedName="java:/DefaultDS")
                     private DataSource datasource;
                    
                     public void create() throws Exception {
                     logger.info("create()");
                     }
                    
                     public void destroy() {
                     logger.info("destroy()");
                     }
                    
                     public void start() throws Exception {
                     logger.info("start()");
                     }
                    
                     public void stop() {
                     logger.info("stop()");
                     }
                    }
                    


                    MigrationService.java:
                    public interface MigrationService {
                     void create() throws Exception;
                     void start() throws Exception;
                     void stop();
                     void destroy();
                    }
                    




                    This one is not actually a problem with adding the @Management annotation. This seems to happen, if you include the following 2 life-cycle methods in the management interface:

                    void create() throws Exception;
                     void start() throws Exception;


                    So removing these 2 methods and letting the other 2 lifecycle methods remain in the management interface got it deployed:


                    public interface MyService {
                    
                     public String sayHelloService(String user);
                    
                    
                     void stop();
                     void destroy();
                    
                    
                    }
                    


                    But hold on, the deployment works fine with this workaround, but the undeployment/shutdown runs into a similar issue:

                    17:13:20,408 WARN [JBossASKernel] stop on jboss.j2ee:ear=ServiceTest.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3,type=ManagementInterface failed
                    javax.management.MBeanException
                    at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:219)
                    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.ejb3.deployers.JBossASKernel.invokeOptionalMethod(JBossASKernel.java:287)
                    at org.jboss.ejb3.deployers.JBossASKernel.uninstallMBean(JBossASKernel.java:220)
                    at org.jboss.ejb3.service.ServiceContainer.unregisterManagementInterface(ServiceContainer.java:637)
                    at org.jboss.ejb3.service.ServiceContainer.lockedStop(ServiceContainer.java:253)
                    at org.jboss.ejb3.EJBContainer.stop(EJBContainer.java:895)
                    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:585)
                    at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                    at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                    at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
                    at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
                    at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:249)
                    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:157)
                    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:42)
                    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79)
                    at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131)
                    at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
                    at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
                    at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1631)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1242)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1146)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1201)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                    at org.jboss.system.ServiceController.doChange(ServiceController.java:672)
                    at org.jboss.system.ServiceController.stop(ServiceController.java:494)
                    at org.jboss.system.deployers.ServiceDeployer.stop(ServiceDeployer.java:153)
                    at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:133)
                    at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:45)
                    at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69)
                    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
                    at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:192)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1315)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1222)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1215)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1177)
                    at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
                    at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1631)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1242)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:543)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unload(ProfileServiceBootstrap.java:379)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unloadProfile(ProfileServiceBootstrap.java:340)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:168)
                    at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:508)
                    at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:827)
                    Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject
                    at org.jboss.ejb3.interceptors.container.ContainerMethodInvocation.setTargetObject(ContainerMethodInvocation.java:120)
                    at org.jboss.ejb3.service.ServiceContainer.populateInvocation(ServiceContainer.java:491)
                    at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:389)
                    at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:361)
                    at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)
                    ... 55 more
                    17:13:20,642 WARN [JBossASKernel] destroy on jboss.j2ee:ear=ServiceTest.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3,type=ManagementInterface failed
                    javax.management.MBeanException
                    at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:219)
                    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.ejb3.deployers.JBossASKernel.invokeOptionalMethod(JBossASKernel.java:287)
                    at org.jboss.ejb3.deployers.JBossASKernel.uninstallMBean(JBossASKernel.java:228)
                    at org.jboss.ejb3.service.ServiceContainer.unregisterManagementInterface(ServiceContainer.java:637)
                    at org.jboss.ejb3.service.ServiceContainer.lockedStop(ServiceContainer.java:253)
                    at org.jboss.ejb3.EJBContainer.stop(EJBContainer.java:895)
                    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:585)
                    at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                    at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                    at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
                    at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
                    at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:249)
                    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:157)
                    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:42)
                    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79)
                    at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131)
                    at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
                    at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
                    at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1631)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1242)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1146)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1201)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                    at org.jboss.system.ServiceController.doChange(ServiceController.java:672)
                    at org.jboss.system.ServiceController.stop(ServiceController.java:494)
                    at org.jboss.system.deployers.ServiceDeployer.stop(ServiceDeployer.java:153)
                    at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:133)
                    at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:45)
                    at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69)
                    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
                    at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:192)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1315)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1222)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1215)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1177)
                    at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
                    at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1631)
                    at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1242)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:543)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unload(ProfileServiceBootstrap.java:379)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unloadProfile(ProfileServiceBootstrap.java:340)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:168)
                    at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:508)
                    at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:827)
                    Caused by: java.lang.RuntimeException: Call setBeanContext, not setTargetObject
                    at org.jboss.ejb3.interceptors.container.ContainerMethodInvocation.setTargetObject(ContainerMethodInvocation.java:120)
                    at org.jboss.ejb3.service.ServiceContainer.populateInvocation(ServiceContainer.java:491)
                    at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:389)
                    at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:361)
                    at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)
                    ... 55 more
                    17:13:20,876 INFO [EJBContainer] STOPPED EJB: org.myapp.service.MyServiceImpl ejbName: MyServiceImpl


                    Without any of these 4 lifecycle methods, the @Management deployment/undeployment works fine.


                    • 7. Re: Deployment dependency on datasource problem
                      jaikiran

                       

                      "scotto" wrote:

                      1. In my code I have a @Depends line in the form:
                      @Depends({"jboss.jca:service=DataSourceBinding,name=DefaultDS"})
                      

                      With this line, my @Service bean still fails to deploy, as per my previous post. However, if I reverse the ordering of the 'name' and 'service' fields in the @Depends line, it works!!:
                      @Depends ({"jboss.jca:name=DefaultDS,service=DataSourceBinding"})
                      




                      This looks like a bug to me. As per the javadocs of the ObjectName http://java.sun.com/j2ee/1.4/docs/api/javax/management/ObjectName.html

                      The key properties are an unordered set of keys and associated values


                      • 8. Re: Deployment dependency on datasource problem

                         


                        Without any of these 4 lifecycle methods, the @Management deployment/undeployment works fine.


                        Yes thats what I'm seeing. Unfortunately, the entire point of using the @Management annotation is to allow access to the lifecycle methods!

                        Heres another issue that I've noticed:

                        If you use the @Service annotation with an objectName setting, e.g.
                        @Service (objectName = "vieo.ccs:service=Migration")
                        

                        it appears that the objectName setting is ignored. With this annotation I would normally expect to see the bean listed in the jmx-console under the "vieo.ccs" category (which is the behaviour observed on 4.2.3.GA).

                        Likewise, it should also be possible to define @Depends against this custom objectName, rather than having to use the fully qualified object name (e.g. jboss.j2ee:ear=vieo-ccs-infrastructure.ear,jar=StartupService.jar,name=MigrationServiceBean,service=EJB3), however this appears to no longer work either.

                        From all these issues it seems to me that there is a fundamental problem affecting the deployment of @Service beans. Perhaps the underlying cause is related somehow?

                        • 9. Re: Deployment dependency on datasource problem
                          jaikiran

                           

                          "scotto" wrote:


                          Heres another issue that I've noticed:

                          If you use the @Service annotation with an objectName setting, e.g.
                          @Service (objectName = "vieo.ccs:service=Migration")
                          

                          it appears that the objectName setting is ignored. With this annotation I would normally expect to see the bean listed in the jmx-console under the "vieo.ccs" category (which is the behaviour observed on 4.2.3.GA).



                          This does work on CR2. Here's the code and the logs that i see:
                          package org.myapp.service;
                          
                          import org.jboss.ejb3.annotation.Depends;
                          import org.jboss.ejb3.annotation.Management;
                          import org.jboss.ejb3.annotation.Service;
                          
                          @Service (objectName = "vieo.ccs:service=Migration")
                          @Management(MyService.class)
                          @Depends ({"jboss.jca:name=DefaultDS,service=DataSourceBinding"})
                          public class MyServiceImpl implements MyService {
                          
                           public String sayHelloService(String user) {
                           System.out.println("From service - Hello " + user);
                           return "From service - Hello " + user;
                           }
                          
                          }
                          



                          14:40:13,475 INFO [JBossASKernel] Created KernelDeployment for: myapp_ejb3.jar
                          14:40:13,475 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=ServiceTest.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3
                          14:40:13,475 INFO [JBossASKernel] with dependencies:
                          14:40:13,475 INFO [JBossASKernel] and demands:
                          14:40:13,475 INFO [JBossASKernel] jboss.jca:name=DefaultDS,service=DataSourceBinding
                          14:40:13,475 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
                          14:40:13,475 INFO [JBossASKernel] and supplies:
                          14:40:13,475 INFO [JBossASKernel] jndi:ServiceTest/MyServiceImpl/local
                          14:40:13,475 INFO [JBossASKernel] jndi:ServiceTest/MyServiceImpl/local-org.myapp.service.MyService
                          14:40:13,475 INFO [JBossASKernel] Class:org.myapp.service.MyService
                          14:40:13,475 INFO [JBossASKernel] jndi:ServiceTest/MyServiceImpl/remote
                          14:40:13,475 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=ServiceTest.ear,jar=myapp_ejb3.jar,name=MyServiceImpl,service=EJB3) to KernelDeployment of: myapp_ejb3.jar
                          14:40:13,678 INFO [EJBContainer] STARTED EJB: org.myapp.service.MyServiceImpl ejbName: MyServiceImpl
                          14:40:16,382 INFO [JBossASKernel] installing bean: vieo.ccs:service=Migration
                          14:40:16,382 INFO [JBossASKernel] with dependencies:
                          14:40:16,382 INFO [JBossASKernel] and demands:
                          14:40:16,382 INFO [JBossASKernel] jboss.jca:name=DefaultDS,service=DataSourceBinding
                          14:40:16,382 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
                          14:40:16,382 INFO [JBossASKernel] and supplies:
                          14:40:16,382 INFO [JBossASKernel] jndi:ServiceTest/MyServiceImpl/local
                          14:40:16,382 INFO [JBossASKernel] jndi:ServiceTest/MyServiceImpl/local-org.myapp.service.MyService
                          14:40:16,382 INFO [JBossASKernel] Class:org.myapp.service.MyService
                          14:40:16,382 INFO [JBossASKernel] jndi:ServiceTest/MyServiceImpl/remote
                          14:40:16,413 INFO [JBossASKernel] Installing bean(vieo.ccs:service=Migration) into kernel
                          


                          Even the jmx-console shows me the vieo.ccs:service=Migration