You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by flexvalley <de...@flexvalley.com> on 2016/10/27 12:24:54 UTC
KARAF 4.6/4.8.Snapshot IgniteAbstractOsgiContextActivator
Hello,
i'm learning Ignite a few day ago. I have questions and problems stopping my
job, i'm looking help.
I'm using Karaf and i used Ignite via feature installation. My OSGI
Activator extends Ignite IgniteAbstractOsgiContextActivator and i ovveride
with OsgiClassLoadingStrategyType.CONTAINER_SWEEP; because with
BUNDLE_DELEGATING doesn't works.
i'm testing Cache and Singleton Service and for me works very fine also in
fault tolerant with 3 Karaf instance.
I see only bundle in Resolved State | 80 | 1.7.0
| ignite-osgi, Hosts: 55. I'm not very skilled with OSGI, i don't know if
Fragment in Resolved state can generate in future some problems.
55 | Active | 80 | 1.7.0 | ignite-core, Fragments: 57
56 | Active | 80 | 1.0.0.1 | Apache ServiceMix :: Bundles ::
cache-api
57 | Resolved | 80 | 1.7.0 | ignite-osgi, Hosts: 55
58 | Active | 80 | 1.7.0 | ignite-log4j
79 | Active | 80 | 2.0.0 | guava-retrying
82 | Active | 80 | 1.1.0 | Paho MQTT Client
83 | Active | 80 | 20.0.0.rc1 | Guava: Google Core Libraries for
Java
84 | Active | 80 | 1.0.2.SNAPSHOT | LARA :: CORE :: CLUSTER,
Fragments: 103
85 | Active | 80 | 1.0.2.SNAPSHOT | LARA :: MQTT :: API
86 | Active | 80 | 1.0.2.SNAPSHOT | LARA :: MQTT :: Broker
87 | Active | 80 | 18.0.0 | Guava: Google Core Libraries for
Java
96 | Active | 80 | 5.0.0.201203141834 | osgi.enterprise
98 | Active | 80 | 1.4.192 | H2 Database Engine
99 | Active | 80 | 6.2.0.1 | Apache ServiceMix :: Bundles ::
lucene-core
103 | Resolved | 80 | 1.7.0 | ignite-indexing, Hosts: 84
First Question:
Now i need to implement Query Ignite future (SqlQuery, SqlFieldsQuery
ContinuousQuery). I have installed via feature ignite-indexing and also
ignite-indexing, Hosts state in Resolved.
After this installation my Bundles stopped worked, because Ignite cluster
when start throws an exception "org.h2.api.JavaObjectSerializer"
classNotFound... Without to change codes in my bundles.
I modify manifest into ignite-indexing in this way "Fragment-Host:
org.flexvalley.ecosystem.cluster-service"... cluster-service is my bundle
where i have Activator extends IgniteAbstractOsgiContextActivator. Now my
bundle start works fine without problem.
Can you help me please to understand if Resolved and "Fragment-host" it's
rigth? or there is a better approach ?
Second Question:
I'm trying to testing
SqlFieldsQuery top10Qry = new SqlFieldsQuery(
"select _key, _val from String order
by _val desc limit 10");
List<List<?>> top10 =
tmpCache.query(top10Qry).getAll();
without success...
"Indexing is disabled for cache: mqttSingletonService. Use setIndexedTypes
or setTypeMetadata methods on CacheConfiguration to enable."...
But by cache it's configured in this way
CacheConfiguration<String, String> cacheCfg = new
CacheConfiguration<>();
cacheCfg.setBackups(0);
cacheCfg.setName("mqttMessageInCache");
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
// Sliding window of 5 seconds based on creation time.
cacheCfg.setExpiryPolicyFactory(
FactoryBuilder.factoryOf(new
CreatedExpiryPolicy(new Duration(TimeUnit.SECONDS, 3))));
cacheCfg.setIndexedTypes(String.class, String.class);
// ignite.addCacheConfiguration(cacheCfg);
dataMqttStreamer =
ignite.dataStreamer(ignite.getOrCreateCache(cacheCfg).getName());
I hope that you spend your time to help me.
Ciao
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/KARAF-4-6-4-8-Snapshot-IgniteAbstractOsgiContextActivator-tp8552.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: KARAF 4.6/4.8.Snapshot IgniteAbstractOsgiContextActivator
Posted by Sergej Sidorov <se...@gmail.com>.
Hi!
I have reproduced your issue with feature:istall ignite-core. I have also
same issue with ignite-indexing: lucene and h2 dependencies have not been
installed. The features.xml looks correct. Probably this is karaf issue.
As a workaround you can use jars from ignite release bundle [1].
About the "Fieldable.class". I downloaded the lucene bundle from [2]. It has
this class and correct osgi export at MANIFEST.MF. Try to use this bundle.
[1] https://ignite.apache.org/download.cgi
[2]
http://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.lucene/3.5.0_1/org.apache.servicemix.bundles.lucene-3.5.0_1.jar
Thanks,
Sergej
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/KARAF-4-6-4-8-Snapshot-IgniteAbstractOsgiContextActivator-tp8552p8650.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: KARAF 4.6/4.8.Snapshot IgniteAbstractOsgiContextActivator
Posted by devis76 <de...@flexvalley.com>.
Hi,
thank you for your update...
These are my step to work with Karaf, i found no alternative to work..
1) feature:install ignite-core
2) I don't understand because index-osgi was not download (same issue in 3
different Karaf) .. i see your features it's ok <bundle
dependency="true">mvn:org.apache.ignite/ignite-osgi/1.7.0</bundle> ... Then
i proceed to install via install manually with install
mvn:org.apache.ignite/ignite-osgi/1.7.0.
3)With feature:install ignite-indexing everything was download as written in
your features.xml.
Problem that i have founds.
1)My Activator("org.flexvalley.ecosystem.cluster-service) extends
IgniteAbstractOsgiContextActivator.
2)"mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene"
not contains "Fieldable.class" than ignite-indexing throws classnotFound.
The only way that i have found was been to download lucene-core-3.5.0.jar
and via bnd i created osgi bundle. My bnd file i also added "Fragment -->
ignite-core."
3)When my Bundle(1) try to run a simple query on my cache i receive no
exception only that i missed "Use setIndexedTypes or setTypeMetadata"...
4)Then i modify manfiest for H2 Database Engine ""Fragment --> ignite-core."
And now i can works with SQLQuery/SQLFieldQuery without problem
I'm working on Raspberry PI3 and Centos 6.5
Devis
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/KARAF-4-6-4-8-Snapshot-IgniteAbstractOsgiContextActivator-tp8552p8607.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: KARAF 4.6/4.8.Snapshot IgniteAbstractOsgiContextActivator
Posted by Sergej Sidorov <se...@gmail.com>.
Hi!
As I know, "Resolved" is right state for fragment bundle.
You should not change MANIFEST files in ignite-* libraries. You should build
correct MANIFEST.MF in your own bundle.
Thanks,
Sergej
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/KARAF-4-6-4-8-Snapshot-IgniteAbstractOsgiContextActivator-tp8552p8590.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.