Hi:
In a distributed environment, if use the spring AOP programming, generated a class of byte code enhancement, then the error will be reported as follows: java.lang.ClassNotFoundException: demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 This error I understand, this class does not exist on the remote node. But the question is, is it a technical limitation of Ignite, or is it the way I use it,or is it a bug? I opened the peer class loading , the normal deployment I did not test, but I estimate it will be the same error. |
Can you please try enabling "peerClassLoading" and share the results here?
--Yakov 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: > Hi: > > In a distributed environment, if use the spring AOP programming, generated > a class of byte code enhancement, then the error will be reported as > follows: > > java.lang.ClassNotFoundException: > demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 > > This error I understand, this class does not exist on the remote node. > But the question is, is it a technical limitation of Ignite, or is it the > way I use it,or is it a bug? > > I opened the peer class loading , the normal deployment I did not test, > but I estimate it will be the same error. > |
Hi:
I have already opened the peerClassLoading. My practice is in eclipse create a java project, developed a ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call configured spring interceptors service. This example in eclipse operation is no problem. But if I open a node in the command line by ignite.sh, it will prompt the following error in the command line. In the default configuration file of ignite, the same configuration of the peerClassLoading=true. 在 16/1/18 19:39, Yakov Zhdanov 写道: > Can you please try enabling "peerClassLoading" and share the results here? > > --Yakov > > 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: > >> Hi: >> >> In a distributed environment, if use the spring AOP programming, generated >> a class of byte code enhancement, then the error will be reported as >> follows: >> >> java.lang.ClassNotFoundException: >> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >> >> This error I understand, this class does not exist on the remote node. >> But the question is, is it a technical limitation of Ignite, or is it the >> way I use it,or is it a bug? >> >> I opened the peer class loading , the normal deployment I did not test, >> but I estimate it will be the same error. >> |
In reply to this post by yzhdanov
Yakov:
I have already opened the peerClassLoading. Attachment is a complete eclipse project that can be run. The required jar package is as follows: aopalliance.jar cache-api-1.0.0.jar commons-logging-1.2.jar ignite-core-1.5.0.final.jar spring-aop-4.1.9.RELEASE.jar spring-beans-4.1.9.RELEASE.jar spring-context-4.1.9.RELEASE.jar spring-core-4.1.9.RELEASE.jar spring-expression-4.1.9.RELEASE.jar The problem is that there is no problem with a single node, if the ignite.sh is started on the command line, the following error will occur. 在 16/1/18 19:39, Yakov Zhdanov 写道: > Can you please try enabling "peerClassLoading" and share the results here? > > --Yakov > > 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: > >> Hi: >> >> In a distributed environment, if use the spring AOP programming, generated >> a class of byte code enhancement, then the error will be reported as >> follows: >> >> java.lang.ClassNotFoundException: >> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >> >> This error I understand, this class does not exist on the remote node. >> But the question is, is it a technical limitation of Ignite, or is it the >> way I use it,or is it a bug? >> >> I opened the peer class loading , the normal deployment I did not test, >> but I estimate it will be the same error. >> |
In reply to this post by 李玉珏@163
Seems that peerClassLoading doesn't work for your case. Please share the
source code of your example. -- Denis On 1/18/2016 3:48 PM, 李玉珏@163 wrote: > Hi: > > I have already opened the peerClassLoading. > My practice is in eclipse create a java project, developed a > ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call > configured spring interceptors service. This example in eclipse > operation is no problem. > > But if I open a node in the command line by ignite.sh, it will prompt > the following error in the command line. > > In the default configuration file of ignite, the same configuration of > the peerClassLoading=true. > > 在 16/1/18 19:39, Yakov Zhdanov 写道: >> Can you please try enabling "peerClassLoading" and share the results >> here? >> >> --Yakov >> >> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >> >>> Hi: >>> >>> In a distributed environment, if use the spring AOP programming, >>> generated >>> a class of byte code enhancement, then the error will be reported as >>> follows: >>> >>> java.lang.ClassNotFoundException: >>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >>> >>> This error I understand, this class does not exist on the remote node. >>> But the question is, is it a technical limitation of Ignite, or is >>> it the >>> way I use it,or is it a bug? >>> >>> I opened the peer class loading , the normal deployment I did not test, >>> but I estimate it will be the same error. >>> > > |
Hi:
I had just sent the code to the list. 在 16/1/19 20:39, Denis Magda 写道: > Seems that peerClassLoading doesn't work for your case. Please share > the source code of your example. > > -- > Denis > > On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >> Hi: >> >> I have already opened the peerClassLoading. >> My practice is in eclipse create a java project, developed a >> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call >> configured spring interceptors service. This example in eclipse >> operation is no problem. >> >> But if I open a node in the command line by ignite.sh, it will prompt >> the following error in the command line. >> >> In the default configuration file of ignite, the same configuration >> of the peerClassLoading=true. >> >> 在 16/1/18 19:39, Yakov Zhdanov 写道: >>> Can you please try enabling "peerClassLoading" and share the results >>> here? >>> >>> --Yakov >>> >>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >>> >>>> Hi: >>>> >>>> In a distributed environment, if use the spring AOP programming, >>>> generated >>>> a class of byte code enhancement, then the error will be reported as >>>> follows: >>>> >>>> java.lang.ClassNotFoundException: >>>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >>>> >>>> This error I understand, this class does not exist on the remote node. >>>> But the question is, is it a technical limitation of Ignite, or is >>>> it the >>>> way I use it,or is it a bug? >>>> >>>> I opened the peer class loading , the normal deployment I did not >>>> test, >>>> but I estimate it will be the same error. >>>> >> >> > |
The list does not support attachments. You can use pastebin [1] or gist [2]
to paste your code and send the link here. [1] http://pastebin.com/ [2] https://gist.github.com/ D. On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: > Hi: > > I had just sent the code to the list. > > 在 16/1/19 20:39, Denis Magda 写道: > > Seems that peerClassLoading doesn't work for your case. Please share the >> source code of your example. >> >> -- >> Denis >> >> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >> >>> Hi: >>> >>> I have already opened the peerClassLoading. >>> My practice is in eclipse create a java project, developed a >>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call >>> configured spring interceptors service. This example in eclipse operation >>> is no problem. >>> >>> But if I open a node in the command line by ignite.sh, it will prompt >>> the following error in the command line. >>> >>> In the default configuration file of ignite, the same configuration of >>> the peerClassLoading=true. >>> >>> 在 16/1/18 19:39, Yakov Zhdanov 写道: >>> >>>> Can you please try enabling "peerClassLoading" and share the results >>>> here? >>>> >>>> --Yakov >>>> >>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >>>> >>>> Hi: >>>>> >>>>> In a distributed environment, if use the spring AOP programming, >>>>> generated >>>>> a class of byte code enhancement, then the error will be reported as >>>>> follows: >>>>> >>>>> java.lang.ClassNotFoundException: >>>>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >>>>> >>>>> This error I understand, this class does not exist on the remote node. >>>>> But the question is, is it a technical limitation of Ignite, or is it >>>>> the >>>>> way I use it,or is it a bug? >>>>> >>>>> I opened the peer class loading , the normal deployment I did not test, >>>>> but I estimate it will be the same error. >>>>> >>>>> >>> >>> >> > > |
Hi:
The relevant code on the GitHub, the address is: https://github.com/liyuj/computegrid Sent from Mail Master On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: The list does not support attachments. You can use pastebin [1] or gist [2] to paste your code and send the link here. [1] http://pastebin.com/ [2] https://gist.github.com/ D. On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: > Hi: > > I had just sent the code to the list. > > 在 16/1/19 20:39, Denis Magda 写道: > > Seems that peerClassLoading doesn't work for your case. Please share the >> source code of your example. >> >> -- >> Denis >> >> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >> >>> Hi: >>> >>> I have already opened the peerClassLoading. >>> My practice is in eclipse create a java project, developed a >>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call >>> configured spring interceptors service. This example in eclipse operation >>> is no problem. >>> >>> But if I open a node in the command line by ignite.sh, it will prompt >>> the following error in the command line. >>> >>> In the default configuration file of ignite, the same configuration of >>> the peerClassLoading=true. >>> >>> 在 16/1/18 19:39, Yakov Zhdanov 写道: >>> >>>> Can you please try enabling "peerClassLoading" and share the results >>>> here? >>>> >>>> --Yakov >>>> >>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >>>> >>>> Hi: >>>>> >>>>> In a distributed environment, if use the spring AOP programming, >>>>> generated >>>>> a class of byte code enhancement, then the error will be reported as >>>>> follows: >>>>> >>>>> java.lang.ClassNotFoundException: >>>>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >>>>> >>>>> This error I understand, this class does not exist on the remote node. >>>>> But the question is, is it a technical limitation of Ignite, or is it >>>>> the >>>>> way I use it,or is it a bug? >>>>> >>>>> I opened the peer class loading , the normal deployment I did not test, >>>>> but I estimate it will be the same error. >>>>> >>>>> >>> >>> >> > > |
Hi!
I've checked your code and spot an issue. The root cause, is using of Autowired annotation, since it cause bean to be serialized on a client side, and that leads ClassNotFoundException on the server side during bean deserialization, since server was started from *.sh, without necessary spring jars in the classpath. Good news here, that it could be fixed easily with those steps: 1. Remove Autowired from transferred entities as ComputeGridJob 2. When you need an applicationContext, use @SpringApplicationContextResource annotation. You are need to use it in your ComputeGridTask. 3. Start server Ignite node from spring context, or put spring jars inside classpath in *.sh file. Also, you can simplify your solution for ComputeGridService by using @ServiceResource. Take a look: https://apacheignite.readme.io/docs/service-example Thanks! On Wed, Jan 20, 2016 at 6:07 AM, 李玉珏 <[hidden email]> wrote: > Hi: > The relevant code on the GitHub, the address is: > https://github.com/liyuj/computegrid > > > Sent from Mail Master > > > > On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: > > The list does not support attachments. You can use pastebin [1] or gist [2] > to paste your code and send the link here. > > [1] http://pastebin.com/ > [2] https://gist.github.com/ > > D. > > On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: > > > Hi: > > > > I had just sent the code to the list. > > > > 在 16/1/19 20:39, Denis Magda 写道: > > > > Seems that peerClassLoading doesn't work for your case. Please share the > >> source code of your example. > >> > >> -- > >> Denis > >> > >> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: > >> > >>> Hi: > >>> > >>> I have already opened the peerClassLoading. > >>> My practice is in eclipse create a java project, developed a > >>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call > >>> configured spring interceptors service. This example in eclipse > operation > >>> is no problem. > >>> > >>> But if I open a node in the command line by ignite.sh, it will prompt > >>> the following error in the command line. > >>> > >>> In the default configuration file of ignite, the same configuration of > >>> the peerClassLoading=true. > >>> > >>> 在 16/1/18 19:39, Yakov Zhdanov 写道: > >>> > >>>> Can you please try enabling "peerClassLoading" and share the results > >>>> here? > >>>> > >>>> --Yakov > >>>> > >>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: > >>>> > >>>> Hi: > >>>>> > >>>>> In a distributed environment, if use the spring AOP programming, > >>>>> generated > >>>>> a class of byte code enhancement, then the error will be reported as > >>>>> follows: > >>>>> > >>>>> java.lang.ClassNotFoundException: > >>>>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 > >>>>> > >>>>> This error I understand, this class does not exist on the remote > node. > >>>>> But the question is, is it a technical limitation of Ignite, or is it > >>>>> the > >>>>> way I use it,or is it a bug? > >>>>> > >>>>> I opened the peer class loading , the normal deployment I did not > test, > >>>>> but I estimate it will be the same error. > >>>>> > >>>>> > >>> > >>> > >> > > > > > |
As for the last step, let me correct myself:
3. Start server Ignite node from spring context *AND *put spring jars inside classpath in *.sh file. Be sure, that both nodes are using the same xml context. On Wed, Jan 20, 2016 at 5:07 PM, Vladimir Ershov <[hidden email]> wrote: > Hi! > > I've checked your code and spot an issue. The root cause, is using of > Autowired annotation, since it cause bean to be serialized on a client > side, and that leads ClassNotFoundException on the server side during bean > deserialization, since server was started from *.sh, without necessary > spring jars in the classpath. > > Good news here, that it could be fixed easily with those steps: > > 1. Remove Autowired from transferred entities as ComputeGridJob > 2. When you need an applicationContext, use > @SpringApplicationContextResource annotation. You are need to use it in > your ComputeGridTask. > 3. Start server Ignite node from spring context, or put spring jars > inside classpath in *.sh file. > > Also, you can simplify your solution for ComputeGridService by using > @ServiceResource. Take a look: > https://apacheignite.readme.io/docs/service-example > > Thanks! > > On Wed, Jan 20, 2016 at 6:07 AM, 李玉珏 <[hidden email]> wrote: > >> Hi: >> The relevant code on the GitHub, the address is: >> https://github.com/liyuj/computegrid >> >> >> Sent from Mail Master >> >> >> >> On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: >> >> The list does not support attachments. You can use pastebin [1] or gist >> [2] >> to paste your code and send the link here. >> >> [1] http://pastebin.com/ >> [2] https://gist.github.com/ >> >> D. >> >> On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: >> >> > Hi: >> > >> > I had just sent the code to the list. >> > >> > 在 16/1/19 20:39, Denis Magda 写道: >> > >> > Seems that peerClassLoading doesn't work for your case. Please share the >> >> source code of your example. >> >> >> >> -- >> >> Denis >> >> >> >> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >> >> >> >>> Hi: >> >>> >> >>> I have already opened the peerClassLoading. >> >>> My practice is in eclipse create a java project, developed a >> >>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call >> >>> configured spring interceptors service. This example in eclipse >> operation >> >>> is no problem. >> >>> >> >>> But if I open a node in the command line by ignite.sh, it will prompt >> >>> the following error in the command line. >> >>> >> >>> In the default configuration file of ignite, the same configuration of >> >>> the peerClassLoading=true. >> >>> >> >>> 在 16/1/18 19:39, Yakov Zhdanov 写道: >> >>> >> >>>> Can you please try enabling "peerClassLoading" and share the results >> >>>> here? >> >>>> >> >>>> --Yakov >> >>>> >> >>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >> >>>> >> >>>> Hi: >> >>>>> >> >>>>> In a distributed environment, if use the spring AOP programming, >> >>>>> generated >> >>>>> a class of byte code enhancement, then the error will be reported as >> >>>>> follows: >> >>>>> >> >>>>> java.lang.ClassNotFoundException: >> >>>>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >> >>>>> >> >>>>> This error I understand, this class does not exist on the remote >> node. >> >>>>> But the question is, is it a technical limitation of Ignite, or is >> it >> >>>>> the >> >>>>> way I use it,or is it a bug? >> >>>>> >> >>>>> I opened the peer class loading , the normal deployment I did not >> test, >> >>>>> but I estimate it will be the same error. >> >>>>> >> >>>>> >> >>> >> >>> >> >> >> > >> > >> > > |
Hi:
I understand your approach, it should be feasible, but not very elegant. If use ProxyFactory in spring. At runtime dynamically add interceptor, can solve the problem, but performance will influence. I switched to a different way of writing, using the Service mechanism, code has been updated to GitHub, throws NullException. I survey the reason, the problem is in service deployment process of marshal and unmarshal stage, because of AdvisedSupport's methodCache is transient, this may be a compatibility problem, also asks you to look at. Sent from Mail Master On 2016-01-20 22:20 , Vladimir Ershov Wrote: As for the last step, let me correct myself: 3. Start server Ignite node from spring context *AND *put spring jars inside classpath in *.sh file. Be sure, that both nodes are using the same xml context. On Wed, Jan 20, 2016 at 5:07 PM, Vladimir Ershov <[hidden email]> wrote: > Hi! > > I've checked your code and spot an issue. The root cause, is using of > Autowired annotation, since it cause bean to be serialized on a client > side, and that leads ClassNotFoundException on the server side during bean > deserialization, since server was started from *.sh, without necessary > spring jars in the classpath. > > Good news here, that it could be fixed easily with those steps: > > 1. Remove Autowired from transferred entities as ComputeGridJob > 2. When you need an applicationContext, use > @SpringApplicationContextResource annotation. You are need to use it in > your ComputeGridTask. > 3. Start server Ignite node from spring context, or put spring jars > inside classpath in *.sh file. > > Also, you can simplify your solution for ComputeGridService by using > @ServiceResource. Take a look: > https://apacheignite.readme.io/docs/service-example > > Thanks! > > On Wed, Jan 20, 2016 at 6:07 AM, 李玉珏 <[hidden email]> wrote: > >> Hi: >> The relevant code on the GitHub, the address is: >> https://github.com/liyuj/computegrid >> >> >> Sent from Mail Master >> >> >> >> On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: >> >> The list does not support attachments. You can use pastebin [1] or gist >> [2] >> to paste your code and send the link here. >> >> [1] http://pastebin.com/ >> [2] https://gist.github.com/ >> >> D. >> >> On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: >> >> > Hi: >> > >> > I had just sent the code to the list. >> > >> > 在 16/1/19 20:39, Denis Magda 写道: >> > >> > Seems that peerClassLoading doesn't work for your case. Please share the >> >> source code of your example. >> >> >> >> -- >> >> Denis >> >> >> >> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >> >> >> >>> Hi: >> >>> >> >>> I have already opened the peerClassLoading. >> >>> My practice is in eclipse create a java project, developed a >> >>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter call >> >>> configured spring interceptors service. This example in eclipse >> operation >> >>> is no problem. >> >>> >> >>> But if I open a node in the command line by ignite.sh, it will prompt >> >>> the following error in the command line. >> >>> >> >>> In the default configuration file of ignite, the same configuration of >> >>> the peerClassLoading=true. >> >>> >> >>> 在 16/1/18 19:39, Yakov Zhdanov 写道: >> >>> >> >>>> Can you please try enabling "peerClassLoading" and share the results >> >>>> here? >> >>>> >> >>>> --Yakov >> >>>> >> >>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >> >>>> >> >>>> Hi: >> >>>>> >> >>>>> In a distributed environment, if use the spring AOP programming, >> >>>>> generated >> >>>>> a class of byte code enhancement, then the error will be reported as >> >>>>> follows: >> >>>>> >> >>>>> java.lang.ClassNotFoundException: >> >>>>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >> >>>>> >> >>>>> This error I understand, this class does not exist on the remote >> node. >> >>>>> But the question is, is it a technical limitation of Ignite, or is >> it >> >>>>> the >> >>>>> way I use it,or is it a bug? >> >>>>> >> >>>>> I opened the peer class loading , the normal deployment I did not >> test, >> >>>>> but I estimate it will be the same error. >> >>>>> >> >>>>> >> >>> >> >>> >> >> >> > >> > >> > > |
Hi,
Yes, sure, I can take a look. Just send me, please, your full logs with exception, and describe how exactly you reproduce it (how many nodes started, which one is client and etc.). Thanks! On Thu, Jan 21, 2016 at 9:43 AM, 李玉珏 <[hidden email]> wrote: > Hi: > > I understand your approach, it should be feasible, but not very elegant. > If use ProxyFactory in spring. At runtime dynamically add interceptor, > can solve the problem, but performance will influence. > > I switched to a different way of writing, using the Service mechanism, > code has been updated to GitHub, throws NullException. I survey the > reason, the problem is in service deployment process of marshal and > unmarshal stage, because of AdvisedSupport's methodCache is transient, > this may be a compatibility problem, also asks you to look at. > > > Sent from Mail Master > > > On 2016-01-20 22:20 , Vladimir Ershov <[hidden email]> Wrote: > > As for the last step, let me correct myself: > > 3. Start server Ignite node from spring context *AND *put spring jars > inside classpath in *.sh file. Be sure, that both nodes are using the same > xml context. > > On Wed, Jan 20, 2016 at 5:07 PM, Vladimir Ershov <[hidden email]> > wrote: > > > Hi! > > > > I've checked your code and spot an issue. The root cause, is using of > > Autowired annotation, since it cause bean to be serialized on a client > > side, and that leads ClassNotFoundException on the server side during > bean > > deserialization, since server was started from *.sh, without necessary > > spring jars in the classpath. > > > > Good news here, that it could be fixed easily with those steps: > > > > 1. Remove Autowired from transferred entities as ComputeGridJob > > 2. When you need an applicationContext, use > > @SpringApplicationContextResource annotation. You are need to use it > in > > your ComputeGridTask. > > 3. Start server Ignite node from spring context, or put spring jars > > inside classpath in *.sh file. > > > > Also, you can simplify your solution for ComputeGridService by using > > @ServiceResource. Take a look: > > https://apacheignite.readme.io/docs/service-example > > > > Thanks! > > > > On Wed, Jan 20, 2016 at 6:07 AM, 李玉珏 <[hidden email]> wrote: > > > >> Hi: > >> The relevant code on the GitHub, the address is: > >> https://github.com/liyuj/computegrid > >> > >> > >> Sent from Mail Master > >> > >> > >> > >> On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: > >> > >> The list does not support attachments. You can use pastebin [1] or gist > >> [2] > >> to paste your code and send the link here. > >> > >> [1] http://pastebin.com/ > >> [2] https://gist.github.com/ > >> > >> D. > >> > >> On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: > >> > >> > Hi: > >> > > >> > I had just sent the code to the list. > >> > > >> > 在 16/1/19 20:39, Denis Magda 写道: > >> > > >> > Seems that peerClassLoading doesn't work for your case. Please share > the > >> >> source code of your example. > >> >> > >> >> -- > >> >> Denis > >> >> > >> >> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: > >> >> > >> >>> Hi: > >> >>> > >> >>> I have already opened the peerClassLoading. > >> >>> My practice is in eclipse create a java project, developed a > >> >>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter > call > >> >>> configured spring interceptors service. This example in eclipse > >> operation > >> >>> is no problem. > >> >>> > >> >>> But if I open a node in the command line by ignite.sh, it will > prompt > >> >>> the following error in the command line. > >> >>> > >> >>> In the default configuration file of ignite, the same configuration > of > >> >>> the peerClassLoading=true. > >> >>> > >> >>> 在 16/1/18 19:39, Yakov Zhdanov 写道: > >> >>> > >> >>>> Can you please try enabling "peerClassLoading" and share the > results > >> >>>> here? > >> >>>> > >> >>>> --Yakov > >> >>>> > >> >>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: > >> >>>> > >> >>>> Hi: > >> >>>>> > >> >>>>> In a distributed environment, if use the spring AOP programming, > >> >>>>> generated > >> >>>>> a class of byte code enhancement, then the error will be reported > as > >> >>>>> follows: > >> >>>>> > >> >>>>> java.lang.ClassNotFoundException: > >> >>>>> > demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 > >> >>>>> > >> >>>>> This error I understand, this class does not exist on the remote > >> node. > >> >>>>> But the question is, is it a technical limitation of Ignite, or > is > >> it > >> >>>>> the > >> >>>>> way I use it,or is it a bug? > >> >>>>> > >> >>>>> I opened the peer class loading , the normal deployment I did not > >> test, > >> >>>>> but I estimate it will be the same error. > >> >>>>> > >> >>>>> > >> >>> > >> >>> > >> >> > >> > > >> > > >> > > > > > > > > 来自 *网易**手机号码邮箱* -- 手机号码就是邮箱帐号,了解详情> <http://shouji.163.com> > |
Hi:
I am at home now, can not reproduce. Do not need to cluster, to get the code to run directly, you can reproduce. If you use the AOP spring technology, through the following code: ClusterGroup cg = ignite.cluster().forServers(); IgniteCompute compute = ignite.compute(cg); IgniteServices svcs = ignite.services(cg); Service service = (Service)ac.getBean("computeGridService"); svcs.deployNodeSingleton("computeGridService", service); Will throw an nullexception. address is:https://github.com/liyuj/computegrid 在 16/1/21 19:40, Vladimir Ershov 写道: > Hi, > > Yes, sure, I can take a look. Just send me, please, your full logs with > exception, and describe how exactly you reproduce it (how many nodes > started, which one is client and etc.). > > Thanks! > > On Thu, Jan 21, 2016 at 9:43 AM, 李玉珏 <[hidden email]> wrote: > >> Hi: >> >> I understand your approach, it should be feasible, but not very elegant. >> If use ProxyFactory in spring. At runtime dynamically add interceptor, >> can solve the problem, but performance will influence. >> >> I switched to a different way of writing, using the Service mechanism, >> code has been updated to GitHub, throws NullException. I survey the >> reason, the problem is in service deployment process of marshal and >> unmarshal stage, because of AdvisedSupport's methodCache is transient, >> this may be a compatibility problem, also asks you to look at. >> >> >> Sent from Mail Master >> >> >> On 2016-01-20 22:20 , Vladimir Ershov <[hidden email]> Wrote: >> >> As for the last step, let me correct myself: >> >> 3. Start server Ignite node from spring context *AND *put spring jars >> inside classpath in *.sh file. Be sure, that both nodes are using the same >> xml context. >> >> On Wed, Jan 20, 2016 at 5:07 PM, Vladimir Ershov <[hidden email]> >> wrote: >> >>> Hi! >>> >>> I've checked your code and spot an issue. The root cause, is using of >>> Autowired annotation, since it cause bean to be serialized on a client >>> side, and that leads ClassNotFoundException on the server side during >> bean >>> deserialization, since server was started from *.sh, without necessary >>> spring jars in the classpath. >>> >>> Good news here, that it could be fixed easily with those steps: >>> >>> 1. Remove Autowired from transferred entities as ComputeGridJob >>> 2. When you need an applicationContext, use >>> @SpringApplicationContextResource annotation. You are need to use it >> in >>> your ComputeGridTask. >>> 3. Start server Ignite node from spring context, or put spring jars >>> inside classpath in *.sh file. >>> >>> Also, you can simplify your solution for ComputeGridService by using >>> @ServiceResource. Take a look: >>> https://apacheignite.readme.io/docs/service-example >>> >>> Thanks! >>> >>> On Wed, Jan 20, 2016 at 6:07 AM, 李玉珏 <[hidden email]> wrote: >>> >>>> Hi: >>>> The relevant code on the GitHub, the address is: >>>> https://github.com/liyuj/computegrid >>>> >>>> >>>> Sent from Mail Master >>>> >>>> >>>> >>>> On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: >>>> >>>> The list does not support attachments. You can use pastebin [1] or gist >>>> [2] >>>> to paste your code and send the link here. >>>> >>>> [1] http://pastebin.com/ >>>> [2] https://gist.github.com/ >>>> >>>> D. >>>> >>>> On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: >>>> >>>>> Hi: >>>>> >>>>> I had just sent the code to the list. >>>>> >>>>> 在 16/1/19 20:39, Denis Magda 写道: >>>>> >>>>> Seems that peerClassLoading doesn't work for your case. Please share >> the >>>>>> source code of your example. >>>>>> >>>>>> -- >>>>>> Denis >>>>>> >>>>>> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >>>>>> >>>>>>> Hi: >>>>>>> >>>>>>> I have already opened the peerClassLoading. >>>>>>> My practice is in eclipse create a java project, developed a >>>>>>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter >> call >>>>>>> configured spring interceptors service. This example in eclipse >>>> operation >>>>>>> is no problem. >>>>>>> >>>>>>> But if I open a node in the command line by ignite.sh, it will >> prompt >>>>>>> the following error in the command line. >>>>>>> >>>>>>> In the default configuration file of ignite, the same configuration >> of >>>>>>> the peerClassLoading=true. >>>>>>> >>>>>>> 在 16/1/18 19:39, Yakov Zhdanov 写道: >>>>>>> >>>>>>>> Can you please try enabling "peerClassLoading" and share the >> results >>>>>>>> here? >>>>>>>> >>>>>>>> --Yakov >>>>>>>> >>>>>>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >>>>>>>> >>>>>>>> Hi: >>>>>>>>> In a distributed environment, if use the spring AOP programming, >>>>>>>>> generated >>>>>>>>> a class of byte code enhancement, then the error will be reported >> as >>>>>>>>> follows: >>>>>>>>> >>>>>>>>> java.lang.ClassNotFoundException: >>>>>>>>> >> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >>>>>>>>> This error I understand, this class does not exist on the remote >>>> node. >>>>>>>>> But the question is, is it a technical limitation of Ignite, or >> is >>>> it >>>>>>>>> the >>>>>>>>> way I use it,or is it a bug? >>>>>>>>> >>>>>>>>> I opened the peer class loading , the normal deployment I did not >>>> test, >>>>>>>>> but I estimate it will be the same error. >>>>>>>>> >>>>>>>>> >>>>>>> >>>>> >>> >> >> >> 来自 *网易**手机号码邮箱* -- 手机号码就是邮箱帐号,了解详情> <http://shouji.163.com> >> |
In reply to this post by Vladimir Ershov
Hi:
I found the ignite-aop module on github, and I asked what the module is to do? In addition, this module does not have a document. 在 16/1/21 19:40, Vladimir Ershov 写道: > Hi, > > Yes, sure, I can take a look. Just send me, please, your full logs with > exception, and describe how exactly you reproduce it (how many nodes > started, which one is client and etc.). > > Thanks! > > On Thu, Jan 21, 2016 at 9:43 AM, 李玉珏 <[hidden email]> wrote: > >> Hi: >> >> I understand your approach, it should be feasible, but not very elegant. >> If use ProxyFactory in spring. At runtime dynamically add interceptor, >> can solve the problem, but performance will influence. >> >> I switched to a different way of writing, using the Service mechanism, >> code has been updated to GitHub, throws NullException. I survey the >> reason, the problem is in service deployment process of marshal and >> unmarshal stage, because of AdvisedSupport's methodCache is transient, >> this may be a compatibility problem, also asks you to look at. >> >> >> Sent from Mail Master >> >> >> On 2016-01-20 22:20 , Vladimir Ershov <[hidden email]> Wrote: >> >> As for the last step, let me correct myself: >> >> 3. Start server Ignite node from spring context *AND *put spring jars >> inside classpath in *.sh file. Be sure, that both nodes are using the same >> xml context. >> >> On Wed, Jan 20, 2016 at 5:07 PM, Vladimir Ershov <[hidden email]> >> wrote: >> >>> Hi! >>> >>> I've checked your code and spot an issue. The root cause, is using of >>> Autowired annotation, since it cause bean to be serialized on a client >>> side, and that leads ClassNotFoundException on the server side during >> bean >>> deserialization, since server was started from *.sh, without necessary >>> spring jars in the classpath. >>> >>> Good news here, that it could be fixed easily with those steps: >>> >>> 1. Remove Autowired from transferred entities as ComputeGridJob >>> 2. When you need an applicationContext, use >>> @SpringApplicationContextResource annotation. You are need to use it >> in >>> your ComputeGridTask. >>> 3. Start server Ignite node from spring context, or put spring jars >>> inside classpath in *.sh file. >>> >>> Also, you can simplify your solution for ComputeGridService by using >>> @ServiceResource. Take a look: >>> https://apacheignite.readme.io/docs/service-example >>> >>> Thanks! >>> >>> On Wed, Jan 20, 2016 at 6:07 AM, 李玉珏 <[hidden email]> wrote: >>> >>>> Hi: >>>> The relevant code on the GitHub, the address is: >>>> https://github.com/liyuj/computegrid >>>> >>>> >>>> Sent from Mail Master >>>> >>>> >>>> >>>> On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: >>>> >>>> The list does not support attachments. You can use pastebin [1] or gist >>>> [2] >>>> to paste your code and send the link here. >>>> >>>> [1] http://pastebin.com/ >>>> [2] https://gist.github.com/ >>>> >>>> D. >>>> >>>> On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: >>>> >>>>> Hi: >>>>> >>>>> I had just sent the code to the list. >>>>> >>>>> 在 16/1/19 20:39, Denis Magda 写道: >>>>> >>>>> Seems that peerClassLoading doesn't work for your case. Please share >> the >>>>>> source code of your example. >>>>>> >>>>>> -- >>>>>> Denis >>>>>> >>>>>> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >>>>>> >>>>>>> Hi: >>>>>>> >>>>>>> I have already opened the peerClassLoading. >>>>>>> My practice is in eclipse create a java project, developed a >>>>>>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter >> call >>>>>>> configured spring interceptors service. This example in eclipse >>>> operation >>>>>>> is no problem. >>>>>>> >>>>>>> But if I open a node in the command line by ignite.sh, it will >> prompt >>>>>>> the following error in the command line. >>>>>>> >>>>>>> In the default configuration file of ignite, the same configuration >> of >>>>>>> the peerClassLoading=true. >>>>>>> >>>>>>> 在 16/1/18 19:39, Yakov Zhdanov 写道: >>>>>>> >>>>>>>> Can you please try enabling "peerClassLoading" and share the >> results >>>>>>>> here? >>>>>>>> >>>>>>>> --Yakov >>>>>>>> >>>>>>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >>>>>>>> >>>>>>>> Hi: >>>>>>>>> In a distributed environment, if use the spring AOP programming, >>>>>>>>> generated >>>>>>>>> a class of byte code enhancement, then the error will be reported >> as >>>>>>>>> follows: >>>>>>>>> >>>>>>>>> java.lang.ClassNotFoundException: >>>>>>>>> >> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >>>>>>>>> This error I understand, this class does not exist on the remote >>>> node. >>>>>>>>> But the question is, is it a technical limitation of Ignite, or >> is >>>> it >>>>>>>>> the >>>>>>>>> way I use it,or is it a bug? >>>>>>>>> >>>>>>>>> I opened the peer class loading , the normal deployment I did not >>>> test, >>>>>>>>> but I estimate it will be the same error. >>>>>>>>> >>>>>>>>> >>>>>>> >>>>> >>> >> >> >> 来自 *网易**手机号码邮箱* -- 手机号码就是邮箱帐号,了解详情> <http://shouji.163.com> >> |
This module enables grid-enabling standard Java methods using @Gridify
annotation in conjunction with some AOP framework. However, AOP is no longer a popular technology, and we thought that having documentation at Javadoc level should suffice. D. On Wed, Feb 3, 2016 at 3:45 AM, 李玉珏@163 <[hidden email]> wrote: > Hi: > > I found the ignite-aop module on github, and I asked what the module is to > do? > In addition, this module does not have a document. > > 在 16/1/21 19:40, Vladimir Ershov 写道: > >> Hi, >> >> Yes, sure, I can take a look. Just send me, please, your full logs with >> exception, and describe how exactly you reproduce it (how many nodes >> started, which one is client and etc.). >> >> Thanks! >> >> On Thu, Jan 21, 2016 at 9:43 AM, 李玉珏 <[hidden email]> wrote: >> >> Hi: >>> >>> I understand your approach, it should be feasible, but not very elegant. >>> If use ProxyFactory in spring. At runtime dynamically add interceptor, >>> can solve the problem, but performance will influence. >>> >>> I switched to a different way of writing, using the Service mechanism, >>> code has been updated to GitHub, throws NullException. I survey the >>> reason, the problem is in service deployment process of marshal and >>> unmarshal stage, because of AdvisedSupport's methodCache is transient, >>> this may be a compatibility problem, also asks you to look at. >>> >>> >>> Sent from Mail Master >>> >>> >>> On 2016-01-20 22:20 , Vladimir Ershov <[hidden email]> Wrote: >>> >>> As for the last step, let me correct myself: >>> >>> 3. Start server Ignite node from spring context *AND *put spring jars >>> inside classpath in *.sh file. Be sure, that both nodes are using the >>> same >>> xml context. >>> >>> On Wed, Jan 20, 2016 at 5:07 PM, Vladimir Ershov <[hidden email]> >>> wrote: >>> >>> Hi! >>>> >>>> I've checked your code and spot an issue. The root cause, is using of >>>> Autowired annotation, since it cause bean to be serialized on a client >>>> side, and that leads ClassNotFoundException on the server side during >>>> >>> bean >>> >>>> deserialization, since server was started from *.sh, without necessary >>>> spring jars in the classpath. >>>> >>>> Good news here, that it could be fixed easily with those steps: >>>> >>>> 1. Remove Autowired from transferred entities as ComputeGridJob >>>> 2. When you need an applicationContext, use >>>> @SpringApplicationContextResource annotation. You are need to use >>>> it >>>> >>> in >>> >>>> your ComputeGridTask. >>>> 3. Start server Ignite node from spring context, or put spring jars >>>> inside classpath in *.sh file. >>>> >>>> Also, you can simplify your solution for ComputeGridService by using >>>> @ServiceResource. Take a look: >>>> https://apacheignite.readme.io/docs/service-example >>>> >>>> Thanks! >>>> >>>> On Wed, Jan 20, 2016 at 6:07 AM, 李玉珏 <[hidden email]> wrote: >>>> >>>> Hi: >>>>> The relevant code on the GitHub, the address is: >>>>> https://github.com/liyuj/computegrid >>>>> >>>>> >>>>> Sent from Mail Master >>>>> >>>>> >>>>> >>>>> On 2016-01-20 04:32 , Dmitriy Setrakyan Wrote: >>>>> >>>>> The list does not support attachments. You can use pastebin [1] or gist >>>>> [2] >>>>> to paste your code and send the link here. >>>>> >>>>> [1] http://pastebin.com/ >>>>> [2] https://gist.github.com/ >>>>> >>>>> D. >>>>> >>>>> On Tue, Jan 19, 2016 at 4:48 AM, 李玉珏@163 <[hidden email]> wrote: >>>>> >>>>> Hi: >>>>>> >>>>>> I had just sent the code to the list. >>>>>> >>>>>> 在 16/1/19 20:39, Denis Magda 写道: >>>>>> >>>>>> Seems that peerClassLoading doesn't work for your case. Please share >>>>>> >>>>> the >>> >>>> source code of your example. >>>>>>> >>>>>>> -- >>>>>>> Denis >>>>>>> >>>>>>> On 1/18/2016 3:48 PM, 李玉珏@163 wrote: >>>>>>> >>>>>>> Hi: >>>>>>>> >>>>>>>> I have already opened the peerClassLoading. >>>>>>>> My practice is in eclipse create a java project, developed a >>>>>>>> ComputeTaskSplitAdapter examples, then in the ComputeJobAdapter >>>>>>>> >>>>>>> call >>> >>>> configured spring interceptors service. This example in eclipse >>>>>>>> >>>>>>> operation >>>>> >>>>>> is no problem. >>>>>>>> >>>>>>>> But if I open a node in the command line by ignite.sh, it will >>>>>>>> >>>>>>> prompt >>> >>>> the following error in the command line. >>>>>>>> >>>>>>>> In the default configuration file of ignite, the same configuration >>>>>>>> >>>>>>> of >>> >>>> the peerClassLoading=true. >>>>>>>> >>>>>>>> 在 16/1/18 19:39, Yakov Zhdanov 写道: >>>>>>>> >>>>>>>> Can you please try enabling "peerClassLoading" and share the >>>>>>>>> >>>>>>>> results >>> >>>> here? >>>>>>>>> >>>>>>>>> --Yakov >>>>>>>>> >>>>>>>>> 2016-01-16 12:09 GMT+03:00 李玉珏@163 <[hidden email]>: >>>>>>>>> >>>>>>>>> Hi: >>>>>>>>> >>>>>>>>>> In a distributed environment, if use the spring AOP programming, >>>>>>>>>> generated >>>>>>>>>> a class of byte code enhancement, then the error will be reported >>>>>>>>>> >>>>>>>>> as >>> >>>> follows: >>>>>>>>>> >>>>>>>>>> java.lang.ClassNotFoundException: >>>>>>>>>> >>>>>>>>>> >>> demo.computegrid.ComputeGridService$$EnhancerBySpringCGLIB$$7b44b192 >>> >>>> This error I understand, this class does not exist on the remote >>>>>>>>>> >>>>>>>>> node. >>>>> >>>>>> But the question is, is it a technical limitation of Ignite, or >>>>>>>>>> >>>>>>>>> is >>> >>>> it >>>>> >>>>>> the >>>>>>>>>> way I use it,or is it a bug? >>>>>>>>>> >>>>>>>>>> I opened the peer class loading , the normal deployment I did not >>>>>>>>>> >>>>>>>>> test, >>>>> >>>>>> but I estimate it will be the same error. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>> >>>> >>> >>> 来自 *网易**手机号码邮箱* -- 手机号码就是邮箱帐号,了解详情> <http://shouji.163.com> >>> >>> > > |
Free forum by Nabble | Edit this page |