[jboss-user] [JBoss Seam] - How to develop my first web app with seam, without EJB, withou

Theface do-not-reply at jboss.com
Sun Apr 22 09:38:24 EDT 2007


Hi,all.
can you help me to develop my first web app,with seam,but without EJB and any DataBase(or called Datasource),Thanks very much at first.
I used the seam command to generate a project,but i think the folder structure is too bad,so i change the todo example to project login:

login
-src
--org.jboss.seam.example.todo.Login.java
-web
--index.html
--login.jsp
--WEB-INF
---web.xml
---components.xml
---faces-config.xml
---lib
----All lib from example folder(size is 23MB)---

and following is changed file:
----------------components.xml-----------------------------
<!DOCTYPE components PUBLIC
  "-//JBoss/Seam Component Configuration DTD 1.2//EN"
  "http://jboss.com/products/seam/components-1.2.dtd">





-----------faces-config.xml-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config 
PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                            "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>

</faces-config>

I deployed this project to tomcat 5.5,and startup the sever.no exception throws,but when to show this page use /login/login.seam.the sever will throw many exception likes follow:
21:29:28,453 ERROR [ExceptionFilter] could not roll back transaction
javax.naming.NamingException: Local server is not initialized
	at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.(InitialContext.java:197)
	at org.jboss.seam.util.Naming.getInitialContext(Naming.java:35)
	at org.jboss.seam.util.Naming.getInitialContext(Naming.java:47)
	at org.jboss.seam.util.Transactions.getUserTransaction(Transactions.java:149)
	at org.jboss.seam.util.Transactions.isUTTransactionActiveOrMarkedRollback(Transactions.java:122)
	at org.jboss.seam.util.Transactions.isTransactionActiveOrMarkedRollback(Transactions.java:50)
	at org.jboss.seam.web.ExceptionFilter.rollbackTransactionIfNecessary(ExceptionFilter.java:128)
	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
	at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
	at java.lang.Thread.run(Thread.java:619)

but the login form is display in browser.

My english is too bad.so .I hope anyone can knows my means.
Thanks again.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039598#4039598

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039598



More information about the jboss-user mailing list