On Dec 4, 2007 7:40 AM, Keeg2 <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm trying to deploy the webapp Service web from
> apache-servicemix-web-3.2.war archive.
>
> I would this application point to a remonte standalone servicemix instance.
> So I replaced in applicationContext.xml the following :
>
>   <bean id="jmxProxy" abstract="true"
> class="org.springframework.jmx.access.MBeanProxyFactoryBean">
>     <property name="server" ref="server"/>
>     <property name="useStrictCasing" value="false" />
>     <property name="connectOnStartup" value="false" />
>   </bean>
>
> by :
>
> <bean id="busConnector"
> class="org.springframework.jmx.support.MBeanServerConnectionFactoryBean">
>                 <property name="serviceUrl"
> value="service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi" />
>                 <property name="environment">
>                 <map>
>                         <entry key="jmx-username"  value="smx"/>
>                         <entry key="jmx-password"  value="smx"/>
>                 </map>
>                 </property>
>         </bean>
>
>         <bean id="jmxProxy"
> class="org.springframework.jmx.access.MBeanProxyFactoryBean">
>                 <property name="objectName" value="bean:name=testBean1" />
>                 <property name="proxyInterface"
> value="java.lang.management.MemoryMXBean"/>
>                 <property name="server" ref="busConnector" />
>         </bean>
>
> But I have this error :
>
> ERROR - ContextLoader                  - Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'busConnector' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested
> exception is java.lang.IllegalArgumentException: Expected String[2], got
> null

The JaasAuthenticator.authenticate() method expects a String[2] and
that's not what it was passed. Notice that the original server bean
that you replaced uses the
StringUtils.commaDelimitedListToStringArray() method to achieve this:

<entry key="jmx.remote.credentials">
  <bean class="org.springframework.util.StringUtils"
factory-method="commaDelimitedListToStringArray">
    <constructor-arg value="${jmx-username},${jmx-password}" />
  </bean>
</entry>

HTH

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

http://bruceblog.org/

Reply via email to