Hi,
>If you're using Spring then I'd avoid JNDI where possible - its just
>another level of indirection and good cause of lots of errors and
>confusion :)
Well, the thing is that with ActiveMQ 3.0, it works, and if I just switch to
ActiveMQ-3.1-M5 (which is the version that is installed on geronimo), then I
get the above error. I don't change anything in the Spring conffile....
Regards,
Sami Dalouche
Selon James Strachan <[EMAIL PROTECTED]>:
> Sami Dalouche wrote:
> > Sorry,
> >
> > actually, my diagnostic was false...
> >
> > There was an exception that I didn't see, and I can actually use the
> > jmsConnectionFactory that I get from a JNDI context.
> > (which way is preferred, btw ? PooledConnectionFactory, or from JNDI ?).
> >
> > But the problem is even weirder...
> > I'm using Geronimo M4 which embeds ActiveMQ 3.1-M5. Topics+Queues are
> configured
> > using Resource Adapters.
> >
> > I was previously using ActiveMQ 3.0 by mistake, and it was in the
> classpath. but
> > it worked fine. and I decided to switch to 3.1-M5 to prevent any problem I
> might
> > get by using 2 versiosn of activeMQ in the same classpath..
> > and guess what ?? This led to an exception :
> > could not find class for resource : services/org/activemq/transport/rmi
>
> Looks like you're trying to connect to ActiveMQ using a bad URL of the
> form "rmi://localhost" which is an invalid URL to connect to ActiveMQ.
> Maybe you're tinkering with the ActiveMQ JNDI initial context factory?
> Or just a typo in your JNDI configuration.
>
>
> > while trying to get the JNDI object.Waoh, so I reverted to using 3.0 and it
> > works, but it's so weird...
>
> If you're using Spring then I'd avoid JNDI where possible - its just
> another level of indirection and good cause of lots of errors and
> confusion :)
>
> James
>
> >
> > Regards,
> > Sami Dalouche
> >
> >
> > Selon Sami Dalouche <[EMAIL PROTECTED]>:
> >
> >
> >>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.
> >>
> >>
> >
> >
> >
> >
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.