Women in Technology

Hear us Roar



Article:
  Wiring Your Web Application with Open Source Java
Subject:   great article-some comments on the code
Date:   2004-07-11 21:39:20
From:   bikachu
Response to: great article-some comments on the code

hi,vijay172
Why I can not still run the sample with the article.The printed information in the console maybe seems to tell me the struts action did not be registed when the web server is starting.
Could you help me in detail.


The following the information printed in console.
2003-7-12 12:27:26 org.apache.coyote.http11.Http11Protocol init
M‘§: Initializing Coyote HTTP/1.1 on port 8085
2003-7-12 12:27:26 org.apache.catalina.startup.Catalina load
M‘§: Initialization processed in 1907 ms
2003-7-12 12:27:27 org.apache.catalina.core.StandardService start
M‘§: Starting service Catalina
2003-7-12 12:27:27 org.apache.catalina.core.StandardEngine start
M‘§: Starting Servlet Engine: Apache Tomcat/5.0.16
2003-7-12 12:27:27 org.apache.catalina.core.StandardHost start
M‘§: XML validation disabled
2003-7-12 12:27:27 org.apache.catalina.core.StandardHost getDeployer
M‘§: Create Host deployer for direct deployment ( non-jmx )
2003-7-12 12:27:27 org.apache.catalina.core.StandardHostDeployer install
M‘§: Processing Context configuration file URL file:D:\Apache Group\jakarta-tomcat-5.0.16\conf\Catalina\localhost\admin.xml
2003-7-12 12:27:28 org.apache.struts.util.PropertyMessageResources <init>
M‘§: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
2003-7-12 12:27:28 org.apache.struts.util.PropertyMessageResources <init>
M‘§: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
2003-7-12 12:27:28 org.apache.struts.util.PropertyMessageResources <init>
M‘§: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
2003-7-12 12:27:30 org.apache.catalina.core.StandardHostDeployer install
M‘§: Processing Context configuration file URL file:D:\Apache Group\jakarta-tomcat-5.0.16\conf\Catalina\localhost\balancer.xml
2003-7-12 12:27:30 org.apache.catalina.core.StandardHostDeployer install
M‘§: Processing Context configuration file URL file:D:\Apache Group\jakarta-tomcat-5.0.16\conf\Catalina\localhost\manager.xml
2003-7-12 12:27:36 org.apache.catalina.core.StandardHostDeployer install
M‘§: Installing web application at context path /wiring from URL file:D:/Apache Group/jakarta-tomcat-5.0.16/webapps/wiring
2003-07-12 12:27:37,906 INFO factory.xml.XmlBeanDefinitionReader:118 -> Loading XML bean definitions from resource [/WEB-INF/applicationContext-hibernate.xml] of ServletContext
2003-07-12 12:27:38,046 INFO context.support.XmlWebApplicationContext:68 -> Bean factory for application context [Root XmlWebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [mySessionFactory,myTransactionManager,orderService,orderTarget,orderDAO]; Root of BeanFactory hierarchy
2003-07-12 12:27:38,140 INFO context.support.XmlWebApplicationContext:249 -> 5 beans defined in ApplicationContext [Root XmlWebApplicationContext]
2003-07-12 12:27:38,156 INFO context.support.XmlWebApplicationContext:337 -> No MessageSource found for context [Root XmlWebApplicationContext]: using empty StaticMessageSource
2003-07-12 12:27:38,156 INFO context.support.UiApplicationContextUtils:67 -> No ThemeSource found for [Root XmlWebApplicationContext]: using ResourceBundleThemeSource
2003-07-12 12:27:38,187 INFO context.support.XmlWebApplicationContext:358 -> Refreshing listeners
2003-07-12 12:27:38,187 INFO factory.support.DefaultListableBeanFactory:168 -> Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [mySessionFactory,myTransactionManager,orderService,orderTarget,orderDAO]; Root of BeanFactory hierarchy]
2003-07-12 12:27:38,187 INFO factory.support.DefaultListableBeanFactory:158 -> Creating shared instance of singleton bean 'mySessionFactory'
2003-07-12 12:27:38,281 INFO hibernate.cfg.Environment:432 -> Hibernate 2.1.1
2003-07-12 12:27:38,281 INFO hibernate.cfg.Environment:466 -> loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=false, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.username=spring, hibernate.connection.url=jdbc:mysql://localhost/spring, hibernate.show_sql=true, hibernate.connection.password=spring, hibernate.statement_cache.size=25, hibernate.connection.pool_size=10}
2003-07-12 12:27:38,515 INFO hibernate.cfg.Binder:225 -> Mapping class: com.meagle.bo.Order -> Orders
2003-07-12 12:27:38,687 INFO hibernate.cfg.Binder:225 -> Mapping class: com.meagle.bo.OrderLineItem -> OrderLineItem
2003-07-12 12:27:38,687 INFO orm.hibernate.LocalSessionFactoryBean:372 -> Building new Hibernate SessionFactory
2003-07-12 12:27:38,687 INFO hibernate.cfg.Configuration:584 -> processing one-to-many association mappings
2003-07-12 12:27:38,687 INFO hibernate.cfg.Binder:1139 -> Mapping collection: com.meagle.bo.Order.orderLineItems -> OrderLineItem
2003-07-12 12:27:38,687 INFO hibernate.cfg.Configuration:593 -> processing one-to-one association property references
2003-07-12 12:27:38,687 INFO hibernate.cfg.Configuration:618 -> processing foreign key constraints
2003-07-12 12:27:38,734 INFO hibernate.dialect.Dialect:82 -> Using dialect: net.sf.hibernate.dialect.MySQLDialect
2003-07-12 12:27:38,734 INFO hibernate.cfg.SettingsFactory:62 -> Use outer join fetching: true
2003-07-12 12:27:38,750 INFO hibernate.connection.ProxoolConnectionProvider:85 -> Configuring Proxool Provider using JAXPConfigurator: D:/eclipse/workspace/spring/wiring/WEB-INF/proxool.xml
2003-07-12 12:27:38,812 INFO logicalcobwebs.proxool.ProxoolFacade:77 -> Proxool 0.8.3 (14-Dec-2003 16:06)
2003-07-12 12:27:38,921 INFO hibernate.connection.ProxoolConnectionProvider:105 -> Configuring Proxool Provider to use pool alias: proxool.spring
2003-07-12 12:27:38,937 INFO hibernate.transaction.TransactionManagerLookupFactory:33 -> No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
2003-07-12 12:27:40,093 INFO hibernate.cfg.SettingsFactory:89 -> Use scrollable result sets: true
2003-07-12 12:27:40,093 INFO hibernate.cfg.SettingsFactory:90 -> JDBC 2 max batch size: 15
2003-07-12 12:27:40,093 INFO hibernate.cfg.SettingsFactory:96 -> echoing all SQL to stdout
2003-07-12 12:27:40,109 INFO hibernate.cfg.SettingsFactory:99 -> Query language substitutions: {}
2003-07-12 12:27:40,109 INFO hibernate.cfg.SettingsFactory:110 -> cache provider: net.sf.ehcache.hibernate.Provider
2003-07-12 12:27:40,109 INFO hibernate.cfg.Configuration:1057 -> instantiating and configuring caches
2003-07-12 12:27:40,265 INFO hibernate.impl.SessionFactoryImpl:119 -> building session factory
2003-07-12 12:27:40,750 INFO hibernate.impl.SessionFactoryObjectFactory:82 -> no JNDI name configured
2003-07-12 12:27:40,750 INFO factory.support.DefaultListableBeanFactory:158 -> Creating shared instance of singleton bean 'myTransactionManager'
2003-07-12 12:27:40,781 INFO factory.support.DefaultListableBeanFactory:158 -> Creating shared instance of singleton bean 'orderService'
2003-07-12 12:27:40,812 INFO factory.support.DefaultListableBeanFactory:158 -> Creating shared instance of singleton bean 'orderTarget'
2003-07-12 12:27:40,828 INFO factory.support.DefaultListableBeanFactory:158 -> Creating shared instance of singleton bean 'orderDAO'
2003-07-12 12:27:40,937 INFO web.context.ContextLoader:98 -> Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for root WebApplicationContext
2003-07-12 12:27:40,937 INFO web.context.ContextLoader:101 -> Published root WebApplicationContext [org.springframework.web.context.support.XmlWebApplicationContext: displayName=[Root XmlWebApplicationContext]; startup date=[Sat Jul 12 12:27:37 CST 2003]; root of ApplicationContext hierarchy; config locations=[/WEB-INF/applicationContext-hibernate.xml]; ] as ServletContext attribute with name [interface org.springframework.web.context.WebApplicationContext.ROOT]
2003-7-12 12:27:41 org.apache.coyote.http11.Http11Protocol start
M‘§: Starting Coyote HTTP/1.1 on port 8085
2003-7-12 12:27:41 org.apache.jk.common.ChannelSocket init
M‘§: JK2: ajp13 listening on /0.0.0.0:8099
2003-7-12 12:27:41 org.apache.jk.server.JkMain start
M‘§: Jk running ID=0 time=16/187 config=D:\Apache Group\jakarta-tomcat-5.0.16\conf\jk2.properties
2003-7-12 12:27:41 org.apache.catalina.startup.Catalina start
M‘§: Server startup in 14453 ms
2003-07-12 12:28:03,890 INFO proxool.stats.spring:66 -> 12:27:38 - 12:28:00, s:1:0.05/s, r:0:0.00/s, a:343.00ms/0.02
2003-07-12 12:28:12,453 INFO struts.util.PropertyMessageResources:127 -> Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
2003-07-12 12:28:12,453 INFO struts.util.PropertyMessageResources:127 -> Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-07-12 12:28:12,453 INFO struts.util.PropertyMessageResources:127 -> Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-07-12 12:28:12,453 INFO struts.util.PropertyMessageResources:127 -> Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
2003-07-12 12:29:03,921 INFO proxool.stats.spring:66 -> 12:28:00 - 12:29:00, s:0:0.00/s, r:0:0.00/s, a:0.00ms/0.00
2003-07-12 12:30:03,937 INFO proxool.stats.spring:66 -> 12:29:00 - 12:30:00, s:0:0.00/s, r:0:0.00/s, a:0.00ms/0.00
2003-07-12 12:30:03,937 INFO proxool.stats.spring:66 -> 12:27:38 - 12:30:00, s:1:0.01/s, r:0:0.00/s, a:343.00ms/0.00
2003-07-12 12:31:03,937 INFO proxool.stats.spring:66 -> 12:30:00 - 12:31:00, s:0:0.00/s, r:0:0.00/s, a:0.00ms/0.00
2003-07-12 12:32:03,937 INFO proxool.stats.spring:66 -> 12:31:00 - 12:32:00, s:0:0.00/s, r:0:0.00/s, a:0.00ms/0.00


Thanks very much , I do like the article.

Full Threads Oldest First

Showing messages 1 through 5 of 5.

  • great article-some comments on the code
    2004-07-12 04:38:48  meagle [View]

    Are you using Tomcat 5? If so, have you tried the steps that another reader posted?

    1. changed web.xml to have a / in front of /WEB-INF/struts-config.xml.
    2. created a WEB-INF/lib and added the required libs.
    3. added to $tomcat-home$/common/lib the jstl jars - standard.jar and jstl.jsr
    4. used spring-framework-1.0-with-dependencies.zip in the lib directory.

    You might also want to put your logger in DEBUG mode in case you are not seeing all details about why Struts is not initializing. Let me know if this does not work.

    Mark
    • great article-some comments on the code
      2004-09-15 23:31:03  bikachu [View]

      hi Mark

      Does jstl.jsr and jstl.jar are same!Now I still can not run the samples.Once I click the link that invoke the struts action,the error will popup with the following information:

      "HTTP Status 404 - Servlet action is not available"

      what happened to you? Could you help me with kindness?I am so in blue!
      • great article-some comments on the code
        2006-07-22 01:40:46  enterprisejava [View]

    • great article-some comments on the code
      2004-09-05 22:48:34  bikachu [View]

      hi ,Mark
      Have you ever happened the following errors when I want to set a order or find a order :

      java.lang.IllegalAccessError: tried to access method net.sf.hibernate.impl.SessionImpl.(Ljava/sql/Connection;Lnet/sf/hibernate/impl/SessionFactoryImpl;ZJLnet/sf/hibernate/Interceptor;)V from class net.sf.hibernate.impl.SessionFactoryImpl
      at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:312)
      at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:325)
      at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:333)
      at org.springframework.orm.hibernate.SessionFactoryUtils.getSession(SessionFactoryUtils.java:184)
      at org.springframework.orm.hibernate.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:268)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:216)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:173)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148)
      at $Proxy0.saveNewOrder(Unknown Source)
      at com.meagle.action.SaveOrderAction.execute(SaveOrderAction.java:85)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
      at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:534)

      Could you help me again!

      thanks very much.

      chengzhou

    • great article-some comments on the code
      2004-08-25 03:04:08  bikachu [View]

      hi Mark
      Thanks for your reply firstly .and could tell me what is jstl.jsr? and could you send it to me if possible .my email address is zhou.cheng@bull.net,
      thanks again ,kind man.