Hi,

I have been able to use tibco ems in karaf pretty successfully.  I have noticed 
that ClassNotFound exceptions are very cryptic and do not tell you exactly what 
the cause is. In this case, it might not be the TibjmsInitialContextFactory 
that is not being found but another Tibco class in another package that isn't 
being imported directly.  Try setting a header in your MyApp Manifest to 
"DynamicImport-Package= *", I think you can even use the dev:dynamic-import 
command from the karaf command line to change this header on the fly on your 
bundle.

Another problem might be that tibco is trying to use another class from another 
bundle (maybe javax.jms isn't available in your bundles), so make sure you have 
all the dependent jars you may need. Also, you can try setting the 
dynamic-import on the tibco bundle itself to see if it works.

If it does work, it is simple enough to check the imports and exports of the 
bundles to see what extra packages were added during the dynamicimport to make 
it work.

Roshan

On Dec 2, 2011, at 3:43 AM, Andreas Pieber wrote:

Slowly it's getting quite hard to diagnose this without the code available..The 
code of "MyApp" you've posted in your first mail is called where? In the 
activator?

Kind regards,
Andreas

On Thu, Dec 1, 2011 at 23:23, surya aditya 
<[email protected]<mailto:[email protected]>> wrote:
Hi:

Tried the following:

1. MyApp bundle does import the "com.tibco.tibjms.naming" package. I still get 
'ClassNotFound' exception, double checked if the tibco ems libraray jar has the 
file in questions and it does. Fyi Tibco Ems jar is copied into /deploy folder. 
Tibco Ems bundle is active, on doing 'headers' i see everything is ok. no red 
lines. verified using 'imports' as well.

2. 'headers' on MyApp bundle is clean as well. This bundle has created 
manifest.mf and looks ok on manual inspection as well.

Problem still persists "Cannot instantiate class: 
com.tibco.tibjms.naming.TibjmsInitialContextFactory [Root exception is 
java.lang.ClassNotFoundException: 
com.tibco.tibjms.naming.TibjmsInitialContextFactory]"

Any other pointers to look into will be helpful? this looks straight forward 
use case where i am trying to connect to EMS server, sure I guess this is 
doable in Karaf, just need to get things in right place I hope.

Appreciate any further help.

regards,
Surya





On Thu, Dec 1, 2011 at 3:53 PM, mikevan 
<[email protected]<mailto:[email protected]>> wrote:


Andreas,



It looks like it should from reading his Import-Package statement. However, if 
the maven-bundle-plugin isn't working, it wouldn't be creating the MANIFEST.MF 
file properly.  Perhaps he should look at the .jar file created to verify that 
the MANIFEST.MF is actually being created. Alternatively, the headers command 
should show what the bundle thinks it should be looking for.  Additionally, the 
imports command could be used to verify this also.



----- Original Message -----


From: "Andreas Pieber [via Karaf]" 
<[email protected]<mailto:ml-node%[email protected]>>
To: "mikevan" <[email protected]<mailto:[email protected]>>
Sent: Thursday, December 1, 2011 3:49:41 PM
Subject: Re: karaf and tibco ems



Sorry for the standard question, but does the bundle containing the code you've 
posted in your first mail imports com.tibco.tibjms.naming?

Kind regards Andreas
On Dec 1, 2011 9:31 PM, "surya aditya" < [hidden email] > wrote:


I verified the class exists in jar. on executing the  'exports'. I get the 
following:


karaf@root> exports | grep com.tibco.tibjms
   45 com.tibco.tibjms; version=0.0.0
   45 com.tibco.tibjms.naming; version=0.0.0
   45 com.tibco.tibjms.naming. tibjmsnaming; version=0.0.0




i see version=0.0.0, but MyApp does not specify any version on imports! should 
that be the issue here? thanks for helping again.


from bundles:headers on  my application jar:
Import-Package =
       com.google.inject;version="[1. 3,2)",
       com.google.inject.binder; version="[1.3,2)",
         com.google.inject.name<http://com.google.inject.name/>  ; 
version="[1.3,2)",
       com.tibco.tibjms,
       com.tibco.tibjms.naming,
       com.tibco.tibjms.naming. tibjmsnaming,
       javax.jms,........................


regards,
Surya





On Thu, Dec 1, 2011 at 3:25 PM, mikevan < [hidden email] > wrote:

<blockquote>


First, try to manually verify that the tibco jar file you're using actually 
contains the correct class: com.tibco.tibjms.naming. 
TibjmsInitialContextFactory .  Once you've done that, if the class is present, 
verify that the package has been properly exported into your environment by 
executing:

karaf@root> exports | grep com.tibco.tibjms.naming



Please let me know what happens.



----- Original Message -----





--
Click here to mark it as 
spam.<http://mailfilter.proteus-technologies.com/cgi-bin/learn-msg.cgi?id=C2606284AD.AC1DA>

Reply via email to