-
1. Re: weld-se-2.0.0.Final compiled with Java 7
israel.bgf May 24, 2013 8:47 AM (in response to mathias.deshayes)I'm with the same problem. A simple hello world application gives an infamous:
"main" java.lang.UnsupportedClassVersionError: javax/el/ExpressionFactory : Unsupported major.minor version 51.0"
-- Code --
public class Hello {
public static void main(String[] args) {
StartMain.main(args);
}
public void inicio(@Observes ContainerInitialized event){
System.out.println("Hello");
}
}
-
2. Re: weld-se-2.0.0.Final compiled with Java 7
israel.bgf May 24, 2013 9:16 AM (in response to mathias.deshayes)I've done some testings, and found that the BETA3 version also works (didn't find your version on http://sourceforge.net/projects/jboss/files/Weld/)
Is that right, Weld2 isn't supposed to work on Java6?
-
3. Re: weld-se-2.0.0.Final compiled with Java 7
mkouba May 24, 2013 9:22 AM (in response to israel.bgf)1 of 1 people found this helpfulHi Mathias, Israel,
I filed an issue: https://issues.jboss.org/browse/WELD-1431
This should only affect "shaded uber jar", so as a temporary workaround you could work with individual dependencies, see also: http://docs.jboss.org/weld/reference/2.0.0.Final/en-US/html/environments.html#d0e5597 and http://search.maven.org/#artifactdetails|org.jboss.weld.se|weld-se-core|2.0.0.SP1|jar
-
4. Re: weld-se-2.0.0.Final compiled with Java 7
mkouba May 24, 2013 9:24 AM (in response to mkouba)It will be fixed in 2.0.1.Final (ETA release date: 04/Jun/13).
-
5. Re: weld-se-2.0.0.Final compiled with Java 7
mathias.deshayes May 24, 2013 9:32 AM (in response to mkouba)Thanks Martin. I will use the 2.0.1
-
6. Re: weld-se-2.0.0.Final compiled with Java 7
israel.bgf May 24, 2013 9:40 AM (in response to mkouba)Thanks Martin, I removed the javax.el from the .jar and inserted the one bundled on jboss-7 for Java6 (nasty surgery) . Everything is working now.
Thanks again,
-
7. Re: weld-se-2.0.0.Final compiled with Java 7
israel.bgf May 24, 2013 9:41 AM (in response to mathias.deshayes)Mathias, use the BETA3 or 8 meanwhile, or do as myself and change de javax.el from the jar.
-
8. Re: weld-se-2.0.0.Final compiled with Java 7
dude34 May 29, 2013 5:57 AM (in response to mkouba)Is there a good reason for building dependencies as SHADED / UBER JAR with textual description into it, whereas you could let MAVEN do his job, and let us tweak the dependencies if we need to ??
I feel like I have been sent to a time where people are building WAR files manually ... nightmare.
-
9. Re: weld-se-2.0.0.Final compiled with Java 7
mkouba May 29, 2013 6:26 AM (in response to dude34)Donatien,
you can tweak the dependencies even now - just don't use shaded jar but weld-se-core instead. I'm not sure whether shaded jar is a good idea, but it was probably a requirement at a time when weld 1.x was developed.
-
10. Re: weld-se-2.0.0.Final compiled with Java 7
dude34 May 29, 2013 9:49 AM (in response to mkouba)Okay ! Many thanks Martin, this is indeed much more clean and usefull with weld-se-core. I appreciate your quick answer !