8 Replies Latest reply on Apr 9, 2014 9:36 AM by alesj

    Migrating jboss-beans.xml to Wildfly - problems.

    paulmkeogh

      Hi,

       

      I am having a problem migrating an application from JBoss 5 to Wildfly.

       

      First problem I see in the AS trace is;

       

      10:55:51,424 INFO  [org.jboss.as.pojo] (MSC service thread 1-1) JBAS017000: Found legacy bean/pojo namespace: urn:jboss:bean-deployer:2.0 - might be missing some xml features (potential exceptions).

       

      followed quickly by;

       

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[27,3]

      Message: JBAS014788: Unexpected attribute 'factoryClass' encountered

       

      when it tries to parse my jboss-beans.xml file.

       

      My questions are;

       

      What should be the namespace be ?

       

      How can I resolve the unexpected attribute error ?

       

      Thanks,

        • 1. Re: Migrating jboss-beans.xml to Wildfly - problems.
          dmlloyd

          I'm actually rather surprised we don't have support for factoryClass.  Can you please file an Enhancement at https://issues.jboss.org/browse/WFLY in the "POJO" component?

          • 2. Re: Migrating jboss-beans.xml to Wildfly - problems.
            alesj

            Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[27,3]

            Message: JBAS014788: Unexpected attribute 'factoryClass' encountered

             

            when it tries to parse my jboss-beans.xml file.

            How does your xml look like?

             

            We do have support for "factory-class" in constructor element.

            • 3. Re: Migrating jboss-beans.xml to Wildfly - problems.
              alesj

              Hmmm, I see, we used to have "factoryClass". Dunno why I renamed it to "factory-class" ...

              * http://anonsvn.jboss.org/repos/jbossas/projects/kernel/trunk/kernel/src/main/resources/schema/jboss-beans-common_2_0.xsd

               

              Should be easy to add back the legacy support.

              Meanwhile change it to "factory-class".

               

              Note: same change is made to factoryMethod --> factory-method

              • 4. Re: Migrating jboss-beans.xml to Wildfly - problems.
                alesj
                • 5. Re: Migrating jboss-beans.xml to Wildfly - problems.
                  paulmkeogh

                  Thanks all for your help - that got me over that problem.

                   

                  Now I see;

                   

                  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017082: Exception while parsing POJO descriptor file: "/home/paul/development/wildfly-8.0.0.Final/standalone/deployments/mobicents-ss7-service.sar/META-INF/jboss-beans.xml"

                    at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptor(KernelDeploymentParsingProcessor.java:160)

                    at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptors(KernelDeploymentParsingProcessor.java:131)

                    at org.jboss.as.pojo.KernelDeploymentParsingProcessor.deploy(KernelDeploymentParsingProcessor.java:85)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

                    ... 5 more

                  Caused by: com.ctc.wstx.exc.WstxParsingException: Received non-all-whitespace CHARACTERS or CDATA event in nextTag().

                  at [row,col {unknown-source}]: [216,2]

                    at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:606) [woodstox-core-asl-4.2.0.jar:4.2.0]

                   

                  when trying to parse;

                   

                          <bean name="TCAPSS7Service" class="org.mobicents.ss7.SS7Service">

                                  <constructor><parameter>TCAP</parameter></constructor>

                                  <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="org.mobicents.ss7:service=TCAPSS7Service",exposedInterface=org.mobicents.ss7.SS7ServiceMBean.class,registerDirectly=true)

                                  </annotation>

                                  <property name="jndiName">java:/mobicents/ss7/tcap</property>

                                  <property name="stack">

                                          <inject bean="TcapStack" property="provider" />

                                  </property>

                          </bean>

                   

                  The </annotation> tag is on line 216.

                   

                  Is the annotation tag supported ?

                  • 6. Re: Migrating jboss-beans.xml to Wildfly - problems.
                    alesj

                    The </annotation> tag is on line 216.

                     

                    Is the annotation tag supported ?

                    No.

                     

                    That would require all/most of the legacy MDR / AOP project to be somehow migrated.

                    Which is far beyond plain POJO support.

                    • 7. Re: Migrating jboss-beans.xml to Wildfly - problems.
                      paulmkeogh

                      OK thanks.

                       

                      Can you point me at a link that describes a migration/rewrite approach ?

                      • 8. Re: Migrating jboss-beans.xml to Wildfly - problems.
                        alesj

                        Can you point me at a link that describes a migration/rewrite approach ?

                        There is no general migration approach.

                         

                        We had a project MDR (Meta Data Repository), which we used to look at the metadata for any service.

                        So, basically we were able to have different metadata per instance.

                         

                        In this case the metadata was annotation for that bean instance.

                        And in most cases annotation triggered some AOP invocation.

                        In this case it was a JMX registry.


                        Hence migration here would be to manually register bean as mbean.