Error while installing log4j2 api on Karaf

2015-03-09 Thread Prithviraj
Hi ,

We are using Karaf 3.2. We are using log4j2 , build 2.1 for logging .
While installing log4j2 bundles we are getting below error 

installing log4j-api :- 
bundle:install -s mvn:org.apache.logging.log4j/log4j-api/2.1

Exception :- 

ERROR: Bundle org.apache.logging.log4j.api [272] EventDispatcher: Error
during dispatch. (java.lang.IllegalMonitorStateException)
Bundle ID: 273
java.lang.IllegalMonitorStateException

installing 
bundle:install -s mvn:org.apache.logging.log4j/log4j-core/2.1

Exception :- 

ERROR: Bundle org.apache.logging.log4j.api [272] EventDispatcher: Error
during dispatch. (java.lang.IllegalMonitorStateException)
Bundle ID: 274





--
View this message in context: 
http://karaf.922171.n3.nabble.com/Error-while-installing-log4j2-api-on-Karaf-tp4038875.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Error while installing log4j2 api on Karaf

2015-03-09 Thread Prithviraj
Hi,

I checked pax package present in  local repository , but does not contain
pax-logging-api  also not log4j2 api
It contains  only master, swissbox, url and web bundles



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Error-while-installing-log4j2-api-on-Karaf-tp4038875p4038885.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Problem in stopping Karaf sever on Unix machine

2015-02-06 Thread Prithviraj
Hi JB,

Do you get chance to look at file ?





--
View this message in context: 
http://karaf.922171.n3.nabble.com/Problem-in-stopping-Karaf-sever-on-Unix-machine-tp4038249p4038340.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Problem in stopping Karaf sever on Unix machine

2015-02-04 Thread Prithviraj
Hi JB,

Actually we are using blue print configuration for broker .
Please  find below file 


?xml version=1.0 encoding=UTF-8?
blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:broker=http://activemq.apache.org/schema/core;
xmlns:ext=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;
  xmlns:enc=http://karaf.apache.org/xmlns/jasypt/v1.0.0;
xsi:schemaLocation=http://activemq.apache.org/schema/core
 http://activemq.apache.org/schema/core/activemq-core.xsd
 

   ext:property-placeholder
ext:locationfile:etc/db.cfg/ext:location
  /ext:property-placeholder
  ext:property-placeholder  placeholder-prefix=${[[
placeholder-suffix=]]}
ext:locationfile:etc/jasypt_enc_passwords.cfg/ext:location
 /ext:property-placeholder
 
  enc:property-placeholder
enc:encryptor
class=org.jasypt.encryption.pbe.StandardPBEStringEncryptor
  property name=config
bean
class=org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig
  property name=algorithm value=PBEWithMD5AndDES /
  property name=password
value=${[[REN_JASYPT_ENCRYPTION_PASSWORD_DB]]} /
/bean
  /property
/enc:encryptor
  /enc:property-placeholder
  
bean id=oracle-ds2 class=oracle.jdbc.pool.OracleDataSource
property name=URL value=${db.url.app} /
property name=user value=${db.user.app} /
property name=password value=${db.password.app} /
/bean
service interface=javax.sql.DataSource ref=oracle-ds2
service-properties
entry key=osgi.jndi.service.name 
value=jdbc/oracleds2 /
/service-properties
/service

broker:broker useJmx=true persistent=true  brokerName=localbroker
schedulerSupport=false


broker:persistenceAdapter
broker:jdbcPersistenceAdapter
dataSource=#oracle-ds2 /
/broker:persistenceAdapter

broker:transportConnectors
broker:transportConnector uri=${activeMQ.url} /
/broker:transportConnectors

broker:systemUsage
broker:systemUsage
broker:memoryUsage
broker:memoryUsage limit=256 mb /
/broker:memoryUsage
broker:storeUsage
broker:storeUsage limit=20 gb /
/broker:storeUsage
broker:tempUsage
broker:tempUsage limit=10 gb /
/broker:tempUsage
/broker:systemUsage
/broker:systemUsage

 
broker:destinationPolicy
  broker:policyMap
broker:policyEntries
  broker:policyEntry queue= memoryLimit=5mb /
  broker:policyEntry topic= memoryLimit=5mb

  /broker:policyEntry
/broker:policyEntries
  /broker:policyMap
/broker:destinationPolicy

 
  
  

/broker:broker
/blueprint 






--
View this message in context: 
http://karaf.922171.n3.nabble.com/Problem-in-stopping-Karaf-sever-on-Unix-machine-tp4038249p4038278.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Need to execute code while uninstalling application on Karaf

2015-01-28 Thread Prithviraj
Thanks a lot Christian.
I am looking into  this solution .

For now  we need  some  quick fix .
can you please let me know if there is any hook which can be plug at
stopping of  bundle (pre stop ) ?
Thanks in advance .





On Tue, Jan 27, 2015 at 7:13 PM, cschneider [via Karaf] 
ml-node+s922171n4038046...@n3.nabble.com wrote:

 Almost all karaf modules use this.

 As an example look at this:

 https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=blob;f=bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/osgi/Activator.java;h=c5c765b18d006a4053a0a66c5d02600259ab94dd;hb=HEAD

 I have condensed the code a bit:
 BundlesMBeanImpl bundlesMBeanImpl = new BundlesMBeanImpl(bundleContext,
 bundleService);
 HashtableString, Object props = new Hashtable();
 props.put(jmx.objectname, org.apache.karaf:type=bundle,name= +
 System.getProperty(karaf.name));
 bundleContext.registerService(getInterfaceNames(mbean), mbean, props);

 Also see:
 http://aries.apache.org/modules/jmx.html

 Christian

 On 27.01.2015 13:32, Prithviraj wrote:
  Do we have any sample example of it , which i can follow ?
 
 
 
 
  --
  View this message in context:
 http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037p4038045.html
  Sent from the Karaf - Dev mailing list archive at Nabble.com.


 --
 Christian Schneider
 http://www.liquid-reality.de

 Open Source Architect
 http://www.talend.com



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037p4038046.html
  To unsubscribe from Need to execute code while uninstalling application
 on Karaf, click here
 http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4038037code=bWVldHJhajE0QGdtYWlsLmNvbXw0MDM4MDM3fC0yMDU1MjgzMDg0
 .
 NAML
 http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://karaf.922171.n3.nabble.com/Re-Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038059.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Need to execute code while uninstalling application on Karaf

2015-01-27 Thread Prithviraj
Hi ,

We are using Mbeans in our application running on Karaf server.
Now our requirement is while uninstalling our application , we need to
uninstall Mbeans  which are added by us.
I am aware of  way to execute code while  start up of Karaf server  .
Is there any way  to execute code  while stopping /uninstall ?

Thanks in advance .

Thanks,
Prithvi 



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Need to execute code while uninstalling application on Karaf

2015-01-27 Thread Prithviraj
Hi Guillaume,

Yes  as  you mentioned  we need to unregister  MBean while bundle is
getting stoped.
I want to know where i can do that configuration  so that my code for
 unregister  MBean while bundle is getting stoped.
Thanks in advance .



On Tue, Jan 27, 2015 at 5:46 PM, Guillaume Nodet-2 [via Karaf] 
ml-node+s922171n403804...@n3.nabble.com wrote:

 What do you refer to as installing your application and uninstalling
 your application.
 I suppose MBeans are registered when some bundles are started (not
 installed).
 If so, you simply need to unregister them when the bundle is stopped (not
 uninstalled).

 Guillaume

 2015-01-27 8:50 GMT+01:00 Prithviraj [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=4038042i=0:

  Hi ,
 
  We are using Mbeans in our application running on Karaf server.
  Now our requirement is while uninstalling our application , we need to
  uninstall Mbeans  which are added by us.
  I am aware of  way to execute code while  start up of Karaf server  .
  Is there any way  to execute code  while stopping /uninstall ?
 
  Thanks in advance .
 
  Thanks,
  Prithvi
 
 
 
  --
  View this message in context:
 
 http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037.html
  Sent from the Karaf - Dev mailing list archive at Nabble.com.
 


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037p4038042.html
  To unsubscribe from Need to execute code while uninstalling application
 on Karaf, click here
 http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4038037code=bWVldHJhajE0QGdtYWlsLmNvbXw0MDM4MDM3fC0yMDU1MjgzMDg0
 .
 NAML
 http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037p4038043.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Need monitoring solution

2015-01-12 Thread Prithviraj
Hi ,

We are using Apache Karaf 3.2  on Unixserver .
We have  different routes   configured .
We need to monitor  these routes .
We  need  some  programmatic solution   for   this ?
Can you please suggest  solution for us ?

Thanks,
Prithvi



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Need-monitoring-solution-tp4037756.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Getting Encryption Exception when encryption is not used

2015-01-05 Thread Prithviraj
Hi ,

We are using apache-karaf-3.0.2 on unix .
To make confiburable impementation , we have created 2  files  in etc/
directory
1)re.properties  - It is containing the properties which are used in 
***bean.xml  file 
2)reRoutes.properties  -It is containing the properties which are usied
**camel-context file  for  configuring differnt  routes  properties values 

re.Properties contains encyrpted passwords( encyrpted by using jasypt) 
whereas reRoutes does not contain any encrypted values . 
**bean.xml looks like  as below 
ext:property-placeholder
ext:locationfile:etc/re.properties/ext:location
/ext:property-placeholder
 enc:property-placeholder
enc:encryptor
class=org.jasypt.encryption.pbe.StandardPBEStringEncryptor
property name=config
bean
class=org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig
property name=algorithm 
value=PBEWithMD5AndDES /
property name=password 
value=${RE_JASYPT_ENCRYPTION_PASSWORD} /
/bean
/property
/enc:encryptor
/enc:property-placeholder 

and **camel-context looks like 
ext:property-placeholder id=coreCamel placeholder-prefix=@(
placeholder-suffix=)
ext:locationfile:etc/reRoutes.properties/ext:location
/ext:property-placeholder

camelContext id=camel
xmlns=http://camel.apache.org/schema/blueprint; trace=false
handleFault=true

errorHandler id=erroHandler 
redeliveryPolicyRef=defaultPolicy /
routeBuilder ref=jmxRouteBuilder/   
redeliveryPolicyProfile id=defaultPolicy

maximumRedeliveries={{re.context.camel.exceptionPolicy.maximumRedeliveries}}
redeliveryDelay={{re.context.camel.exceptionPolicy.redeliveryDelay}}
retryAttemptedLogLevel=WARN /
onException redeliveryPolicyRef=defaultPolicy
exceptionjava.lang.Exception/exception
handled
constanttrue/constant
/handled
bean ref=errorHandlerBean /
convertBodyTo type=com.gemalto.openapi.SoapMap /
/onException  
route id=openApi trace=true
from uri=openAPI /
onException
exceptionjava.lang.Exception/exception
redeliveryPolicy logRetryAttempted=true
retryAttemptedLogLevel=WARN
maximumRedeliveries={{re.context.camel.openApiRoute.maximumRedeliveries}}
/
.

Now  in **camel-context.xml file  we are not using any ecnryped values ,
but still when we try to install application , it is giving below  error 
while calculating value for maximumRedeliveries

Caused by: org.jasypt.exceptions.EncryptionOperationNotPossibleException
at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.decrypt(StandardPBEByteEncryptor.java:1055)
at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:725)
at
org.apache.karaf.jaas.jasypt.handler.EncryptablePropertyPlaceholder.getProperty(EncryptablePropertyPlaceholder.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.7.0_25]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_25]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_25]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_25]
at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1001)

Can you please help me if anything is missed  from our  side ?

Thanks
Prithvi



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Getting-Encryption-Exception-when-encryption-is-not-used-tp4037593.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Need help realted to Karaf on unix

2014-12-22 Thread Prithviraj
sorry  for asking again, can you please point me  the link for  mentioned
thread ?
thanks in advance for your help 




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Need-help-realted-to-Karaf-on-unix-tp4037355p4037358.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Telling whether startup is really complete

2014-12-22 Thread Prithviraj
Hi JB,

I tried this , it displayed the message as mentioned in custom.properties
file .
Actually it is not solving my problem .
My problem statement is like below 
1) I have  wrote start_karaf.sh file  which will invoke start  script  from 
{$KARAF_HOME}/bin location .
Which internally start the karaf in back ground mode 
2) I have other script deploy_apps.sh which will get execute  once  previous
start_karaf.sh  script get successfully executed.
deploy_app.sh script is for  deploying  bundles in karaf  server.
Since  start_karaf.sh  invoking karaf server in background , i need to know
if  server is fully started  before  deploying apps . 
So i need  some mechanism , or  commands  by which i  can come to know
server is  fully started  so  that i can start with bundle app deployment .

Thanks in advance  for your help .

Thanks 
Prithvi
  




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Telling-whether-startup-is-really-complete-tp4025451p4037359.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.