Re: Understanding peerclassloading

2017-06-16 Thread Helge Waastad
Ok,
getting somewhere here.
Reason for this issue is that the library is bundled in the WEB-INF/lib 
of the war and not ear/lib.
If I make the war 100% skinny, classloading works fine.
(But it's not an option putting jsf libs in ear/lib due to a lot of
other issues)
/hw
 
fr., 16.06.2017 kl. 10.27 +0200, skrev Helge Waastad:
> After some more testing it seems to be related to ear and
> classloading.
> 
> a war deployment seems to be OK, but in an ear I need the "toArray"
> workaround.
> 
> I can also check with the tomee guys.
> 
> /hw
> 
> to., 15.06.2017 kl. 15.38 +0200, skrev Helge Waastad:
> > 
> > Hi,
> > running 2.0
> > 
> > https://github.com/hwaastad/Ignite.git
> > 
> > Its a ear project (did test to evaluate classloading)
> > 
> > Ignite is initialized in Ignite-web servletcontextlistener
> > (org.waastad.servlet.StartupListener)
> > cache is produced: 
> > 
> > Cache spec is produced in Ignite-web/
> > (org.waastad.cache.CacheProducer)
> > 
> > Cache is being used in a Rest Resource:  Ignite-
> > web/(org.waastad.service.RestResource) 
> > 
> > POST to http://localhost:8080/Ignite-web/api/counter body:
> > whatever..
> > 
> > 
> > I've made an IT test (which does not fail)
> > But running mvn tomee:run in web or ear will fail.
> > 
> > 
> > /hw
> > 
> > 
> > 
> > to., 15.06.2017 kl. 05.21 -0700, skrev afedotov:
> > > 
> > > Hi, please share the full log containing the error.
> > > Which version of Ignite do you use?
> > > It's not reproducible on my side.
> > > 
> > > Kind regards,
> > > Alex.
> > > 
> > > On Thu, Jun 15, 2017 at 2:46 PM, Helge Waastad [via Apache Ignite
> > > Users] <[hidden email]> wrote:
> > > > 
> > > > Hi, and thx for answering. 
> > > > peerclassloading is enabled on both server and client. 
> > > > 
> > > > My trouble is the understanding of the reason why 
> > > > cache.put(key,arraylist) will not work (not trigger class
> > > > loading) but 
> > > > cache.put(key,Arrays.aslist(arraylist.toArray())) will. 
> > > > 
> > > > /hw 
> > > > 
> > > > to., 15.06.2017 kl. 03.22 -0700, skrev afedotov:
> > > > 
> > > > > 
> > > > > Hi, 
> > > > >  
> > > > > If I get your problem right you need either enable peer class
> > > > loading 
> > > > > 
> > > > > on both the client and the server or make sure 
> > > > > that all required class definitions are available on the
> > > > classpath of 
> > > > > 
> > > > > the client. 
> > > > > https://apacheignite.readme.io/v2.0/docs/deployment-
> > > > > modes#secti
> > > > on-con
> > > > > 
> > > > > figuration 
> > > > >  
> > > > >  
> > > > >  
> > > > > Kind regards, 
> > > > > Alex. 
> > > > >  
> > > > > On Thu, Jun 15, 2017 at 10:42 AM, Helge Waastad [via Apache
> > > > Ignite
> > > > > 
> > > > > Users] <[hidden email]> wrote:
> > > > > 
> > > > > > 
> > > > > > Hi, 
> > > > > > I'm pretty new to the Apache Ignite. 
> > > > > > I'm working with peerclassloading and need to understand a
> > > > couple 
> > > > > 
> > > > > > 
> > > > > > of thing. 
> > > > > >  
> > > > > > Scenario: 
> > > > > > 1x server and 1x client 
> > > > > >  
> > > > > > Cache: 
> > > > > > CacheConfiguration<String, List> cc = new
> > > > CacheConfiguration<>("my- 
> > > > > 
> > > > > > 
> > > > > > cache"); 
> > > > > >  
> > > > > > Code creating classnotfound: 
> > > > > > FluidGridItem item = new FluidGridItem(UUID.randomUUID()); 
> > > > > > List ll = new ArrayList<>(); 
> > > > > > ll.add(item); 
> > > > > > cache.put(key, ll); 
> > > > > >  
> > > > > > Code loading class ok: (INFO: Class locally deployed:
> > > > > > class 
> > > > > > org.primefaces.extensions.model.fluidgr

Re: Understanding peerclassloading

2017-06-16 Thread Helge Waastad
After some more testing it seems to be related to ear and classloading.

a war deployment seems to be OK, but in an ear I need the "toArray"
workaround.

I can also check with the tomee guys.

/hw

to., 15.06.2017 kl. 15.38 +0200, skrev Helge Waastad:
> Hi,
> running 2.0
> 
> https://github.com/hwaastad/Ignite.git
> 
> Its a ear project (did test to evaluate classloading)
> 
> Ignite is initialized in Ignite-web servletcontextlistener
> (org.waastad.servlet.StartupListener)
> cache is produced: 
> 
> Cache spec is produced in Ignite-web/
> (org.waastad.cache.CacheProducer)
> 
> Cache is being used in a Rest Resource:  Ignite-
> web/(org.waastad.service.RestResource) 
> 
> POST to http://localhost:8080/Ignite-web/api/counter body: whatever..
> 
> 
> I've made an IT test (which does not fail)
> But running mvn tomee:run in web or ear will fail.
> 
> 
> /hw
> 
> 
> 
> to., 15.06.2017 kl. 05.21 -0700, skrev afedotov:
> > Hi, please share the full log containing the error.
> > Which version of Ignite do you use?
> > It's not reproducible on my side.
> > 
> > Kind regards,
> > Alex.
> > 
> > On Thu, Jun 15, 2017 at 2:46 PM, Helge Waastad [via Apache Ignite
> > Users] <[hidden email]> wrote:
> > > Hi, and thx for answering. 
> > > peerclassloading is enabled on both server and client. 
> > > 
> > > My trouble is the understanding of the reason why 
> > > cache.put(key,arraylist) will not work (not trigger class
> > > loading) but 
> > > cache.put(key,Arrays.aslist(arraylist.toArray())) will. 
> > > 
> > > /hw 
> > > 
> > > to., 15.06.2017 kl. 03.22 -0700, skrev afedotov:
> > > 
> > > > Hi, 
> > > > 
> > > > If I get your problem right you need either enable peer class
> > > loading 
> > > > on both the client and the server or make sure 
> > > > that all required class definitions are available on the
> > > classpath of 
> > > > the client. 
> > > > https://apacheignite.readme.io/v2.0/docs/deployment-modes#secti
> > > on-con
> > > > figuration 
> > > > 
> > > > 
> > > > 
> > > > Kind regards, 
> > > > Alex. 
> > > > 
> > > > On Thu, Jun 15, 2017 at 10:42 AM, Helge Waastad [via Apache
> > > Ignite
> > > > Users] <[hidden email]> wrote:
> > > 
> > > > > Hi, 
> > > > > I'm pretty new to the Apache Ignite. 
> > > > > I'm working with peerclassloading and need to understand a
> > > couple 
> > > > > of thing. 
> > > > > 
> > > > > Scenario: 
> > > > > 1x server and 1x client 
> > > > > 
> > > > > Cache: 
> > > > > CacheConfiguration<String, List> cc = new
> > > CacheConfiguration<>("my- 
> > > > > cache"); 
> > > > > 
> > > > > Code creating classnotfound: 
> > > > > FluidGridItem item = new FluidGridItem(UUID.randomUUID()); 
> > > > > List ll = new ArrayList<>(); 
> > > > > ll.add(item); 
> > > > > cache.put(key, ll); 
> > > > > 
> > > > > Code loading class ok: (INFO: Class locally deployed: class 
> > > > > org.primefaces.extensions.model.fluidgrid.FluidGridItem) 
> > > > > FluidGridItem item = new FluidGridItem(UUID.randomUUID()); 
> > > > > List ll = new ArrayList<>(); 
> > > > > ll.add(item); 
> > > > > cache.put(key, Arrays.asList(ll.toArray())); 
> > > > > 
> > > > > 
> > > > > Can someone please explain why this is? 
> > > > > (It's been a headache resolving this - been trying to get a
> > > JCS 
> > > > > project migrated to Ignite) 
> > > > > 
> > > > > br hw 
> > > > > 
> > > > > 
> > > > >
> > > > > If you reply to this email, your message will be added to
> > > the 
> > > > > discussion below: 
> > > > > http://apache-ignite-users.70518.x6.nabble.com/Understanding-
> > > peercl
> > > > > assloading-tp13805.html 
> > > > > To start a new topic under Apache Ignite Users, email
> > > [hidden 
> > > > > email]  
> > > > > To unsubscribe from Apache Ignite Users, click here. 
> > > > > NAML 
> > > > > 
> > > > 
> > > > View this message in context: Re: Understanding
> > > peerclassloading 
> > > > Sent from the Apache Ignite Users mailing list archive at
> > > Nabble.com. 
> > > 
> > > 
> > > If you reply to this email, your message will be added to the
> > > discussion below:
> > > http://apache-ignite-users.70518.x6.nabble.com/Understanding-peer
> > > classloading-tp13805p13818.html
> > > To start a new topic under Apache Ignite Users, email [hidden
> > > email] 
> > > To unsubscribe from Apache Ignite Users, click here.
> > > NAML
> > > 
> > View this message in context: Re: Understanding peerclassloading
> > Sent from the Apache Ignite Users mailing list archive at
> > Nabble.com.


Re: Understanding peerclassloading

2017-06-15 Thread Helge Waastad
Hi,
running 2.0
https://github.com/hwaastad/Ignite.git
Its a ear project (did test to evaluate classloading)
Ignite is initialized in Ignite-web servletcontextlistener
(org.waastad.servlet.StartupListener)
cache is produced: 
Cache spec is produced in Ignite-web/ (org.waastad.cache.CacheProducer)
Cache is being used in a Rest Resource:  Ignite-
web/(org.waastad.service.RestResource) 
POST to http://localhost:8080/Ignite-web/api/counter body: whatever..


I've made an IT test (which does not fail)
But running mvn tomee:run in web or ear will fail.


/hw


to., 15.06.2017 kl. 05.21 -0700, skrev afedotov:
> Hi, please share the full log containing the error.
> Which version of Ignite do you use?
> It's not reproducible on my side.
> 
> Kind regards,
> Alex.
> 
> On Thu, Jun 15, 2017 at 2:46 PM, Helge Waastad [via Apache Ignite
> Users] <[hidden email]> wrote:
> > Hi, and thx for answering. 
> > peerclassloading is enabled on both server and client. 
> > 
> > My trouble is the understanding of the reason why 
> > cache.put(key,arraylist) will not work (not trigger class loading)
> > but 
> > cache.put(key,Arrays.aslist(arraylist.toArray())) will. 
> > 
> > /hw 
> > 
> > to., 15.06.2017 kl. 03.22 -0700, skrev afedotov:
> > 
> > > Hi, 
> > > 
> > > If I get your problem right you need either enable peer class
> > loading 
> > > on both the client and the server or make sure 
> > > that all required class definitions are available on the
> > classpath of 
> > > the client. 
> > > https://apacheignite.readme.io/v2.0/docs/deployment-
> > modes#section-con
> > > figuration 
> > > 
> > > 
> > > 
> > > Kind regards, 
> > > Alex. 
> > > 
> > > On Thu, Jun 15, 2017 at 10:42 AM, Helge Waastad [via Apache
> > Ignite
> > > Users] <[hidden email]> wrote:
> > 
> > > > Hi, 
> > > > I'm pretty new to the Apache Ignite. 
> > > > I'm working with peerclassloading and need to understand a
> > couple 
> > > > of thing. 
> > > > 
> > > > Scenario: 
> > > > 1x server and 1x client 
> > > > 
> > > > Cache: 
> > > > CacheConfiguration cc = new
> > CacheConfiguration<>("my- 
> > > > cache"); 
> > > > 
> > > > Code creating classnotfound: 
> > > > FluidGridItem item = new FluidGridItem(UUID.randomUUID()); 
> > > > List ll = new ArrayList<>(); 
> > > > ll.add(item); 
> > > > cache.put(key, ll); 
> > > > 
> > > > Code loading class ok: (INFO: Class locally deployed: class 
> > > > org.primefaces.extensions.model.fluidgrid.FluidGridItem) 
> > > > FluidGridItem item = new FluidGridItem(UUID.randomUUID()); 
> > > > List ll = new ArrayList<>(); 
> > > > ll.add(item); 
> > > > cache.put(key, Arrays.asList(ll.toArray())); 
> > > > 
> > > > 
> > > > Can someone please explain why this is? 
> > > > (It's been a headache resolving this - been trying to get a
> > JCS 
> > > > project migrated to Ignite) 
> > > > 
> > > > br hw 
> > > > 
> > > > 
> > > >
> > > > If you reply to this email, your message will be added to the 
> > > > discussion below: 
> > > > http://apache-ignite-users.70518.x6.nabble.com/Understanding-
> > peercl
> > > > assloading-tp13805.html 
> > > > To start a new topic under Apache Ignite Users, email [hidden 
> > > > email]  
> > > > To unsubscribe from Apache Ignite Users, click here. 
> > > > NAML 
> > > > 
> > > 
> > > View this message in context: Re: Understanding peerclassloading 
> > > Sent from the Apache Ignite Users mailing list archive at
> > Nabble.com. 
> > 
> > 
> > If you reply to this email, your message will be added to the
> > discussion below:
> > http://apache-ignite-users.70518.x6.nabble.com/Understanding-
> > peerclassloading-tp13805p13818.html
> > To start a new topic under Apache Ignite Users, email [hidden
> > email] 
> > To unsubscribe from Apache Ignite Users, click here.
> > NAML
> > 
> 
> View this message in context: Re: Understanding peerclassloading
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Understanding peerclassloading

2017-06-15 Thread afedotov
Hi, please share the full log containing the error.
Which version of Ignite do you use?
It's not reproducible on my side.

Kind regards,
Alex.

On Thu, Jun 15, 2017 at 2:46 PM, Helge Waastad [via Apache Ignite Users] <
ml+s70518n13818...@n6.nabble.com> wrote:

> Hi, and thx for answering.
> peerclassloading is enabled on both server and client.
>
> My trouble is the understanding of the reason why
> cache.put(key,arraylist) will not work (not trigger class loading) but
> cache.put(key,Arrays.aslist(arraylist.toArray())) will.
>
> /hw
>
> to., 15.06.2017 kl. 03.22 -0700, skrev afedotov:
>
> > Hi,
> >
> > If I get your problem right you need either enable peer class loading
> > on both the client and the server or make sure
> > that all required class definitions are available on the classpath of
> > the client.
> > https://apacheignite.readme.io/v2.0/docs/deployment-modes#section-con
> > figuration
> >
> >
> >
> > Kind regards,
> > Alex.
> >
> > On Thu, Jun 15, 2017 at 10:42 AM, Helge Waastad [via Apache Ignite
> > Users] <[hidden email]> wrote:
> > > Hi,
> > > I'm pretty new to the Apache Ignite.
> > > I'm working with peerclassloading and need to understand a couple
> > > of thing.
> > >
> > > Scenario:
> > > 1x server and 1x client
> > >
> > > Cache:
> > > CacheConfiguration<String, List> cc = new CacheConfiguration<>("my-
> > > cache");
> > >
> > > Code creating classnotfound:
> > > FluidGridItem item = new FluidGridItem(UUID.randomUUID());
> > > List ll = new ArrayList<>();
> > > ll.add(item);
> > > cache.put(key, ll);
> > >
> > > Code loading class ok: (INFO: Class locally deployed: class
> > > org.primefaces.extensions.model.fluidgrid.FluidGridItem)
> > > FluidGridItem item = new FluidGridItem(UUID.randomUUID());
> > > List ll = new ArrayList<>();
> > > ll.add(item);
> > > cache.put(key, Arrays.asList(ll.toArray()));
> > >
> > >
> > > Can someone please explain why this is?
> > > (It's been a headache resolving this - been trying to get a JCS
> > > project migrated to Ignite)
> > >
> > > br hw
> > >
> > >
> > >
> > > If you reply to this email, your message will be added to the
> > > discussion below:
> > > http://apache-ignite-users.70518.x6.nabble.com/Understanding-peercl
> > > assloading-tp13805.html
> > > To start a new topic under Apache Ignite Users, email [hidden
> > > email]
> > > To unsubscribe from Apache Ignite Users, click here.
> > > NAML
> > >
> >
> > View this message in context: Re: Understanding peerclassloading
> > Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Understanding-
> peerclassloading-tp13805p13818.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1...@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=1=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Understanding-peerclassloading-tp13805p13820.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Understanding peerclassloading

2017-06-15 Thread Helge Waastad
Hi, and thx for answering.
peerclassloading is enabled on both server and client.

My trouble is the understanding of the reason why
cache.put(key,arraylist) will not work (not trigger class loading) but
cache.put(key,Arrays.aslist(arraylist.toArray())) will.

/hw

to., 15.06.2017 kl. 03.22 -0700, skrev afedotov:
> Hi,
> 
> If I get your problem right you need either enable peer class loading
> on both the client and the server or make sure
> that all required class definitions are available on the classpath of
> the client.
> https://apacheignite.readme.io/v2.0/docs/deployment-modes#section-con
> figuration
> 
> 
> 
> Kind regards,
> Alex.
> 
> On Thu, Jun 15, 2017 at 10:42 AM, Helge Waastad [via Apache Ignite
> Users] <[hidden email]> wrote:
> > Hi,
> > I'm pretty new to the Apache Ignite.
> > I'm working with peerclassloading and need to understand a couple
> > of thing.
> > 
> > Scenario:
> > 1x server and 1x client
> > 
> > Cache:
> > CacheConfiguration<String, List> cc = new CacheConfiguration<>("my-
> > cache");
> > 
> > Code creating classnotfound:
> > FluidGridItem item = new FluidGridItem(UUID.randomUUID());
> > List ll = new ArrayList<>();
> > ll.add(item);
> > cache.put(key, ll);
> > 
> > Code loading class ok: (INFO: Class locally deployed: class
> > org.primefaces.extensions.model.fluidgrid.FluidGridItem)
> > FluidGridItem item = new FluidGridItem(UUID.randomUUID());
> > List ll = new ArrayList<>();
> > ll.add(item);
> > cache.put(key, Arrays.asList(ll.toArray()));
> > 
> > 
> > Can someone please explain why this is?
> > (It's been a headache resolving this - been trying to get a JCS
> > project migrated to Ignite)
> > 
> > br hw
> > 
> > 
> > 
> > If you reply to this email, your message will be added to the
> > discussion below:
> > http://apache-ignite-users.70518.x6.nabble.com/Understanding-peercl
> > assloading-tp13805.html
> > To start a new topic under Apache Ignite Users, email [hidden
> > email] 
> > To unsubscribe from Apache Ignite Users, click here.
> > NAML
> > 
> 
> View this message in context: Re: Understanding peerclassloading
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Understanding peerclassloading

2017-06-15 Thread afedotov
Hi,

If I get your problem right you need either enable peer class loading on
both the client and the server or make sure
that all required class definitions are available on the classpath of the
client.
https://apacheignite.readme.io/v2.0/docs/deployment-modes#section-configuration



Kind regards,
Alex.

On Thu, Jun 15, 2017 at 10:42 AM, Helge Waastad [via Apache Ignite Users] <
ml+s70518n13805...@n6.nabble.com> wrote:

> Hi,
> I'm pretty new to the Apache Ignite.
> I'm working with peerclassloading and need to understand a couple of thing.
>
> Scenario:
> 1x server and 1x client
>
> Cache:
> CacheConfiguration cc = new CacheConfiguration<>("my-
> cache");
>
> Code creating classnotfound:
> FluidGridItem item = new FluidGridItem(UUID.randomUUID());
> List ll = new ArrayList<>();
> ll.add(item);
> cache.put(key, ll);
>
> Code loading class ok: (INFO: Class locally deployed: class
> org.primefaces.extensions.model.fluidgrid.FluidGridItem)
> FluidGridItem item = new FluidGridItem(UUID.randomUUID());
> List ll = new ArrayList<>();
> ll.add(item);
> cache.put(key, Arrays.asList(ll.toArray()));
>
>
> Can someone please explain why this is?
> (It's been a headache resolving this - been trying to get a JCS project
> migrated to Ignite)
>
> br hw
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Understanding-
> peerclassloading-tp13805.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1...@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Understanding-peerclassloading-tp13805p13816.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.