facebook

Spring XML config error for ActiveMQ beans

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #326286 Reply

    davout
    Participant

    I have a Spring 3 XML configuration file that is showing a red compile error in MyEclipse r10.1.

    The red error icon appears against the ‘amq:broker’ line. Any ideas?

    See…

    
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:amq="http://activemq.apache.org/schema/core"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://activemq.apache.org/schema/core 
            http://activemq.apache.org/schema/core/activemq-core.xsd 
        ">
    
        <!-- ACTIVE MQ JMS RELATED -->
    
        <amq:broker persistent="false" useJmx="false">
            <amq:transportConnectors>
                <amq:transportConnector uri="tcp://localhost:0" />
            </amq:transportConnectors>
        </amq:broker>
    
        <!-- JMS ConnectionFactory to use, configuring the embedded broker using 
            XML -->
        <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost" />
    
        <!-- ActiveMQ destinations to use -->
        <amq:queue id="destination"
            physicalName="org.apache.activemq.spring.Test.spring.embedded" />
    
    
        <!-- Spring JMS Template -->
        <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory">
                <!-- lets wrap in a pool to avoid creating a connection per send -->
                <bean class="org.springframework.jms.connection.SingleConnectionFactory">
                    <property name="targetConnectionFactory">
                        <ref local="jmsFactory" />
                    </property>
                </bean>
            </property>
        </bean>
    
        <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory" ref="jmsFactory" />
        </bean>
    
        <bean id="supportMailDestination" class="org.apache.activemq.command.ActiveMQQueue">
            <constructor-arg value="mail.queue" />
        </bean>
    
        <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory" ref="jmsFactory" />
            <property name="receiveTimeout" value="10000" />
        </bean>
    
    
    </beans>
    

    The web app still runs. Is there a way for me to suppress or correct this XML error?

    #326287 Reply

    davout
    Participant

    Forgot to mention the IDE shows the error as:

    Unrecognized xbean namespace mapping: http://activemq.apache.org/schema/core

    #326299 Reply

    support-swapna
    Moderator

    davout,

    I could replicate the issue at my end. I have filed a PR with the dev team to look into it.
    Sorry for inconvenience caused.

    #326413 Reply

    davout
    Participant

    Where’s a fix likely to appear?

    #326473 Reply

    support-swapna
    Moderator

    davout,

    The dev team is evaluating this issue for the 10.5 release which will happen in 2 weeks time.

    #326593 Reply

    Brian Fernandes
    Moderator

    davout,
    This issue has been fixed and will be available in the 10.5 release due around mid June.

    Thanks for reporting the problem.

    #326594 Reply

    davout
    Participant

    Thanks…

    I’ve seen a similar problems when building XML based ‘ZUL’ markup files using the ZK framework.

    With the excerpt show below the IDE reports any error on the line…

    a label=”@bind(item.title)” onClick=”@global-command(‘setDataArea’,DataViewCommand=item.defDisplayCommand)”/>

    I’ve attached a screenshot for you to see as well.

    
    <?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
    
    <panel title="Project list display" height="100%" width="100%"
        apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vm') @init('com.eis.zk.project.list.ProjectListDisplayVM')"
        binder="@init(queueName='DataAreaQueue')">
        <panelchildren>
            <borderlayout>
                <north>
                    <hlayout>
                        <button label="Change" onClick="" />
                    </hlayout>
                </north>
                <center>
                    <grid id="projectGrid" autopaging="true" mold="paging"
                        vflex="true" model="@load(vm.projectsModel)">
                        <columns>
                            <column label="Title" />
                            <column label="Type" />
                            <column label="Alias" />
                        </columns>
                        <template name="model" var="item">
                            <row>
                                <a label="@bind(item.title)" onClick="@global-command('setDataArea',DataViewCommand=item.defDisplayCommand)"/>
                                <label value="@bind(item.typeTitle)" />
                                <label value="@bind(item.alias)" />
                            </row>
                        </template>
                    </grid>
                </center>
            </borderlayout>
        </panelchildren>
    </panel>
    
    Attachments:
    You must be logged in to view attached files.
    #326602 Reply

    Brian Fernandes
    Moderator

    davout,

    So these files are XML files with a .zul extension? Could you please clarify?

    Did you install any additional plugins for this ZUL support? I ask because I see an unfamiliar editor icon for the file in your screenshot; not something that is part of MyEclipse.

    Could you please paste the actual errors that are being reported? You should be able to copy them right out of the Problems view. Sending us the entire file (or a fully functional snippet) would also help us reproduce locally. You can paste that here or send it to support@genuitec.com ATTN Brian with a link to this thread.

    #326617 Reply

    davout
    Participant

    The error is shown as:

    
    Multiple annotations found at this line:
        - Syntax error on token "global", ( expected after this token
        - Syntax error, insert "enum Identifier" to complete 
         EnumHeaderName
        - Invalid character constant
        - Syntax error on token ",", delete this token
        - Syntax error, insert "EnumBody" to complete 
         BlockStatements
        - Syntax error, insert ")" to complete SingleMemberAnnotation
    

    The ZUl file is attached.

    You have to install the ZUL visual editor
    http://studio.zkoss.org/resource/plugins/eclipse_3_7

    Attachments:
    You must be logged in to view attached files.
    #326618 Reply

    Brian Fernandes
    Moderator

    davout,

    These are certainly not XML errors and I’m quite sure they are errors that are being reported by the ZUL visual editor or set of plugins. You would need to contact them for support.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Spring XML config error for ActiveMQ beans

You must be logged in to post in the forum log in