Membrane ESB with Tanuki Java Service Wrapper on Ubuntu x64: issues with MEMBRANE_HOME

163 views
Skip to first unread message

tntowker

unread,
Nov 4, 2012, 9:38:38 AM11/4/12
to membrane...@googlegroups.com
Hello,

I'm trying to run Membrane ESB with Tanuki Java Service Wrapper on Ubuntu Server 12.04 x64.
I have no issues starting Membrane ESB itself, however I receive error when using it with wrapper.
I guess it's because I define %MEMBRANE_HOME% manually in ../conf/wrapper.conf file:
set.MEMBRANE_HOME=/opt/membrane/membrane-esb-cli-3.5.3

For test purpose I've tried to run ESB using modified memrouter.sh:
===========================================================
#!/bin/bash
#MEMBRANE_HOME="$(dirname $0)"
MEMBRANE_HOME=/opt/membrane/membrane-esb-cli-3.5.3 
export MEMBRANE_HOME
CLASSPATH="$MEMBRANE_HOME/conf"
CLASSPATH="$CLASSPATH:$MEMBRANE_HOME/starter.jar"
export CLASSPATH
cd "$MEMBRANE_HOME"
echo Membrane Router running...
java  -classpath "$CLASSPATH" com.predic8.membrane.core.Starter "$@"
===========================================================

.. and received the same error as when I use wrapper:

===========================================================
root@host:/opt/membrane/membrane-esb-cli-3.5.3# ./memrouter.sh
Membrane Router running...
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/opt/membrane/membrane-esb-cli-3.5.3/opt/membrane/membrane-esb-cli-3.5.3/conf/monitor-beans.xml]; nested exception is java.io.FileNotFoundException: opt/membrane/membrane-esb-cli-3.5.3/conf/monitor-beans.xml (No such file or directory)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:465)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:395)
        at com.predic8.membrane.core.Router.init(Router.java:70)
        at com.predic8.membrane.core.RouterCLI.main(RouterCLI.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.predic8.membrane.core.Starter.main(Starter.java:26)
Caused by: java.io.FileNotFoundException: opt/membrane/membrane-esb-cli-3.5.3/conf/monitor-beans.xml (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:110)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
        ... 17 more
Could not read rules configuration. Please specify a file containing rules using the -c command line option. Or make sure that the file /opt/membrane/membrane-esb-cli-3.5.3/conf/proxies.xml exists
===========================================================

monitor-beans.xml  and proxies.xml are present in the targeted location.
java version "1.7.0_09"
is there any possible workaround for this problem? 


Thanks in advance. 

Thomas Bayer

unread,
Nov 5, 2012, 2:37:17 PM11/5/12
to membrane...@googlegroups.com
Hi,
thanks for reporting. What looks strange for me is that the path seemed to be duplicated:


[/opt/membrane/membrane-esb-cli-3.5.3/opt/membrane/membrane-esb-cli-3.5.3/conf/monitor-beans.xml]; 


Maybe the first / get lost. Perhaps you can add an echo $MEMBRANE_HOME statement to doublecheck the content of the variable. Because that does not seem to promising I have already created an issue at our github project:



--
Thomas

tntowker

unread,
Nov 5, 2012, 5:19:09 PM11/5/12
to membrane...@googlegroups.com
Hello Thomas, 

Thank you for the reply. I have tried to start ESB with the following:
======================================================
#!/bin/bash
#MEMBRANE_HOME="$(dirname $0)"
MEMBRANE_HOME=/opt/membrane/membrane-esb-cli-3.5.3
echo $MEMBRANE_HOME
export MEMBRANE_HOME
CLASSPATH="$MEMBRANE_HOME/conf"
echo $CLASSPATH
CLASSPATH="$CLASSPATH:$MEMBRANE_HOME/starter.jar"
echo $CLASSPATH
export CLASSPATH
cd "$MEMBRANE_HOME"
echo Membrane Router running...
java  -classpath "$CLASSPATH" com.predic8.membrane.core.Starter "$@"
====================================================== 

result is following:
======================================================  
root@host:/opt/membrane/membrane-esb-cli-3.5.3# ./memrouter.sh
/opt/membrane/membrane-esb-cli-3.5.3
/opt/membrane/membrane-esb-cli-3.5.3/conf
/opt/membrane/membrane-esb-cli-3.5.3/conf:/opt/membrane/membrane-esb-cli-3.5.3/starter.jar
Membrane Router running...
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/opt/membrane/membrane-esb-cli-3.5.3/opt/membrane/membrane-esb-cli-3.5.3/conf/monitor-beans.xml]; nested exception is java.io.FileNotFoundException: opt/membrane/membrane-esb-cli-3.5.3/conf/monitor-beans.xml (No such file or directory)
......
same error
......
======================================================  

With default $MEMBRANE_HOME:
======================================================   
root@host:/opt/membrane/membrane-esb-cli-3.5.3# ./memrouter.sh
.
./conf
./conf:./starter.jar
Membrane Router running...
======================================================   


Best Regards,
tntowker.

Понеділок, 5 листопада 2012 р. 21:37:17 UTC+2 користувач Thomas Bayer написав:

Thomas Bayer

unread,
Nov 6, 2012, 3:06:13 AM11/6/12
to membrane...@googlegroups.com
Hi,
so your script looks good. We will have a look at the code and fix this.


Thanks,
Thomas

Tobias Polley

unread,
Nov 9, 2012, 2:29:13 PM11/9/12
to membrane...@googlegroups.com
Hi tntowker,

this is actually a bug in the Java code. It only occurs on Linux when using an absolute path for MEMBRANE_HOME, which our normal shell scripts do not.

I just committed a fix to our github repository. The fix will therefore be available with the next release.

Best, Tobias

tntowker

unread,
Nov 11, 2012, 4:05:58 AM11/11/12
to membrane...@googlegroups.com
Hello Tobias,

Thank you. As far as I understand, by next release you mean 3.5.4, right?

Tobias Polley

unread,
Nov 12, 2012, 12:41:38 PM11/12/12
to membrane...@googlegroups.com
On Sunday, November 11, 2012 10:05:58 AM UTC+1, tntowker wrote:
Thank you. As far as I understand, by next release you mean 3.5.4, right?

Yes.

Best, Tobias
Reply all
Reply to author
Forward
0 new messages