RE: db error
Check your database is up before trying to connect to it. If it is and you can ping the database from your application server box, then check your spelling in the data source definition. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:01 To: Struts Users Mailing List Subject: db error Hello All, i am trying to connect a oracle database, and i get this stack trace, can someone please tell me what is wrong with it. !-- stack trace -- javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1091) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) !-- end of stack trace -- --- data sources -- data-sources !-- data-source type=org.apache.commons.dbcp.BasicDataSource -- data-source set-property property=driverClassName value=oracle.jdbc.driver.OracleDriver / set-property property=url value=jdbc:oracle:thin:oci8:1521:ora9i / set-property property=username value=*** / set-property property=password value=*** / set-property property=autoCommit value=true / set-property property=maxCount value=4 / set-property property=minCount value=2 / set-property property=validationQuery value=SELECT 1+1 from dual / /data-source /data-sources -- code -- ServletContext context = servlet.getServletContext(); DataSource ds = (DataSource) context.getAttribute(Action.DATA_SOURCE_KEY); //DataSource ds = getDataSource(req); try { conn = ds.getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery(Select tname, tabtype from tab); if (!rs.wasNull()) { /** * some records where returned */ System.err.println(==); while (rs.next()) { System.err.println(Table Name: + rs.getString(1)); System.err.println(TabType: + rs.getString(2)); System.err.println(--); } System.err.println(==); } } catch (SQLException e) { System.err.println(== Error in getting the connection: + e.getMessage()); ---end of code -- -- Rajat Pandit | [EMAIL PROTECTED] System Analyst Manchitra Services Pvt. Ltd (www.manchitra.com) Tel: 011-26232696 / 26232798 Cellphone: 9818247126 B231 / C GK I New Delhi *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has
Re: db error
Thanks chris, so this is not because of any missing classes or jar files? is this a connectivity issue? the database server isup and my other applications sqlplusw can access it. any pointers? sorry about read reciept thing in my previous mail. rajat - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 25, 2004 4:46 PM Subject: RE: db error Check your database is up before trying to connect to it. If it is and you can ping the database from your application server box, then check your spelling in the data source definition. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:01 To: Struts Users Mailing List Subject: db error Hello All, i am trying to connect a oracle database, and i get this stack trace, can someone please tell me what is wrong with it. !-- stack trace -- javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j ava:1091) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93 4) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) !-- end of stack trace -- --- data sources -- data-sources !-- data-source type=org.apache.commons.dbcp.BasicDataSource -- data-source set-property property=driverClassName value=oracle.jdbc.driver.OracleDriver / set-property property=url value=jdbc:oracle:thin:oci8:1521:ora9i / set-property property=username value=*** / set-property property=password value=*** / set-property property=autoCommit value=true / set-property property=maxCount value=4 / set-property property=minCount value=2 / set-property property=validationQuery value=SELECT 1+1 from dual / /data-source /data-sources -- code -- ServletContext context = servlet.getServletContext(); DataSource ds = (DataSource) context.getAttribute(Action.DATA_SOURCE_KEY); //DataSource ds = getDataSource(req); try { conn = ds.getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery(Select tname, tabtype from tab); if (!rs.wasNull()) { /** * some records where returned */ System.err.println(==); while (rs.next()) { System.err.println(Table Name: + rs.getString(1)); System.err.println(TabType: + rs.getString(2)); System.err.println(--); } System.err.println(==); } } catch (SQLException e
RE: db error
It doesnt appear to be a case of missing classes etc This exception seems pretty descriptive : UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE It looks like struts cannot physically get a connection to the specified source, so a. it doesnt exist b. it does exist but your application cannot get to the source (routing issue?) c. there is a typo in the connection details. d. the connection details are setup incorrectly. there are other factors etc but I would say this is an initial check list. data-source key=dev.sitea set-property property=autoCommit value=true / set-property property=descriptionvalue=JDBC data source/ set-property property=driverClass value=oracle.jdbc.driver.OracleDriver/ set-property property=maxCount value=50/ set-property property=minCount value=2/ set-property property=password value=**/ set-property property=user value=**/ set-property property=url value=jdbc:oracle:thin:@box:1521:db/ /data-source A minor difference I have noticed is the use of the '@' symbol to reference your box in the url parameter. I have included one that I know works for one of my systems oracle connection. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:11 To: Struts Users Mailing List Subject: Re: db error Thanks chris, so this is not because of any missing classes or jar files? is this a connectivity issue? the database server isup and my other applications sqlplusw can access it. any pointers? sorry about read reciept thing in my previous mail. rajat - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 25, 2004 4:46 PM Subject: RE: db error Check your database is up before trying to connect to it. If it is and you can ping the database from your application server box, then check your spelling in the data source definition. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:01 To: Struts Users Mailing List Subject: db error Hello All, i am trying to connect a oracle database, and i get this stack trace, can someone please tell me what is wrong with it. !-- stack trace -- javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j ava:1091) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93 4) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324
Re: db error
Hello, i tried your suggestion but i continue getting the same error. javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j ava:1091) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) we are porting a legacy application to struts and i am using now the same connection URL. data-source set-property property=driverClassName value=oracle.jdbc.driver.OracleDriver / set-property property=url value=jdbc:oracle:oci8:@ora9i / set-property property=username value=** / set-property property=password value=* / set-property property=autoCommit value=true / set-property property=maxCount value=4 / set-property property=minCount value=2 / set-property property=validationQuery value=SELECT 1+1 from dual / /data-source any futher suggestions o clues? pls help this is urgent. regards rajat - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 25, 2004 4:58 PM Subject: RE: db error It doesnt appear to be a case of missing classes etc This exception seems pretty descriptive : UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE It looks like struts cannot physically get a connection to the specified source, so a. it doesnt exist b. it does exist but your application cannot get to the source (routing issue?) c. there is a typo in the connection details. d. the connection details are setup incorrectly. there are other factors etc but I would say this is an initial check list. data-source key=dev.sitea set-property property=autoCommit value=true / set-property property=descriptionvalue=JDBC data source/ set-property property=driverClass value=oracle.jdbc.driver.OracleDriver/ set-property property=maxCount value=50/ set-property property=minCount value=2/ set-property property=password value=**/ set-property property=user value=**/ set-property property=url value=jdbc:oracle:thin:@box:1521:db/ /data-source A minor difference I have noticed is the use of the '@' symbol to reference your box in the url parameter. I have included one that I know works for one of my systems oracle connection. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:11 To: Struts Users Mailing List Subject: Re: db error Thanks chris, so this is not because of any missing classes or jar files? is this a connectivity issue? the database server isup and my other applications sqlplusw can access it. any pointers? sorry about read reciept thing in my previous mail. rajat - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 25, 2004 4:46 PM Subject: RE: db error Check your database is up before trying to connect to it. If it is and you can ping the database from your application server box, then check your spelling in the data source definition. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:01 To: Struts Users Mailing List Subject: db error Hello All, i am trying to connect a oracle database, and i get this stack trace, can someone please tell me what is wrong with it. !-- stack trace -- javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j ava:1091) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93 4) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569
Re: db error
It has been a while since i used oracle, but that url looks wrong: jdbc:oracle:thin:oci8:1521:ora9i Can you have thin and oci in one url? Larry [EMAIL PROTECTED] 03/25/04 4:10 AM Thanks chris, so this is not because of any missing classes or jar files? is this a connectivity issue? the database server isup and my other applications sqlplusw can access it. any pointers? sorry about read reciept thing in my previous mail. rajat - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 25, 2004 4:46 PM Subject: RE: db error Check your database is up before trying to connect to it. If it is and you can ping the database from your application server box, then check your spelling in the data source definition. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:01 To: Struts Users Mailing List Subject: db error Hello All, i am trying to connect a oracle database, and i get this stack trace, can someone please tell me what is wrong with it. !-- stack trace -- javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j ava:1091) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93 4) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) !-- end of stack trace -- --- data sources -- data-sources !-- data-source type=org.apache.commons.dbcp.BasicDataSource -- data-source set-property property=driverClassName value=oracle.jdbc.driver.OracleDriver / set-property property=url value=jdbc:oracle:thin:oci8:1521:ora9i / set-property property=username value=*** / set-property property=password value=*** / set-property property=autoCommit value=true / set-property property=maxCount value=4 / set-property property=minCount value=2 / set-property property=validationQuery value=SELECT 1+1 from dual / /data-source /data-sources -- code -- ServletContext context = servlet.getServletContext(); DataSource ds = (DataSource) context.getAttribute(Action.DATA_SOURCE_KEY); //DataSource ds = getDataSource(req); try { conn = ds.getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery(Select tname, tabtype from tab); if (!rs.wasNull()) { /** * some records where returned */ System.err.println(==); while (rs.next()) { System.err.println(Table Name: + rs.getString(1)); System.err.println(TabType: + rs.getString(2
Re: db error
About that url try this: jdbc:oracle:thin:@oci8:1521:ora9i considering 'oci8' is your database server name and 'ora9i' is your Oracle's instance (service) name. Regards, Daniel Silva. --- Larry Meadors [EMAIL PROTECTED] wrote: It has been a while since i used oracle, but that url looks wrong: jdbc:oracle:thin:oci8:1521:ora9i Can you have thin and oci in one url? Larry [EMAIL PROTECTED] 03/25/04 4:10 AM Thanks chris, so this is not because of any missing classes or jar files? is this a connectivity issue? the database server isup and my other applications sqlplusw can access it. any pointers? sorry about read reciept thing in my previous mail. rajat - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 25, 2004 4:46 PM Subject: RE: db error Check your database is up before trying to connect to it. If it is and you can ping the database from your application server box, then check your spelling in the data source definition. Chris McCormack -Original Message- From: Rajat Pandit [mailto:[EMAIL PROTECTED] Sent: 25 March 2004 11:01 To: Struts Users Mailing List Subject: db error Hello All, i am trying to connect a oracle database, and i get this stack trace, can someone please tell me what is wrong with it. !-- stack trace -- javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j ava:1091) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93 4) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) !-- end of stack trace -- --- data sources -- data-sources !-- data-source type=org.apache.commons.dbcp.BasicDataSource -- data-source set-property property=driverClassName value=oracle.jdbc.driver.OracleDriver / set-property property=url value=jdbc:oracle:thin:oci8:1521:ora9i / set-property property=username value=*** / set-property property=password value=*** / set-property property=autoCommit value=true / set-property property=maxCount value=4 / set-property property=minCount value=2 / set-property property=validationQuery value=SELECT 1+1 from dual / /data-source /data-sources -- code -- ServletContext context = servlet.getServletContext(); DataSource ds = (DataSource) context.getAttribute(Action.DATA_SOURCE_KEY); //DataSource ds = getDataSource(req); try { conn = ds.getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery(Select tname
Re: Regarding Error in Validator - Urgent Help
Hi Ramachandran: Here's a suggestion: look at line number 63 of the servlet (in your work directory) generated by your first.jsp. See what the code there is and that may give you an idea of what's going wrong.. (seems like a null pointer somewhere, so try to see what may be null in that line of code ..) Regards, Geeta Ramachandran wrote: Root cause: java.lang.ExceptionInInitializerError at _0002ffirst_0002ejspfirst_jsp_0._jspService(_0002ffirst_0002ejspfirst_jsp_0. java:63) Caused by: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:577) at org.apache.struts.taglib.html.HtmlTag.(HtmlTag.java:96) ... 16 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation error in FormBean, where to redirect next?
Yes - Original Message - From: Marco Mistroni [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:51 AM Subject: validation error in FormBean, where to redirect next? Hi all, Assume that I have following struts-config.xml action path=/receiveLine type= ReceiveLineAction input=/receiveLine.jsp name=receiveLineForm scope=request forward name=failure path=/receiveLine.jsp /forward forward name=exitLine path=/receiveHeader.jsp /forward forward name=lineComplete path=/populateProduct.do /forward /action Now, I have ALWAYS assumed that if validation fails in the ReceiveLIneForm bean, I should be redirected to the input page, which is receiveLine.jsp Is my assumption correct? Regards] Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FileUploading Error
I am using Mozilla 1.2.1. via redhat. How can I see what is passed without doing an autopsy on the request handler? mas Andrew Hill wrote: Hmmm. Sounds rather like a browser issue to me. You might want to see what is actually being passed in that request - if its actually a valid multipart request or not! I had a try in IE, but IE's file selector is too smart to allow selection of a folder as the upload file. Which browser are you using? -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 February 2004 00:13 To: Struts Users Mailing List Subject: Re: FileUploading Error At 9:35 AM -0500 2/16/04, Mark Shifman wrote: In trying to bulletproof file uploading I noticed something odd. If I type some junk in the field for the file name and hit Submit, I get a file of size 0. I can deal with that. If I type in a directory name in my home directory (admittedly a dumb thing to type) nothing seems to happen and I get this error in my log file. ERROR 2004-02-13 14:09:18,679 handleRequest(CommonsMultipartRequestHandler.java:241) Failed to parse multipart request org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly ... This error seems to be thrown before it even gets to my UploadAction. How do I catch this and tell the user the file typed in is invalid? In Javascript, the value of the form field is the path to the file; you might be able to apply a mask validation testing for a reasonable filename -- this is far from perfect, but may help. I use this as a cheap way to get around the lack of support for the accepts attribute -- I test to see if the file has a right extension using the mask validator. Just one thought... Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FileUploading Error
At 9:35 AM -0500 2/16/04, Mark Shifman wrote: In trying to bulletproof file uploading I noticed something odd. If I type some junk in the field for the file name and hit Submit, I get a file of size 0. I can deal with that. If I type in a directory name in my home directory (admittedly a dumb thing to type) nothing seems to happen and I get this error in my log file. ERROR 2004-02-13 14:09:18,679 handleRequest(CommonsMultipartRequestHandler.java:241) Failed to parse multipart request org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly ... This error seems to be thrown before it even gets to my UploadAction. How do I catch this and tell the user the file typed in is invalid? In Javascript, the value of the form field is the path to the file; you might be able to apply a mask validation testing for a reasonable filename -- this is far from perfect, but may help. I use this as a cheap way to get around the lack of support for the accepts attribute -- I test to see if the file has a right extension using the mask validator. Just one thought... Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FileUploading Error
Hmmm. Sounds rather like a browser issue to me. You might want to see what is actually being passed in that request - if its actually a valid multipart request or not! I had a try in IE, but IE's file selector is too smart to allow selection of a folder as the upload file. Which browser are you using? -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 February 2004 00:13 To: Struts Users Mailing List Subject: Re: FileUploading Error At 9:35 AM -0500 2/16/04, Mark Shifman wrote: In trying to bulletproof file uploading I noticed something odd. If I type some junk in the field for the file name and hit Submit, I get a file of size 0. I can deal with that. If I type in a directory name in my home directory (admittedly a dumb thing to type) nothing seems to happen and I get this error in my log file. ERROR 2004-02-13 14:09:18,679 handleRequest(CommonsMultipartRequestHandler.java:241) Failed to parse multipart request org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly ... This error seems to be thrown before it even gets to my UploadAction. How do I catch this and tell the user the file typed in is invalid? In Javascript, the value of the form field is the path to the file; you might be able to apply a mask validation testing for a reasonable filename -- this is far from perfect, but may help. I use this as a cheap way to get around the lack of support for the accepts attribute -- I test to see if the file has a right extension using the mask validator. Just one thought... Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation error messages
in the resource file where the error message is defined use {0} to parametize it. eg address.invalid=Address {0} is not a valid email address. When you construct the actionError add the parameter to the constructor ie. new ActionError(address.invalid, address) Regards Steve -Original Message- From: Glenn, Scott [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 14:45 To: 'Struts Users Mailing List' Subject: Validation error messages I might be missing something obvious here, but is there an easy way to get the submitted value to become part of the your error message? So, for example, if the user enters abc in an email field, I'd like a message saying :- Address abc is not a valid email address. I can get this behaviour when I write my own custom validation routines, but what about the base Struts validation rules ... can they be configured to display the entered value, as opposed to a string from the AppResources bindle? Cheers, Scott. === This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation error messages
Thanks Steve, That's what I'm doing when I implement my own custom validation routines, but what about the standard Struts validation rules (which are implemented declaratively), so you don't explicitly create any ActionError objects?? For example, we might have a validation.xml snippet like:- form name=addRecipientForm field property=email depends=required, email arg0 key=admin.email.user/ /field /form which checks for a mandatory well formatted mail address. If you enter abc, Struts generates an ActionError object containing:- Recipient's email address is an invalid e-mail address (providing you have the following resources admin.email.pdf=Recipient's email address errors.email={0} is an invalid e-mail address. ) So I don't specifically create any ActionError objects . Is there no way I can declaratively (ie. in the validation.xml) inform the rule that I'd like the submitted value inserted rather than a textual string from the AppResources? Hope that explains the problem a little better Cheers, Scott. -Original Message- From: Hunt, Steve [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 15:49 To: 'Struts Users Mailing List' Subject: RE: Validation error messages in the resource file where the error message is defined use {0} to parametize it. eg address.invalid=Address {0} is not a valid email address. When you construct the actionError add the parameter to the constructor ie. new ActionError(address.invalid, address) Regards Steve -Original Message- From: Glenn, Scott [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 14:45 To: 'Struts Users Mailing List' Subject: Validation error messages I might be missing something obvious here, but is there an easy way to get the submitted value to become part of the your error message? So, for example, if the user enters abc in an email field, I'd like a message saying :- Address abc is not a valid email address. I can get this behaviour when I write my own custom validation routines, but what about the base Struts validation rules ... can they be configured to display the entered value, as opposed to a string from the AppResources bindle? Cheers, Scott. === This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation error messages
Scott, As long as the error message is set up as I said the validation framework should put the field name at the start of the message... But not the value in the field. so in your example below you might get an error message like; Email address is a required field if admin.email.user=Email address To explicitly get the value submitted into the error message I think you'd have to take a look at the validation framework code and modify that. Regards Steve -Original Message- From: Glenn, Scott [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 16:30 To: 'Struts Users Mailing List' Subject: RE: Validation error messages Thanks Steve, That's what I'm doing when I implement my own custom validation routines, but what about the standard Struts validation rules (which are implemented declaratively), so you don't explicitly create any ActionError objects?? For example, we might have a validation.xml snippet like:- form name=addRecipientForm field property=email depends=required, email arg0 key=admin.email.user/ /field /form which checks for a mandatory well formatted mail address. If you enter abc, Struts generates an ActionError object containing:- Recipient's email address is an invalid e-mail address (providing you have the following resources admin.email.pdf=Recipient's email address errors.email={0} is an invalid e-mail address. ) So I don't specifically create any ActionError objects . Is there no way I can declaratively (ie. in the validation.xml) inform the rule that I'd like the submitted value inserted rather than a textual string from the AppResources? Hope that explains the problem a little better Cheers, Scott. -Original Message- From: Hunt, Steve [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 15:49 To: 'Struts Users Mailing List' Subject: RE: Validation error messages in the resource file where the error message is defined use {0} to parametize it. eg address.invalid=Address {0} is not a valid email address. When you construct the actionError add the parameter to the constructor ie. new ActionError(address.invalid, address) Regards Steve -Original Message- From: Glenn, Scott [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 14:45 To: 'Struts Users Mailing List' Subject: Validation error messages I might be missing something obvious here, but is there an easy way to get the submitted value to become part of the your error message? So, for example, if the user enters abc in an email field, I'd like a message saying :- Address abc is not a valid email address. I can get this behaviour when I write my own custom validation routines, but what about the base Struts validation rules ... can they be configured to display the entered value, as opposed to a string from the AppResources bindle? Cheers, Scott. === This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation error messages
As long as the error message is set up as I said the validation framework should put the field name at the start of the message... But not the value in the field. so in your example below you might get an error message like; Email address is a required field [[SMG]] Yeah, that's exactly the behaviour I'm trying to avoid. It's easy enough to get the actual submitted value to be displayed, but it means writing (or possibly sub classing) your own validation methods, which I haven't really got time to do. Seems a shame there isn't a field name / field value option in the xml that you can just set to get the desired output. A future enhancement perhaps?
Re: Tomcat error
Just thought i'd add that this error might be something completey different and not necessarily the reason why Tomcat is throwing LifeCycle exceptions.. just i saw the error and put 2 and 2 together.. - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 02, 2004 6:04 PM Subject: Tomcat error I know this is the Struts mailing list but replies are nice and quick here that i'm gonna post my query to you guys (and gals) Tomcat keeps on throwing LifeCycle exception errors and produces this error in the log file: 2004-02-02 17:54:57 StandardManager[/ApplicationName] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.ja va:2423) at java.io.ObjectInputStream.skipCustomData(ObjectInputStream.java:1783) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1509) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1425) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1616) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) at org.apache.catalina.session.StandardSession.readObject(StandardSession.java: 1369) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.j ava:864) at org.apache.catalina.session.StandardManager.load(StandardManager.java:440) at org.apache.catalina.session.StandardManager.start(StandardManager.java:655) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2572) at org.apache.catalina.servlets.ManagerServlet.reload(ManagerServlet.java:802) at org.apache.catalina.servlets.HTMLManagerServlet.reload(HTMLManagerServlet.ja va:501) at org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.jav a:151) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(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.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:551) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(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.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(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.invok eNext(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:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:536) I'm guessing that this is because there are some non-serialized objects trying to be persisted in the session but its not allowing it
Re: Tomcat error with compiling JSPs
i see what you're saying, but I've got about 6 applications running on Tomcat on this server and they all work fine with no problems. This is the first time that this has occured so I'd really like to understand what could be causing this to happen. I'm assuming that it can't be anything coded into my servlets/classes as these are already complied and shouldn't be compiled by Tomcat when it's run, should they? I am using the getRealPath() method in my servlets but this is also true of my other applications. i cannot change the path of Tomcat because this application may well need to be installed on a server where we can't dictate the install path of Tomcat so this is not a solution. - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 12:11 PM Subject: RE: Tomcat error with compiling JSPs [javac] javac: invalid flag: C:\Program [javac] Usage: javac -- Try putting your tomcat install to c:\tomcat -Original Message- From: Claire Wall [mailto: Sent: 15 January 2004 12:07 To: Struts Users Mailing List Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2 93) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4 73) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 90) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(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.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(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:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline
Re: Tomcat error with compiling JSPs
This seems telling: [javac] javac: invalid flag: C:\Program It seems like some kind of path with a space in it is being passed to the compiler, but it is not being quoted properly. javac -classpath C:\Program Files\somelib\lib.jar ... (should be: javac -classpath C:\Program Files\somelib\lib.jar ...) However, I would kind of expect the error to be invalid flag: Files\somelib\lib.jar in that case, since the C:\Program part is before the space. Could you have some kind of funky classpath like C:\dir\lib.jar; C:\Program Files\poop\stuff.jar (note the space after the ';'). Are you setting the classpath for the server process yourself, perhaps by starting Tomcat using your own script (rather than startup.bat)? Or do you have some strange classpath in your environment before you start Tomcat? -Max - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:06 AM Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2 93) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4 73) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 90) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(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.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(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:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
Re: Tomcat error with compiling JSPs
the classpath of the server only points to the bin folder of the JDK. It still doesn't explain why this application isnt working and all of the rest are, since all our applications are installed via a WAR file and I do not change or set a class path for each application - I only change the paths that need to be changed in web.xml and struts-config.xml for the application. We have been developing this application on Tomcat on another server and it works fine. What reasons are there for the java compiler to not be able to compile JSP files for a particular application as this appears to be the problem. - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:31 PM Subject: Re: Tomcat error with compiling JSPs This seems telling: [javac] javac: invalid flag: C:\Program It seems like some kind of path with a space in it is being passed to the compiler, but it is not being quoted properly. javac -classpath C:\Program Files\somelib\lib.jar ... (should be: javac -classpath C:\Program Files\somelib\lib.jar ...) However, I would kind of expect the error to be invalid flag: Files\somelib\lib.jar in that case, since the C:\Program part is before the space. Could you have some kind of funky classpath like C:\dir\lib.jar; C:\Program Files\poop\stuff.jar (note the space after the ';'). Are you setting the classpath for the server process yourself, perhaps by starting Tomcat using your own script (rather than startup.bat)? Or do you have some strange classpath in your environment before you start Tomcat? -Max - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:06 AM Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2 93) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4 73) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 90) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
RE: Tomcat error with compiling JSPs
This is a known problem in some versions of Tomcat, due to a known problem in some versions of ANT, due to a known problem with command-line length on windows. It relates to the path length that is used by ANT when compiling your JSP. If the path is longer than the max, then the initial '' is there but the final one is chopped. So if you have spaces in the path it will fail as you say. We hit this bug too. My guess is you are using 4.1.24? (maybe 21/27 too, but it broke in 24 for me). Try 4.1.29 - that seems better (embeds a newer version of ANT), although I think theoretically its not entirely fixed. (I think they put quotes around each element, but that could still mean the path is chopped. Not sure on this though.) Your other apps worked because the their paths (e.g. package names) are shorter, or they depend on fewer 3rd party JARs. Hope this helps. Kev -Original Message- From: Claire Wall [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 12:53 To: Struts Users Mailing List Subject: Re: Tomcat error with compiling JSPs i see what you're saying, but I've got about 6 applications running on Tomcat on this server and they all work fine with no problems. This is the first time that this has occured so I'd really like to understand what could be causing this to happen. I'm assuming that it can't be anything coded into my servlets/classes as these are already complied and shouldn't be compiled by Tomcat when it's run, should they? I am using the getRealPath() method in my servlets but this is also true of my other applications. i cannot change the path of Tomcat because this application may well need to be installed on a server where we can't dictate the install path of Tomcat so this is not a solution. - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 12:11 PM Subject: RE: Tomcat error with compiling JSPs [javac] javac: invalid flag: C:\Program [javac] Usage: javac -- Try putting your tomcat install to c:\tomcat -Original Message- From: Claire Wall [mailto: Sent: 15 January 2004 12:07 To: Struts Users Mailing List Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.java:2 93) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.java:4 73) at org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:1 90) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:295
Re: Tomcat error with compiling JSPs
I ran into this exact error when I installed IBM JDK with Websphere and all of a sudden my JSP wouldnt compile on Tomcat What is your JAVA_HOME pointing to? Regards, -Martin - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 8:44 AM Subject: Re: Tomcat error with compiling JSPs the classpath of the server only points to the bin folder of the JDK. It still doesn't explain why this application isnt working and all of the rest are, since all our applications are installed via a WAR file and I do not change or set a class path for each application - I only change the paths that need to be changed in web.xml and struts-config.xml for the application. We have been developing this application on Tomcat on another server and it works fine. What reasons are there for the java compiler to not be able to compile JSP files for a particular application as this appears to be the problem. - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:31 PM Subject: Re: Tomcat error with compiling JSPs This seems telling: [javac] javac: invalid flag: C:\Program It seems like some kind of path with a space in it is being passed to the compiler, but it is not being quoted properly. javac -classpath C:\Program Files\somelib\lib.jar ... (should be: javac -classpath C:\Program Files\somelib\lib.jar ...) However, I would kind of expect the error to be invalid flag: Files\somelib\lib.jar in that case, since the C:\Program part is before the space. Could you have some kind of funky classpath like C:\dir\lib.jar; C:\Program Files\poop\stuff.jar (note the space after the ';'). Are you setting the classpath for the server process yourself, perhaps by starting Tomcat using your own script (rather than startup.bat)? Or do you have some strange classpath in your environment before you start Tomcat? -Max - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:06 AM Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2 93) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4 73) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 90) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295
Re: Tomcat error with compiling JSPs
sorry, i lied before - the JAVA_HOME variable is pointing to the bin folder of the JDK. we have just reinstalled Tomcat (4.1.2) again to a path that has no spaces and it now works. However, this doesnt solve the problem because as stated before, we cannot dictate what path our client has their tomcat installed in. - Original Message - From: Martin Gainty [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:43 PM Subject: Re: Tomcat error with compiling JSPs I ran into this exact error when I installed IBM JDK with Websphere and all of a sudden my JSP wouldnt compile on Tomcat What is your JAVA_HOME pointing to? Regards, -Martin - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 8:44 AM Subject: Re: Tomcat error with compiling JSPs the classpath of the server only points to the bin folder of the JDK. It still doesn't explain why this application isnt working and all of the rest are, since all our applications are installed via a WAR file and I do not change or set a class path for each application - I only change the paths that need to be changed in web.xml and struts-config.xml for the application. We have been developing this application on Tomcat on another server and it works fine. What reasons are there for the java compiler to not be able to compile JSP files for a particular application as this appears to be the problem. - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:31 PM Subject: Re: Tomcat error with compiling JSPs This seems telling: [javac] javac: invalid flag: C:\Program It seems like some kind of path with a space in it is being passed to the compiler, but it is not being quoted properly. javac -classpath C:\Program Files\somelib\lib.jar ... (should be: javac -classpath C:\Program Files\somelib\lib.jar ...) However, I would kind of expect the error to be invalid flag: Files\somelib\lib.jar in that case, since the C:\Program part is before the space. Could you have some kind of funky classpath like C:\dir\lib.jar; C:\Program Files\poop\stuff.jar (note the space after the ';'). Are you setting the classpath for the server process yourself, perhaps by starting Tomcat using your own script (rather than startup.bat)? Or do you have some strange classpath in your environment before you start Tomcat? -Max - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:06 AM Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print
Re: Tomcat error with compiling JSPs
we are using 4.1.24 and are pretty certain that what you say is exactly what is happening. The path that the app was installed in was quite long + then there's the package names on top of that and they are pretty lengthy too - up to 7 folders in depth. Thanks for your help! I'm going to try it out at home where I have 4.1.29 installed and see if this solves the problem, but I'm fairly sure that you're spot on. :) - Original Message - From: Kevin A. Palfreyman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:46 PM Subject: RE: Tomcat error with compiling JSPs This is a known problem in some versions of Tomcat, due to a known problem in some versions of ANT, due to a known problem with command-line length on windows. It relates to the path length that is used by ANT when compiling your JSP. If the path is longer than the max, then the initial '' is there but the final one is chopped. So if you have spaces in the path it will fail as you say. We hit this bug too. My guess is you are using 4.1.24? (maybe 21/27 too, but it broke in 24 for me). Try 4.1.29 - that seems better (embeds a newer version of ANT), although I think theoretically its not entirely fixed. (I think they put quotes around each element, but that could still mean the path is chopped. Not sure on this though.) Your other apps worked because the their paths (e.g. package names) are shorter, or they depend on fewer 3rd party JARs. Hope this helps. Kev -Original Message- From: Claire Wall [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 12:53 To: Struts Users Mailing List Subject: Re: Tomcat error with compiling JSPs i see what you're saying, but I've got about 6 applications running on Tomcat on this server and they all work fine with no problems. This is the first time that this has occured so I'd really like to understand what could be causing this to happen. I'm assuming that it can't be anything coded into my servlets/classes as these are already complied and shouldn't be compiled by Tomcat when it's run, should they? I am using the getRealPath() method in my servlets but this is also true of my other applications. i cannot change the path of Tomcat because this application may well need to be installed on a server where we can't dictate the install path of Tomcat so this is not a solution. - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 12:11 PM Subject: RE: Tomcat error with compiling JSPs [javac] javac: invalid flag: C:\Program [javac] Usage: javac -- Try putting your tomcat install to c:\tomcat -Original Message- From: Claire Wall [mailto: Sent: 15 January 2004 12:07 To: Struts Users Mailing List Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print a synopsis of standard options
Re: Tomcat error with compiling JSPs
I expect politicians to lie not engineers! *Glad that solved your problem* Martin - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 8:56 AM Subject: Re: Tomcat error with compiling JSPs sorry, i lied before - the JAVA_HOME variable is pointing to the bin folder of the JDK. we have just reinstalled Tomcat (4.1.2) again to a path that has no spaces and it now works. However, this doesnt solve the problem because as stated before, we cannot dictate what path our client has their tomcat installed in. - Original Message - From: Martin Gainty [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:43 PM Subject: Re: Tomcat error with compiling JSPs I ran into this exact error when I installed IBM JDK with Websphere and all of a sudden my JSP wouldnt compile on Tomcat What is your JAVA_HOME pointing to? Regards, -Martin - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 8:44 AM Subject: Re: Tomcat error with compiling JSPs the classpath of the server only points to the bin folder of the JDK. It still doesn't explain why this application isnt working and all of the rest are, since all our applications are installed via a WAR file and I do not change or set a class path for each application - I only change the paths that need to be changed in web.xml and struts-config.xml for the application. We have been developing this application on Tomcat on another server and it works fine. What reasons are there for the java compiler to not be able to compile JSP files for a particular application as this appears to be the problem. - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:31 PM Subject: Re: Tomcat error with compiling JSPs This seems telling: [javac] javac: invalid flag: C:\Program It seems like some kind of path with a space in it is being passed to the compiler, but it is not being quoted properly. javac -classpath C:\Program Files\somelib\lib.jar ... (should be: javac -classpath C:\Program Files\somelib\lib.jar ...) However, I would kind of expect the error to be invalid flag: Files\somelib\lib.jar in that case, since the C:\Program part is before the space. Could you have some kind of funky classpath like C:\dir\lib.jar; C:\Program Files\poop\stuff.jar (note the space after the ';'). Are you setting the classpath for the server process yourself, perhaps by starting Tomcat using your own script (rather than startup.bat)? Or do you have some strange classpath in your environment before you start Tomcat? -Max - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:06 AM Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride
RE: Tomcat error with compiling JSPs
I have mine installed and working fine with a CATALINA_HOME of D:\Program Files\Apache Group\Tomcat 4.1. I had trouble with the J2SDK and JASPER until I changed those environmental variables/paths to be the short names of the paths (i.e. without spaces). Those can be seen using the command dir /x from a command prompt window in Windows NT/ME/XP/etc. :) So, while my long path is: D:\Program Files\Apache Group\Tomcat 4.1 My short path for CATALONA_HOME is: d:\progra~1\apache~1\tomcat~1.1\ Regards, David -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 10:47 AM To: Struts Users Mailing List Subject: Re: Tomcat error with compiling JSPs I expect politicians to lie not engineers! *Glad that solved your problem* Martin - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 8:56 AM Subject: Re: Tomcat error with compiling JSPs sorry, i lied before - the JAVA_HOME variable is pointing to the bin folder of the JDK. we have just reinstalled Tomcat (4.1.2) again to a path that has no spaces and it now works. However, this doesnt solve the problem because as stated before, we cannot dictate what path our client has their tomcat installed in. - Original Message - From: Martin Gainty [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:43 PM Subject: Re: Tomcat error with compiling JSPs I ran into this exact error when I installed IBM JDK with Websphere and all of a sudden my JSP wouldnt compile on Tomcat What is your JAVA_HOME pointing to? Regards, -Martin - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 8:44 AM Subject: Re: Tomcat error with compiling JSPs the classpath of the server only points to the bin folder of the JDK. It still doesn't explain why this application isnt working and all of the rest are, since all our applications are installed via a WAR file and I do not change or set a class path for each application - I only change the paths that need to be changed in web.xml and struts-config.xml for the application. We have been developing this application on Tomcat on another server and it works fine. What reasons are there for the java compiler to not be able to compile JSP files for a particular application as this appears to be the problem. - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 1:31 PM Subject: Re: Tomcat error with compiling JSPs This seems telling: [javac] javac: invalid flag: C:\Program It seems like some kind of path with a space in it is being passed to the compiler, but it is not being quoted properly. javac -classpath C:\Program Files\somelib\lib.jar ... (should be: javac -classpath C:\Program Files\somelib\lib.jar ...) However, I would kind of expect the error to be invalid flag: Files\somelib\lib.jar in that case, since the C:\Program part is before the space. Could you have some kind of funky classpath like C:\dir\lib.jar; C:\Program Files\poop\stuff.jar (note the space after the ';'). Are you setting the classpath for the server process yourself, perhaps by starting Tomcat using your own script (rather than startup.bat)? Or do you have some strange classpath in your environment before you start Tomcat? -Max - Original Message - From: Claire Wall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:06 AM Subject: Tomcat error with compiling JSPs hi, I am trying to install my application on another server (Tomcat 4.1). I have built a WAR file from an ANT build file but when I install it on Tomcat and try to access it I get the following error: HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info
RE: Generic Error Handler
We generally map HTTP 400, 500, and 404 to an error handler action via the web.xml like so... error-page error-code500/error-code location/Error.do/location /error-page error-page error-code404/error-code location/InvalidUrl.do/location /error-page error-page error-code400/error-code location/InvalidUrl.do/location /error-page --Norm -- Norm Deane MIS Consultant Vanderbilt University (615) 322-7855 [EMAIL PROTECTED] -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 10:08 AM To: Struts Users Mailing List Subject: Generic Error Handler I searched the archives and I must have missed it. I want to have a generic JSP or Servlet get invoked when an error occurs in my application. For example, when I try to clink on a link on one of my pages I get an error message: HTTP Status 500 - No action instance for path /detailSearch could be created Looking at the logs it is obvious why there is an error (because I didn't create the org.jax.mgi.mtb.wi.actions.DetailSearchAction class). What is the best approach to handle this type of error? I tried adding the following to my struts-config.xml, but it is not going to the appError.jsp page. global-exceptions exception key=system.error type=java.lang.Exception path=/appError.jsp/ exception key=system.error type=java.lang.ClassNotFoundException path=/appError.jsp/ /global-exceptions What is the best way to handle this? What about other types of errors? Is there a rule of thumb that everyone follows? Sorry for the hopefully easy (probably already asked) question. Matt Here is an output of the logs: SEVERE: No action instance for path /detailSearch could be created java.lang.ClassNotFoundException: org.jax.mgi.mtb.wi.actions.DetailSearchAction at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC lassLoader.jav a:1366) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC lassLoader.jav a:1213) at org.apache.struts.util.RequestUtils.applicationClass(RequestUt ils.java:207) at org.apache.struts.util.RequestUtils.applicationInstance(Reques tUtils.java:23 1) at org.apache.struts.action.RequestProcessor.processActionCreate( RequestProcess or.java:326) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java:268) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.j ava:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:204) at org.jax.mgi.mtb.wi.filters.TimerFilter.doFilter(TimerFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.j ava:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:256) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(S tandardContext Valve.java:24 5) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(Stand ardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:564) at
RE: Generic Error Handler
Would this be better handled in the web.xml Matt -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:08 AM To: Struts Users Mailing List Subject: Generic Error Handler I searched the archives and I must have missed it. I want to have a generic JSP or Servlet get invoked when an error occurs in my application. For example, when I try to clink on a link on one of my pages I get an error message: HTTP Status 500 - No action instance for path /detailSearch could be created Looking at the logs it is obvious why there is an error (because I didn't create the org.jax.mgi.mtb.wi.actions.DetailSearchAction class). What is the best approach to handle this type of error? I tried adding the following to my struts-config.xml, but it is not going to the appError.jsp page. global-exceptions exception key=system.error type=java.lang.Exception path=/appError.jsp/ exception key=system.error type=java.lang.ClassNotFoundException path=/appError.jsp/ /global-exceptions What is the best way to handle this? What about other types of errors? Is there a rule of thumb that everyone follows? Sorry for the hopefully easy (probably already asked) question. Matt Here is an output of the logs: SEVERE: No action instance for path /detailSearch could be created java.lang.ClassNotFoundException: org.jax.mgi.mtb.wi.actions.DetailSearchAction at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1366) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1213) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207) at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:23 1) at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcess or.java:326) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:268) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.j ava:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.jax.mgi.mtb.wi.filters.TimerFilter.doFilter(TimerFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.j ava:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:24 5) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11P rotocol.java:696) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:677) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL
RE: Generic Error Handler
Matthew, What we do is define this in our web.xml file so that when the container gets a 500, 404, etc... error status code, I can then assign the appropriate Struts action to handle it. For example: error-page error-code500/error-code location/c/systemError/location /error-page error-page error-code404/error-code location/c/fileNotFoundError/location /error-page For application exceptions that occur in an action class, you could (as you have already mentioned) defined some general global exceptions handlers and then define more fine grained exception handlers as necessary (per action). hth, robert -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:08 AM To: Struts Users Mailing List Subject: Generic Error Handler I searched the archives and I must have missed it. I want to have a generic JSP or Servlet get invoked when an error occurs in my application. For example, when I try to clink on a link on one of my pages I get an error message: HTTP Status 500 - No action instance for path /detailSearch could be created Looking at the logs it is obvious why there is an error (because I didn't create the org.jax.mgi.mtb.wi.actions.DetailSearchAction class). What is the best approach to handle this type of error? I tried adding the following to my struts-config.xml, but it is not going to the appError.jsp page. global-exceptions exception key=system.error type=java.lang.Exception path=/appError.jsp/ exception key=system.error type=java.lang.ClassNotFoundException path=/appError.jsp/ /global-exceptions What is the best way to handle this? What about other types of errors? Is there a rule of thumb that everyone follows? Sorry for the hopefully easy (probably already asked) question. Matt Here is an output of the logs: SEVERE: No action instance for path /detailSearch could be created java.lang.ClassNotFoundException: org.jax.mgi.mtb.wi.actions.DetailSearchAction at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClass Loader.jav a:1366) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClass Loader.jav a:1213) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils. java:207) at org.apache.struts.util.RequestUtils.applicationInstance(RequestUti ls.java:23 1) at org.apache.struts.action.RequestProcessor.processActionCreate(Requ estProcess or.java:326) at org.apache.struts.action.RequestProcessor.process(RequestProcessor .java:268) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.j ava:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:204) at org.jax.mgi.mtb.wi.filters.TimerFilter.doFilter(TimerFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.j ava:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp erValve.ja va:256) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(Stand ardContext Valve.java:24 5) at org.apache.catalina.core.StandardContextValve.invoke(StandardConte xtValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv e.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv e.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine Valve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:151) at
Re: 403 error page not being displayed
Looks like Struts 1.1 sends a 400 and the current nightly sends a 403. Maybe it's a TC bug. Which version are you using? Quoting Matt Raible [EMAIL PROTECTED]: I have roles configured on my /editUser action mapping so that only administrator can access it. When I try to request the page as a user, I get the default 403 page from Tomcat, rather than my app's configured one. In web.xml, I have a number of error pages defined, and 404 works OK: error-page error-code500/error-code location/error.jsp/location /error-page error-page error-code400/error-code location/index.jsp/location /error-page error-page error-code403/error-code location/403.jsp/location /error-page error-page error-code404/error-code location/404.jsp/location /error-page In another application, that uses a very similar structure, when a 403 is returned the user sees nothing - they're just routed back to the welcome file of the app. The first app uses a Struts Nightly build from early December, the 2nd uses Struts 1.1. Any ideas why my 403.jsp error page isn't displaying? I can pull it up fine if I type in the URL. Thanks, Matt -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 403 error page not being displayed
Huh. Both 4.1.29 and 5.0.16 seem to work for 400 and 403 with a simple error-page test (no Struts involved). AFAIK, the roles check is performed within RequestProcessor.processRoles which just does an HttpServletResponse.sendError if the user in not in the required role. At that point, the container should take over, so I'm not sure why it's not working for you. Big help, eh? ;-) Quoting Kris Schneider [EMAIL PROTECTED]: Looks like Struts 1.1 sends a 400 and the current nightly sends a 403. Maybe it's a TC bug. Which version are you using? Quoting Matt Raible [EMAIL PROTECTED]: I have roles configured on my /editUser action mapping so that only administrator can access it. When I try to request the page as a user, I get the default 403 page from Tomcat, rather than my app's configured one. In web.xml, I have a number of error pages defined, and 404 works OK: error-page error-code500/error-code location/error.jsp/location /error-page error-page error-code400/error-code location/index.jsp/location /error-page error-page error-code403/error-code location/403.jsp/location /error-page error-page error-code404/error-code location/404.jsp/location /error-page In another application, that uses a very similar structure, when a 403 is returned the user sees nothing - they're just routed back to the welcome file of the app. The first app uses a Struts Nightly build from early December, the 2nd uses Struts 1.1. Any ideas why my 403.jsp error page isn't displaying? I can pull it up fine if I type in the URL. Thanks, Matt -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 403 error page not being displayed
I'm currently experiencing the issue with Tomcat 4.1.29, JDK 1.4.2 on Windows XP and Fedora Core 1. The header (from Mozilla) looks fine: HTTP/1.x 403 User is not authorized to access action /editUser Content-Type: text/html;charset=ISO-8859-1 Content-Language: en-US Transfer-Encoding: chunked Date: Thu, 08 Jan 2004 19:51:50 GMT Server: Apache-Coyote/1.1 After further review it looks like my Gzip CompressionFilter (http://tinyurl.com/25xva) is hosing things up - bout time I get a new one (http://tinyurl.com/3aaoy). Thanks, Matt -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 12:05 PM To: Struts Users Mailing List Subject: Re: 403 error page not being displayed Huh. Both 4.1.29 and 5.0.16 seem to work for 400 and 403 with a simple error-page test (no Struts involved). AFAIK, the roles check is performed within RequestProcessor.processRoles which just does an HttpServletResponse.sendError if the user in not in the required role. At that point, the container should take over, so I'm not sure why it's not working for you. Big help, eh? ;-) Quoting Kris Schneider [EMAIL PROTECTED]: Looks like Struts 1.1 sends a 400 and the current nightly sends a 403. Maybe it's a TC bug. Which version are you using? Quoting Matt Raible [EMAIL PROTECTED]: I have roles configured on my /editUser action mapping so that only administrator can access it. When I try to request the page as a user, I get the default 403 page from Tomcat, rather than my app's configured one. In web.xml, I have a number of error pages defined, and 404 works OK: error-page error-code500/error-code location/error.jsp/location /error-page error-page error-code400/error-code location/index.jsp/location /error-page error-page error-code403/error-code location/403.jsp/location /error-page error-page error-code404/error-code location/404.jsp/location /error-page In another application, that uses a very similar structure, when a 403 is returned the user sees nothing - they're just routed back to the welcome file of the app. The first app uses a Struts Nightly build from early December, the 2nd uses Struts 1.1. Any ideas why my 403.jsp error page isn't displaying? I can pull it up fine if I type in the URL. Thanks, Matt -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 403 error page not being displayed
OK, well that Filter isn't any better - anyone know how to get the HTTP_STATUS code so I can disable the filter when the error-code is 403? Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 1:14 PM To: 'Struts Users Mailing List' Subject: RE: 403 error page not being displayed I'm currently experiencing the issue with Tomcat 4.1.29, JDK 1.4.2 on Windows XP and Fedora Core 1. The header (from Mozilla) looks fine: HTTP/1.x 403 User is not authorized to access action /editUser Content-Type: text/html;charset=ISO-8859-1 Content-Language: en-US Transfer-Encoding: chunked Date: Thu, 08 Jan 2004 19:51:50 GMT Server: Apache-Coyote/1.1 After further review it looks like my Gzip CompressionFilter (http://tinyurl.com/25xva) is hosing things up - bout time I get a new one (http://tinyurl.com/3aaoy). Thanks, Matt -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 12:05 PM To: Struts Users Mailing List Subject: Re: 403 error page not being displayed Huh. Both 4.1.29 and 5.0.16 seem to work for 400 and 403 with a simple error-page test (no Struts involved). AFAIK, the roles check is performed within RequestProcessor.processRoles which just does an HttpServletResponse.sendError if the user in not in the required role. At that point, the container should take over, so I'm not sure why it's not working for you. Big help, eh? ;-) Quoting Kris Schneider [EMAIL PROTECTED]: Looks like Struts 1.1 sends a 400 and the current nightly sends a 403. Maybe it's a TC bug. Which version are you using? Quoting Matt Raible [EMAIL PROTECTED]: I have roles configured on my /editUser action mapping so that only administrator can access it. When I try to request the page as a user, I get the default 403 page from Tomcat, rather than my app's configured one. In web.xml, I have a number of error pages defined, and 404 works OK: error-page error-code500/error-code location/error.jsp/location /error-page error-page error-code400/error-code location/index.jsp/location /error-page error-page error-code403/error-code location/403.jsp/location /error-page error-page error-code404/error-code location/404.jsp/location /error-page In another application, that uses a very similar structure, when a 403 is returned the user sees nothing - they're just routed back to the welcome file of the app. The first app uses a Struts Nightly build from early December, the 2nd uses Struts 1.1. Any ideas why my 403.jsp error page isn't displaying? I can pull it up fine if I type in the URL. Thanks, Matt -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 403 error page not being displayed
I couldn't see any. But could you modify the GZIPResponseWrapper so that the sendError() or setStatus() methods can keep a copy of the status and add a getStatus() method so you can retrieve it later? Matt Raible wrote: OK, well that Filter isn't any better - anyone know how to get the HTTP_STATUS code so I can disable the filter when the error-code is 403? Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 1:14 PM To: 'Struts Users Mailing List' Subject: RE: 403 error page not being displayed I'm currently experiencing the issue with Tomcat 4.1.29, JDK 1.4.2 on Windows XP and Fedora Core 1. The header (from Mozilla) looks fine: HTTP/1.x 403 User is not authorized to access action /editUser Content-Type: text/html;charset=ISO-8859-1 Content-Language: en-US Transfer-Encoding: chunked Date: Thu, 08 Jan 2004 19:51:50 GMT Server: Apache-Coyote/1.1 After further review it looks like my Gzip CompressionFilter (http://tinyurl.com/25xva) is hosing things up - bout time I get a new one (http://tinyurl.com/3aaoy). Thanks, Matt -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 12:05 PM To: Struts Users Mailing List Subject: Re: 403 error page not being displayed Huh. Both 4.1.29 and 5.0.16 seem to work for 400 and 403 with a simple error-page test (no Struts involved). AFAIK, the roles check is performed within RequestProcessor.processRoles which just does an HttpServletResponse.sendError if the user in not in the required role. At that point, the container should take over, so I'm not sure why it's not working for you. Big help, eh? ;-) Quoting Kris Schneider [EMAIL PROTECTED]: Looks like Struts 1.1 sends a 400 and the current nightly sends a 403. Maybe it's a TC bug. Which version are you using? Quoting Matt Raible [EMAIL PROTECTED]: I have roles configured on my /editUser action mapping so that only administrator can access it. When I try to request the page as a user, I get the default 403 page from Tomcat, rather than my app's configured one. In web.xml, I have a number of error pages defined, and 404 works OK: error-page error-code500/error-code location/error.jsp/location /error-page error-page error-code400/error-code location/index.jsp/location /error-page error-page error-code403/error-code location/403.jsp/location /error-page error-page error-code404/error-code location/404.jsp/location /error-page In another application, that uses a very similar structure, when a 403 is returned the user sees nothing - they're just routed back to the welcome file of the app. The first app uses a Struts Nightly build from early December, the 2nd uses Struts 1.1. Any ideas why my 403.jsp error page isn't displaying? I can pull it up fine if I type in the URL. Thanks, Matt -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [other] error tag PS
Hi withbean:message key=card.title/ you can read messages from your properties file btw, If I get nothing back in JSP it's because I forget the taglibs... %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-bean prefix=bean % *** REPLY SEPARATOR *** On 22-12-2003 at 5:37 Jerald Powel wrote: it just occurrred to me, perhaps it may be due to the JSP: html:errors / as ActionMessages are not soley used for error handling? If this is the case, what error tag will extract the error labels defined in my Application.properties? thanks again G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [other] error tag
Jerald, The first parameter to ActionMessages.add() is a string interpreted to be either ActionMessages.GLOBAL_MESSAGE or a name of one of your form fields. If you had a field on your form that was named (i.e. property=...) username, then if you wished to add a message pertaining to this field, then you would write: messages.add(username, errorMsg). You're not getting any messages displayed probably because you don't have a form field with property=init_message. Cheers, Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 12:26 AM To: Struts Users Mailing List Subject: RE: [other] error tag Hi Noel, Thanks for that. Since that post, I have opted for constructing an ActionMessages object and populating it with ActionMessage (s). This being because I hear ActionError/s are deprecated as of Struts 1.2. I have set up the Application.properties file under WEB-INF/classes/resources containing: initialisation.error=Initialisation error - invalid UserID I catch the exception thus: ActionMessages messages = new ActionMessages(); ActionMessage errorMsg = new ActionMessage(initialisation.error); messages.add(init_message, errorMsg); saveMessages(request, messages); and forward off to the error page, but nothing is rendered. Any idea here? Perhaps something to do with the init_message string I am passing? What does that represent? appreciated G. Hi Jerald, The single-string ActionError class constructor that you are invoking interprets the parameter passed to it as a key of a message string defined in your Application.properties file (this file is usually placed under the classes/resources directory). HTH Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 9:45 PM To: Struts Users Mailing List Subject: [other] error tag Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate Error
Problem was resolved. but the reason was not exactly clear to me. What I am doing was: I was using the html:image tag of struts for replacement of html input type=image tag In this i was using html:image property=addButton value=continue srcKey=ask-question.button-submit.image altKey=ask-question.button-submit.alt border=0 / FYI -- I had this addButton declared in my Action Form. Actually I am having more then one image sumbit button in my form. when I removed the property attribute. it worked fine.. I think this was the reason... I don't know otherwise. Hope this may help others... -- Raman [EMAIL PROTECTED] - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 7:59 PM Subject: Re: BeanUtils.populate Error On 20 Dec 2003, at 11:28, Raman wrote: ya the properties are same both in bean and form... I have switched the validation off in cong file and on submitting the form same error is occuring. what can be the cause still not getting that My struts conf file is -- action path=/AskAQuestion type=actions.UpdateAskAQuestionAction attribute=askAQuestionForm This may be something new i dont know about but i've always used name=askAQuestionForm scope=request validate=false forward name=view path=ask-a-question/ /action action path=/UpdateAskAQuestion type=actions.UpdateAskAQuestionAction name=askAQuestionForm scope=request input=/AskAQuestion validate=false forward name=success path=/AskAQuestionList.do redirect=true/ /action action path=/AskAQuestionList type=actions.UpdateAskAQuestionAction scope=request parameter=List validate=false forward name=success path=ask-a-question-list/ /action -- Raman - Original Message - From: Firat TIRYAKI [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:20 PM Subject: Re: BeanUtils.populate Error check your form and bean properties, types, ... they have to be same... F. - Original Message - From: Raman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prope r tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: [other] error tag
Hi Jerald, The single-string ActionError class constructor that you are invoking interprets the parameter passed to it as a key of a message string defined in your Application.properties file (this file is usually placed under the classes/resources directory). HTH Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 9:45 PM To: Struts Users Mailing List Subject: [other] error tag Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried html:errors/ but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [other] error tag
Hi Noel, Thanks for that. Since that post, I have opted for constructing an ActionMessages object and populating it with ActionMessage (s). This being because I hear ActionError/s are deprecated as of Struts 1.2. I have set up the Application.properties file under WEB-INF/classes/resources containing: initialisation.error=Initialisation error - invalid UserID I catch the exception thus: ActionMessages messages = new ActionMessages(); ActionMessage errorMsg = new ActionMessage(initialisation.error); messages.add(init_message, errorMsg); saveMessages(request, messages); and forward off to the error page, but nothing is rendered. Any idea here? Perhaps something to do with the init_message string I am passing? What does that represent? appreciated G. Hi Jerald, The single-string ActionError class constructor that you are invoking interprets the parameter passed to it as a key of a message string defined in your Application.properties file (this file is usually placed under the classes/resources directory). HTH Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 9:45 PM To: Struts Users Mailing List Subject: [other] error tag Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
RE: [other] error tag PS
it just occurrred to me, perhaps it may be due to the JSP: html:errors / as ActionMessages are not soley used for error handling? If this is the case, what error tag will extract the error labels defined in my Application.properties? thanks again G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
Re: BeanUtils.populate Error
When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Proper tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate Error
Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Proper tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate Error
check your form and bean properties, types, ... they have to be same... F. - Original Message - From: Raman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Proper tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate Error
Try and switch stuff off and see if it breaks.. Switch the validate attribute to false in struts config and then you'll have a good idea something's up with validator or something else.. Like the dynaforms themselves.. Also when it it happening? When you submit a form? On 20 Dec 2003, at 10:41, Raman wrote: Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProc es sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prop er tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java: 846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProc es sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate Error
ya the properties are same both in bean and form... I have switched the validation off in cong file and on submitting the form same error is occuring. what can be the cause still not getting that My struts conf file is -- action path=/AskAQuestion type=actions.UpdateAskAQuestionAction attribute=askAQuestionForm scope=request validate=false forward name=view path=ask-a-question/ /action action path=/UpdateAskAQuestion type=actions.UpdateAskAQuestionAction name=askAQuestionForm scope=request input=/AskAQuestion validate=false forward name=success path=/AskAQuestionList.do redirect=true/ /action action path=/AskAQuestionList type=actions.UpdateAskAQuestionAction scope=request parameter=List validate=false forward name=success path=ask-a-question-list/ /action -- Raman - Original Message - From: Firat TIRYAKI [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:20 PM Subject: Re: BeanUtils.populate Error check your form and bean properties, types, ... they have to be same... F. - Original Message - From: Raman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Proper tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProces sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate Error
So are your form beans dyanaaction forms? On 20 Dec 2003, at 11:28, Raman wrote: ya the properties are same both in bean and form... I have switched the validation off in cong file and on submitting the form same error is occuring. what can be the cause still not getting that My struts conf file is -- action path=/AskAQuestion type=actions.UpdateAskAQuestionAction attribute=askAQuestionForm scope=request validate=false forward name=view path=ask-a-question/ /action action path=/UpdateAskAQuestion type=actions.UpdateAskAQuestionAction name=askAQuestionForm scope=request input=/AskAQuestion validate=false forward name=success path=/AskAQuestionList.do redirect=true/ /action action path=/AskAQuestionList type=actions.UpdateAskAQuestionAction scope=request parameter=List validate=false forward name=success path=ask-a-question-list/ /action -- Raman - Original Message - From: Firat TIRYAKI [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:20 PM Subject: Re: BeanUtils.populate Error check your form and bean properties, types, ... they have to be same... F. - Original Message - From: Raman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prope r tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate Error
On 20 Dec 2003, at 11:28, Raman wrote: ya the properties are same both in bean and form... I have switched the validation off in cong file and on submitting the form same error is occuring. what can be the cause still not getting that My struts conf file is -- action path=/AskAQuestion type=actions.UpdateAskAQuestionAction attribute=askAQuestionForm This may be something new i dont know about but i've always used name=askAQuestionForm scope=request validate=false forward name=view path=ask-a-question/ /action action path=/UpdateAskAQuestion type=actions.UpdateAskAQuestionAction name=askAQuestionForm scope=request input=/AskAQuestion validate=false forward name=success path=/AskAQuestionList.do redirect=true/ /action action path=/AskAQuestionList type=actions.UpdateAskAQuestionAction scope=request parameter=List validate=false forward name=success path=ask-a-question-list/ /action -- Raman - Original Message - From: Firat TIRYAKI [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:20 PM Subject: Re: BeanUtils.populate Error check your form and bean properties, types, ... they have to be same... F. - Original Message - From: Raman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) -- --- root cause java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prope r tyUtils.java:816) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:846) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProce s sor.java:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FormBean error using Struts 1.1 and Tomcat 5
Forget it, guys, I called an exorsist and a vodoo-specialist, who told me to install Tomcat 5.0.16, and now it works. John Ferguson Smart wrote: Anyone got any ideas ? John Ferguson Smart wrote: Hi, I've run into a strange problem using Struts 1.1 with Tomcat 5.0.14 . In a page that previously worked fine (of course...), I now get a JSP page displays the following message : [ServletException in:/admin/tiles/welcomeBody.jsp] Exception creating bean of class com.wakaleo.webcat.auth.LogonForm: {1} The strange thing is, I'm not working on the user interface at the moment, so I don't see what could have changed. From what I can gather from the source code, Struts calls the RequestUtils.applicationInstance() method to instanciate an instance of the form bean, and then exploses (see the stack dump below). Tomcat (?) doesn't seem to be able to find some of the Struts classes (ActionForm, ActionErrors,...). I get the same thing with any other Struts forms, but, strangely enough, the bits of the site that don't use the html:form tag seem to work as excepted (they do use Tiles and JSTL, though). I also have no idea what on earth Tomcat is trying to compile This one's got me stumped. Any ideas ? STACK DUMP : GRAVE: Error creating form bean of class com.wakaleo.webcat.auth.LogonForm java.lang.Error: Unresolved compilation problems: The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved ActionForm cannot be resolved or is not a valid superclass ActionErrors cannot be resolved (or is not a valid return type) for the method validate ActionMapping cannot be resolved (or is not a valid type) for the argume nt mapping of the method validate ActionErrors cannot be resolved or is not a type ActionErrors cannot be resolved or is not a type ActionError cannot be resolved or is not a type ActionError cannot be resolved or is not a type ActionError cannot be resolved or is not a type at com.wakaleo.webcat.auth.LogonForm.init(LogonForm.java:14) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct orAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils. java:231) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.jav a:837) at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:552) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520) ... TAGLIB WHICH EXPLOSES (works fine if I replace all this with 'HELLO WORLD') : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %@ taglib uri=http://jakarta.apache.org/taglibs/log-1.0; prefix=log % %@ taglib tagdir=/WEB-INF/tags/util prefix=util % %-- Login form --% table class=infoFrame cellpadding=0 cellspacing=0 width=100% %-- Box Heading --% util:boxed_heading titleKey=admin.home.login.title / tr class=infoList td colspan=3 align=center colspan=3 table class=infoListFrame cellpadding=0 cellspacing=5 width=100% html:form action=/admin/LogonSubmit tr class=infoList td class=newsDetails fmt:message key=admin.home.login.description / /td /tr tr class=infoListth align=leftfmt:message key=admin.home.login.login //th/tr tr class=infoListtdhtml:text property=username //td/tr html:errors property=username / tr class=infoListth align=leftfmt:message key=admin.home.login.account //th/tr tr class=infoListtdhtml:text property=account //td/tr html:errors property=account / tr class=infoListth align=leftfmt:message key=admin.home.login.password //th/tr tr class=infoListtdhtml:password property=password //td/tr html:errors property=password / tr class=infoList td align=left width=116 height=23 input value='submit' border='0' src='html:rewrite page=/admin/images/btn_ok.gif/' name='submit' type='image' /td /tr html:errors property=org.apache.struts.action.GLOBAL_MESSAGE / /html:form /table /td /tr /table %-- End Login form --% FORM-BEAN in struts-config.xml : form-bean name=logonForm
Re: FormBean error using Struts 1.1 and Tomcat 5
Anyone got any ideas ? John Ferguson Smart wrote: Hi, I've run into a strange problem using Struts 1.1 with Tomcat 5.0.14 . In a page that previously worked fine (of course...), I now get a JSP page displays the following message : [ServletException in:/admin/tiles/welcomeBody.jsp] Exception creating bean of class com.wakaleo.webcat.auth.LogonForm: {1} The strange thing is, I'm not working on the user interface at the moment, so I don't see what could have changed. From what I can gather from the source code, Struts calls the RequestUtils.applicationInstance() method to instanciate an instance of the form bean, and then exploses (see the stack dump below). Tomcat (?) doesn't seem to be able to find some of the Struts classes (ActionForm, ActionErrors,...). I get the same thing with any other Struts forms, but, strangely enough, the bits of the site that don't use the html:form tag seem to work as excepted (they do use Tiles and JSTL, though). I also have no idea what on earth Tomcat is trying to compile This one's got me stumped. Any ideas ? STACK DUMP : GRAVE: Error creating form bean of class com.wakaleo.webcat.auth.LogonForm java.lang.Error: Unresolved compilation problems: The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved ActionForm cannot be resolved or is not a valid superclass ActionErrors cannot be resolved (or is not a valid return type) for the method validate ActionMapping cannot be resolved (or is not a valid type) for the argume nt mapping of the method validate ActionErrors cannot be resolved or is not a type ActionErrors cannot be resolved or is not a type ActionError cannot be resolved or is not a type ActionError cannot be resolved or is not a type ActionError cannot be resolved or is not a type at com.wakaleo.webcat.auth.LogonForm.init(LogonForm.java:14) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct orAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils. java:231) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.jav a:837) at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:552) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520) ... TAGLIB WHICH EXPLOSES (works fine if I replace all this with 'HELLO WORLD') : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %@ taglib uri=http://jakarta.apache.org/taglibs/log-1.0; prefix=log % %@ taglib tagdir=/WEB-INF/tags/util prefix=util % %-- Login form --% table class=infoFrame cellpadding=0 cellspacing=0 width=100% %-- Box Heading --% util:boxed_heading titleKey=admin.home.login.title / tr class=infoList td colspan=3 align=center colspan=3 table class=infoListFrame cellpadding=0 cellspacing=5 width=100% html:form action=/admin/LogonSubmit tr class=infoList td class=newsDetails fmt:message key=admin.home.login.description / /td /tr tr class=infoListth align=leftfmt:message key=admin.home.login.login //th/tr tr class=infoListtdhtml:text property=username //td/tr html:errors property=username / tr class=infoListth align=leftfmt:message key=admin.home.login.account //th/tr tr class=infoListtdhtml:text property=account //td/tr html:errors property=account / tr class=infoListth align=leftfmt:message key=admin.home.login.password //th/tr tr class=infoListtdhtml:password property=password //td/tr html:errors property=password / tr class=infoList td align=left width=116 height=23 input value='submit' border='0' src='html:rewrite page=/admin/images/btn_ok.gif/' name='submit' type='image' /td /tr html:errors property=org.apache.struts.action.GLOBAL_MESSAGE / /html:form /table /td /tr /table %-- End Login form --% FORM-BEAN in struts-config.xml : form-bean name=logonForm type=com.wakaleo.webcat.auth.LogonForm/ (And, yes, LogonForm is derived from ActionForm). -- John Ferguson Smart, PhD Directeur de Projet Département informatique
Re: FormBean error using Struts 1.1 and Tomcat 5
Couple of questions: Are the Struts and supporting JAR files installed in your app's WEB-INF/lib or someplace else like $CATALINA_HOME/common/lib? Are you intentionally using JSTL 1.0? With TC 5, you probably want JSTL 1.1. How are you doing your deployment/update? For example, are you copying WAR files or using TC Ant tasks or...? Quoting John Ferguson Smart [EMAIL PROTECTED]: Anyone got any ideas ? John Ferguson Smart wrote: Hi, I've run into a strange problem using Struts 1.1 with Tomcat 5.0.14 . In a page that previously worked fine (of course...), I now get a JSP page displays the following message : [ServletException in:/admin/tiles/welcomeBody.jsp] Exception creating bean of class com.wakaleo.webcat.auth.LogonForm: {1} The strange thing is, I'm not working on the user interface at the moment, so I don't see what could have changed. From what I can gather from the source code, Struts calls the RequestUtils.applicationInstance() method to instanciate an instance of the form bean, and then exploses (see the stack dump below). Tomcat (?) doesn't seem to be able to find some of the Struts classes (ActionForm, ActionErrors,...). I get the same thing with any other Struts forms, but, strangely enough, the bits of the site that don't use the html:form tag seem to work as excepted (they do use Tiles and JSTL, though). I also have no idea what on earth Tomcat is trying to compile This one's got me stumped. Any ideas ? STACK DUMP : GRAVE: Error creating form bean of class com.wakaleo.webcat.auth.LogonForm java.lang.Error: Unresolved compilation problems: The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved The import org.apache.struts cannot be resolved ActionForm cannot be resolved or is not a valid superclass ActionErrors cannot be resolved (or is not a valid return type) for the method validate ActionMapping cannot be resolved (or is not a valid type) for the argume nt mapping of the method validate ActionErrors cannot be resolved or is not a type ActionErrors cannot be resolved or is not a type ActionError cannot be resolved or is not a type ActionError cannot be resolved or is not a type ActionError cannot be resolved or is not a type at com.wakaleo.webcat.auth.LogonForm.init(LogonForm.java:14) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct orAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils. java:231) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.jav a:837) at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:552) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520) ... TAGLIB WHICH EXPLOSES (works fine if I replace all this with 'HELLO WORLD') : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %@ taglib uri=http://jakarta.apache.org/taglibs/log-1.0; prefix=log % %@ taglib tagdir=/WEB-INF/tags/util prefix=util % %-- Login form --% table class=infoFrame cellpadding=0 cellspacing=0 width=100% %-- Box Heading --% util:boxed_heading titleKey=admin.home.login.title / tr class=infoList td colspan=3 align=center colspan=3 table class=infoListFrame cellpadding=0 cellspacing=5 width=100% html:form action=/admin/LogonSubmit tr class=infoList td class=newsDetails fmt:message key=admin.home.login.description / /td /tr tr class=infoListth align=leftfmt:message key=admin.home.login.login //th/tr tr class=infoListtdhtml:text property=username //td/tr html:errors property=username / tr class=infoListth align=leftfmt:message key=admin.home.login.account //th/tr tr class=infoListtdhtml:text property=account //td/tr html:errors property=account / tr class=infoListth align=leftfmt:message key=admin.home.login.password //th/tr tr class=infoListtdhtml:password property=password //td/tr html:errors property=password / tr class=infoList td
RE: Requiredif error?
Try var-namefieldTest[0]/var-name -Original Message- From: Greg Hess [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 12:21 PM To: Struts Subject: Requiredif error? Hi All, I get the following error when I submit my form using the requiredif: 25 Oct 2003 12:03:13,311 - ERROR org.apache.commons.validator.Validator - reflection: null java.lang.reflect.InvocationTargetException 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:324) at org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:454) at org.apache.commons.validator.Validator.validateField(Validator.java:544) at org.apache.commons.validator.Validator.validate(Validator.java:582) at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152) at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) 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:165) at javax.servlet.http.HttpServlet.service(HttpServlet.java:103) at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96) at com.caucho.http.security.SecurityFilter.doFilter(SecurityFilter.java:115) at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:536) Caused by: java.lang.NullPointerException at org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldChecks.java:200) ... 23 more My config is good: form name=archiveRestoreForm field property=archive depends=requiredif arg0 key=archiveRestoreForm.archiveFile/ var var-namefield[0]/var-name var-valueevent/var-value /var var var-namefield-test[0]/var-name var-valueNOTNULL/var-value /var /field /form If I switch the rule to required all is well. Any help is much appreciated. Greg Hess Software Engineer Wrapped Apps Corporation 275 Michael Cowpland Dr. Suite 201 Ottawa, Ontario K2M 2G2 Tel: (613) 591 -7552 Fax: (613) 591-0523 1 (877) 388-6742 www.wrappedapps.com http://www.wrappedapps.com
Re: Multiple error pages from validate method
Here's one hacky way of doing this: Set a request attribute, something like goToErrorPage2 right after you validate. On the top of the error page if that attribute goToErrorPage2 is nonnull, then forward to the second error page else simply render the normal error page.. [EMAIL PROTECTED] wrote: Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter? Can somebody help?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple error pages from validate method
Thanks geeta! Yes that might be a roundabout way of doing it.Lemme try! Geeta Ramani [EMAIL PROTECTED] 10/24/2003 02:36 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multiple error pages from validate method Here's one hacky way of doing this: Set a request attribute, something like goToErrorPage2 right after you validate. On the top of the error page if that attribute goToErrorPage2 is nonnull, then forward to the second error page else simply render the normal error page.. [EMAIL PROTECTED] wrote: Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter? Can somebody help?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple error pages from validate method
Here's another way that I can think of: I'm assuming you will have 2 actions (one for add and one for edit) or a single action that uses a lookupdispatch add/edit handling. In either case don't have validate=true in your struts-config but rather do the validation from your action method: public ActionForward addAction() { ActionErrors errors = myBean.validate(...); if( errors != null !errors.isEmpty()) { return aMapping.findForward(ERROR_PAGE_ADD); } } Do the same for edit. Of course there are a lot of other ways to do this as well. -Tim -Original Message- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 3:36 PM To: Struts Users Mailing List Subject: Re: Multiple error pages from validate method Here's one hacky way of doing this: Set a request attribute, something like goToErrorPage2 right after you validate. On the top of the error page if that attribute goToErrorPage2 is nonnull, then forward to the second error page else simply render the normal error page.. [EMAIL PROTECTED] wrote: Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter? Can somebody help?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple error pages from validate method
Thanks Tim.This too makes good sense..thanks Chen, Gin [EMAIL PROTECTED] 10/24/2003 02:45 PM Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:RE: Multiple error pages from validate method Here's another way that I can think of: I'm assuming you will have 2 actions (one for add and one for edit) or a single action that uses a lookupdispatch add/edit handling. In either case don't have validate=true in your struts-config but rather do the validation from your action method: public ActionForward addAction() { ActionErrors errors = myBean.validate(...); if( errors != null !errors.isEmpty()) { return aMapping.findForward(ERROR_PAGE_ADD); } } Do the same for edit. Of course there are a lot of other ways to do this as well. -Tim -Original Message- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 3:36 PM To: Struts Users Mailing List Subject: Re: Multiple error pages from validate method Here's one hacky way of doing this: Set a request attribute, something like goToErrorPage2 right after you validate. On the top of the error page if that attribute goToErrorPage2 is nonnull, then forward to the second error page else simply render the normal error page.. [EMAIL PROTECTED] wrote: Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter? Can somebody help?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple error pages from validate method
Ah! I was assuming that the original poster was validating in the form bean..:) Chen, Gin wrote: Here's another way that I can think of: I'm assuming you will have 2 actions (one for add and one for edit) or a single action that uses a lookupdispatch add/edit handling. In either case don't have validate=true in your struts-config but rather do the validation from your action method: public ActionForward addAction() { ActionErrors errors = myBean.validate(...); if( errors != null !errors.isEmpty()) { return aMapping.findForward(ERROR_PAGE_ADD); } } Do the same for edit. Of course there are a lot of other ways to do this as well. -Tim -Original Message- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 3:36 PM To: Struts Users Mailing List Subject: Re: Multiple error pages from validate method Here's one hacky way of doing this: Set a request attribute, something like goToErrorPage2 right after you validate. On the top of the error page if that attribute goToErrorPage2 is nonnull, then forward to the second error page else simply render the normal error page.. [EMAIL PROTECTED] wrote: Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter? Can somebody help?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple error pages from validate method
The input page is specified in the action mapping. Use separate action mappings for each input page (add.jsp and edit.jsp). You can use the same Action class for both. -Max - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 24, 2003 12:15 PM Subject: Multiple error pages from validate method Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter? Can somebody help?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts error on console screen.
this is not an error message, but an information message!! It informs you that the MessageResources are being configured from your file org.apache.struts.action.ActionResources, and that if there is no message for the key you ask for, null will be returned. Hope it helps! Caroline Does anybody have an idea on following error? [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true I am getting this error on console. Regards, Viral -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts error on console screen.
Thanks Caroline for the info -Original Message- From: Caroline Lauferon [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 6:15 PM To: Struts Users Mailing List Subject: Re: struts error on console screen. this is not an error message, but an information message!! It informs you that the MessageResources are being configured from your file org.apache.struts.action.ActionResources, and that if there is no message for the key you ask for, null will be returned. Hope it helps! Caroline Does anybody have an idea on following error? [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true I am getting this error on console. Regards, Viral -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No Error Message But A Blank Page Is Displayed.
My welcome page is displayed as the very first screen without any problem. The page has logic:present and logic:notPresent tags, which test if any registered user has logged on. The problem occurred after I filled out username, and clicked the Submit button. Thereafter, the welcome page was not shown. My welcome page looks like the following: Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % HTML HEAD TITLEWelcome!/TITLE html:base/ /HEAD BODY logic:present name=user H3Welcome bean:write name=user property=username/!/H3 /logic:present logic:notPresent scope=session name=user H3Welcome World!/H3 /logic:notPresent html:errors/ UL LIhtml:link forward=logonSign in/html:link/LI logic:present name=user LIhtml:link forward=logoffSign out/html:link/LI /logic:present /UL IMG src='struts-power.gif' alt='Powered by Struts' /BODY /HTML --- Kwok Peng Tuck [EMAIL PROTECTED] wrote: You might want to put System.out.println(Line [number]) ; to see the flow in your action. BTW did you actually put anything(like hello world) in Welcome.jsp ? Caroline Jen wrote: Which resource file needs to be updated? I have checked the application.properties. Nothing in that file is relevant to my problem. --- Abhijeet Mahalkar [EMAIL PROTECTED] wrote: have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
Re: No Error Message But A Blank Page Is Displayed.
Your missing html:form My welcome page is displayed as the very first screen without any problem. The page has logic:present and logic:notPresent tags, which test if any registered user has logged on. The problem occurred after I filled out username, and clicked the Submit button. Thereafter, the welcome page was not shown. My welcome page looks like the following: Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % HTML HEAD TITLEWelcome!/TITLE html:base/ /HEAD BODY logic:present name=user H3Welcome bean:write name=user property=username/!/H3 /logic:present logic:notPresent scope=session name=user H3Welcome World!/H3 /logic:notPresent html:errors/ UL LIhtml:link forward=logonSign in/html:link/LI logic:present name=user LIhtml:link forward=logoffSign out/html:link/LI /logic:present /UL IMG src='struts-power.gif' alt='Powered by Struts' /BODY /HTML --- Kwok Peng Tuck [EMAIL PROTECTED] wrote: You might want to put System.out.println(Line [number]) ; to see the flow in your action. BTW did you actually put anything(like hello world) in Welcome.jsp ? Caroline Jen wrote: Which resource file needs to be updated? I have checked the application.properties. Nothing in that file is relevant to my problem. --- Abhijeet Mahalkar [EMAIL PROTECTED] wrote: have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest
Re: No Error Message But A Blank Page Is Displayed.
You're missing html:form My welcome page is displayed as the very first screen without any problem. The page has logic:present and logic:notPresent tags, which test if any registered user has logged on. The problem occurred after I filled out username, and clicked the Submit button. Thereafter, the welcome page was not shown. My welcome page looks like the following: Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % HTML HEAD TITLEWelcome!/TITLE html:base/ /HEAD BODY logic:present name=user H3Welcome bean:write name=user property=username/!/H3 /logic:present logic:notPresent scope=session name=user H3Welcome World!/H3 /logic:notPresent html:errors/ UL LIhtml:link forward=logonSign in/html:link/LI logic:present name=user LIhtml:link forward=logoffSign out/html:link/LI /logic:present /UL IMG src='struts-power.gif' alt='Powered by Struts' /BODY /HTML --- Kwok Peng Tuck [EMAIL PROTECTED] wrote: You might want to put System.out.println(Line [number]) ; to see the flow in your action. BTW did you actually put anything(like hello world) in Welcome.jsp ? Caroline Jen wrote: Which resource file needs to be updated? I have checked the application.properties. Nothing in that file is relevant to my problem. --- Abhijeet Mahalkar [EMAIL PROTECTED] wrote: have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest
RE: No Error Message But A Blank Page Is Displayed.
I would want to see your web.xml, and any information that shows up in the Tomcat console (not log file). -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50 E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Obtain username and password from web tier String username = ((LogonForm) form).getUsername(); String password = ((LogonForm) form).getPassword(); // Validate credentials with business tier boolean validated = false; try { validated = isUserLogon(username,password); } catch (UserDirectoryException ude) { // couldn't connect to user directory ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.connect)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } if (!validated) { // credentials don't match ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.invalid)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } // Save our logged-in user in the session, // because we use it again later. HttpSession session = request.getSession(); session.setAttribute(Constants.USER_KEY, form); // Log this event, if appropriate
RE: No Error Message But A Blank Page Is Displayed.
I have seen this behavior when the jsp page I am forwarding to is not found such as in wrong location, wrong case (Welcome.jsp vs welcome.jsp). But we are using tiles so not sure if it is tiles specific or not. Hope this helps. [EMAIL PROTECTED] 09/30/03 10:28AM I would want to see your web.xml, and any information that shows up in the Tomcat console (not log file). -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50 E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Obtain username and password from web tier String username = ((LogonForm) form).getUsername(); String password = ((LogonForm) form).getPassword(); // Validate credentials with business tier boolean validated = false; try { validated = isUserLogon(username,password); } catch (UserDirectoryException ude) { // couldn't connect to user directory ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.connect)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } if (!validated) { // credentials don't match ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.invalid)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput()));
RE: No Error Message But A Blank Page Is Displayed.
In my experience, this is because your execute/perform is returning null as the result of findForward(forwardname) not finding anything. Usually, this is because I misspelled the forward name. Returning null from execute/perform tells struts that your method wrote the response itself. Regards, Â Rich -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 3:05 AM To: Struts Users Mailing List Subject: Re: No Error Message But A Blank Page Is Displayed. Your missing html:form My welcome page is displayed as the very first screen without any problem. The page has logic:present and logic:notPresent tags, which test if any registered user has logged on. The problem occurred after I filled out username, and clicked the Submit button. Thereafter, the welcome page was not shown. My welcome page looks like the following: Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % HTML HEAD TITLEWelcome!/TITLE html:base/ /HEAD BODY logic:present name=user H3Welcome bean:write name=user property=username/!/H3 /logic:present logic:notPresent scope=session name=user H3Welcome World!/H3 /logic:notPresent html:errors/ UL LIhtml:link forward=logonSign in/html:link/LI logic:present name=user LIhtml:link forward=logoffSign out/html:link/LI /logic:present /UL IMG src='struts-power.gif' alt='Powered by Struts' /BODY /HTML --- Kwok Peng Tuck [EMAIL PROTECTED] wrote: You might want to put System.out.println(Line [number]) ; to see the flow in your action. BTW did you actually put anything(like hello world) in Welcome.jsp ? Caroline Jen wrote: Which resource file needs to be updated? I have checked the application.properties. Nothing in that file is relevant to my problem. --- Abhijeet Mahalkar [EMAIL PROTECTED] wrote: have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import
RE: No Error Message But A Blank Page Is Displayed.
I am very grateful for the overwhelming help that I have received. I followed the advices given by all of you and paid special attention to possible mis-spelling in forward mapping. I did not find any mis-spelling or mixing up of lower case/upper case. Finally, I re-typed all the key words in the forward mapping parts of the program. Everything worked - I got the expected page displayed in the browser. I still do not have any idea why I got a blank page last night. I would be more than happy to share my experience with all of you if I knew the root cause of the problem. But, I do not know. -Caroline --- Richard J. Duncan [EMAIL PROTECTED] wrote: In my experience, this is because your execute/perform is returning null as the result of findForward(forwardname) not finding anything. Usually, this is because I misspelled the forward name. Returning null from execute/perform tells struts that your method wrote the response itself. Regards, Â Rich -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 3:05 AM To: Struts Users Mailing List Subject: Re: No Error Message But A Blank Page Is Displayed. Your missing html:form My welcome page is displayed as the very first screen without any problem. The page has logic:present and logic:notPresent tags, which test if any registered user has logged on. The problem occurred after I filled out username, and clicked the Submit button. Thereafter, the welcome page was not shown. My welcome page looks like the following: Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % HTML HEAD TITLEWelcome!/TITLE html:base/ /HEAD BODY logic:present name=user H3Welcome bean:write name=user property=username/!/H3 /logic:present logic:notPresent scope=session name=user H3Welcome World!/H3 /logic:notPresent html:errors/ UL LIhtml:link forward=logonSign in/html:link/LI logic:present name=user LIhtml:link forward=logoffSign out/html:link/LI /logic:present /UL IMG src='struts-power.gif' alt='Powered by Struts' /BODY /HTML --- Kwok Peng Tuck [EMAIL PROTECTED] wrote: You might want to put System.out.println(Line [number]) ; to see the flow in your action. BTW did you actually put anything(like hello world) in Welcome.jsp ? Caroline Jen wrote: Which resource file needs to be updated? I have checked the application.properties. Nothing in that file is relevant to my problem. --- Abhijeet Mahalkar [EMAIL PROTECTED] wrote: have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have
Re: No Error Message But A Blank Page Is Displayed.
have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Obtain username and password from web tier String username = ((LogonForm) form).getUsername(); String password = ((LogonForm) form).getPassword(); // Validate credentials with business tier boolean validated = false; try { validated = isUserLogon(username,password); } catch (UserDirectoryException ude) { // couldn't connect to user directory ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.connect)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } if (!validated) { // credentials don't match ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.invalid)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } // Save our logged-in user in the session, // because we use it again later. HttpSession session = request.getSession(); session.setAttribute(Constants.USER_KEY, form); // Log this event, if appropriate if (servlet.getDebug() = Constants.DEBUG) { StringBuffer message =
Re: No Error Message But A Blank Page Is Displayed.
Which resource file needs to be updated? I have checked the application.properties. Nothing in that file is relevant to my problem. --- Abhijeet Mahalkar [EMAIL PROTECTED] wrote: have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Obtain username and password from web tier String username = ((LogonForm) form).getUsername(); String password = ((LogonForm) form).getPassword(); // Validate credentials with business tier boolean validated = false; try { validated = isUserLogon(username,password); } catch (UserDirectoryException ude) { // couldn't connect to user directory ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.connect)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } if (!validated) { // credentials don't match ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.invalid)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); }
Re: No Error Message But A Blank Page Is Displayed.
You might want to put System.out.println(Line [number]) ; to see the flow in your action. BTW did you actually put anything(like hello world) in Welcome.jsp ? Caroline Jen wrote: Which resource file needs to be updated? I have checked the application.properties. Nothing in that file is relevant to my problem. --- Abhijeet Mahalkar [EMAIL PROTECTED] wrote: have u updated the Resource files... ? abhijeet - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:45 AM Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Obtain username and password from web tier String username = ((LogonForm) form).getUsername(); String password = ((LogonForm) form).getPassword(); // Validate credentials with business tier boolean validated = false; try { validated = isUserLogon(username,password); } catch (UserDirectoryException ude) { // couldn't connect to user directory ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.connect)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } if (!validated) { // credentials don't match ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.invalid)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } // Save our
RE: No Error Message But A Blank Page Is Displayed.
I'm not sure where in your scenario the error was supposed to occur. I would suggest just right clicking on the blank page and see what the src holds. If you change the last line to: ActionForward valForward = mapping.findForward(Constants.VALID); servlet.log(Forwarding to: + valForward ); return valForward; That might help too. -Tim -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 12:15 AM To: [EMAIL PROTECTED] Subject: No Error Message But A Blank Page Is Displayed. I am experimenting a basic application - logon. I got the first two screens working without problem. However, the third screen displays a blank page (no error message). I am having a very difficult time to figure out the problem; henceforth, seeking help. Here is the history of my application: 1. http://localhost:8080/LogonPractice/index.jsp (no problem and I clicked on Sign in) 2. http://localhost:8080/LogonPractice/Logon.do;jsessionid=170B50E4D8E07EE36290 E98342E8BF9C (no problem and the screen asked for username and password. I filled out the information and clicked on Submit) 3. http://localhost:8080/LogonPractice/LogonSubmit.do (displayed a blank page) The Tomcat log file shows the following (no error message at all): 2003-09-29 23:29:26 action: Processing a GET for /Logon 2003-09-29 23:29:26 action: Looking for Action instance for class org.apache.struts.actions.ForwardAction 2003-09-29 23:29:26 action: Double checking for Action instance already there 2003-09-29 23:29:26 action: Creating new Action instance 2003-09-29 23:29:35 action: Processing a POST for /LogonSubmit 2003-09-29 23:29:35 action: Looking for ActionForm bean under attribute 'logonForm' 2003-09-29 23:29:35 action: Creating new ActionForm instance of class 'org.apache.artimus.logon.LogonForm' 2003-09-29 23:29:35 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-09-29 23:29:35 action: Populating bean properties from this request 2003-09-29 23:29:35 action: Validating input form properties 2003-09-29 23:29:35 action: No errors detected, accepting input 2003-09-29 23:29:35 action: Looking for Action instance for class org.apache.artimus.logon.LogonAction 2003-09-29 23:29:35 action: Double checking for Action instance already there 2003-09-29 23:29:35 action: Creating new Action instance in my struts-config.xml, I have: action path=/LogonSubmit type=org.apache.artimus.logon.LogonAction name=logonForm scope=request validate=true input=/signin/Logon.jsp forward name=valid path=/signin/Welcome.jsp/ /action and my LogonAction.java is: package org.apache.artimus.logon; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.artimus.lang.Constants; public final class LogonAction extends Action { public boolean isUserLogon(String username, String password) throws UserDirectoryException { return (UserDirectory.getInstance().isValidPassword(username,password)); // return true; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Obtain username and password from web tier String username = ((LogonForm) form).getUsername(); String password = ((LogonForm) form).getPassword(); // Validate credentials with business tier boolean validated = false; try { validated = isUserLogon(username,password); } catch (UserDirectoryException ude) { // couldn't connect to user directory ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.connect)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } if (!validated) { // credentials don't match ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.logon.invalid)); saveErrors(request,errors); // return to input page return (new ActionForward(mapping.getInput())); } // Save our
Re: [OT] Error Messages using standard security constraint?
Do you have the form-error-page set to something different than the form-login-page? That is the normal means to inform the user that something was wrong with the username/password combo they typed in. Of then the form-error-page is nearly identical to the form-login-page, except that a bad username/password combination error message is displayed. But you are free (and responsible for) creating both pages, and thus have full control over their appearance. The same error is typically displayed no matter what was wrong with the username/password the user supplied. It may be attractive to be able to tell them that the username they enetered does not exist in the system, or that the username was good but the password was wrong, etc. But be aware that providing such messages has some security cost. If someone is trying to break in, they can use that information to find a real account and then just focus on choosing the right password. If they get the same it didn't work message for each failed attempt no matter what wa wrong with it, they won't even know if they are trying to get into a valid user account. If you do wish to provide more informative error messages, you can have the form-error-page get the j_username and j_password from the request (this typically works, though I am not sure it is guaranteed to work on all containers) and use that information to figure out what went wrong. The results of that check can be used to provide a more descriptive error message. -Max - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Sunday, September 28, 2003 12:13 PM Subject: [OT] Error Messages using standard security constraint? I am using the standard web.xml security constraint with JBoss, and if a user enters a wrong username and/or password, there is not an error message generated to tell about the error. I just get the same logon form page. How do I add an error message in the struts manner? --- Thanks Mick Knutson coming soon: Your SOS: Your personal emergency contact system. http://YourSos.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Quartz error and Struts plugin for struts
I had no problem using the quartz-config you supplied. Is your plugin configured like this in the struts-config? plug-in className='com.jgsullivan.struts.plugins.QuartzPlugIn' set-property property='configPath' value='/WEB-INF/quartz-config.xml'/ /plug-in Cal -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 19:12 To: Struts Users Mailing List Subject: Re: Quartz error and Struts plugin for struts I also have the following execute method which is not called: /** * Method execute * * @param jobExecCtx * @throws org.quartz.JobExecutionException */ public void execute( JobExecutionContext jobExecCtx ) throws org.quartz.JobExecutionException { log.info(Executing AlertSenderJob. This is the only operation this job performs.); } I also have the following quartz-config.xml: ?xml version=1.0 encoding=ISO-8859-1 ? quartz-config trigger-group trigger name=alertSenderTrigger className=org.quartz.SimpleTrigger description=Trigger for sending Alerts when they are due volatility=false misfireConstant=INSTRUCTION_RE_EXECUTE_JOB set-property property=repeatCount value=900 / set-property property=repeatInterval value=5000 / /trigger /trigger-group job-group job name=alertSenderJob className=com.baselogic.yoursos.scheduler.jobs.AlertSenderJob / /job-group schedule job=alertSenderJob trigger=alertSenderTrigger / /quartz-config --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 4:05 PM Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301
Re: Quartz error and Struts plugin for struts
Yes, here is an exact cut-n-paste: plug-in className=com.jgsullivan.struts.plugins.QuartzPlugIn set-property property=configPath value=/WEB-INF/quartz-config.xml / /plug-in --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 4:58 AM Subject: RE: Quartz error and Struts plugin for struts I had no problem using the quartz-config you supplied. Is your plugin configured like this in the struts-config? plug-in className='com.jgsullivan.struts.plugins.QuartzPlugIn' set-property property='configPath' value='/WEB-INF/quartz-config.xml'/ /plug-in Cal -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 19:12 To: Struts Users Mailing List Subject: Re: Quartz error and Struts plugin for struts I also have the following execute method which is not called: /** * Method execute * * @param jobExecCtx * @throws org.quartz.JobExecutionException */ public void execute( JobExecutionContext jobExecCtx ) throws org.quartz.JobExecutionException { log.info(Executing AlertSenderJob. This is the only operation this job performs.); } I also have the following quartz-config.xml: ?xml version=1.0 encoding=ISO-8859-1 ? quartz-config trigger-group trigger name=alertSenderTrigger className=org.quartz.SimpleTrigger description=Trigger for sending Alerts when they are due volatility=false misfireConstant=INSTRUCTION_RE_EXECUTE_JOB set-property property=repeatCount value=900 / set-property property=repeatInterval value=5000 / /trigger /trigger-group job-group job name=alertSenderJob className=com.baselogic.yoursos.scheduler.jobs.AlertSenderJob / /job-group schedule job=alertSenderJob trigger=alertSenderTrigger / /quartz-config --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 4:05 PM Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150
RE: Quartz error and Struts plugin for struts
In the war .jars in the web-inf/lib quartz-config in web-inf quartz.properties in web-inf/classes Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 15:29 To: struts Subject: Quartz error and Struts plugin for struts I am having an error with the quartz plugin and need some help. Below is the error I get. I have an EAR, with a common.jar, ejbs.jar and an app.war. Where is quartz.jar, jgs-struts-0.2-dev.jar, jgs-quartz-0.2-dev.jar and the quartz-config.xml suppose to go in the above hierarchy? === 11:51:52,625 ERROR [MainDeployer] could not start deployment: file:/C:/usr/local/jboss-3.0.7/server/default/tmp/deploy/server/default/deploy/yoursos-a pp.ear/31.yoursos-app.ear-contents/yoursos-web-application.war org.jboss.deployment.DeploymentException: Error initializing Quartz scheduler; - nested throwable: (javax.servlet.ServletException: Error initializing Quartz scheduler) at org.jboss.jetty.Jetty.deploy(Jetty.java:353) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne r.java:435) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner. java:561) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThr ead.doScan(AbstractDeploymentScanner.java:217) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(Ab stractDeploymentScanner.java:230) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(Abs tractDeploymentScanner.java:207) Caused by: javax.servlet.ServletException: Error initializing Quartz scheduler at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:103) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) ... 18 more 11:51:52,921 ERROR [MainDeployer] could not start deployment: file:/C:/usr/local/jboss-3.0.7/server/default/deploy/yoursos-app.ear org.jboss.deployment.DeploymentException: Error initializing Quartz scheduler; - nested throwable: (javax.servlet.ServletException: Error initializing Quartz scheduler) at org.jboss.jetty.Jetty.deploy(Jetty.java:353) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at
Re: Quartz error and Struts plugin for struts
Are you using the quartz plugin? In the examples, I did not see the quartz.properties. I thought the quartz-config.xml is the replacement. --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 1:58 PM Subject: RE: Quartz error and Struts plugin for struts In the war .jars in the web-inf/lib quartz-config in web-inf quartz.properties in web-inf/classes Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 15:29 To: struts Subject: Quartz error and Struts plugin for struts I am having an error with the quartz plugin and need some help. Below is the error I get. I have an EAR, with a common.jar, ejbs.jar and an app.war. Where is quartz.jar, jgs-struts-0.2-dev.jar, jgs-quartz-0.2-dev.jar and the quartz-config.xml suppose to go in the above hierarchy? === 11:51:52,625 ERROR [MainDeployer] could not start deployment: file:/C:/usr/local/jboss-3.0.7/server/default/tmp/deploy/server/default/deploy/yoursos-a pp.ear/31.yoursos-app.ear-contents/yoursos-web-application.war org.jboss.deployment.DeploymentException: Error initializing Quartz scheduler; - nested throwable: (javax.servlet.ServletException: Error initializing Quartz scheduler) at org.jboss.jetty.Jetty.deploy(Jetty.java:353) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne r.java:435) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner. java:561) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThr ead.doScan(AbstractDeploymentScanner.java:217) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(Ab stractDeploymentScanner.java:230) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(Abs tractDeploymentScanner.java:207) Caused by: javax.servlet.ServletException: Error initializing Quartz scheduler at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:103) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) ... 18 more 11:51:52,921 ERROR [MainDeployer] could not start deployment: file:/C:/usr/local/jboss-3.0.7/server/default/deploy/yoursos-app.ear org.jboss.deployment.DeploymentException: Error initializing Quartz scheduler; - nested throwable: (javax.servlet.ServletException: Error initializing Quartz scheduler) at org.jboss.jetty.Jetty.deploy(Jetty.java:353) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814
RE: Quartz error and Struts plugin for struts
Mick Yes I am using the plug in. The properties configure Quartz - the type of scheduler, misfire instructions, and other more advanced stuff. It my not e necessary - ill try without. I really only have the followling items in the file: org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 5 org.quartz.threadPool.threadPriority = 4 org.quartz.jobStore.misfireThreshold = 5000 org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore The quartz-config used with the plugin is for configuring the actual schedule and job to fire on that schedule. So for all my sites I have a common quartz.properties but each web app has it's own set of jobs and independent schedules. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 17:20 To: Struts Users Mailing List Subject: Re: Quartz error and Struts plugin for struts Are you using the quartz plugin? In the examples, I did not see the quartz.properties. I thought the quartz-config.xml is the replacement. --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 1:58 PM Subject: RE: Quartz error and Struts plugin for struts In the war .jars in the web-inf/lib quartz-config in web-inf quartz.properties in web-inf/classes Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 15:29 To: struts Subject: Quartz error and Struts plugin for struts I am having an error with the quartz plugin and need some help. Below is the error I get. I have an EAR, with a common.jar, ejbs.jar and an app.war. Where is quartz.jar, jgs-struts-0.2-dev.jar, jgs-quartz-0.2-dev.jar and the quartz-config.xml suppose to go in the above hierarchy? === 11:51:52,625 ERROR [MainDeployer] could not start deployment: file:/C:/usr/local/jboss-3.0.7/server/default/tmp/deploy/server/default/deploy/yoursos-a pp.ear/31.yoursos-app.ear-contents/yoursos-web-application.war org.jboss.deployment.DeploymentException: Error initializing Quartz scheduler; - nested throwable: (javax.servlet.ServletException: Error initializing Quartz scheduler) at org.jboss.jetty.Jetty.deploy(Jetty.java:353) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne r.java:435) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner. java:561) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThr ead.doScan(AbstractDeploymentScanner.java:217) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(Ab stractDeploymentScanner.java:230) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(Abs tractDeploymentScanner.java:207) Caused by: javax.servlet.ServletException: Error initializing Quartz scheduler at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:103) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150
Re: Quartz error and Struts plugin for struts
OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne r.java:435) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner. java:561) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan == --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 2:35 PM Subject: RE: Quartz error and Struts plugin for struts Mick Yes I am using the plug in. The properties configure Quartz - the type of scheduler, misfire instructions, and other more advanced stuff. It my not e necessary - ill try without. I really only have the followling items in the file: org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 5 org.quartz.threadPool.threadPriority = 4 org.quartz.jobStore.misfireThreshold = 5000
Re: Quartz error and Struts plugin for struts
I also have the following execute method which is not called: /** * Method execute * * @param jobExecCtx * @throws org.quartz.JobExecutionException */ public void execute( JobExecutionContext jobExecCtx ) throws org.quartz.JobExecutionException { log.info(Executing AlertSenderJob. This is the only operation this job performs.); } I also have the following quartz-config.xml: ?xml version=1.0 encoding=ISO-8859-1 ? quartz-config trigger-group trigger name=alertSenderTrigger className=org.quartz.SimpleTrigger description=Trigger for sending Alerts when they are due volatility=false misfireConstant=INSTRUCTION_RE_EXECUTE_JOB set-property property=repeatCount value=900 / set-property property=repeatInterval value=5000 / /trigger /trigger-group job-group job name=alertSenderJob className=com.baselogic.yoursos.scheduler.jobs.AlertSenderJob / /job-group schedule job=alertSenderJob trigger=alertSenderTrigger / /quartz-config --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 4:05 PM Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25
Re: Quartz error and Struts plugin for struts
And com.baselogic.yoursos.scheduler.jobs.AlertSenderJob is in my WAR under web-inf/classes --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 4:11 PM Subject: Re: Quartz error and Struts plugin for struts I also have the following execute method which is not called: /** * Method execute * * @param jobExecCtx * @throws org.quartz.JobExecutionException */ public void execute( JobExecutionContext jobExecCtx ) throws org.quartz.JobExecutionException { log.info(Executing AlertSenderJob. This is the only operation this job performs.); } I also have the following quartz-config.xml: ?xml version=1.0 encoding=ISO-8859-1 ? quartz-config trigger-group trigger name=alertSenderTrigger className=org.quartz.SimpleTrigger description=Trigger for sending Alerts when they are due volatility=false misfireConstant=INSTRUCTION_RE_EXECUTE_JOB set-property property=repeatCount value=900 / set-property property=repeatInterval value=5000 / /trigger /trigger-group job-group job name=alertSenderJob className=com.baselogic.yoursos.scheduler.jobs.AlertSenderJob / /job-group schedule job=alertSenderJob trigger=alertSenderTrigger / /quartz-config --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 4:05 PM Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242
Re: Quartz error and Struts plugin for struts
Looks like the plug in is having trouble with parsing the quartz-config. I cannot see any problem but I am on a blackberry so it is hard to compare your file to the dtd. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 19:05:51 2003 Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne r.java:435) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner. java:561) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan == --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 2:35 PM Subject: RE: Quartz error and Struts plugin for struts Mick Yes I am using the plug in. The properties configure Quartz
Re: Quartz error and Struts plugin for struts
I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 5:27 PM Subject: Re: Quartz error and Struts plugin for struts Looks like the plug in is having trouble with parsing the quartz-config. I cannot see any problem but I am on a blackberry so it is hard to compare your file to the dtd. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 19:05:51 2003 Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne r.java:435) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner. java:561) at org.jboss.deployment.scanner.AbstractDeploymentScanner
Re: Quartz error and Struts plugin for struts
At 5:45 PM -0700 9/24/03, Mick Knutson wrote: I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? I'd suggest going straight to the source code, seeing as all the pieces you are using are open source projects. For example: java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) Looking in the source for org.apache.commons.beanutils.BeanUtils, I see that line 792 is the call to log.debug(): if (log.isDebugEnabled()) { log.debug(BeanUtils.populate( + bean + , + properties + )); } So one thing you've discovered is that Quartz has a bug in it's JobDetail.toString() implementation -- it should be doing a null check! The other thing you see though, is that that's merely a debugging line. So if you go to your commons-logging configuration and set the logging threshold for org.apache.commons.beanutils.BeanUtils to INFO or higher, you'll skip that call all together, and maybe get a little farther. You could also go and look at the code for Quartz and see what values in the JobDetail.toString() might possibly be dereferencing a property or method on a null object; that may help you figure out something that needs to be set, or help you track down some bug in the com.jgsullivan.quartz.SchedulerBuilder and/or com.jgsullivan.quartz.ConfigRuleSet -- I see from a brief look at ConfigRuleSet that Quartz requires some kind of complicated rules because it needs to establish relationships between a JobDetail object and a JobGroupConfig object. At the risk of sounding like a jerk, your posts don't give the impression that you are trying very hard yourself to get to the bottom of these problems. I can't speak for anyone else, but if all you ever do is post the next stack trace that comes up, I'm personally not likely to put a whole lot more energy into helping you get to the bottom of your problem. You've got to do some of your own legwork too. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com We want beef in dessert if we can get it there. -- Betty Hogan, Director of New Product Development, National Cattlemen's Beef Association - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quartz error and Struts plugin for struts
I tried that and here is what I found: JobDetail(381): return JobDetail ' as listed in the method below: public String toString() { return JobDetail ' + getFullName() + ': jobClass: ' + getJobClass().getName() + isStateful: + isStateful() + isVolatile: + isVolatile() + isDurable: + isDurable() + requestsRecovers: + requestsRecovery(); } --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 6:08 PM Subject: Re: Quartz error and Struts plugin for struts At 5:45 PM -0700 9/24/03, Mick Knutson wrote: I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? I'd suggest going straight to the source code, seeing as all the pieces you are using are open source projects. For example: java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java: 2 59) Looking in the source for org.apache.commons.beanutils.BeanUtils, I see that line 792 is the call to log.debug(): if (log.isDebugEnabled()) { log.debug(BeanUtils.populate( + bean + , + properties + )); } So one thing you've discovered is that Quartz has a bug in it's JobDetail.toString() implementation -- it should be doing a null check! The other thing you see though, is that that's merely a debugging line. So if you go to your commons-logging configuration and set the logging threshold for org.apache.commons.beanutils.BeanUtils to INFO or higher, you'll skip that call all together, and maybe get a little farther. You could also go and look at the code for Quartz and see what values in the JobDetail.toString() might possibly be dereferencing a property or method on a null object; that may help you figure out something that needs to be set, or help you track down some bug in the com.jgsullivan.quartz.SchedulerBuilder and/or com.jgsullivan.quartz.ConfigRuleSet -- I see from a brief look at ConfigRuleSet that Quartz requires some kind of complicated rules because it needs to establish relationships between a JobDetail object and a JobGroupConfig object. At the risk of sounding like a jerk, your posts don't give the impression that you are trying very hard yourself to get to the bottom of these problems. I can't speak for anyone else, but if all you ever do is post the next stack trace that comes up, I'm personally not likely to put a whole lot more energy into helping you get to the bottom of your problem. You've got to do some of your own legwork too. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com We want beef in dessert if we can get it there. -- Betty Hogan, Director of New Product Development, National Cattlemen's Beef Association - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quartz error and Struts plugin for struts
The only way to get a NPE in that use would be to have a null return for getJobClass(). Check it and let us know if that's the case. []s Michael Nascimento Santos JSR-207 Expert Group Member http://weblogs.java.net/pub/au/80 htp://www.soujava.org.br - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:19 PM Subject: Re: Quartz error and Struts plugin for struts I tried that and here is what I found: JobDetail(381): return JobDetail ' as listed in the method below: public String toString() { return JobDetail ' + getFullName() + ': jobClass: ' + getJobClass().getName() + isStateful: + isStateful() + isVolatile: + isVolatile() + isDurable: + isDurable() + requestsRecovers: + requestsRecovery(); } --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 6:08 PM Subject: Re: Quartz error and Struts plugin for struts At 5:45 PM -0700 9/24/03, Mick Knutson wrote: I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? I'd suggest going straight to the source code, seeing as all the pieces you are using are open source projects. For example: java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java: 2 59) Looking in the source for org.apache.commons.beanutils.BeanUtils, I see that line 792 is the call to log.debug(): if (log.isDebugEnabled()) { log.debug(BeanUtils.populate( + bean + , + properties + )); } So one thing you've discovered is that Quartz has a bug in it's JobDetail.toString() implementation -- it should be doing a null check! The other thing you see though, is that that's merely a debugging line. So if you go to your commons-logging configuration and set the logging threshold for org.apache.commons.beanutils.BeanUtils to INFO or higher, you'll skip that call all together, and maybe get a little farther. You could also go and look at the code for Quartz and see what values in the JobDetail.toString() might possibly be dereferencing a property or method on a null object; that may help you figure out something that needs to be set, or help you track down some bug in the com.jgsullivan.quartz.SchedulerBuilder and/or com.jgsullivan.quartz.ConfigRuleSet -- I see from a brief look at ConfigRuleSet that Quartz requires some kind of complicated rules because it needs to establish relationships between a JobDetail object and a JobGroupConfig object. At the risk of sounding like a jerk, your posts don't give the impression that you are trying very hard yourself to get to the bottom of these problems. I can't speak for anyone else, but if all you ever do is post the next stack trace that comes up, I'm personally not likely to put a whole lot more energy into helping you get to the bottom of your problem. You've got to do some of your own legwork too. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com We want beef in dessert if we can get it there. -- Betty Hogan, Director of New Product Development, National Cattlemen's Beef Association - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quartz error and Struts plugin for struts
in the openSource JobDetail.java, there is a getJobClass(): /** * pGet the instance of codeJob/code that will be executed./p */ public Class getJobClass() { return jobClass; } I also set the job in my quartz-config.xml: job name=alertSenderJob className=com.baselogic.yoursos.scheduler.jobs.AlertSenderJob/ and the quartz-config.xml is in WEB-INF/ and com.baselogic.yoursos.scheduler.jobs.AlertSenderJob is in WEB-INF/classes Am I missing something else? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 6:26 PM Subject: Re: Quartz error and Struts plugin for struts The only way to get a NPE in that use would be to have a null return for getJobClass(). Check it and let us know if that's the case. []s Michael Nascimento Santos JSR-207 Expert Group Member http://weblogs.java.net/pub/au/80 htp://www.soujava.org.br - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:19 PM Subject: Re: Quartz error and Struts plugin for struts I tried that and here is what I found: JobDetail(381): return JobDetail ' as listed in the method below: public String toString() { return JobDetail ' + getFullName() + ': jobClass: ' + getJobClass().getName() + isStateful: + isStateful() + isVolatile: + isVolatile() + isDurable: + isDurable() + requestsRecovers: + requestsRecovery(); } --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 6:08 PM Subject: Re: Quartz error and Struts plugin for struts At 5:45 PM -0700 9/24/03, Mick Knutson wrote: I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? I'd suggest going straight to the source code, seeing as all the pieces you are using are open source projects. For example: java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java: 2 59) Looking in the source for org.apache.commons.beanutils.BeanUtils, I see that line 792 is the call to log.debug(): if (log.isDebugEnabled()) { log.debug(BeanUtils.populate( + bean + , + properties + )); } So one thing you've discovered is that Quartz has a bug in it's JobDetail.toString() implementation -- it should be doing a null check! The other thing you see though, is that that's merely a debugging line. So if you go to your commons-logging configuration and set the logging threshold for org.apache.commons.beanutils.BeanUtils to INFO or higher, you'll skip that call all together, and maybe get a little farther. You could also go and look at the code for Quartz and see what values in the JobDetail.toString() might possibly be dereferencing a property or method on a null object; that may help you figure out something that needs to be set, or help you track down some bug in the com.jgsullivan.quartz.SchedulerBuilder and/or com.jgsullivan.quartz.ConfigRuleSet -- I see from a brief look at ConfigRuleSet that Quartz requires some kind of complicated rules because it needs to establish relationships between a JobDetail object and a JobGroupConfig object. At the risk of sounding like a jerk, your posts don't give the impression that you are trying very hard yourself to get to the bottom of these problems. I can't speak for anyone else, but if all you ever do is post the next stack trace that comes up, I'm personally not likely to put a whole lot more energy into helping you get to the bottom of your problem. You've got to do some of your own legwork too. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com We want beef in dessert if we can get it there. -- Betty Hogan, Director of New Product Development, National Cattlemen's Beef Association - To unsubscribe, e-mail: [EMAIL
Re: Quartz error and Struts plugin for struts
I see now that you mean + getJobClass().getName(), but I do not know where jobClass gets set. I see a className attribute, but not where this is converted to a class. --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 6:26 PM Subject: Re: Quartz error and Struts plugin for struts The only way to get a NPE in that use would be to have a null return for getJobClass(). Check it and let us know if that's the case. []s Michael Nascimento Santos JSR-207 Expert Group Member http://weblogs.java.net/pub/au/80 htp://www.soujava.org.br - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:19 PM Subject: Re: Quartz error and Struts plugin for struts I tried that and here is what I found: JobDetail(381): return JobDetail ' as listed in the method below: public String toString() { return JobDetail ' + getFullName() + ': jobClass: ' + getJobClass().getName() + isStateful: + isStateful() + isVolatile: + isVolatile() + isDurable: + isDurable() + requestsRecovers: + requestsRecovery(); } --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 6:08 PM Subject: Re: Quartz error and Struts plugin for struts At 5:45 PM -0700 9/24/03, Mick Knutson wrote: I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? I'd suggest going straight to the source code, seeing as all the pieces you are using are open source projects. For example: java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java: 2 59) Looking in the source for org.apache.commons.beanutils.BeanUtils, I see that line 792 is the call to log.debug(): if (log.isDebugEnabled()) { log.debug(BeanUtils.populate( + bean + , + properties + )); } So one thing you've discovered is that Quartz has a bug in it's JobDetail.toString() implementation -- it should be doing a null check! The other thing you see though, is that that's merely a debugging line. So if you go to your commons-logging configuration and set the logging threshold for org.apache.commons.beanutils.BeanUtils to INFO or higher, you'll skip that call all together, and maybe get a little farther. You could also go and look at the code for Quartz and see what values in the JobDetail.toString() might possibly be dereferencing a property or method on a null object; that may help you figure out something that needs to be set, or help you track down some bug in the com.jgsullivan.quartz.SchedulerBuilder and/or com.jgsullivan.quartz.ConfigRuleSet -- I see from a brief look at ConfigRuleSet that Quartz requires some kind of complicated rules because it needs to establish relationships between a JobDetail object and a JobGroupConfig object. At the risk of sounding like a jerk, your posts don't give the impression that you are trying very hard yourself to get to the bottom of these problems. I can't speak for anyone else, but if all you ever do is post the next stack trace that comes up, I'm personally not likely to put a whole lot more energy into helping you get to the bottom of your problem. You've got to do some of your own legwork too. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com We want beef in dessert if we can get it there. -- Betty Hogan, Director of New Product Development, National Cattlemen's Beef Association - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: Quartz error and Struts plugin for struts
Are you using the struts 1.1 libs? Latest parser? Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 20:45:51 2003 Subject: Re: Quartz error and Struts plugin for struts I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 5:27 PM Subject: Re: Quartz error and Struts plugin for struts Looks like the plug in is having trouble with parsing the quartz-config. I cannot see any problem but I am on a blackberry so it is hard to compare your file to the dtd. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 19:05:51 2003 Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source
Re: Quartz error and Struts plugin for struts
Yes, I am only using the 1.1 LIB release. Do you mean the beanutils? Or Xerces? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 7:05 PM Subject: Re: Quartz error and Struts plugin for struts Are you using the struts 1.1 libs? Latest parser? Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 20:45:51 2003 Subject: Re: Quartz error and Struts plugin for struts I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 5:27 PM Subject: Re: Quartz error and Struts plugin for struts Looks like the plug in is having trouble with parsing the quartz-config. I cannot see any problem but I am on a blackberry so it is hard to compare your file to the dtd. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 19:05:51 2003 Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
Re: Quartz error and Struts plugin for struts
Xerces. All the commons should be ok from the struts release. I will try your quartz-config tomorrow. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 22:11:24 2003 Subject: Re: Quartz error and Struts plugin for struts Yes, I am only using the 1.1 LIB release. Do you mean the beanutils? Or Xerces? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 7:05 PM Subject: Re: Quartz error and Struts plugin for struts Are you using the struts 1.1 libs? Latest parser? Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 20:45:51 2003 Subject: Re: Quartz error and Struts plugin for struts I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 5:27 PM Subject: Re: Quartz error and Struts plugin for struts Looks like the plug in is having trouble with parsing the quartz-config. I cannot see any problem but I am on a blackberry so it is hard to compare your file to the dtd. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 19:05:51 2003 Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806
Re: Quartz error and Struts plugin for struts
Thanks for the help --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 7:25 PM Subject: Re: Quartz error and Struts plugin for struts Xerces. All the commons should be ok from the struts release. I will try your quartz-config tomorrow. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 22:11:24 2003 Subject: Re: Quartz error and Struts plugin for struts Yes, I am only using the 1.1 LIB release. Do you mean the beanutils? Or Xerces? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 7:05 PM Subject: Re: Quartz error and Struts plugin for struts Are you using the struts 1.1 libs? Latest parser? Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 20:45:51 2003 Subject: Re: Quartz error and Struts plugin for struts I have used the example xml excerp from the src, but I don't know what would be wrong with the file, or how to track it further. Any ideas about where I can go to get help? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - Original Message - From: Holman, Cal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 5:27 PM Subject: Re: Quartz error and Struts plugin for struts Looks like the plug in is having trouble with parsing the quartz-config. I cannot see any problem but I am on a blackberry so it is hard to compare your file to the dtd. Cal -Original Message- From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wed Sep 24 19:05:51 2003 Subject: Re: Quartz error and Struts plugin for struts OK, I seem to be a little further. Here is the next error I get: === 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 16:03:11,515 INFO [StdSchedulerFactory] Quartz scheduler version: 1.2.2 16:03:11,578 ERROR [Digester] Begin event threw exception java.lang.NullPointerException at org.quartz.JobDetail.toString(JobDetail.java:381) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:792) at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2 59) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 199) at com.jgsullivan.quartz.SchedulerBuilder.buildScheduler(SchedulerBuilder.java: 176) at com.jgsullivan.struts.plugins.QuartzPlugIn.init(QuartzPlugIn.java:97) at com.jgsullivan.struts.plugins.PlugInSupport.init(PlugInSupport.java:276) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at com.baselogic.yoursos.struts.ExtendedActionServlet.init(ExtendedActionServle t.java:23) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j ava:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic ationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.j ava:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext. java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java
Re: org.apache.commons.digester.Digester error
It sounds like you might have installed the JSTL correctly. Did you copy the appropriate JARS into your WEB-INF/lib directory and the TLDs into your WEB-INF directory? I believe this is all that is required for installation. Also make sure that you are referring to the TLDs correctly if you also added them to web.xml (although this step is not necessary). Does that help? Matt - Original Message - From: deepaksawdekar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:22 AM Subject: org.apache.commons.digester.Digester error Hi All, I am using struts and jstl on tomcat. But when I start the tomcat I always get this error. Even though my application works fine. I would like to know what these error and how to get rid of them Sep 18, 2003 2:47:53 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 6 column 19: Document root element taglib, must ma tch DOCTYPE root null. org.xml.sax.SAXParseException: Document root element taglib, must match DOCTYP E root null. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Er rorHandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper. java:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:362) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:296) at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDT Thanks and Regards Deepak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Compile Error for bean:define
It _may_ be, and I'm just shooting in the dark here, that it's defined by default someplace other than as a local variable (like in the request). Try adding scope=page to the bean:define and see if that makes any difference. HTH, Carey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 11:11 PM To: [EMAIL PROTECTED] Subject: Compile Error for bean:define I am using bean:define tag in my jsp pages as bean:define id=actionValue name=GLPMUserAdminForm property=actionValue type=java.lang.String / html:form method=POST action='%=actionValue%' but when I run my application, I got compile error message that actionValue couldn't be solved in line html:form method=POST action='%=actionValue%'. Can anybody give me a hand?? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html error
How would I check to see if that specific error existed? I would like to write the message after a break BR below the text box when the message is present, and have no break when it is not. For example: if (fieldSample${count}) then brprint error message Ryan Ryan wrote: Thanks, that worked. Ryan Slattery, Tim - BLS wrote: When I try and set the html error attribute property using a jsp expression nothing shows up. html:errors property='%= fieldSample + count %'/ Note: The variable count is just an integer that gets incremented each iteration of the loop. An easy way out would be to use the html-el tags: html-el:errors property=fieldSample${count} / That said, I have no clue why your html:errors... tag won't work. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html error
There's a way to do this using html:messages instead of html:errors. Convert your code to (untested so please check syntax if you get an error): html-el:messages id=foo property=fieldSample${count} brc:out value=${foo}/ /html-el:messages Optionally you can define a resource property in your ApplicationResources: errors.header=br/ or errors.prefix=br/ -Tim -Original Message- From: Ryan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 12:34 PM To: [EMAIL PROTECTED] Subject: Re: html error How would I check to see if that specific error existed? I would like to write the message after a break BR below the text box when the message is present, and have no break when it is not. For example: if (fieldSample${count}) then brprint error message Ryan Ryan wrote: Thanks, that worked. Ryan Slattery, Tim - BLS wrote: When I try and set the html error attribute property using a jsp expression nothing shows up. html:errors property='%= fieldSample + count %'/ Note: The variable count is just an integer that gets incremented each iteration of the loop. An easy way out would be to use the html-el tags: html-el:errors property=fieldSample${count} / That said, I have no clue why your html:errors... tag won't work. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html error
Worked, thanks again. Ryan Chen, Gin wrote: There's a way to do this using html:messages instead of html:errors. Convert your code to (untested so please check syntax if you get an error): html-el:messages id=foo property=fieldSample${count} brc:out value=${foo}/ /html-el:messages Optionally you can define a resource property in your ApplicationResources: errors.header=br/ or errors.prefix=br/ -Tim -Original Message- From: Ryan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 12:34 PM To: [EMAIL PROTECTED] Subject: Re: html error How would I check to see if that specific error existed? I would like to write the message after a break BR below the text box when the message is present, and have no break when it is not. For example: if (fieldSample${count}) then brprint error message Ryan Ryan wrote: Thanks, that worked. Ryan Slattery, Tim - BLS wrote: When I try and set the html error attribute property using a jsp expression nothing shows up. html:errors property='%= fieldSample + count %'/ Note: The variable count is just an integer that gets incremented each iteration of the loop. An easy way out would be to use the html-el tags: html-el:errors property=fieldSample${count} / That said, I have no clue why your html:errors... tag won't work. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html error
When I try and set the html error attribute property using a jsp expression nothing shows up. html:errors property='%= fieldSample + count %'/ Note: The variable count is just an integer that gets incremented each iteration of the loop. An easy way out would be to use the html-el tags: html-el:errors property=fieldSample${count} / That said, I have no clue why your html:errors... tag won't work. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html error
Thanks, that worked. Ryan Slattery, Tim - BLS wrote: When I try and set the html error attribute property using a jsp expression nothing shows up. html:errors property='%= fieldSample + count %'/ Note: The variable count is just an integer that gets incremented each iteration of the loop. An easy way out would be to use the html-el tags: html-el:errors property=fieldSample${count} / That said, I have no clue why your html:errors... tag won't work. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Positioning error messages
forget it.. i had made a silly mistake.. thanx -Samanth Samanth Athrey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey all, I am using Validation Framework. The only problem I now have is to position the messages. Everything is towards the right of textbox. But i want to the left. Is that possible? Thanx Samanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TILES ERROR when using more than one directory
Cameron You are correct the references are set to the base tag - but to avoid all the issues from the template's relationship to the various folders where the actual jsp's are I anchor the base to the root directory of the web app like this: base href=http://%= request.getServerName()%:%= request.getServerPort()%%=request.getContextPath()%// Messy - there may be better ways to do this. Then all URLs are simple - they all are from the root directory no matter which template they are pulled into. Here is the base definition for a site and you can see the directory structure is not flat. Now I do not place jsps in the WEB-INF folder but I am not sure that matters. definition name=home.pagedef page=/template.jsp put name=title value=home.title / put name=header value=/web/includes/header.jsp / put name=index value=/web/pages/home/HomeIndex.jsp / put name=indexMain value=/web/includes/index.jsp / put name=content value=/web/pages/home/HomeContent.jsp / put name=footer value=/web/includes/footer.jsp / put name=styleSheet value=web/styles/Omega_StyleSheet.css / put name=keywords value=home.keywords/ put name=crumbs value=/web/includes/crumb.jsp/ put name=crumbtitle1 value=Home/ put name=crumblink1value=/do/home/home/ put name=defname value=home.pagedef/ /definition definition name=about.pagedef extends=home.pagedef put name=title value=about.title / put name=content value=/web/pages/about/AboutContent.jsp / put name=keywordsvalue=about.keywords/ put name=crumbtitle2 value=About/ put name=crumblink2 value=/do/home/About/ put name=defname value=about.pagedef/ /definition Cal -Original Message- From: Cameron Hickey [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 11:39 To: 'Struts Users Mailing List' Subject: RE: TILES ERROR when using more than one directory I did not solve this problem, and since I had not gotten any responses, decided to just give up and keep all the templates in the same folder. Your suggested methodology confuses me somewhat... an html:base / tag is supposed to set the references of all files called from a particular JSP to the local root of this JSP. The references to the other TILES are all stored in the tiles-defs.xml file, not in the JSP. Further, regardless of whether I use a BASE tag or not, I get this error. If the parser cannot actually find the file (assuming it is confused about the local vs absolute paths) then it just doesn't load the tile at all. In my situation, it does seem to locate the file, but it just throws an error anyway. It would appear that your initial TILE and all embedded TILEs need to be located in the same directory. Is anyone else actually implementing what I have tried to do? Specifically: definition name=.list path=/WEB-INF/admin/list.jsp put name=body value= / /definition definition name=category.list extends=.list put name=body value=/WEB-INF/admin/pages/categorylist.jsp / /definition extending a definition by tossing in a file in a deeper directory... thanks for any further assistance Cameron -Original Message- From: Holman, Cal [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:10 PM To: Struts Users Mailing List Subject: RE: TILES ERROR when using more than one directory Cameron Did you figure this out? I use a base tag in my template to anchor all tiles jsp files to the single spot in the webapp. You should not have any problems having a more complex directory structure - it is simplified if all the paths are from the same point in the webapp. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Cameron Hickey [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2003 07:20 To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: TILES ERROR when using more than one directory I am having a problem storing portions of a TILES layout in different directories. When using TILES definitions This works: definition name=.list path=/WEB-INF/admin/list.jsp put name=title value=the list page / put name=subtitle value=the list page / put name=body value= / /definition definition name=category.list extends=.list put name=body value=/WEB-INF/admin/categorylist.jsp / /definition BUT, this doesn't: definition name=.list path=/WEB-INF/admin/list.jsp put name=title value=the list page / put name=subtitle value=the list
RE: TILES ERROR when using more than one directory
Cameron Did you figure this out? I use a base tag in my template to anchor all tiles jsp files to the single spot in the webapp. You should not have any problems having a more complex directory structure - it is simplified if all the paths are from the same point in the webapp. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Cameron Hickey [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2003 07:20 To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: TILES ERROR when using more than one directory I am having a problem storing portions of a TILES layout in different directories. When using TILES definitions This works: definition name=.list path=/WEB-INF/admin/list.jsp put name=title value=the list page / put name=subtitle value=the list page / put name=body value= / /definition definition name=category.list extends=.list put name=body value=/WEB-INF/admin/categorylist.jsp / /definition BUT, this doesn't: definition name=.list path=/WEB-INF/admin/list.jsp put name=title value=the list page / put name=subtitle value=the list page / put name=body value= / /definition definition name=category.list extends=.list put name=body value=/WEB-INF/admin/pages/categorylist.jsp / /definition The only difference is that I have put the category list page into a directory called pages. Is there something I am missing? Should I be setting the second file's path to be pages/categorylist.jsp without the rest of it since someone mentioned before that child tiles are locally referenced? I tried this, but it doesn't work either. Is there a configuration setting which controls the ability to do this? Has anyone else experienced this error? Thanks for any thoughts Cameron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TILES ERROR when using more than one directory
I did not solve this problem, and since I had not gotten any responses, decided to just give up and keep all the templates in the same folder. Your suggested methodology confuses me somewhat... an html:base / tag is supposed to set the references of all files called from a particular JSP to the local root of this JSP. The references to the other TILES are all stored in the tiles-defs.xml file, not in the JSP. Further, regardless of whether I use a BASE tag or not, I get this error. If the parser cannot actually find the file (assuming it is confused about the local vs absolute paths) then it just doesn't load the tile at all. In my situation, it does seem to locate the file, but it just throws an error anyway. It would appear that your initial TILE and all embedded TILEs need to be located in the same directory. Is anyone else actually implementing what I have tried to do? Specifically: definition name=.list path=/WEB-INF/admin/list.jsp put name=body value= / /definition definition name=category.list extends=.list put name=body value=/WEB-INF/admin/pages/categorylist.jsp / /definition extending a definition by tossing in a file in a deeper directory... thanks for any further assistance Cameron -Original Message- From: Holman, Cal [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:10 PM To: Struts Users Mailing List Subject: RE: TILES ERROR when using more than one directory Cameron Did you figure this out? I use a base tag in my template to anchor all tiles jsp files to the single spot in the webapp. You should not have any problems having a more complex directory structure - it is simplified if all the paths are from the same point in the webapp. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Cameron Hickey [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2003 07:20 To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: TILES ERROR when using more than one directory I am having a problem storing portions of a TILES layout in different directories. When using TILES definitions This works: definition name=.list path=/WEB-INF/admin/list.jsp put name=title value=the list page / put name=subtitle value=the list page / put name=body value= / /definition definition name=category.list extends=.list put name=body value=/WEB-INF/admin/categorylist.jsp / /definition BUT, this doesn't: definition name=.list path=/WEB-INF/admin/list.jsp put name=title value=the list page / put name=subtitle value=the list page / put name=body value= / /definition definition name=category.list extends=.list put name=body value=/WEB-INF/admin/pages/categorylist.jsp / /definition The only difference is that I have put the category list page into a directory called pages. Is there something I am missing? Should I be setting the second file's path to be pages/categorylist.jsp without the rest of it since someone mentioned before that child tiles are locally referenced? I tried this, but it doesn't work either. Is there a configuration setting which controls the ability to do this? Has anyone else experienced this error? Thanks for any thoughts Cameron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]