Help

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

FAQ Category:

Yes, but there are some things that you need to know (and do).

As of Seam 2.1, all of Seam's test suites and seam-gen projects execute successfully on JDK 6. You can find the automated runs of the Seam testsuite on JDK 6 for 2.2.X. JDK 6 is a support requirement in Seam 2.1.0.GA and above.

Keep in mind that if you are going to use JDK 6 in production, you need to ensure the Java EE container in which you run your application is JDK 6 compatible as well. The information on this page deals with using JDK 6 for development.

Here's what you need to know.

Sun's JDK 6 Update 4 release upgraded from JAXB 2.0 to JAXB 2.1. Prior to this release, you would get a conflict between the JAXB 2.0 in the bootstrap classpath and the JAXB 2.1 included in the Embedded JBoss libraries (thirdparty-all.jar). To make that combination work, you would have had to override the JAXB library provided by the JVM by using its endorsed directory feature. But that's all a thing of the past. Now, when testing (or really just in general), just be sure to use JDK 6 Update 4 or higher (>= 1.6.0_04).

But there's a caveat! Seam uses Embedded JBoss in its unit and integration testing. This has an additional requirement when using JDK 6. In order to run Embedded JBoss with JDK 6 you need to set the following JVM argument:

-Dsun.lang.ClassLoader.allowArraySyntax=true

Seam's internal build system is setting this by default when it executes Seam's test suite. seam-gen now includes this flag in the <testng> task used in the test target. If you are also using Embedded JBoss for your own testing, such as when you run tests from Eclipse, you will need to add this setting to the VM arguments.

  • TestNG: Add the element <jvmarg line="-Dsun.lang.ClassLoader.allowArraySyntax=true"/> inside the <testng> task
  • Eclipse: Add the VM argument -Dsun.lang.ClassLoader.allowArraySyntax=true to the VM args tab in the TestNG launch configuration for your suite.
7 comments:
 
28. Jan 2008, 13:23 America/New_York | Link

The only current failures on the JDK 6 runs of the Seam testsuite are related to Hibernate collection handling, otherwise the testsuite is running well.

 

Read about how to report a bug.

 
23. May 2008, 20:53 America/New_York | Link
Pete Muir wrote on Jan 28, 2008 13:23:
The only current failures on the JDK 6 runs of the Seam testsuite are related to Hibernate collection handling, otherwise the testsuite is running well.

Is this a known Hibernate bug? I've been running Seam/Hibernate with JDK6 on my development box for a while and haven't seen these issues; is it a particular problem area?

 

Luke Maurer

 
03. Mar 2009, 05:04 America/New_York | Link
Chune
After fighting with Seam 2.1.1.GA + JBoss AS 5.0.1.GA + MySQL 5.1.31 + JDK 6.0(u12) in a clean Eclipse IDE 3.4.2 install (for Report Dev; Seam/AS as dropins) on WinXP (32b), I went back to JDK 5.0 (u17), and all was immediately good!

The driving element here is JBoss AS. I will be waiting for JBoss AS 5.x to be released without JDK 6 caveats prior to trying again with JDK 6.

(Also of note, Seam still, er, seams to be best suited to JBoss AS [standalone]. I fumbled around with a number of other servers, including GlassFish v3 Prelude, SpringSource dm Server, and briefly tried Tomcat 6 + JBoss AS [embedded], but really could only get the configuration noted at the top of this post to perform reliably.)
 
20. Apr 2009, 21:30 America/New_York | Link

I am using IBM JDK1.6 , Seam2.0.1 GA. Server is getting stuck after the following line

00:44:54,421 INFO SeamFilter Initializing filter: org.jboss.seam.web.ajax4jsf Filter 00:44:54,468 INFO CacheManager Selected org.ajax4jsf.cache.LRUMapCacheFactor y cache factory

But it works fine with sun jdk1.6. Is there any setting needs to be done?

 
27. Aug 2009, 16:43 America/New_York | Link
Eric Link

I opened a JIRA on JDK 1.6 support:

https://jira.jboss.org/jira/browse/JBSEAM-4390

 
24. Nov 2009, 17:58 America/New_York | Link

For those using the Maven surefire plugin, the following setup seems to work for me:

<plugin>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <additionalClasspathElements>                                    
      <additionalClasspathElement>etc/bootstrap</additionalClasspathElement>
    </additionalClasspathElements>
    <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true</argLine>
  </configuration>
</plugin>

Where etc/bootstrap points to the bootstrap directory with all the config files in it.

Also, the <systemProperties> element didn't seem to work for me. Not sure why.

22. Mar 2010, 11:13 America/New_York | Link

quote deb wrote on Apr 20, 2009 21:30:

I am using IBM JDK1.6 , Seam2.0.1 GA. Server is getting stuck after the following line

00:44:54,421 INFO SeamFilter Initializing filter: org.jboss.seam.web.ajax4jsf Filter 00:44:54,468 INFO CacheManager Selected org.ajax4jsf.cache.LRUMapCacheFactor y cache factory

But it works fine with sun jdk1.6. Is there any setting needs to be done? quote

I have the same question : I am using IBM JDK1.6 , Seam2.0.1 GA. Server is getting stuck after the following line,it also works fine with sun jdk1.5.