0

I've been working on a project with Spring + Flex BlazeDS.

I want to use Jrebel remote debug with tomcat. But here's the problem. It seems Jrebel failed to recognize Flex BlazeDS xml tag. So when I enabled Jrebel in catalina.bat and try to start up tomcat. My app in tomcat webapps failed to start up on context initialization because Jrebel failed to recognize the xml tag.

[2014-Oct-24 17:13:02,503][main:ERROR][ContextLoader] Context initialization failed org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 27 in XML document from ServletContext resource [/WEB-INF/spring/RemotingContext.xml] is invalid; nested exception is org.xm l.sax.SAXParseException: Element type "flex:" must be followed by either attribute specifications, " " or "/>". at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBe anDefinitionReader.java:396) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBean DefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBean DefinitionReader.java:302) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinition s(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinition s(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinition s(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlW ebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlW ebApplicationContext.java:93) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFact ory(AbstractRefreshableApplicationContext.java:130) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(Abs tractApplicationContext.java:467) at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicat ionContext.java:397) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio nContext.java) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.j ava:282) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.jav a:204) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderLis tener.java:47)

My xml :

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:flex="http://www.springframework.org/schema/flex"
xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/flex
    http://www.springframework.org/schema/flex/spring-flex-1.5.xsd
">

<flex:message-broker>
    <flex:exception-translator ref="allExceptionTranslator"/>
    <flex:remoting-service default-channels="my-amf" />
    <flex:message-service default-adapter-id="jms" default-channels="my-polling-amf" />
</flex:message-broker>

<flex:message-destination id="newSystemDate"/>


<flex:remoting-destination ref="mainPanelService"/>
<flex:remoting-destination ref="tradeService"/> </beans>

Is there a way to config Jrebel to recognize Flex BlazeDS xml tag? If not, I want to exclude those xmls on tomcat startup so Jrebel won't try to load it and fail to startup the whole app.

Roger Ray
  • 1,251
  • 2
  • 12
  • 20

1 Answers1

0

Do you know which line is 27th line that causes problems? It's hard to determine it based on this xml section, since it doesn't contain 27 lines.

Joonas Vali
  • 727
  • 6
  • 11
  • it's this xml tag that Jrebel failed to recognize and validate – Roger Ray Oct 25 '14 at 14:13
  • I don't think there's a problem with the xml. My app started well without Jrebel. But with it, it couldn't be started in tomcat. I want to know if there's a way even I got a broken xml in my classpath. It will still run successfully – Roger Ray Oct 25 '14 at 14:17
  • You might want to turn to support@zeroturnaround.com with the issue, not just exclude some files. – Joonas Vali Oct 28 '14 at 08:31