You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mean_bcp <go...@versatile.com> on 2016/05/02 15:18:35 UTC

Re: activemq xbean and tomee-maven-plugin

Sorry to bump an ancient thread, but I am having this exact problem and I do
not understand the solution posted.

The link is about a maven plugin, I am not building tomee from source, so I
am not sure how that helps me. What do I need to change so that my
activemq.xml file can be found regardless of which directory I start tomee
from?

Thanks!



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/activemq-xbean-and-tomee-maven-plugin-tp4667661p4678323.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: activemq xbean and tomee-maven-plugin

Posted by mean_bcp <go...@versatilets.com>.
Yes, thank you! The xbean:classpath:activemq.xml worked.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/activemq-xbean-and-tomee-maven-plugin-tp4667661p4678635.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: activemq xbean and tomee-maven-plugin

Posted by Romain Manni-Bucau <rm...@gmail.com>.
BrokerXmlConfig = xbean:file:${catalina.base}/amq/activemq.xml or
BrokerXmlConfig
= xbean:classpath:activemq.xml

are the ones I think


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-26 20:20 GMT+02:00 mean_bcp <go...@versatilets.com>:

> Still not working.
>
> in catalina.properties:
>
> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/amq
>
> file exists in that dir:
> [root@ndollee-dt-1d amq]# pwd
> /opt/apache-tomee-plus-1.7.2/amq
> [root@ndollee-dt-1d amq]# ls -alt
> total 12
> drwxr-xr-x  2 root   root   4096 May 26 18:46 .
> drwxr-xr-x 16 root   root   4096 May 26 18:46 ..
> -rwxrwxrwx  1 root   root   1398 May 13 20:27 activemq.xml
>
> in tomee.xml:
> <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
>     BrokerXmlConfig = xbean:file:activemq.xml
>     ServerUrl = vm://localhost
>   </Resource>
>
> catalina.out:
> IOException parsing XML document from URL [file:activemq.xml]; nested
> exception is java.io.FileNotFoundException: activemq.xml (No such file or
> directory)
>
>
> I really don't want to use an absolute path, then the tomee.xml has to be
> manually tweaked for each deployment. Is there no way to standardize this?
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/activemq-xbean-and-tomee-maven-plugin-tp4667661p4678613.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: activemq xbean and tomee-maven-plugin

Posted by mean_bcp <go...@versatilets.com>.
Still not working.

in catalina.properties:
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/amq

file exists in that dir:
[root@ndollee-dt-1d amq]# pwd
/opt/apache-tomee-plus-1.7.2/amq
[root@ndollee-dt-1d amq]# ls -alt
total 12
drwxr-xr-x  2 root   root   4096 May 26 18:46 .
drwxr-xr-x 16 root   root   4096 May 26 18:46 ..
-rwxrwxrwx  1 root   root   1398 May 13 20:27 activemq.xml

in tomee.xml:
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
    BrokerXmlConfig = xbean:file:activemq.xml
    ServerUrl = vm://localhost
  </Resource>

catalina.out:
IOException parsing XML document from URL [file:activemq.xml]; nested
exception is java.io.FileNotFoundException: activemq.xml (No such file or
directory)


I really don't want to use an absolute path, then the tomee.xml has to be
manually tweaked for each deployment. Is there no way to standardize this?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/activemq-xbean-and-tomee-maven-plugin-tp4667661p4678613.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: activemq xbean and tomee-maven-plugin

Posted by Romain Manni-Bucau <rm...@gmail.com>.
BrokerXmlConfig = xbean:file:conf/activemq.xml means "look in
conf/activemq.xml", if you start in /foo it will check
/foo/conf/activemq.xml so either use an absolute path

Alternative can be to add in catalina.properties in line common.loader
another folder (...,${catalina.base}/amq for instance) and put activemq.xml
in amq folder after having created it. Then just use: BrokerXmlConfig =
xbean:file:activemq.xml to resolve it from the classpath.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-09 15:46 GMT+02:00 mean_bcp <go...@versatile.com>:

> I still do not understand.
>
> The file is in ${catalina.base}/conf.
>
> [root@ndollee-dt-1d conf]# pwd
> /opt/apache-tomee-plus-1.7.2/conf
> [root@ndollee-dt-1d conf]# ls -alt
> total 228
> drwxrwxr-x  4 silver silver  4096 May  9 14:15 .
> -rw-rw-r--  1 silver silver   638 May  9 14:15 tomee.xml
> *-rwxrwxrwx  1 silver silver  1352 May  9 14:10 activemq.xml*
>
> My tomee.xml shows this:
>
> BrokerXmlConfig = xbean:file:conf/activemq.xml
>
> If I start tomee from the ${catalina.base} dir, it works fine. ie:
> bin/startup.sh
> If I start tomee from the ${catalina.base}/bin dir, I get an error. ie:
> ./startup.sh
>
> nested exception is java.io.FileNotFoundException: conf/activemq.xml (No
> such file or directory)
>
> Surely there is a way to set this up so it does not matter how I start
> tomee, it will always find the file? Please help!
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/activemq-xbean-and-tomee-maven-plugin-tp4667661p4678387.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: activemq xbean and tomee-maven-plugin

Posted by mean_bcp <go...@versatile.com>.
I still do not understand.

The file is in ${catalina.base}/conf.

[root@ndollee-dt-1d conf]# pwd
/opt/apache-tomee-plus-1.7.2/conf
[root@ndollee-dt-1d conf]# ls -alt
total 228
drwxrwxr-x  4 silver silver  4096 May  9 14:15 .
-rw-rw-r--  1 silver silver   638 May  9 14:15 tomee.xml
*-rwxrwxrwx  1 silver silver  1352 May  9 14:10 activemq.xml*

My tomee.xml shows this:

BrokerXmlConfig = xbean:file:conf/activemq.xml

If I start tomee from the ${catalina.base} dir, it works fine. ie:
bin/startup.sh
If I start tomee from the ${catalina.base}/bin dir, I get an error. ie:
./startup.sh

nested exception is java.io.FileNotFoundException: conf/activemq.xml (No
such file or directory)

Surely there is a way to set this up so it does not matter how I start
tomee, it will always find the file? Please help!




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/activemq-xbean-and-tomee-maven-plugin-tp4667661p4678387.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: activemq xbean and tomee-maven-plugin

Posted by Romain Manni-Bucau <rm...@gmail.com>.
The solution was to set the file in a folder tomee finds, typically
${catalina.base}/conf which is the tomee maven plugin "config" option.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-02 15:18 GMT+02:00 mean_bcp <go...@versatile.com>:

> Sorry to bump an ancient thread, but I am having this exact problem and I
> do
> not understand the solution posted.
>
> The link is about a maven plugin, I am not building tomee from source, so I
> am not sure how that helps me. What do I need to change so that my
> activemq.xml file can be found regardless of which directory I start tomee
> from?
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/activemq-xbean-and-tomee-maven-plugin-tp4667661p4678323.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>