You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by John Dubchak <jo...@johndubchak.com> on 2014/06/24 20:35:46 UTC
karaf.base Question
Hi,
I am trying to find where the karaf.base property is set in the etc/*
configuration files but I'm not having much luck.
Can anyone tell me where I can find it?
Thanks,
John
Re: karaf.base Question
Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
Hi
Have you tested a fresh version of ServiceMix (with no modifications or
own bundles)? I can't reproduce your ptoblem.
I tried to overwrite thekaraf.home and define a wrong value (starting
with home instead of /home).
The method with -Dkaraf.home after the command is wrong -- -D defines
JVM option, not the servicemix options.
I have tried export JAVA_OPTS="-Dkaraf.home=..." but did change
anything. When you look into servicemix.sh or karaf.sh you can see the
karaf.home is defined in following way:
-Dkaraf.home="$KARAF_HOME"
So you could try to define the KARAF_HOME variable but it didn't work
too. It seems to ignore the existing value of the variabe
*if [ "x$KARAF_HOME" != "x" ]; then**
** warn "Ignoring predefined value for KARAF_HOME"**
** fi*
# In POSIX shells, CDPATH may cause cd to write to stdout
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
KARAF_HOME=`cd "$DIRNAME/.."; pwd`
if [ ! -d "$KARAF_HOME" ]; then
die "KARAF_HOME is not valid: $KARAF_HOME"
fi
Setting KARAF_HOME in setenv.sh didnt change anything too (from the same
reason)
The only way I could make the karaf.home wrong was setting of following
variable before starting servicemix
export
KARAF_OPTS="-Dkaraf.home=home/kso/work/projects/asf/tmp/apache-servicemix-5.1.0"
But in this case I got following exception at startup
Could not create framework: java.lang.IllegalArgumentException: Invalid
karaf.home system property
'home/kso/work/projects/asf/tmp/apache-servicemix-5.1.0' : does not exist
java.lang.IllegalArgumentException: Invalid karaf.home system property
'home/kso/work/projects/asf/tmp/apache-servicemix-5.1.0' : does not exist
at org.apache.karaf.main.Utils.validateDirectoryExists(Utils.java:87)
at org.apache.karaf.main.Utils.getKarafHome(Utils.java:38)
at org.apache.karaf.main.Main.launch(Main.java:230)
at org.apache.karaf.main.Main.main(Main.java:507)
It means, your karaf.home must be correct at startup and something
changes it later, before the broker is started. Otherwise you would get
the above error at startup.
But you can try the above method and check what happens
export
KARAF_OPTS="-Dkaraf.home=/home/jdubchak/ops/automation/apache-servicemix-5.1.0"
Best regards
Krzysztof
On 24.06.2014 20:56, John Dubchak wrote:
> It does, sort of. I am getting this error when running ServiceMix and
> setting the property explicitly doesn't help:
>
> Incorrect (from exception below):
>
> home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml
>
> Correct:
>
> /home/jdubchak/ops/automation/apache-servicemix-5.1.0/etc/activemq.xml
>
> Here's how I run the server, from a script:
>
> SERVICEMIX_HOME=/home/jdubchak/ops/automation/apache-servicemix-5.1.0
>
> # Installation prefix
> if [ ! -x ${SERVICEMIX_HOME} ]; then
> echo "SERVICEMIX_HOME is not defined, exiting now..."
> exit -1
> fi
>
> echo "Starting ServiceMix..."
> ${SERVICEMIX_HOME}/bin/start -Dkaraf.base=${SERVICEMIX_HOME}
>
> Which doesn't seem to correct the invalid path, so I suspect I have it
> wrong.
>
> Thanks,
> John
>
> 2014-06-24 18:50:41,517 | ERROR | ctivemq.server]) | configadmin
> | ? ? | 5 -
> org.apache.felix.configadmin - 1.6.0 |
> [org.osgi.service.cm.ManagedServiceFactory, id=323,
> bundle=97/mvn:org.apache.activemq/activemq-osgi/5.10.0]: Updating
> configuration
> org.apache.activemq.server.ca20b9d1-b4e6-4572-b3a3-df61283f8802 caused
> a problem: Cannot start the broker
> org.osgi.service.cm.ConfigurationException: null : Cannot start the
> broker
> at
> org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:110)[97:org.apache.activemq.activemq-osgi:5.10.0]
> at
> org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:88)[5:org.apache.felix.configadmin:1.6.0]
> at
> org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1593)[5:org.apache.felix.configadmin:1.6.0]
> at
> org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1536)[5:org.apache.felix.configadmin:1.6.0]
> at
> org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[5:org.apache.felix.configadmin:1.6.0]
> at java.lang.Thread.run(Thread.java:744)[:1.7.0_60-ea]
> Caused by:
> org.springframework.beans.factory.BeanDefinitionStoreException:
> IOException parsing XML document from class path resource
> [home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml]; nested
> exception is java.io.FileNotFoundException: class path resource
> [home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml] cannot be
> opened because it does not exist
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)[84:org.springframework.beans:3.2.4.RELEASE]
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[84:org.springframework.beans:3.2.4.RELEASE]
> at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)[96:org.apache.xbean.spring:3.16.0]
> at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)[96:org.apache.xbean.spring:3.16.0]
> at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[86:org.springframework.context:3.2.4.RELEASE]
> at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[86:org.springframework.context:3.2.4.RELEASE]
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[86:org.springframework.context:3.2.4.RELEASE]
> at
> org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:90)[97:org.apache.activemq.activemq-osgi:5.10.0]
> ... 5 more
> Caused by: java.io.FileNotFoundException: class path resource
> [home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml] cannot be
> opened because it does not exist
> at
> org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)[82:org.springframework.core:3.2.4.RELEASE]
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)[84:org.springframework.beans:3.2.4.RELEASE]
>
> On 6/24/14 11:45 AM, Dominique Broeglin wrote:
>> Hello!
>>
>> The karaf.base property is set either in your bin/servicemix (or
>> other bin/* scripts) or in the wrapper.conf file that you might have
>> created if you use service mix as a service in your OS.
>>
>> It is added directly on the JVM path with a -Dkaraf.base=… argument.
>>
>> Hope this helps!
>>
>> Best regards,
>> Dominique
>>
>> On 24 Jun 2014, at 20:35 , John Dubchak <jo...@johndubchak.com> wrote:
>>
>>> Hi,
>>>
>>> I am trying to find where the karaf.base property is set in the
>>> etc/* configuration files but I'm not having much luck.
>>>
>>> Can anyone tell me where I can find it?
>>>
>>> Thanks,
>>> John
>>
--
Krzysztof Sobkowiak
JEE & OSS Architect | Senior Solution Architect @ Capgemini | Committer
@ ASF
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
Twitter: @KSobkowiak
Calendar: http://goo.gl/yvsebC
Re: karaf.base Question
Posted by John Dubchak <jo...@johndubchak.com>.
It does, sort of. I am getting this error when running ServiceMix and
setting the property explicitly doesn't help:
Incorrect (from exception below):
home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml
Correct:
/home/jdubchak/ops/automation/apache-servicemix-5.1.0/etc/activemq.xml
Here's how I run the server, from a script:
SERVICEMIX_HOME=/home/jdubchak/ops/automation/apache-servicemix-5.1.0
# Installation prefix
if [ ! -x ${SERVICEMIX_HOME} ]; then
echo "SERVICEMIX_HOME is not defined, exiting now..."
exit -1
fi
echo "Starting ServiceMix..."
${SERVICEMIX_HOME}/bin/start -Dkaraf.base=${SERVICEMIX_HOME}
Which doesn't seem to correct the invalid path, so I suspect I have it
wrong.
Thanks,
John
2014-06-24 18:50:41,517 | ERROR | ctivemq.server]) | configadmin
| ? ? | 5 -
org.apache.felix.configadmin - 1.6.0 |
[org.osgi.service.cm.ManagedServiceFactory, id=323,
bundle=97/mvn:org.apache.activemq/activemq-osgi/5.10.0]: Updating
configuration
org.apache.activemq.server.ca20b9d1-b4e6-4572-b3a3-df61283f8802 caused a
problem: Cannot start the broker
org.osgi.service.cm.ConfigurationException: null : Cannot start the broker
at
org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:110)[97:org.apache.activemq.activemq-osgi:5.10.0]
at
org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:88)[5:org.apache.felix.configadmin:1.6.0]
at
org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1593)[5:org.apache.felix.configadmin:1.6.0]
at
org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1536)[5:org.apache.felix.configadmin:1.6.0]
at
org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[5:org.apache.felix.configadmin:1.6.0]
at java.lang.Thread.run(Thread.java:744)[:1.7.0_60-ea]
Caused by:
org.springframework.beans.factory.BeanDefinitionStoreException:
IOException parsing XML document from class path resource
[home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml]; nested
exception is java.io.FileNotFoundException: class path resource
[home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml] cannot be
opened because it does not exist
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)[84:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[84:org.springframework.beans:3.2.4.RELEASE]
at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)[96:org.apache.xbean.spring:3.16.0]
at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)[96:org.apache.xbean.spring:3.16.0]
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[86:org.springframework.context:3.2.4.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[86:org.springframework.context:3.2.4.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[86:org.springframework.context:3.2.4.RELEASE]
at
org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:90)[97:org.apache.activemq.activemq-osgi:5.10.0]
... 5 more
Caused by: java.io.FileNotFoundException: class path resource
[home/jdubchak/ops/apache-servicemix-5.1.0/etc/activemq.xml] cannot be
opened because it does not exist
at
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)[82:org.springframework.core:3.2.4.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)[84:org.springframework.beans:3.2.4.RELEASE]
On 6/24/14 11:45 AM, Dominique Broeglin wrote:
> Hello!
>
> The karaf.base property is set either in your bin/servicemix (or other bin/* scripts) or in the wrapper.conf file that you might have created if you use service mix as a service in your OS.
>
> It is added directly on the JVM path with a -Dkaraf.base=… argument.
>
> Hope this helps!
>
> Best regards,
> Dominique
>
> On 24 Jun 2014, at 20:35 , John Dubchak <jo...@johndubchak.com> wrote:
>
>> Hi,
>>
>> I am trying to find where the karaf.base property is set in the etc/* configuration files but I'm not having much luck.
>>
>> Can anyone tell me where I can find it?
>>
>> Thanks,
>> John
>
Re: karaf.base Question
Posted by Dominique Broeglin <do...@gmail.com>.
Hello!
The karaf.base property is set either in your bin/servicemix (or other bin/* scripts) or in the wrapper.conf file that you might have created if you use service mix as a service in your OS.
It is added directly on the JVM path with a -Dkaraf.base=… argument.
Hope this helps!
Best regards,
Dominique
On 24 Jun 2014, at 20:35 , John Dubchak <jo...@johndubchak.com> wrote:
> Hi,
>
> I am trying to find where the karaf.base property is set in the etc/* configuration files but I'm not having much luck.
>
> Can anyone tell me where I can find it?
>
> Thanks,
> John