Migrating Wicket 1.4.x to Wicket 7.9.x - wicket

I want to migrate Wicket from 1.4.9 to 7.9.0 but I haven't found any direct links.
Can anyone provide me one?

There is no migration guide for direct upgrade from 1.4 to 7. You will have to do an incremental migration along the major release path:
1.4 -> 1.5 -> 6 -> 7
Each step can be found here: https://cwiki.apache.org/confluence/display/WICKET/Migrations
1.4 to 1.5: https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5
1.5 to 6:
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+6.0
6 to 7:
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0

Related

Wicket 9 & Tomcat 10 Can't Cast jakarta.servlet.Filter

I'm trying to use the Wicket Project 'QuickStart' with
Netbeans 11, Java 11, Tomcat 10, Wicket 9, and Ubuntu 18.04.
When I install the WAR package and start it, it throws:
20-May-2020 09:23:37.067 GRAVE [] org.apache.catalina.core.StandardContext.filterStart Exception at start [wicket.quickstart]
java.lang.ClassCastException: class org.apache.wicket.protocol.http.WicketFilter cannot be cast to class jakarta.servlet.Filter (org.apache.wicket.protocol.http.WicketFilter is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader)
Has anyone seen this issue before and if so, what can I do to resolve this?
The issue is that Tomcat 10 uses jakarta.** packages (Jakarta EE 9) while Wicket 9.x is still based on javax.** packages (Java EE 8).
The solutions are:
Use Tomcat 9.x
Use https://github.com/apache/tomcat-jakartaee-migration to migrate the Wicket application (the .war file) from javax to jakarta
Deploy the javax.** based application into $TOMCAT10_HOME/webapps-javaee/ folder. It will be automatically migrated to jakarta.** by Tomcat.
Don't use Tomcat 10 yet, it works with the new jakarta packages.
Switch to version 9 instead.
To make wicket 9 work with with jakarta, e.g. if using tomcat 10 or spring boot 3, you have to convert some jars. There is the tool jakartaee-migration which does this for a given jar. So apply it at least to these 4 jars and create new ones - I used -jakarta as appendix:
wicket-core -> wicket-core-jakarta
wicket-util -> wicket-util-jakarta
wicket-request -> wicket-request-jakarta
commons-fileupload -> commons-fileupload
Also create proper pom files put all together into your local/shared repository.
To use it, add the new dependencies and exclude the old ones where necessary. Run mvn dependency:tree until nothing bogus gets picked up.
Congrats - you now have wicket 9 for jakarta.

While upgrading to jdk7 to jdk11 with wildfly16 drools are not working

Hi I am having following configuration:
java version-jdk11
server-wildfly16
jars-drools 6.0 and ecj 4.6.1
in server location: C:\wildfly-16.0.0.Final\modules\org\eclipse\jdt\main
I am having jar: jasper-jdt-6.0.29
having an ear.
but after deploying my application opens though when i check rules so drls not working.
below error i am getting..
/servlet/com.fourcs.clm.iwarranty.eclaims.dataview.servlets.ClaimSearchServlet
Path Info:null
Query String:null
Stack Trace:
java.lang.NoSuchFieldError: compilation_beginningToCompile
at deployment.CLMEAR.ear//org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:428)
at deployment.CLMEAR.ear//org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417)
at deployment.CLMEAR.ear//org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:405)
at deployment.CLMEAR.ear//org.drools.compiler.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at deployment.CLMEAR.ear//org.drools.compiler.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:405)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageRegistry.compileAll(PackageRegistry.java:110)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageBuilder.compileAll(PackageBuilder.java:1334)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageBuilder.compileRules(PackageBuilder.java:1058)
at deployment.CLMEAR.ear//org.drools.compiler.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:972)
I tried upgrading jar version ecj 4.3.1 to 4.6.1 but that also not worked.
How to resolve this error. Any idea?
If you look on the drools usage forums, you can find that Drools does not work with JDK11.
Drools 6 works with JDK7, but that version is from 2013. Latest Drools versions (7.X) work on WildFly 10 to 14 with JDK8.

Does Eclipse 4.4 (Luna) Require Java 1.7

I decided to update my eclipse to 4.4 (luna release). When I try to launch it however, I get an error stating that eclipse requires 1.7 or later of java jvm.
Just wanted to see if this is true and if it is possible to get it running with 1.6 (specifically 1.6.0_65)
If there is an explicit message stating that 1.7 or later is required when you run it with 1.6, I expect this to be a strong (ie blocking) minimum requirement. Eclipse Luna (4.4) is the first release requiring 1.7:
http://wiki.eclipse.org/Eclipse/Installation
And still, if you still doubt it you can verify for which version it was compiled. For every Eclipse classes run the following command:
javap -verbose EclipseClass.class
Look for Major Version. If value is 51 this means it was compiled for java 1.7, so you are out of luck for 1.6. The magic numbers for major versions are :
J2SE 8 = 52 (0x34 hex),
J2SE 7 = 51 (0x33 hex),
J2SE 6.0 = 50 (0x32 hex),
J2SE 5.0 = 49 (0x31 hex),
JDK 1.4 = 48 (0x30 hex),
JDK 1.3 = 47 (0x2F hex),
JDK 1.2 = 46 (0x2E hex),
JDK 1.1 = 45 (0x2D hex).
and are described here:
http://en.wikipedia.org/wiki/Java_class_file#Magic_Number
Thing is, each eclipse bundle have different minimum requirements, so this may not be a good option for a platform as big as Eclipse. Anyway, I mention it because its good to know.
I also had this problem during the IDE Luna installation. In my case, to solve this problem, I had that change the system variables in win 7. In my computer was the variable that was did referenced the jdk 6... after that I changed it, I could open it again.
This link helped me:
It is requesting to install latest JDK. This is the link
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I have installed jdk1.7.0_67 and its running successfully.

Migrating GWT 1.7 to GWT 2.4

I am trying to upgrade GWT from 1.7 to GWT 2.4 but I get build errors saying
Errors in 'jar:file:/C:/src/project/lib/gxt.jar!/com/extjs/gxt/ui/client/widget/Component.java'
[ERROR] Line 1280: Cannot reduce the visibility of the inherited method from Widget
Should I change the gxt version as well? I tried to change gxt to 2.2.5 and 2.2.6 but it doesn't work.
Yes, you do need to upgrade GXT. GXT 2.2.4+ should work. Check the release notes; they say GWT 2.3 support is introduced in GXT version 2.2.4.
http://dev.sencha.com/deploy/gxt-2.2.4/release_notes.html#Release_2.2.4
They also answer this in the forums.
http://www.sencha.com/forum/showthread.php?146796-GWT-2.4-compatibility

testing java ee 6 with junit 3

I have a short question: Can I test java ee 6 with junit 3, or do I have to use JUnit 4?
No, JUnit version 3.8 and earlier supports Java up to version 1.4.
Source: http://www.methodsandtools.com/tools/tools.php?junit