RAD: Seam development with Eclipse and Tomcat Step-by-Step-Tutorial Screencast
November 11, 2007 — techiexchange
Jboss Seam, one of the most innovative full-stack web application framework in Java EE era.
Letz dive in to the tutorial directly without explaining more about Seam.
In order to develop an enterprise application, one must have
an application server installed locally, which is a big pain
when considering system resource and performance. During the
development period developer always perfer to have his
code-hotdeploy time as short as possible, which rapidly
increases his development and production. But this is not
easily achieved when application servers are used during
development. An alternative is to use web servers which are
very light when compared to Application servers. Seam has a
good support for Tomcat webserver.
This tutorial focuses Seam development under Tomcat webserver without support for EJB, that means Seam with POJO and JPA+Hibernate as Persistence provider.
Main goal of this tutorial is to achieve RAD-Rapid Application Development with Seam, Tomcat and Eclipse.
Requirements for Seam development envirnoment:
Download latest Seam release
Download Tomcat 5.5 or Tomcat 6
Download latest Eclipse
Download Eclipse-Tomcat-Sysdeo plugin
This is a screencast (static) showing all the screenshots without explanation.
Here we go….
Extract Seam 2 GA distribution on local hard disk (see Figure 1)
JPA example from Seam 2 GA distribution (see Figure 2)
Build JPA example for Tomcat 5.5 by using ant (make sure that ANT already installed) command:ant tomcat55
Building JPA WAR file (see Figure 3)
Once build successfull, then you can find the war file inside dist-tomcat55 folder (see Figure 4)
Now import WAR file to Eclipse to make an Eclipse project (see Figure 5)
In order to import WAR file select Web -> WAR file from Eclipse import console (see Figure 6)
Choose absolute path of jboss-seam-jpa.war file and press next (see Figure 7)
Import all libs from WEB-INF/lib (don’t select any libs) (see Figure 8)
Here’s new project created in Eclipse workspace (see Figure 9)
Create classes inside WEB-INF to build src files (see Figure 10)
Configure the build path so that src folder takes correct classes folder (see Figure 11)
Choose classes folder as default output folder (see Figure 12)
Copy src from Seam-JPA example (see Figure 13)
Paste into the src folder in Eclipse (see Figure 14)
Now src are shown in the hierarchy but with errors (see Figure 15)
Delete ImportedClasses folder in root of Project workspace (see Figure 16)
In order to remove src errors in the project import TestNG lib to WEB-INF/lib (see Figure 17)
Now Project src has been done without any errors (see Figure 18)
Configure Tomcat Sysdeo plugin to installed home directory of Tomcat (see Figure 19)
See Eclipse toolbar for Sysdeo-Tomcat shortcuts - Start, Shutdown, Restart (see Figure 20)
Tell the created Project (jboss-seam-jpa) that it is a web project to Sysdeo plugin (Project ->rightclick-Properties-> Tomcat) (see Figure 21)
Now update/define about project’s context in Tomcat (server.xml will be updated) (see Figure 22)
Open context.xml (inside Webcontent/META-INF) and copy Resource tag (see Figure 23)
Goto server.xml (Tomcat_Home/conf) and see whether project context is defined (see Figure 24)
Paste Resource tag (make sure that Resource is closed properly) copied from context.xml as child tage to Context tag in server.xml (see Figure 25)
In order to work with HSQL DB, copy hsql.jar from Seam distribution to Tomcat-Home/common/lib folder (see Figure 26)
Now all configuration things are over, so Start Tomcat inside Eclipse by pressing Start icon on Eclipse-Sysdeo toolbar (see Figure 27)
You can see the console output of Tomcat saying server started (see Figure 28)
Test whether the application started without any errors by opeing a browser and navigating
http://localhost:tomcatport/jboss-seam-jpaNote that the footer of the front page. We’re going to change that in the next step. (see Figure 29)
Open home.xhtml (front page of the application) located inside WebContent and check the footer (see Figure 30)
Edit footer note and save the page (see Figure 31)
Now goto opened browser where application is already running, and press Refresh or F5 to reload the page.
That’s it.. without starting the server your code got hot deployed and web page was reloaded. (see Figure 32)
Please note that Tomcat should be used only during development phase in order to increase the development productivity, use some application server to deploy production applications.
I hope this tutorial gives a kick-off project template for Seam with POJO+JPA+Hibernate based application.
Share your thoughts.































November 12, 2007 at 1:29 pm
thx for the documentation!
We are planning to use Seam as in combination with EJB3.0 to create an “webbased” enterprise application!
This means we will not have the chance to skip AS and use Tomcat instead
November 13, 2007 at 9:20 am
Hi necrite,
My next tutorial would be Seam+EJB3 on Tomcat (with JBoss embedded) for development envirnoment, but for production you need to go with some application server.
That means without changing the code that you developed on Tomcat should be deployable (with change in some configuration files) using build script on your favourite application server.
Moreover you should deeply think about your usage of EJBs in web application. Try to find out the need to use for EJBs and think whether its possible to replace it without EJBs (POJO). Eventhough EJB3 is lightweight when compared to its previous versions, but you can achieve all the features of EJB with POJO and Seam. One of the biggest advantage with Seam+POJO+JPA is, you can run it on all servers (J2EE, JEE5, Webserver) and application-stack would be easy to maintain.
November 13, 2007 at 11:44 am
“One of the biggest advantage with Seam+POJO+JPA is, you can run it on all servers (J2EE, JEE5, Webserver) and application-stack would be easy to maintain”
One of the biggest disadvantage with Seam+POJO+JPA is, you can not generate the staff with the seam-gen, can you?
How can I make it, if I have just about 10 or 20 tables in MySQL?
November 13, 2007 at 12:15 pm
Hi !
This is a very good tutorial.
Thanks for the link !
November 13, 2007 at 6:13 pm
[...] RAD - Rapid Application Development with Eclipse and Tomcat, focusing on developer productivity. RAD: Seam development with Eclipse and Tomcat Step-by-Step-Tutorial Screencast Techieexchanges Te… I hope this tutorial will be useful for J2EE/JEE [...]
November 13, 2007 at 8:38 pm
[...] Development mit Eclipse und Tomcat, konzentriert auf entwickler Produktivitt geschrieben. http://techieexchange.wordpress.com/…al-screencast/ Ich hoffe, dass dieses Tutorial ntzlich sein wird fr die J2EE/JEE Entwickler. Sorry for my bad [...]
November 13, 2007 at 10:28 pm
Thanks for the link.. I definitely plan to use Tomcat +
JPA..
I think its better to avoid EJB as far as possible(in
some projects),
even though EJB3 is like POJO , as I really dont need the
“EJB3 features”, and dont want to use any AS in comparison with the “fast light-weight” Tomcat..
November 14, 2007 at 3:17 am
Nice tutorial…one suggestion combine all these images..make a ppt ans share it on slideshare..also instead of using sysdeo plugin you could have used eclipse europa JEE version which supports most of the app servers/servlet containers..no additional plugins needed….
For ome of the comments above
Yes you can generate simple CRUD apps using seam..when tables are in place..just look for the documentation on
seam generate-entities (after seam setup)
November 14, 2007 at 3:38 am
Do you really find running JBoss to be that resource intensive? JBoss starts up on my laptop in about 15 seconds, and I can hot deploy my ear without issue, so I just use JBoss for my development.
November 15, 2007 at 11:49 pm
[...] 作者: Prem 翻译: Thomas 来源: Techieexchange [...]
November 16, 2007 at 12:20 am
Hi, Prem
We post the translation in JBossSeam.com today, this is the link: http://www.jbossseam.com/2007/11/16/seam-development-with-eclipse-and-tomcat/
Thanks for your support!
November 17, 2007 at 11:20 am
[...] wouldn’t relay on this guide though….haven’t tried [...]
November 26, 2007 at 3:58 pm
I tried to use above steps with MyEclipse 6.0. I was
not able to use “Apache Tomcat 5.5″ as runtime.. Hence
change the runtime to “No RunTime”.
a) Since i am using Myeclipse 6.0 , i had to add
webcapability to deploy it..
But it failed, and hence i manually deployed it.
I did not need to copy the context.xml in server.xml , but
had to copy the hsqldb.jar in to common/lib.
b) I went to TestNg.jar and downloaded latest version, which
had missing jar file for 1.5.. Hence i dowlonad older version
which had it.
c) I was getting weird errors at startup. .And added below to
remove it.
com.sun.faces.config.ConfigureListener
November 27, 2007 at 8:23 pm
Hi Zahid Shaikh,
I have no experience with MyEclipse, so try to use plain Eclipse 3.3 / 3.2 and repeat all the steps as posted on this blog.
Also you could set your log level to DEBUG to see exactly what kind of error happened to throw
com.sun.faces.config.ConfigureListener
If possible send me the complete stack trace.
Post your comment, if still not working.
Regards,
TechieExchange
November 30, 2007 at 3:34 pm
Thanks.. it worked in Myeclipse 6.0 after i did
the mentioned steps..
But it included lots of other unrelated projects - jboss-el, jboss-seam-ui, which i am ignoring..
December 5, 2007 at 6:35 pm
Thanks for this tutorial. I’m running into a problem, and I’d appreciate any help. I’m using Tomcat 6 and have followed all the instructions. When I start the server, I get the following error:
SEVERE: Could not find datasource: java:comp/env/jdbc/TestDB









javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81)
at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
at org.jboss.seam.Component.newInstance(Component.java:196
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:27
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
at org.jboss.seam.init.Initialization.init(Initialization.java:555)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:48
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:113
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:28
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Dec 5, 2007 1:30:24 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:737)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81)
at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
at org.jboss.seam.Component.newInstance(Component.java:196
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:27
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
at org.jboss.seam.init.Initialization.init(Initialization.java:555)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:48
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:113
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:28
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
… 43 more
Caused by: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
… 50 more
Dec 5, 2007 1:30:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Dec 5, 2007 1:30:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jboss-seam-jpa] startup failed due to previous errors
December 5, 2007 at 7:19 pm
Please disregard the previous comment; I figured out what I was doing wrong.
December 7, 2007 at 2:48 pm
Two remarks regarding the tutorial:
“Paste Resource tag … in server.xml (see Figure 25)” - for Tomcat 6 this should be changed to “… in conf/Catalina/localhost/jboss-seam-jpa.xml” (this is the problem that Bruce reported).
“In order to work with HSQL … Tomcat-Home/common/lib folder (see Figure 26)” - for Tomcat 6 this should be changed to “… Tomcat-Home/lib”
December 8, 2007 at 2:38 am
Hey Bruce, how did you solve your problem?
Im running into the same…
Thanks for your help!
December 8, 2007 at 6:28 pm
Arthur, please see my two remarks.
December 10, 2007 at 3:32 am
description The requested resource (/jboss-seam-jpa/) is not available.
December 10, 2007 at 3:54 am
Please ignore my previous message Worked after Added webContent in docBase line.
December 10, 2007 at 7:29 pm
Arthur, I had made a mistake in my server.xml. That file should contain something like:
December 10, 2007 at 7:31 pm
Previous post didn’t show my server.xml excerpt. Second attempt:
March 13, 2008 at 1:07 pm
I am able to run the application after importing it in eclipse and doing the configuration changes. But when I try to run the test cases i get this exception .
FAILED CONFIGURATION: @BeforeClass init
javax.servlet.ServletException: ServletContext not allow to getResourceAsStream for /WEB-INF/web.xml
at org.ajax4jsf.webapp.WebXml.init(WebXml.java:113)
at org.ajax4jsf.resource.InternetResourceService.init(InternetResourceService.java:133)
at org.ajax4jsf.webapp.BaseFilter.init(BaseFilter.java:14
at org.jboss.seam.web.Ajax4jsfFilter.init(Ajax4jsfFilter.java:86)
at org.jboss.seam.servlet.SeamFilter.init(SeamFilter.java:97)
at org.jboss.seam.mock.BaseSeamTest.createSeamFilter(BaseSeamTest.java:961)
at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:942)
at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
… Removed 22 stack frames
SKIPPED CONFIGURATION: @BeforeMethod begin
SKIPPED CONFIGURATION: @AfterMethod end
SKIPPED CONFIGURATION: @BeforeMethod begin
SKIPPED CONFIGURATION: @AfterMethod end
SKIPPED CONFIGURATION: @AfterClass cleanup
SKIPPED: testLogin
SKIPPED: testLoginComponent
March 13, 2008 at 1:41 pm
Hi Alok Kumar,
Actually there are some conflicts with SeamTest cases. We already discussed about this in Seam forum.
Please search for posts related to this or post a new one.
Seam old forum:
http://www.jboss.com/index.html?module=bb&op=viewforum&f=231
Seam new Forum:
http://www.seamframework.org/Community/Forums
Hope this helps.
Regards,
Techieexchange
March 23, 2008 at 1:37 pm
Did anyone add a WebService functionality to this jpa example? Basic Idea is to have tomcat+seam+webservices.
April 16, 2008 at 9:42 am
[...] http://techieexchange.wordpress.com/2007/11/11/rad-seam-development-with-eclipse-and-tomcat-step-by-... [...]
May 5, 2008 at 3:47 pm
can anyone tell me any site where i can find information about using quartz in seam
May 24, 2008 at 1:53 pm
Great tutorial. Thanks a lot.
Just some feedback to help other new comers like myself.
The steps above didn’t work for me exactly. Have to do some tweaks to make it work.
I am using MyEclipse 6.0.1 and
jboss-seam-2.0.1GA, tomcat6
- after running ‘clean’ then build project in MyEclipse,
persistence.xml from /WebContent/WEB-INF/classes/META-INF will be deleted,
what I did to get around was copy everything from
/WebContent/WEB-INF/classes except for /WebContent/WEB-INF/classes/org/* to /src
- also I need to copy asm.jar from \lib to
/WebContent/WEB-INF/lib to avoid this problem
http://www.seamframework.org/Community/AreTheTomcatInstructionsIncomplete
- I modify \conf\Catalina\localhost\jboss-seam-jpa.xml instead of server.xml as in tutorial, but change in jboss-seam-jpa.xml will be lost after each update of context definition as in Fig 23.
Other than that, everything work.
Thanks again