ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helge Waastad <he...@waastad.org>
Subject Re: Understanding peerclassloading
Date Fri, 16 Jun 2017 08:27:08 GMT
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<FluidGridItem> 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<FluidGridItem> 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.

Mime
View raw message