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
Caused by: 
java.lang.IllegalArgumentException: Expected String[2], got null
        at
org.apache.servicemix.jbi.jmx.JaasAuthenticator.authenticate(JaasAuthenticator.java:73)
        at
javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:214)
        at
javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown 
Source)
        at
javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2239)
        at 
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:271)
        at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
        at
org.springframework.jmx.support.MBeanServerConnectionFactoryBean.connect(MBeanServerConnectionFactoryBean.java:126)
        at
org.springframework.jmx.support.MBeanServerConnectionFactoryBean.afterPropertiesSet(MBeanServerConnectionFactoryBean.java:114)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)


I think that I have an authentication failure, but I can't fix it.

How can I pass an authentication to the
org.springframework.jmx.support.MBeanServerConnectionFactoryBean class? (I
tryed with "principal" and "credentials" instead of "jmx-user" and
"jmx-password", and I had the same error).


Thanks for reply.
-- 
View this message in context: 
http://www.nabble.com/Servicemix-web-deployment-tf4943470s12049.html#a14151750
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to