3 Replies Latest reply on Jul 27, 2009 5:30 PM by David Hosier

    MC Deployment Struggles

    David Hosier Newbie

      I've been struggling all day with trying to deploy a cache instance to AS 5.1 using a -jboss-beans.xml deployment. I've moved all the necessary jar files into my configuration's lib directory. I'm hoping someone can explain why the following does not work. My XML looks like:

      <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
       xmlns="urn:jboss:bean-deployer:2.0">
      
       <bean name="ServicesCacheConfig" class="org.jboss.cache.config.Configuration">
      
       <property name="runtimeConfig">
       <bean class="org.jboss.cache.config.RuntimeConfig">
       <property name="transactionManager">
       <inject bean="TransactionManager" property="transactionManager"/>
       </property>
       </bean>
       </property>
      
       <property name="cacheMode">LOCAL</property>
       <property name="lockAcquisitionTimeout">15000</property>
       <property name="isolationLevel">REPEATABLE_READ</property>
      
       </bean>
      
       <bean name="ServicesPojoCacheMBean" class="org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper">
       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="osi:cache=PojoCache", exposedInterface=org.jboss.cache.pojo.jmx.PojoCacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
       <property name="configuration"><inject bean="ServicesCacheConfig" /></property>
       </bean>
      
      </deployment>
      


      And yields the following error:

      DEPLOYMENTS IN ERROR:
       Deployment "vfszip:/Users/david/java/jboss-5.1.0.GA/server/default/deploy/BeanServiceTestEAR.ear/" is in error due to the following reason(s): org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"urn:jboss:bean-deployer:2.0":value, "urn:jboss:bean-deployer:2.0":inject, "urn:jboss:bean-deployer:2.0":value-factory, "urn:jboss:bean-deployer:2.0":collection, "urn:jboss:bean-deployer:2.0":list, "urn:jboss:bean-deployer:2.0":set, "urn:jboss:bean-deployer:2.0":array, "urn:jboss:bean-deployer:2.0":map, "urn:jboss:bean-deployer:2.0":null, "urn:jboss:bean-deployer:2.0":this, WC[##other:"urn:jboss:bean-deployer:2.0"], "urn:jboss:bean-deployer:2.0":annotation}' is expected. @ vfszip:/Users/david/java/jboss-5.1.0.GA/server/default/deploy/BeanServiceTestEAR.ear/META-INF/cache-jboss-beans.xml[10,76]
      
       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
       at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:637)
      


      This is obviously saying that the server does not expect to find a bean element directly under a property element, but I see configurations in all/deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml that do things like this, and all the examples I see in the docs look like this. So I'm a bit confused. Any insight would be great. Thanks in advance.