[jboss-dev-forums] [JBoss AS Development Deployment Framework] - How to deploy XMBean defined for 4.2.3 in 7.1.0 Final

Arun Varadharajan do-not-reply at jboss.com
Tue Jul 23 07:08:30 EDT 2013


Arun Varadharajan [https://community.jboss.org/people/arun168403] created the discussion

"How to deploy XMBean defined for 4.2.3 in 7.1.0 Final"

To view the discussion, visit: https://community.jboss.org/message/829280#829280

--------------------------------------------------------------
I have a XMBean defined for Jboss4.2.3 and successfully deployed. When I deploy the same on Jboss7.1.0 Final, 

I getting the error as :

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017224: Failed to parse service xml ["/D:/Upgrade/OFF2/export/home/application/zic/jboss-as-7.1.0.Final/standalone/deployments/gem.ear/nequeue_s
ervices.sar/META-INF/jboss-service.xml"]
        at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:95)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
        ... 5 more
Caused by: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)
        at com.ctc.wstx.sr.BasicStreamReader.throwNotTextual(BasicStreamReader.java:5444)
        at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:833)
        at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.getText(XMLExtendedStreamReaderImpl.java:275)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.unexpectedContent(JBossServiceXmlDescriptorParser.java:622)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.parseMBean(JBossServiceXmlDescriptorParser.java:212)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElement(JBossServiceXmlDescriptorParser.java:183)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElement(JBossServiceXmlDescriptorParser.java:46)
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
        at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
        at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:88)

My jboss-service.xml and xmbean.xml looks as below:

----------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?> 
<server xmlns="urn:jboss:service:7.0"
      xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">

  <!-- Define the NeScheduler service -->
  <mbean
    code="com.abc.nequeue.NeScheduler"
    name="GEMService:service=NeScheduler"
    xmbean-dd="META-INF/nescheduler-xmbean.xml">


    <depends>jboss:service=Naming</depends>
    <depends>jboss.mq:service=DestinationManager</depends>
  </mbean>

</server>
---------------------------------------------------------------------------------------------------------------------------


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mbean PUBLIC
   "-//JBoss//DTD JBOSS XMBEAN 1.1//EN"
   " http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_1.dtd http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_1.dtd"
>
  <mbean>
  <description>XMBean for representing the NE scheduler</description>
   <descriptors>
    <persistence persistPolicy="Never"
      persistPeriod="0"
      persistLocation="data/NeScheduler.data"
      persistName="NeScheduler"
    />
  </descriptors>
  <class>com.abc.nequeue.NeScheduler</class>
  <constructor>
    <description> The default constructor</description>
    <name>NeScheduler</name>
  </constructor>
  <!-- Attributes -->
  &defaultAttributes;
  <attribute access="read-only" getMethod="getThreadPoolSize">
    <description>The number of threads in the thread pool</description>
    <name>ThreadPoolSize</name>
    <type>int</type>
  </attribute>
  <attribute access="read-only" getMethod="getMaxThreadPoolSize">
    <description>The maximum number of threads in the thread pool</description>
    <name>MaxThreadPoolSize</name>
    <type>int</type>
  </attribute>
  <attribute access="read-only" getMethod="getQueueLength">
    <description>The number of number of nes in the queue</description>
    <name>QueueLength</name>
    <type>int</type>
  </attribute>
  <attribute access="read-only" getMethod="getWaitingThreadCount">
    <description>The number of threads waiting for work.</description>
    <name>WaitingThreadCount</name>
    <type>int</type>
  </attribute>
  <!-- Operations -->
  <operation impact="ACTION_INFO">
    <description>Schedule a command</description>
    <name>schedule</name>
    <parameter>
      <description>neId for the command</description>
      <name>neId</name>
      <type>int</type>
    </parameter>
    <parameter>
      <description>Scheduled Command</description>
      <name>cmd</name>
      <type>com.abc.ne.ejb.NeCommand</type>
    </parameter>
  </operation>
  <operation impact="ACTION_INFO">
    <description>Unschedule all commands</description>
    <name>unschedule</name>
    <parameter>
      <description>neId for the command</description>
      <name>neId</name>
      <type>int</type>
    </parameter>
    <return-type>boolean</return-type>
  </operation>
  &defaultOperations;   
 </mbean>

Please help. I completly stucked.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829280#829280]

Start a new discussion in JBoss AS Development Deployment Framework at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2072]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130723/a7bf5113/attachment.html 


More information about the jboss-dev-forums mailing list