Based on your fix, it seams that the class loader which loaded the
EntitySignatureVisitor (I suppose the json jar?), is unable to find
ShoppingCartItemView. It would be interesting to know what is the
class path on which the JsonMarshaller is loaded, as well as the
classpath of the ShoppingCartItemView.
Since things work with the context class loader (the one that was used
to create the current thread) it means that your class loaders are
somewhat isolated from each other (very normal in a web app context).
It might be wise for the JsonMarshaller to allow passing the class
loader to be used, something like
> On May 18, 8:20 pm, Pascal-Louis Perez <pascallouispe...@gmail.com>
> wrote:
>> Would you have some sample code? Is this fully reproducible or intermittent?
>> PL
>> On Mon, May 18, 2009 at 5:15 AM, <zvika...@gmail.com> wrote:
>> > I have a class A that contains a reference to another class B.
>> > Calling TwoLattes.createMarshaller with class A fails with
>> > ClassNotFoundException thrown for the nested class B.
>> > Code is running in application server and both classes A & B are in
>> > the same location. What might be the source of the problem?
> Based on your fix, it seams that the class loader which loaded the
> EntitySignatureVisitor (I suppose the json jar?), is unable to find
> ShoppingCartItemView. It would be interesting to know what is the
> class path on which the JsonMarshaller is loaded, as well as the
> classpath of the ShoppingCartItemView.
> Since things work with the context class loader (the one that was used
> to create the current thread) it means that your class loaders are
> somewhat isolated from each other (very normal in a web app context).
> It might be wise for the JsonMarshaller to allow passing the class
> loader to be used, something like
> > On May 18, 8:20 pm, Pascal-Louis Perez <pascallouispe...@gmail.com>
> > wrote:
> >> Would you have some sample code? Is this fully reproducible or intermittent?
> >> PL
> >> On Mon, May 18, 2009 at 5:15 AM, <zvika...@gmail.com> wrote:
> >> > I have a class A that contains a reference to another class B.
> >> > Calling TwoLattes.createMarshaller with class A fails with
> >> > ClassNotFoundException thrown for the nested class B.
> >> > Code is running in application server and both classes A & B are in
> >> > the same location. What might be the source of the problem?
It is hard to say without knowing the code, but it is feasible that
the outer class is loaded by the framework but the inner class is
never referenced prior to the JM accessing it. The JVM has no notion
of inner classes, it is pure syntactic sugar offered by Java and so it
is absolutely feasible to load an outer class without loading the
inner class.
On Wed, May 20, 2009 at 5:36 AM, <zvika...@gmail.com> wrote:
> Yes, it'll be helpfull. It requires changes to the library, right?
> I'm still puzzled regrading how the containing class was loaded while
> the nested class has not.
> On May 19, 9:48 am, Pascal-Louis Perez <pascallouispe...@gmail.com>
> wrote:
>> Based on your fix, it seams that the class loader which loaded the
>> EntitySignatureVisitor (I suppose the json jar?), is unable to find
>> ShoppingCartItemView. It would be interesting to know what is the
>> class path on which the JsonMarshaller is loaded, as well as the
>> classpath of the ShoppingCartItemView.
>> Since things work with the context class loader (the one that was used
>> to create the current thread) it means that your class loaders are
>> somewhat isolated from each other (very normal in a web app context).
>> It might be wise for the JsonMarshaller to allow passing the class
>> loader to be used, something like
>> > On May 18, 8:20 pm, Pascal-Louis Perez <pascallouispe...@gmail.com>
>> > wrote:
>> >> Would you have some sample code? Is this fully reproducible or intermittent?
>> >> PL
>> >> On Mon, May 18, 2009 at 5:15 AM, <zvika...@gmail.com> wrote:
>> >> > I have a class A that contains a reference to another class B.
>> >> > Calling TwoLattes.createMarshaller with class A fails with
>> >> > ClassNotFoundException thrown for the nested class B.
>> >> > Code is running in application server and both classes A & B are in
>> >> > the same location. What might be the source of the problem?
> It is hard to say without knowing the code, but it is feasible that
> the outer class is loaded by the framework but the inner class is
> never referenced prior to the JM accessing it. The JVM has no notion
> of inner classes, it is pure syntactic sugar offered by Java and so it
> is absolutely feasible to load an outer class without loading the
> inner class.
> PL
> On Wed, May 20, 2009 at 5:36 AM, <zvika...@gmail.com> wrote:
> > Yes, it'll be helpfull. It requires changes to the library, right?
> > I'm still puzzled regrading how the containing class was loaded while
> > the nested class has not.
> > On May 19, 9:48 am, Pascal-Louis Perez <pascallouispe...@gmail.com>
> > wrote:
> >> Based on your fix, it seams that the class loader which loaded the
> >> EntitySignatureVisitor (I suppose the json jar?), is unable to find
> >> ShoppingCartItemView. It would be interesting to know what is the
> >> class path on which the JsonMarshaller is loaded, as well as the
> >> classpath of the ShoppingCartItemView.
> >> Since things work with the context class loader (the one that was used
> >> to create the current thread) it means that your class loaders are
> >> somewhat isolated from each other (very normal in a web app context).
> >> It might be wise for the JsonMarshaller to allow passing the class
> >> loader to be used, something like
> >> > On May 18, 8:20 pm, Pascal-Louis Perez <pascallouispe...@gmail.com>
> >> > wrote:
> >> >> Would you have some sample code? Is this fully reproducible or intermittent?
> >> >> PL
> >> >> On Mon, May 18, 2009 at 5:15 AM, <zvika...@gmail.com> wrote:
> >> >> > I have a class A that contains a reference to another class B.
> >> >> > Calling TwoLattes.createMarshaller with class A fails with
> >> >> > ClassNotFoundException thrown for the nested class B.
> >> >> > Code is running in application server and both classes A & B are in
> >> >> > the same location. What might be the source of the problem?
On Sun, Jun 7, 2009 at 6:36 AM, <zvika...@gmail.com> wrote:
> Do you think the fix will be part of the next version?
> Actually the two classes are defined in separate files and one class
> simply references the other.
> On Jun 4, 4:37 pm, Pascal-Louis Perez <pascallouispe...@gmail.com>
> wrote:
>> It does, yes.
>> It is hard to say without knowing the code, but it is feasible that
>> the outer class is loaded by the framework but the inner class is
>> never referenced prior to the JM accessing it. The JVM has no notion
>> of inner classes, it is pure syntactic sugar offered by Java and so it
>> is absolutely feasible to load an outer class without loading the
>> inner class.
>> PL
>> On Wed, May 20, 2009 at 5:36 AM, <zvika...@gmail.com> wrote:
>> > Yes, it'll be helpfull. It requires changes to the library, right?
>> > I'm still puzzled regrading how the containing class was loaded while
>> > the nested class has not.
>> > On May 19, 9:48 am, Pascal-Louis Perez <pascallouispe...@gmail.com>
>> > wrote:
>> >> Based on your fix, it seams that the class loader which loaded the
>> >> EntitySignatureVisitor (I suppose the json jar?), is unable to find
>> >> ShoppingCartItemView. It would be interesting to know what is the
>> >> class path on which the JsonMarshaller is loaded, as well as the
>> >> classpath of the ShoppingCartItemView.
>> >> Since things work with the context class loader (the one that was used
>> >> to create the current thread) it means that your class loaders are
>> >> somewhat isolated from each other (very normal in a web app context).
>> >> It might be wise for the JsonMarshaller to allow passing the class
>> >> loader to be used, something like
>> >> > On May 18, 8:20 pm, Pascal-Louis Perez <pascallouispe...@gmail.com>
>> >> > wrote:
>> >> >> Would you have some sample code? Is this fully reproducible or intermittent?
>> >> >> PL
>> >> >> On Mon, May 18, 2009 at 5:15 AM, <zvika...@gmail.com> wrote:
>> >> >> > I have a class A that contains a reference to another class B.
>> >> >> > Calling TwoLattes.createMarshaller with class A fails with
>> >> >> > ClassNotFoundException thrown for the nested class B.
>> >> >> > Code is running in application server and both classes A & B are in
>> >> >> > the same location. What might be the source of the problem?