Re: Problem with ReloadingClassLoader
On 11.11.2005, at 10:22, Reinhard Poetz wrote: Torsten Curdt wrote: BTW, currently ReloadingClassLoaderFactory doesn't work out of the box as it isn't declared in any xconf ...but it's declared in the cocoon.roles - that should work fine you mean http://svn.apache.org/repos/asf/cocoon/trunk/src/java/ org/ apache/cocoon/cocoon.roles? Can't find it there. Only the DefaultClassLoaderFactory is declared. Doh! ...no - I did not want to change the default behavior. So I did override it in the xconf In which one? In the javaflow xconf PGP.sig Description: This is a digitally signed message part
Re: Problem with ReloadingClassLoader
Torsten Curdt wrote: BTW, currently ReloadingClassLoaderFactory doesn't work out of the box as it isn't declared in any xconf ...but it's declared in the cocoon.roles - that should work fine you mean http://svn.apache.org/repos/asf/cocoon/trunk/src/java/org/ apache/cocoon/cocoon.roles? Can't find it there. Only the DefaultClassLoaderFactory is declared. Doh! ...no - I did not want to change the default behavior. So I did override it in the xconf In which one? -- Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc
Re: Problem with ReloadingClassLoader
Reinhard Poetz wrote: Torsten Curdt wrote: You can reproduce it all the time only with generators?? yep, I'm using Eclipse 3.1 and the class-dir points to the porject's output directory. Well, I came across this problem when I wanted to use a generator but I don't think this problem is related to generators in general. Maybe you can try out http://people.apache.org/~reinhard/rcl/Ccooon%20ReloadingClassloaderTest.zip which contains a ready to use Eclipse project and an html generator that produces my problem. I hope this error is reproducible by others :-/ -- Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc
Re: Problem with ReloadingClassLoader
On 11.11.2005, at 09:45, Reinhard Poetz wrote: Torsten Curdt wrote: I have a nasty error that I can't track down. I'm using the ReloadingClassloader of trunk and include it with following code: I declare a couple of components like generators and actions. Using an action works as it has been doing for months but since an upgrade to the latest SVN I get following error when declaring a custom generator: You can reproduce it all the time only with generators?? yep, I'm using Eclipse 3.1 and the class-dir points to the porject's output directory. And reloading actions still works? The HTTP response is: HTTP ERROR: 500 my.CustomGenerator (Bad index in constant pool.) At the console following stacktrace appears: java.lang.ClassFormatError: my.CustomGenerator (Bad ind ex in constant pool.) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at org.apache.cocoon.components.classloader.ReloadingClassLoaderFactory $ DefaultClassLoader.fastFindClass(ReloadingClassLoaderFactory.java: 182) Now that's interesting :-/ ...with a basic "class-dir" there should be no rewriting that could possibly cause this. BTW, currently ReloadingClassLoaderFactory doesn't work out of the box as it isn't declared in any xconf ...but it's declared in the cocoon.roles - that should work fine you mean http://svn.apache.org/repos/asf/cocoon/trunk/src/java/org/ apache/cocoon/cocoon.roles? Can't find it there. Only the DefaultClassLoaderFactory is declared. Doh! ...no - I did not want to change the default behavior. So I did override it in the xconf class="org.apache.cocoon.components.classloader.ReloadingClassLoaderFact ory" role="org.apache.cocoon.components.classloader.ClassLoaderFactory/ ReloadingClassLoaderFactory"/> In order to debug this I'd suggest to print out the size of the "clazzBytes" byte[] and then compare what's on the disk. cheers -- Torsten PGP.sig Description: This is a digitally signed message part
Re: Problem with ReloadingClassLoader
Torsten Curdt wrote: I have a nasty error that I can't track down. I'm using the ReloadingClassloader of trunk and include it with following code: I declare a couple of components like generators and actions. Using an action works as it has been doing for months but since an upgrade to the latest SVN I get following error when declaring a custom generator: You can reproduce it all the time only with generators?? yep, I'm using Eclipse 3.1 and the class-dir points to the porject's output directory. The HTTP response is: HTTP ERROR: 500 my.CustomGenerator (Bad index in constant pool.) At the console following stacktrace appears: java.lang.ClassFormatError: my.CustomGenerator (Bad ind ex in constant pool.) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at org.apache.cocoon.components.classloader.ReloadingClassLoaderFactory$ DefaultClassLoader.fastFindClass(ReloadingClassLoaderFactory.java:182) Now that's interesting :-/ ...with a basic "class-dir" there should be no rewriting that could possibly cause this. BTW, currently ReloadingClassLoaderFactory doesn't work out of the box as it isn't declared in any xconf ...but it's declared in the cocoon.roles - that should work fine you mean http://svn.apache.org/repos/asf/cocoon/trunk/src/java/org/apache/cocoon/cocoon.roles? Can't find it there. Only the DefaultClassLoaderFactory is declared. -- Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc
Re: Problem with ReloadingClassLoader
I have a nasty error that I can't track down. I'm using the ReloadingClassloader of trunk and include it with following code: I declare a couple of components like generators and actions. Using an action works as it has been doing for months but since an upgrade to the latest SVN I get following error when declaring a custom generator: You can reproduce it all the time only with generators?? The HTTP response is: HTTP ERROR: 500 my.CustomGenerator (Bad index in constant pool.) At the console following stacktrace appears: java.lang.ClassFormatError: my.CustomGenerator (Bad ind ex in constant pool.) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at org.apache.cocoon.components.classloader.ReloadingClassLoaderFactory$ DefaultClassLoader.fastFindClass(ReloadingClassLoaderFactory.java:182) Now that's interesting :-/ ...with a basic "class-dir" there should be no rewriting that could possibly cause this. BTW, currently ReloadingClassLoaderFactory doesn't work out of the box as it isn't declared in any xconf ...but it's declared in the cocoon.roles - that should work fine cheers -- Torsten PGP.sig Description: This is a digitally signed message part
Problem with ReloadingClassLoader
I have a nasty error that I can't track down. I'm using the ReloadingClassloader of trunk and include it with following code: I declare a couple of components like generators and actions. Using an action works as it has been doing for months but since an upgrade to the latest SVN I get following error when declaring a custom generator: The HTTP response is: HTTP ERROR: 500 my.CustomGenerator (Bad index in constant pool.) At the console following stacktrace appears: java.lang.ClassFormatError: my.CustomGenerator (Bad ind ex in constant pool.) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at org.apache.cocoon.components.classloader.ReloadingClassLoaderFactory$ DefaultClassLoader.fastFindClass(ReloadingClassLoaderFactory.java:182) Any ideas? BTW, currently ReloadingClassLoaderFactory doesn't work out of the box as it isn't declared in any xconf and also requires commons-io which is optional. -- Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc