Hi,

OK, so at least it's normal I get the problem :) I was thinking I was getting
some weird problem again .... :)

Concerning the IllegalArgumentException, actually, the problem seemed to be that
instead of getting a JMS factory using :
  <bean id="jmsFactory" class="org.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL">
          <value>tcp://localhost:61616</value>
        </property>
      </bean>
    </property>
  </bean>

I was getting it from a JNDI context...
        <bean id="jmsConnectionFactory"
        class="org.springframework.jms.connection.SingleConnectionFactory">
        <property name="targetConnectionFactory">
            <ref bean="internalJmsQueueConnectionFactory"/>
        </property>
    </bean>

    <bean id="internalJmsQueueConnectionFactory"
        class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiTemplate">
            <ref bean="jndiTemplate"/>
        </property>
        <property name="jndiName">
            <value>${jms.connectionFactoryName}</value>
        </property>
    </bean>
and apparently, something was wrong with one of thoese compoenents that used the
factory..

component id="inputSender" service="my:inputSender"
class="org.servicemix.components.jms.JmsSenderComponent">
        <property name="template">
          <bean class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory">
              <ref bean="jmsFactory"/>
            </property>
            <property name="defaultDestinationName" value="TestTopic"/>
            <property name="pubSubDomain" value="true"/>
          </bean>
        </property>
      </component>

Any specific reason why I can't use a factory that comes from JNDI ?
Regards,
Sami Dalouche


Selon James Strachan <[EMAIL PROTECTED]>:

> Sami Dalouche wrote:
> > Hi,
> >
> > Some more thoughts about this problem : It's really weird...
> >
> > using the standard way of launching Spring files to launch a serviceMix
> > spring-based XML descriptor inside a web WAR leads to the "no grammar
> found"
> > error.
> >  <context-param>
> >       <param-name>contextConfigLocation</param-name>
> > <param-value>classpath:/spring/servicemix.xml</param-value>
> > </context-param>
> >     <listener>
> >
> >
>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> >     </listener>
>
> Yeah - I think we need to make a non-validating version of Spring's
> ContextLoaderListener. Basically we don't enable validation by default
> (as the DTD can't handle namespaces, something we need quite a bit in
> ServiceMix).
>
> > However, if I do a dirty hack, only use a standard Spring container here
> that
> > launches a class that will
> >  context = new ClassPathXmlApplicationContext(configFiles);
> > then it's ok, I don't get the previous error...
> > Is is supposed to behave that way ???
> >
> > In any case, I'm getting an exception I don't know about :
> > org.springframework.beans.factory.BeanCreationException: Error creating
> bean wit
> > h name 'jbi' defined in class path resource [spring/servicemix-ext.xml]:
> Initial
> > ization of bean failed; nested exception is
> java.lang.IllegalArgumentException:
> > null source
> > java.lang.IllegalArgumentException: null source
> >         at java.util.EventObject.<init>(Unknown Source)
> >         at javax.management.Notification.<init>(Unknown Source)
> >         at javax.management.AttributeChangeNotification.<init>(Unknown
> Source)
> >         at
> org.servicemix.jbi.management.BaseStandardMBean.sendAttributeChangeNo
> > tification(BaseStandardMBean.java:438)
> >         at
> org.servicemix.jbi.management.BaseStandardMBean.updateAttribute(BaseS
> > tandardMBean.java:221)
> >
> > What does "null source" mean ? does it mean there is no component that
> inputs
> > data into the JBI engine ?
>
> Could you provide the Spring.xml that causes this exception? I wonder if
> more of the stack trace might help figure it out.
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Reply via email to