Re: [t5] upgrade to java 6 and javassist
Hi Inge, I am glad that you cleared that up for everyones benefit, but also for the good of Tapestry, as some people need very little excuse to rant. I believe our earlier problems with javassist were real ... Yes, the problems you mentioned in earlier posts were indeed real, but resolved for some time now in with the newer libraries. A side note: With regards to the Java C compiler issues, only 'very rarely' does it get into trouble, but let me assure you that it can (at least up until JDK 1.6.0_14 this was the case)... these issues we had related back to generics and type checking... I remember one issue using instanceof, and the workaround was to use isInstance instead, see these posts: http://forums.sun.com/thread.jspa?threadID=5336141 http://bugs.sun.com/view_bug.do?bug_id=6548436 These were almost always outstanding bugs in the JDK, but somehow ejc manages to optimize and compile the code correctly, whereas the Sun Java C compiler falls over... and this was not the only bug we ran into. I am currently running on Ubuntu 9.10 JDK 1.6.0_15, but have not conducted any tests recently, when I do I will post it to this list. cheers, Peter - Original Message - From: Inge Solvoll inge.tapes...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 26 November, 2009 13:54:44 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [t5] upgrade to java 6 and javassist This is embarrassing. Our most recent problems with javassist crashes were entirely our own fault, not javassist or t5. We had a search/replace ant target that replaced all occurrences of /script with /scripttodaysdate. This target recursed (not our intention) into our classes folder, and did some replacement on class files, the ones that got crashes from javassist. It seems that the value of the @IncludeJavascriptLibrary and other annotations are stored as pure readable text in the compiled file. I believe our earlier problems with javassist were real, due to things like 1.6 as compilation target, duplicate javassist.jar in classpath and so on. But this last one was a big stupid mistake. I wanted to report it here to avoid people using my case in the future as proof in similar issues. As of now, we have no issues with javassist in T5. Sorry, guys! Inge On Tue, Nov 3, 2009 at 6:43 PM, Howard Lewis Ship hls...@gmail.com wrote: I'm very glad you found a solution ... it's still a mystery to me as all the applications I work on are built using the Sun javac compiler and I've never seen problems like you are seeing, and I do some of my deployments on Linux (Ubuntu) ... again, with the Sun JDK/JRE. On Tue, Nov 3, 2009 at 3:33 AM, Inge Solvoll inge.tapes...@gmail.com wrote: 2 more days spent on this, and I actually came up with a solution: Switching from JDK modern compiler to eclipse compiler. I found another thread about class transformation errors on the list, saying that the Java C compiler had issues with class transformation. http://www.mail-archive.com/users@tapestry.apache.org/msg23610.html I rebuilt my classes with the eclipse compiler, and voila! No more errors about invalid constants and similar! The recipe for using eclipse compiler in ant: http://emacsblog.org/2007/02/13/emacs-jdee-ant-and-the-eclipse-java-compiler/ Regards Inge On Mon, Nov 2, 2009 at 3:00 PM, Inge Solvoll inge.tapes...@gmail.com wrote: Done some pretty extensive research on this the last few days. Our application doesn't work at all on our test and production servers, because of the dreaded invalid constant length error. We have the following setup: - jre-6u16 for linux - Suse Linux - JBoss 5.0.1 with embedded tomcat - Compiles using java 1.6, tried both 1.5 and 1.6 as target compatibility I have verified that there is excactly ONE javassist.jar within my jboss directory, and the version of that file is 3.9.0.GA. I still get javassist crashes on several of my smaller components, like the one below. I'm going crazy over this, especially because it indicates to everyone else that our big investment in T5 may have been a really stupid move. Just reported this to let you know that this problem DOES occur when there is only one javassist.jar, and it is causing major problems for us. Example of crashing component: @IncludeJavaScriptLibrary( { context:/script/tiny_mce/tiny_mce.js }) public class TinyMceEditor { public static final String MODE_EXACT = exact; public static final String MODE_TEXTAREAS = textareas; @Inject private UrlProvider urlProvider; @Environmental private RenderSupport renderSupport; @Parameter(defaultPrefix = BindingConstants.LITERAL, value = MODE_TEXTAREAS) private String mode; /** * If mode=exact, attach editor to these elements */ @Parameter private ClientElement[] elements; void initEditor(MarkupWriter writer
Re: [t5] upgrade to java 6 and javassist
)) { if (elements != null elements.length 0) { StringBuffer elementsString = new StringBuffer(); for (int i = 0; i elements.length; i++) { ClientElement currentElement = elements[i]; FrontendTools.appendCommaSeparated(currentElement.getClientId(), elementsString); } json.put(elements, elementsString); } else { throw new IllegalArgumentException(Exact mode specified, but no elements); } } } void afterRender(MarkupWriter writer) { initEditor(writer); patchZoneForms(); } } Regards Inge On Tue, Oct 27, 2009 at 9:57 AM, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl wrote: For what it is worth .. i have not had *this* problem anymore since i straigthened out the use of the libs in the different projects being used. IF something like this happens again (hope not with my friday deadline .. ) i'll post it as well. On Tue, Oct 27, 2009 at 8:37 AM, Inge Solvoll inge.tapes...@gmail.com wrote: This problem has been gone for us for a while, today it came back when deploying our app to a jboss server (5.0.1) with embedded tomcat. I immediately started searching for javassist.jar duplicates. Found javassist.jar in jboss/lib, jboss/client and myapp/WEB-INF/lib. Jboss wouldn't start up without the one in jboss/lib, so I removed all but that one. Now it started, and my T5 app works, but the error in one specific component is still there: java.io.IOException: invalid constant type: 121. It always happens with the same component. The component works in most configurations, just not on our jboss server setup with embedded tomcat. I then replaced the javassist.jar in jboss/lib with a fresh 3.9.0, like specified in this thread. Now Jboss won't start up, nothing happens in the log when I try to start it We will continue working on this this week, as this is a major problem for us. Hopefully, you're right about it being a javassist.jar duplicate issue. But so far, I haven't found anything pointing in that direction. Inge On Wed, Oct 7, 2009 at 4:18 PM, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl wrote: This was actually it. A 'hidden' antiquated version of javassist somewhere on the classpath AND (as later turned out) a project that did not want to be placed on the classpath (via the classpath settings in the launcher of Eclipse Galileo). Finally got the whole thing stopping on my breakpoint again .. I guess it all has to do with the infamous medal ansd its two sides. Having all the libs available is a good thing but it might also be lurking behind a tree with dubious intentions .. ;-) Thx to the list for getting me on my way again. On Wed, Oct 7, 2009 at 4:17 PM, Peter Stavrinides p.stavrini...@albourne.com wrote: Tapestry works perfectly with Java 6 now!! Lets not be ridiculous and claim that you need to shorten methods and method names etc in order to get it working, it has been completely compatible for some time now. This is a library issue, you must use 3.9.0.GA, which is the version provided by Tapestry 5.1, beware of Chenillekit it brings in an old version javassist 3.7, which in most causes this problem. You must include this in your pom: dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version1.2.0/version exclusions exclusion groupIdjboss/groupId artifactIdjavassist/artifactId /exclusion /exclusions /dependency Cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.htmlfor important additional terms relating to this e-mail. - Original Message - From: Cameron Newham cameron.new...@bl.uk To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: [t5] upgrade to java 6 and javassist When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
T5 app works, but the error in one specific component is still there: java.io.IOException: invalid constant type: 121. It always happens with the same component. The component works in most configurations, just not on our jboss server setup with embedded tomcat. I then replaced the javassist.jar in jboss/lib with a fresh 3.9.0, like specified in this thread. Now Jboss won't start up, nothing happens in the log when I try to start it We will continue working on this this week, as this is a major problem for us. Hopefully, you're right about it being a javassist.jar duplicate issue. But so far, I haven't found anything pointing in that direction. Inge On Wed, Oct 7, 2009 at 4:18 PM, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl wrote: This was actually it. A 'hidden' antiquated version of javassist somewhere on the classpath AND (as later turned out) a project that did not want to be placed on the classpath (via the classpath settings in the launcher of Eclipse Galileo). Finally got the whole thing stopping on my breakpoint again .. I guess it all has to do with the infamous medal ansd its two sides. Having all the libs available is a good thing but it might also be lurking behind a tree with dubious intentions .. ;-) Thx to the list for getting me on my way again. On Wed, Oct 7, 2009 at 4:17 PM, Peter Stavrinides p.stavrini...@albourne.com wrote: Tapestry works perfectly with Java 6 now!! Lets not be ridiculous and claim that you need to shorten methods and method names etc in order to get it working, it has been completely compatible for some time now. This is a library issue, you must use 3.9.0.GA, which is the version provided by Tapestry 5.1, beware of Chenillekit it brings in an old version javassist 3.7, which in most causes this problem. You must include this in your pom: dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version1.2.0/version exclusions exclusion groupIdjboss/groupId artifactIdjavassist/artifactId /exclusion /exclusions /dependency Cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.htmlfor important additional terms relating to this e-mail. - Original Message - From: Cameron Newham cameron.new...@bl.uk To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: [t5] upgrade to java 6 and javassist When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org Subject: Re: [t5] upgrade to java 6 and javassist Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target optimizetrue/optimize encodingUTF-8/encoding showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Thiago H. de Paula Figueiredo wrote: Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Using Eclipse, my Compiler compliance level is set at 1.5 already and still. What OS are you using? Ubuntu. But I guess it's
Re: [t5] upgrade to java 6 and javassist
for us for a while, today it came back when deploying our app to a jboss server (5.0.1) with embedded tomcat. I immediately started searching for javassist.jar duplicates. Found javassist.jar in jboss/lib, jboss/client and myapp/WEB-INF/lib. Jboss wouldn't start up without the one in jboss/lib, so I removed all but that one. Now it started, and my T5 app works, but the error in one specific component is still there: java.io.IOException: invalid constant type: 121. It always happens with the same component. The component works in most configurations, just not on our jboss server setup with embedded tomcat. I then replaced the javassist.jar in jboss/lib with a fresh 3.9.0, like specified in this thread. Now Jboss won't start up, nothing happens in the log when I try to start it We will continue working on this this week, as this is a major problem for us. Hopefully, you're right about it being a javassist.jar duplicate issue. But so far, I haven't found anything pointing in that direction. Inge On Wed, Oct 7, 2009 at 4:18 PM, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl wrote: This was actually it. A 'hidden' antiquated version of javassist somewhere on the classpath AND (as later turned out) a project that did not want to be placed on the classpath (via the classpath settings in the launcher of Eclipse Galileo). Finally got the whole thing stopping on my breakpoint again .. I guess it all has to do with the infamous medal ansd its two sides. Having all the libs available is a good thing but it might also be lurking behind a tree with dubious intentions .. ;-) Thx to the list for getting me on my way again. On Wed, Oct 7, 2009 at 4:17 PM, Peter Stavrinides p.stavrini...@albourne.com wrote: Tapestry works perfectly with Java 6 now!! Lets not be ridiculous and claim that you need to shorten methods and method names etc in order to get it working, it has been completely compatible for some time now. This is a library issue, you must use 3.9.0.GA, which is the version provided by Tapestry 5.1, beware of Chenillekit it brings in an old version javassist 3.7, which in most causes this problem. You must include this in your pom: dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version1.2.0/version exclusions exclusion groupIdjboss/groupId artifactIdjavassist/artifactId /exclusion /exclusions /dependency Cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.htmlfor important additional terms relating to this e-mail. - Original Message - From: Cameron Newham cameron.new...@bl.uk To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: [t5] upgrade to java 6 and javassist When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org Subject: Re: [t5] upgrade to java 6 and javassist Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target optimizetrue/optimize encodingUTF-8/encoding showDeprecationtrue/showDeprecation showWarningstrue
Re: [t5] upgrade to java 6 and javassist
...@dcgconsultancy.nl wrote: This was actually it. A 'hidden' antiquated version of javassist somewhere on the classpath AND (as later turned out) a project that did not want to be placed on the classpath (via the classpath settings in the launcher of Eclipse Galileo). Finally got the whole thing stopping on my breakpoint again .. I guess it all has to do with the infamous medal ansd its two sides. Having all the libs available is a good thing but it might also be lurking behind a tree with dubious intentions .. ;-) Thx to the list for getting me on my way again. On Wed, Oct 7, 2009 at 4:17 PM, Peter Stavrinides p.stavrini...@albourne.com wrote: Tapestry works perfectly with Java 6 now!! Lets not be ridiculous and claim that you need to shorten methods and method names etc in order to get it working, it has been completely compatible for some time now. This is a library issue, you must use 3.9.0.GA, which is the version provided by Tapestry 5.1, beware of Chenillekit it brings in an old version javassist 3.7, which in most causes this problem. You must include this in your pom: dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version1.2.0/version exclusions exclusion groupIdjboss/groupId artifactIdjavassist/artifactId /exclusion /exclusions /dependency Cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.htmlfor important additional terms relating to this e-mail. - Original Message - From: Cameron Newham cameron.new...@bl.uk To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: [t5] upgrade to java 6 and javassist When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org Subject: Re: [t5] upgrade to java 6 and javassist Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target optimizetrue/optimize encodingUTF-8/encoding showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Thiago H. de Paula Figueiredo wrote: Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Using Eclipse, my Compiler compliance level is set at 1.5 already and still. What OS are you using? Ubuntu. But I guess it's not operating-system related. The @OnEvent i understand but i can't find a 'ready made' entry for the EventConstants. What do you mean by ready-made? EventConstants is just a class that declares String constants. You can use the event name directly if you want or need. Do i make my own enum for that? No, event names are Strings. And if so, how does that hook into the autocompleter mixin without additional coding? I'm not following you here. All events are hooked by name and, optionally, component id, just that. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago
Re: [t5] upgrade to java 6 and javassist
This problem has been gone for us for a while, today it came back when deploying our app to a jboss server (5.0.1) with embedded tomcat. I immediately started searching for javassist.jar duplicates. Found javassist.jar in jboss/lib, jboss/client and myapp/WEB-INF/lib. Jboss wouldn't start up without the one in jboss/lib, so I removed all but that one. Now it started, and my T5 app works, but the error in one specific component is still there: java.io.IOException: invalid constant type: 121. It always happens with the same component. The component works in most configurations, just not on our jboss server setup with embedded tomcat. I then replaced the javassist.jar in jboss/lib with a fresh 3.9.0, like specified in this thread. Now Jboss won't start up, nothing happens in the log when I try to start it We will continue working on this this week, as this is a major problem for us. Hopefully, you're right about it being a javassist.jar duplicate issue. But so far, I haven't found anything pointing in that direction. Inge On Wed, Oct 7, 2009 at 4:18 PM, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl wrote: This was actually it. A 'hidden' antiquated version of javassist somewhere on the classpath AND (as later turned out) a project that did not want to be placed on the classpath (via the classpath settings in the launcher of Eclipse Galileo). Finally got the whole thing stopping on my breakpoint again .. I guess it all has to do with the infamous medal ansd its two sides. Having all the libs available is a good thing but it might also be lurking behind a tree with dubious intentions .. ;-) Thx to the list for getting me on my way again. On Wed, Oct 7, 2009 at 4:17 PM, Peter Stavrinides p.stavrini...@albourne.com wrote: Tapestry works perfectly with Java 6 now!! Lets not be ridiculous and claim that you need to shorten methods and method names etc in order to get it working, it has been completely compatible for some time now. This is a library issue, you must use 3.9.0.GA, which is the version provided by Tapestry 5.1, beware of Chenillekit it brings in an old version javassist 3.7, which in most causes this problem. You must include this in your pom: dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version1.2.0/version exclusions exclusion groupIdjboss/groupId artifactIdjavassist/artifactId /exclusion /exclusions /dependency Cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - Original Message - From: Cameron Newham cameron.new...@bl.uk To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: [t5] upgrade to java 6 and javassist When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org Subject: Re: [t5] upgrade to java 6 and javassist Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target optimizetrue/optimize encodingUTF-8/encoding showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Thiago H. de Paula Figueiredo wrote: Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Using Eclipse, my Compiler compliance level is set at 1.5
Re: [t5] upgrade to java 6 and javassist
For what it is worth .. i have not had *this* problem anymore since i straigthened out the use of the libs in the different projects being used. IF something like this happens again (hope not with my friday deadline .. ) i'll post it as well. On Tue, Oct 27, 2009 at 8:37 AM, Inge Solvoll inge.tapes...@gmail.comwrote: This problem has been gone for us for a while, today it came back when deploying our app to a jboss server (5.0.1) with embedded tomcat. I immediately started searching for javassist.jar duplicates. Found javassist.jar in jboss/lib, jboss/client and myapp/WEB-INF/lib. Jboss wouldn't start up without the one in jboss/lib, so I removed all but that one. Now it started, and my T5 app works, but the error in one specific component is still there: java.io.IOException: invalid constant type: 121. It always happens with the same component. The component works in most configurations, just not on our jboss server setup with embedded tomcat. I then replaced the javassist.jar in jboss/lib with a fresh 3.9.0, like specified in this thread. Now Jboss won't start up, nothing happens in the log when I try to start it We will continue working on this this week, as this is a major problem for us. Hopefully, you're right about it being a javassist.jar duplicate issue. But so far, I haven't found anything pointing in that direction. Inge On Wed, Oct 7, 2009 at 4:18 PM, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl wrote: This was actually it. A 'hidden' antiquated version of javassist somewhere on the classpath AND (as later turned out) a project that did not want to be placed on the classpath (via the classpath settings in the launcher of Eclipse Galileo). Finally got the whole thing stopping on my breakpoint again .. I guess it all has to do with the infamous medal ansd its two sides. Having all the libs available is a good thing but it might also be lurking behind a tree with dubious intentions .. ;-) Thx to the list for getting me on my way again. On Wed, Oct 7, 2009 at 4:17 PM, Peter Stavrinides p.stavrini...@albourne.com wrote: Tapestry works perfectly with Java 6 now!! Lets not be ridiculous and claim that you need to shorten methods and method names etc in order to get it working, it has been completely compatible for some time now. This is a library issue, you must use 3.9.0.GA, which is the version provided by Tapestry 5.1, beware of Chenillekit it brings in an old version javassist 3.7, which in most causes this problem. You must include this in your pom: dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version1.2.0/version exclusions exclusion groupIdjboss/groupId artifactIdjavassist/artifactId /exclusion /exclusions /dependency Cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.htmlfor important additional terms relating to this e-mail. - Original Message - From: Cameron Newham cameron.new...@bl.uk To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: [t5] upgrade to java 6 and javassist When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org Subject: Re: [t5] upgrade to java 6 and javassist Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source
RE: [t5] upgrade to java 6 and javassist
When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org Subject: Re: [t5] upgrade to java 6 and javassist Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target optimizetrue/optimize encodingUTF-8/encoding showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Thiago H. de Paula Figueiredo wrote: Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Using Eclipse, my Compiler compliance level is set at 1.5 already and still. What OS are you using? Ubuntu. But I guess it's not operating-system related. The @OnEvent i understand but i can't find a 'ready made' entry for the EventConstants. What do you mean by ready-made? EventConstants is just a class that declares String constants. You can use the event name directly if you want or need. Do i make my own enum for that? No, event names are Strings. And if so, how does that hook into the autocompleter mixin without additional coding? I'm not following you here. All events are hooked by name and, optionally, component id, just that. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/-t5--upgrade-to-java-6-and-javassist-tp25295834p25 780245.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org ** Experience the British Library online at http://www.bl.uk/ The British Library’s new interactive Annual Report and Accounts 2007/08 : http://www.bl.uk/knowledge Help the British Library conserve the world's knowledge. Adopt a Book. http://www.bl.uk/adoptabook The Library's St Pancras site is WiFi - enabled * The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the mailto:postmas...@bl.uk : The contents of this e-mail must not be disclosed or copied without the sender's consent. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author. * - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
This was actually it. A 'hidden' antiquated version of javassist somewhere on the classpath AND (as later turned out) a project that did not want to be placed on the classpath (via the classpath settings in the launcher of Eclipse Galileo). Finally got the whole thing stopping on my breakpoint again .. I guess it all has to do with the infamous medal ansd its two sides. Having all the libs available is a good thing but it might also be lurking behind a tree with dubious intentions .. ;-) Thx to the list for getting me on my way again. On Wed, Oct 7, 2009 at 4:17 PM, Peter Stavrinides p.stavrini...@albourne.com wrote: Tapestry works perfectly with Java 6 now!! Lets not be ridiculous and claim that you need to shorten methods and method names etc in order to get it working, it has been completely compatible for some time now. This is a library issue, you must use 3.9.0.GA, which is the version provided by Tapestry 5.1, beware of Chenillekit it brings in an old version javassist 3.7, which in most causes this problem. You must include this in your pom: dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version1.2.0/version exclusions exclusion groupIdjboss/groupId artifactIdjavassist/artifactId /exclusion /exclusions /dependency Cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - Original Message - From: Cameron Newham cameron.new...@bl.uk To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: [t5] upgrade to java 6 and javassist When I had trouble with javassist a few months ago it was because there were multiple versions on the classpath. I'm using Java 1.6 and have had no problems since sorting out what jars were being included. I see I'm currently using 3.8.0.GA. -Original Message- From: Ville Virtanen [mailto:ville.virta...@cerion.fi] Sent: 07 October 2009 05:11 To: users@tapestry.apache.org Subject: Re: [t5] upgrade to java 6 and javassist Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target optimizetrue/optimize encodingUTF-8/encoding showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Thiago H. de Paula Figueiredo wrote: Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Using Eclipse, my Compiler compliance level is set at 1.5 already and still. What OS are you using? Ubuntu. But I guess it's not operating-system related. The @OnEvent i understand but i can't find a 'ready made' entry for the EventConstants. What do you mean by ready-made? EventConstants is just a class that declares String constants. You can use the event name directly if you want or need. Do i make my own enum for that? No, event names are Strings. And if so, how does that hook into the autocompleter mixin without additional coding? I'm not following you here. All events are hooked by name and, optionally, component id, just that. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/-t5--upgrade-to-java-6-and-javassist-tp25295834p25 780245.htmlhttp://www.nabble.com/-t5--upgrade-to-java-6-and-javassist-tp25295834p25%0A780245.html Sent from the Tapestry - User mailing list archive at Nabble.com
Re: [t5] upgrade to java 6 and javassist
Hello Fermin, we were also hit by some spurios javassit failures. Fermin Da Costa Gomez schrieb: public class Search { public ListString onProvideCompletionsFromFieldName(String partial) { return new ArrayListString(); } this method name is quite long. Did you try to use a shorter one? ... @Log void setupRender() { } } We use several strategies to fix the problems: * replace @Property annotation by plain old setters and getters * reduce the number of @Inject * reduce the length of event handlers (which already failed for you) Once, we were successful by replacing an @Inject LoggerSource loggerSource; whith simply @Inject Logger log; Unfortunately we still have no idea why the (mostly random) refactorings fixed the problem. IMHO, the only reliable fix was to downgrade the compiler level to 1.5 for all pages. mfg Gunter - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
Em Tue, 06 Oct 2009 14:52:44 -0300, Gunter Winkler guw...@gmx.de escreveu: public class Search { public ListString onProvideCompletionsFromFieldName(String partial) { return new ArrayListString(); } this method name is quite long. Did you try to use a shorter one? Example: @OnEvent(EventConstants.PROVIDE_COMPLETIONS) public ListString completions(String partial) {... } -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
Hi Gunter, we were also hit by some spurios javassit failures. Fermin Da Costa Gomez schrieb: public class Search { public ListString onProvideCompletionsFromFieldName(String partial) { return new ArrayListString(); } this method name is quite long. Did you try to use a shorter one? I hear what you say but and will try your suggested solution but you would agree that this is slightly ridiculous! What is the point of a modern tool if we are to be again bound by using variables/ methods of a maximum length. W'r talking a 64b system not an old ms-dos machine with 640K memory .. We use several strategies to fix the problems: * replace @Property annotation by plain old setters and getters * reduce the number of @Inject * reduce the length of event handlers (which already failed for you) Once, we were successful by replacing an @Inject LoggerSource loggerSource; whith simply @Inject Logger log; I will keep your recommendations in mind and try to work them into the thing i'm working on. Unfortunately we still have no idea why the (mostly random) refactorings fixed the problem. IMHO, the only reliable fix was to downgrade the compiler level to 1.5 for all pages. Really appreciate your feedback and suggestions and i will try to implement/ use them, although it does seem to go a long way in defeating the whole purpose or at least some important strong parts of T5. I am a consultant/ problem solver (sw developer) mainly focussing on the investment banking/ insurance and for my hourly rate (200+) my clients expect solid advice. I was planning on working T5 into my solutions but with this erratic behaviour i can in all honesty not do that. I would even have to advice against actually using it in production environments. Please take note of the fact that i still prefer the framework above any other but having to navigate around these icebergs is not something one should want .. If given a choice between documentation and resolving this particular issue i would always opt for the resolution of the issue. I would even be willing to make a montary donation to get it out of the way! Got it out of my system now. Tia, Fermin DCG
Re: [t5] upgrade to java 6 and javassist
Hi Thiago, public class Search { public ListString onProvideCompletionsFromFieldName(String partial) { return new ArrayListString(); } this method name is quite long. Did you try to use a shorter one? Example: @OnEvent(EventConstants.PROVIDE_COMPLETIONS) public ListString completions(String partial) {... } Thx for this feedback. I am still a bit puzzled by the whole thing but encouraged enough by your and Gunters tips to not yet drop T5 and switch to Wicket. Much appreciated. Cheers, Fermin DCG
Re: [t5] upgrade to java 6 and javassist
Em Tue, 06 Oct 2009 17:13:01 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: If given a choice between documentation and resolving this particular issue i would always opt for the resolution of the issue. I would even be willing to make a montary donation to get it out of the way! Howard, the framework creator and main committer, has plans to stop using Javassist to do the class manipulation used in Tapestry. If you want to donate to the project to have this issue solved more quickly, I guess Again, I have never had this issue. I had just checked that all my projects have a Java 1.5 compiler target, while running them in Java 6. Maybe this can be a solution while the Javassist replacement isn't done. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
If given a choice between documentation and resolving this particular issue i would always opt for the resolution of the issue. I would even be willing to make a montary donation to get it out of the way! Howard, the framework creator and main committer, has plans to stop using Javassist to do the class manipulation used in Tapestry. If you want to donate to the project to have this issue solved more quickly, I guess I have read about this hence my reply .. ;-) Again, I have never had this issue. I had just checked that all my projects have a Java 1.5 compiler target, while running them in Java 6. Maybe this can be a solution while the Javassist replacement isn't done. Using Eclipse, my Compiler compliance level is set at 1.5 already and still. What OS are you using? Re. the EventConstants.PROVIDE_COMPLETIONS annotation thing you mentioned. The @OnEvent i understand but i can't find a 'ready made' entry for the EventConstants. Do i make my own enum for that? And if so, how does that hook into the autocompleter mixin without additional coding? Tia,
Re: [t5] upgrade to java 6 and javassist
Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Using Eclipse, my Compiler compliance level is set at 1.5 already and still. What OS are you using? Ubuntu. But I guess it's not operating-system related. The @OnEvent i understand but i can't find a 'ready made' entry for the EventConstants. What do you mean by ready-made? EventConstants is just a class that declares String constants. You can use the event name directly if you want or need. Do i make my own enum for that? No, event names are Strings. And if so, how does that hook into the autocompleter mixin without additional coding? I'm not following you here. All events are hooked by name and, optionally, component id, just that. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
Hi, Also make 100% sure that there aren't multiple javassists (different versions in classpath) AND that the included javassist version is the right one. Check this from the produced war, do NOT trust what the ide is saying ;) Sometimes we have had problems like this, but those were because maven dependencies affected to the included javassist version. We use java 6, and our compile targets are 1.6 in about ten projects, we have multiple developers compiling with different versions of java and haven't had any problems besides those javaassist version related. The version of javassist that gets included for us is 3.9.0.GA - Ville Ps. Below is the mvn configuration we're using w/ netbeans plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target optimizetrue/optimize encodingUTF-8/encoding showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Thiago H. de Paula Figueiredo wrote: Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Using Eclipse, my Compiler compliance level is set at 1.5 already and still. What OS are you using? Ubuntu. But I guess it's not operating-system related. The @OnEvent i understand but i can't find a 'ready made' entry for the EventConstants. What do you mean by ready-made? EventConstants is just a class that declares String constants. You can use the event name directly if you want or need. Do i make my own enum for that? No, event names are Strings. And if so, how does that hook into the autocompleter mixin without additional coding? I'm not following you here. All events are hooked by name and, optionally, component id, just that. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/-t5--upgrade-to-java-6-and-javassist-tp25295834p25780245.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
Hi Joost, Did you get this 'sort-off' resolved? A large method constitutes a method with 'a lot of code' or a method with a long name (fully qualified ..)? Tia, Fermin Joost Schouten (mailing lists) wrote: Thanks for the quick response, Howard Lewis Ship wrote: Look for any large methods that are annotated or are event listeners and refactor them to be smaller; too often Javassist gets confused with large methods. That is all a bit too uncertain for me. I'll revert back to java 5 as I have no immediate need for 6 in this project. Do you know what the javassist roadmap looks like and if they are working on propper java 6 support? My biggest regret for Tapestry 5: Should have ditched Javassist, much as I like it. Does that regret lead you to make any changes to T5 in the future or is javassist used so much that that is unrealistic? Cheers, Joost On Fri, Sep 4, 2009 at 7:51 AM, Joost Schouten (ml) joost...@jsportal.comwrote: I've been struggling the last few days to upgrade to java 6 and get my tapestry 5 app to work. Everything starts up nicely but when accessing a page I get the below listed exception. It seems to have to do something with javassist as also some internet resources suggest, but I didn't find any solution. Has anyone encountered this and can they point me in the right direction? I use T 5.2.0.0-SNAPSHOT and javassist:javassist 3.11.0.GA Cheers, Joost java.lang.ClassFormatError Invalid length 140 in LocalVariableTable in class file com/jsportal/projectportal/client/http/components/template/Navigation * java.lang.ClassLoader.defineClass1(Native Method) * java.lang.ClassLoader.defineClass(ClassLoader.java:703) * java.lang.ClassLoader.defineClass(ClassLoader.java:548) * javassist.Loader.findClass(Loader.java:379) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) * javassist.Loader.loadClass(Loader.java:311) * java.lang.ClassLoader.loadClass(ClassLoader.java:254) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.getInstantiator(ComponentInstantiatorSourceImpl.java:276) * $ComponentInstantiatorSource_1238573d852.getInstantiator($ComponentInstantiatorSource_1238573d852.java) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.getModel(EmbeddedComponentAssemblerImpl.java:177) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.init(EmbeddedComponentAssemblerImpl.java:85) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.createEmbeddedAssembler(ComponentAssemblerImpl.java:274) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.startComponent(PageLoaderImpl.java:740) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:610) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:631) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.programAssembler(PageLoaderImpl.java:234) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.createAssembler(PageLoaderImpl.java:207) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.getAssembler(PageLoaderImpl.java:183) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:943) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:207) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:157) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:947) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:207) *
Re: [t5] upgrade to java 6 and javassist
On Fri, Sep 4, 2009 at 1:09 PM, Howard Lewis Ship hls...@gmail.com wrote: Look for any large methods that are annotated or are event listeners and refactor them to be smaller; too often Javassist gets confused with large methods. I'm working full time in a Tapestry project using Java 6 without any problems, so do the right thing :) and refactor any large event handler methods to smaller ones. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
Hi Thiago, On Mon, Oct 5, 2009 at 7:14 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Fri, Sep 4, 2009 at 1:09 PM, Howard Lewis Ship hls...@gmail.com wrote: Look for any large methods that are annotated or are event listeners and refactor them to be smaller; too often Javassist gets confused with large methods. I'm working full time in a Tapestry project using Java 6 without any problems, so do the right thing :) and refactor any large event handler methods to smaller ones. Sorry if this sounds like a silly question, but what would be an example of an eventhandler method? Would that be something like the onSuccess() method .. ? Large can be defined as 100 chars, 150 chars .. what would you estimate your avg method size would be, from your experience and the fact that you do not run into these pesky little issues .. Tia, Fermin DCG
Re: [t5] upgrade to java 6 and javassist
Em Mon, 05 Oct 2009 15:40:58 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Hi Thiago, Hi! Sorry if this sounds like a silly question, but what would be an example of an eventhandler method? Would that be something like the onSuccess() method .. ? Yes. Or some method annotated with @OnEvent. Large can be defined as 100 chars, 150 chars .. what would you estimate your avg method size would be, from your experience and the fact that you do not run into these pesky little issues .. I don't have any estimate for that. Just take a look at the Tapestry page that has that problem and try to shorten their event handler methods. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
Would that be something like the onSuccess() method .. ? Sorry if this sounds like a silly question, but what would be an example of an eventhandler method? Yes. Or some method annotated with @OnEvent. Hmm, i figured as much so i did some stripping. Below the code that i end up with whilst still throwing the error. How much shorter does it have to be .. ;-) public class Search { public ListString onProvideCompletionsFromFieldName(String partial) { return new ArrayListString(); } void onValidateForm() { } Object onSuccess() { return this; } private ListObject _results; public ListObject getResults() { return _results; } @Log void setupRender() { } } I don't have any estimate for that. Just take a look at the Tapestry page that has that problem and try to shorten their event handler methods. As you can tell i went a bit overboard but i'm starting to think that the problem is not in the code but something that's going on in the AutocompleteMixin, or so it seems to me at least. To be complete the .tml code as well ... form t:type=form t:id=mixinform Type in your search arguments: input t:id=fieldName t:type=TextField t:mixins=autocomplete/ br/ input type=submit value=Search/ /form ... The combo of the above code gave me the following trace (top part ..) java.lang.ClassFormatErrorInvalid length 112 in LocalVariableTable in class file org/apache/tapestry5/corelib/mixins/Autocomplete Hide uninteresting stack frames Stack trace - java.lang.ClassLoader.defineClass1(Native Method) - java.lang.ClassLoader.defineClass(ClassLoader.java:621) - java.lang.ClassLoader.defineClass(ClassLoader.java:466) - javassist.Loader.findClass(Loader.java:379) - org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) - javassist.Loader.loadClass(Loader.java:311) ... Is there any chance i'm looking at a 'corrupted' class of sorts, even though the whole thing is based on the quickstart archetype from Maven. Or doesn't T5 like Ubuntu on a MacPro .. ;) Tia Fermin DCG
Re: [t5] upgrade to java 6 and javassist
Em Mon, 05 Oct 2009 19:10:41 -0300, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl escreveu: Is there any chance i'm looking at a 'corrupted' class of sorts, even though the whole thing is based on the quickstart archetype from Maven. Have you tried deleting the tapestry-core JAR from your local repository and running a Maven goal (such as compile) again, so the JAR is redownloaded? Corrupted and/or truncated JAR files provide us all kinds of random-looking problems and strange behaviours. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [t5] upgrade to java 6 and javassist
Is there any chance i'm looking at a 'corrupted' class of sorts, even though the whole thing is based on the quickstart archetype from Maven. Have you tried deleting the tapestry-core JAR from your local repository and running a Maven goal (such as compile) again, so the JAR is redownloaded? Corrupted and/or truncated JAR files provide us all kinds of random-looking problems and strange behaviours. Nope, not yet so i will give it a whirl. However, wouldn't you agree that three corrupted projects using three different repositories is a bit suspect? I hope that that is the problem .. Thx for the feedback .. Fermin DCG
Re: [t5] upgrade to java 6 and javassist
Just cleaned the whole repository to no avail. The error persists as tenaciously as my headache is increasing. Any other suggestions (short of putting T5 by the side of the street ..)? On Tue, Oct 6, 2009 at 12:39 AM, Fermin Da Costa Gomez dacostago...@dcgconsultancy.nl wrote: Is there any chance i'm looking at a 'corrupted' class of sorts, even though the whole thing is based on the quickstart archetype from Maven. Have you tried deleting the tapestry-core JAR from your local repository and running a Maven goal (such as compile) again, so the JAR is redownloaded? Corrupted and/or truncated JAR files provide us all kinds of random-looking problems and strange behaviours. Nope, not yet so i will give it a whirl. However, wouldn't you agree that three corrupted projects using three different repositories is a bit suspect? I hope that that is the problem .. Thx for the feedback .. Fermin DCG -- “The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.” - George Bernard Shaw (1856 - 1950)
Re: [t5] upgrade to java 6 and javassist
It is starting to look like something 'funny' with the Autocomplete class Relevant tml code: ... input t:id=fieldName t:mixins=autocomplete t:type=TextField / ... Without the mixin i am able to create 2 exceptions, both pointing to the Autocomplete class. When i start without the t:mixin all is fine. Insert the t:mixin and refresh (the browser) gives the exception below. - org.apache.tapestry5.ioc.internal.util.TapestryExceptionFailure creating embedded component 'fieldName' of dcg.nl.demo.pages.Index: java.lang.ClassNotFoundException: caught an exception while obtaining a class file for org.apache.tapestry5.corelib.mixins.Autocomplete locationcontext:Index.tml, line 116 7 p${message:greeting}/p8 9 form t:type=form t:id=formMixinID10 Type in your search arguments:11 input t:id=fieldName t:mixins=autocomplete t:type=TextField /12 br/13 input type=submit value=Search/14/form 15 16 table t:type=grid t:source=results t:rowsPerPage=10 t:pagerPosition=top[Grid here]/tablebr/ - java.lang.ClassNotFoundExceptioncaught an exception while obtaining a class file for org.apache.tapestry5.corelib.mixins.Autocomplete exceptionjava.lang.RuntimeException: Class org.apache.tapestry5.corelib.mixins.Autocomplete contains field(s) (_$assetSource, _$baseResource, _$environment, _$operation, _$resources, _$type) that are not private. You should change these fields to private, and add accessor methods if needed. Restart the server (Tomcat 6.0.20) with the mixin and the 'normal' exception occurs: java.lang.ClassFormatErrorInvalid length 112 in LocalVariableTable in class file org/apache/tapestry5/corelib/mixins/Autocomplete Hide uninteresting stack frames Stack trace - java.lang.ClassLoader.defineClass1(Native Method) ... Unless anybody has another suggestion i'm starting to lean towards the idea that the autocompleter is not entirely happy about something. Tia, Fermin DCG
Re: [t5] upgrade to java 6 and javassist
Look for any large methods that are annotated or are event listeners and refactor them to be smaller; too often Javassist gets confused with large methods. My biggest regret for Tapestry 5: Should have ditched Javassist, much as I like it. On Fri, Sep 4, 2009 at 7:51 AM, Joost Schouten (ml) joost...@jsportal.comwrote: I've been struggling the last few days to upgrade to java 6 and get my tapestry 5 app to work. Everything starts up nicely but when accessing a page I get the below listed exception. It seems to have to do something with javassist as also some internet resources suggest, but I didn't find any solution. Has anyone encountered this and can they point me in the right direction? I use T 5.2.0.0-SNAPSHOT and javassist:javassist 3.11.0.GA Cheers, Joost java.lang.ClassFormatError Invalid length 140 in LocalVariableTable in class file com/jsportal/projectportal/client/http/components/template/Navigation * java.lang.ClassLoader.defineClass1(Native Method) * java.lang.ClassLoader.defineClass(ClassLoader.java:703) * java.lang.ClassLoader.defineClass(ClassLoader.java:548) * javassist.Loader.findClass(Loader.java:379) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) * javassist.Loader.loadClass(Loader.java:311) * java.lang.ClassLoader.loadClass(ClassLoader.java:254) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.getInstantiator(ComponentInstantiatorSourceImpl.java:276) * $ComponentInstantiatorSource_1238573d852.getInstantiator($ComponentInstantiatorSource_1238573d852.java) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.getModel(EmbeddedComponentAssemblerImpl.java:177) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.init(EmbeddedComponentAssemblerImpl.java:85) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.createEmbeddedAssembler(ComponentAssemblerImpl.java:274) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.startComponent(PageLoaderImpl.java:740) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:610) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:631) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.programAssembler(PageLoaderImpl.java:234) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.createAssembler(PageLoaderImpl.java:207) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.getAssembler(PageLoaderImpl.java:183) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:943) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:207) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:157) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:947) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:207) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:88) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:159) * $PageLoader_1238573d883.loadPage($PageLoader_1238573d883.java) * org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) * org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) * $PagePool_1238573d882.checkout($PagePool_1238573d882.java) * org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51) * $RequestPageCache_1238573d881.get($RequestPageCache_1238573d881.java) *
Re: [t5] upgrade to java 6 and javassist
Thanks for the quick response, Howard Lewis Ship wrote: Look for any large methods that are annotated or are event listeners and refactor them to be smaller; too often Javassist gets confused with large methods. That is all a bit too uncertain for me. I'll revert back to java 5 as I have no immediate need for 6 in this project. Do you know what the javassist roadmap looks like and if they are working on propper java 6 support? My biggest regret for Tapestry 5: Should have ditched Javassist, much as I like it. Does that regret lead you to make any changes to T5 in the future or is javassist used so much that that is unrealistic? Cheers, Joost On Fri, Sep 4, 2009 at 7:51 AM, Joost Schouten (ml) joost...@jsportal.comwrote: I've been struggling the last few days to upgrade to java 6 and get my tapestry 5 app to work. Everything starts up nicely but when accessing a page I get the below listed exception. It seems to have to do something with javassist as also some internet resources suggest, but I didn't find any solution. Has anyone encountered this and can they point me in the right direction? I use T 5.2.0.0-SNAPSHOT and javassist:javassist 3.11.0.GA Cheers, Joost java.lang.ClassFormatError Invalid length 140 in LocalVariableTable in class file com/jsportal/projectportal/client/http/components/template/Navigation * java.lang.ClassLoader.defineClass1(Native Method) * java.lang.ClassLoader.defineClass(ClassLoader.java:703) * java.lang.ClassLoader.defineClass(ClassLoader.java:548) * javassist.Loader.findClass(Loader.java:379) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) * javassist.Loader.loadClass(Loader.java:311) * java.lang.ClassLoader.loadClass(ClassLoader.java:254) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.getInstantiator(ComponentInstantiatorSourceImpl.java:276) * $ComponentInstantiatorSource_1238573d852.getInstantiator($ComponentInstantiatorSource_1238573d852.java) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.getModel(EmbeddedComponentAssemblerImpl.java:177) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.init(EmbeddedComponentAssemblerImpl.java:85) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.createEmbeddedAssembler(ComponentAssemblerImpl.java:274) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.startComponent(PageLoaderImpl.java:740) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:610) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:631) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.programAssembler(PageLoaderImpl.java:234) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.createAssembler(PageLoaderImpl.java:207) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.getAssembler(PageLoaderImpl.java:183) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:943) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:207) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:157) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:947) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:207) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:88) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:159) * $PageLoader_1238573d883.loadPage($PageLoader_1238573d883.java) * org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) *
Re: [t5] upgrade to java 6 and javassist
What I need to do is, over time, replace the APIs that are thin wrappers on Javassist with a different high-level set of operations that can be implemented on top of ASM (likely) instead, then deprecate the Javassist versions, then eliminate them. See you in Tapestry 5.5 or so! :-) On Fri, Sep 4, 2009 at 10:17 AM, Joost Schouten (ml) joost...@jsportal.comwrote: Thanks for the quick response, Howard Lewis Ship wrote: Look for any large methods that are annotated or are event listeners and refactor them to be smaller; too often Javassist gets confused with large methods. That is all a bit too uncertain for me. I'll revert back to java 5 as I have no immediate need for 6 in this project. Do you know what the javassist roadmap looks like and if they are working on propper java 6 support? My biggest regret for Tapestry 5: Should have ditched Javassist, much as I like it. Does that regret lead you to make any changes to T5 in the future or is javassist used so much that that is unrealistic? Cheers, Joost On Fri, Sep 4, 2009 at 7:51 AM, Joost Schouten (ml) joost...@jsportal.comwrote: I've been struggling the last few days to upgrade to java 6 and get my tapestry 5 app to work. Everything starts up nicely but when accessing a page I get the below listed exception. It seems to have to do something with javassist as also some internet resources suggest, but I didn't find any solution. Has anyone encountered this and can they point me in the right direction? I use T 5.2.0.0-SNAPSHOT and javassist:javassist 3.11.0.GA Cheers, Joost java.lang.ClassFormatError Invalid length 140 in LocalVariableTable in class file com/jsportal/projectportal/client/http/components/template/Navigation * java.lang.ClassLoader.defineClass1(Native Method) * java.lang.ClassLoader.defineClass(ClassLoader.java:703) * java.lang.ClassLoader.defineClass(ClassLoader.java:548) * javassist.Loader.findClass(Loader.java:379) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) * javassist.Loader.loadClass(Loader.java:311) * java.lang.ClassLoader.loadClass(ClassLoader.java:254) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296) * org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.getInstantiator(ComponentInstantiatorSourceImpl.java:276) * $ComponentInstantiatorSource_1238573d852.getInstantiator($ComponentInstantiatorSource_1238573d852.java) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.getModel(EmbeddedComponentAssemblerImpl.java:177) * org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.init(EmbeddedComponentAssemblerImpl.java:85) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.createEmbeddedAssembler(ComponentAssemblerImpl.java:274) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.startComponent(PageLoaderImpl.java:740) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:610) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.element(PageLoaderImpl.java:670) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:395) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:631) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.processTemplateToken(PageLoaderImpl.java:400) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.programAssembler(PageLoaderImpl.java:234) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.createAssembler(PageLoaderImpl.java:207) * org.apache.tapestry5.internal.pageload.PageLoaderImpl.getAssembler(PageLoaderImpl.java:183) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:943) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:207) * org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:157) * org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:947) *