You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Udaya Prakash <ud...@yahoo.com> on 2004/07/06 22:29:32 UTC

Issue with Struts application on Jboss Server

I am running a struts application in JBoss. When the server is getting started I am getting the following error message:
 

Loading container servlet default

16:01:51,654 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.action.ActionResources', returnNull=true

16:01:53,342 ERROR [Digester] Begin event threw exception

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

at java.util.ArrayList.RangeCheck(ArrayList.java:508)

at java.util.ArrayList.set(ArrayList.java:336)

at org.apache.commons.beanutils.PropertyUtils.setIndexedProperty(PropertyUtils.java:1461)

at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1013)

at org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:198)

at org.apache.commons.digester.Rule.begin(Rule.java:200)

at org.apache.commons.digester.Digester.startElement(Digester.java:1273)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:434)

at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:216)

at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:829)

at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:590)

at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:817)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1454)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)

at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:529)

at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:585)

at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)

at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1148)

at org.apache.commons.digester.Digester.parse(Digester.java:1548)

at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)

at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)

at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)

at javax.servlet.GenericServlet.init(GenericServlet.java:256)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3422)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)

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:595)

at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:549)

at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309)

at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)

at sun.reflect.GeneratedMethodAccessor44.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(ReflectedMBeanDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)

at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)

at $Proxy6.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

16:01:53,373 ERROR [ActionServlet] Parsing error processing resource path 

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)

at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)

at org.apache.commons.digester.Digester.startElement(Digester.java:1276)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:434)

at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:216)

at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:829)

at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:590)

at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:817)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1454)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)

at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:529)

at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:585)

at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)

at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1148)

at org.apache.commons.digester.Digester.parse(Digester.java:1548)

at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)

at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)

at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)

at javax.servlet.GenericServlet.init(GenericServlet.java:256)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3422)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)

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:595)

at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:549)

at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309)

at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)

at sun.reflect.GeneratedMethodAccessor44.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(ReflectedMBeanDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)

at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)

at $Proxy6.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)


		
---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

Re: OT: exporting data as .csv in Struts webapp

Posted by klute <so...@yahoo.com>.
Bill and Dennis,

Thanks a lot for the info. VERY helpful!

James

---
http://www.devbistro.com


--- Bill Siggelkow <bi...@bellsouth.net> wrote:
> Ooh ... I was just reminded that the values between
> the commas should be
> quoted in case there are internal commas ...
> 
>         
>
out.write("\"Every\",\"good\",\"boy\",\"does\",\"fine\"\r\n");
>         
>
out.write("\"face\",\"in\",\"the\",\"space\",\"dude\"\r\n");
> 
> 
> Bill Siggelkow wrote:
> 
> > Try something like this little servlet:
> > 
> > import java.io.IOException;
> > import java.io.PrintWriter;
> > 
> > import javax.servlet.ServletException;
> > import javax.servlet.http.HttpServlet;
> > import javax.servlet.http.HttpServletRequest;
> > import javax.servlet.http.HttpServletResponse;
> > 
> > public class CsvServlet extends HttpServlet {
> > 
> >     protected void doGet(HttpServletRequest
> request, HttpServletResponse 
> > response)
> >             throws ServletException, IOException {
> >         doPost(request, response);
> >     }
> >     protected void doPost(HttpServletRequest
> request, 
> > HttpServletResponse response)
> >             throws ServletException, IOException {
> >         response.setContentType("text/csv");
> >         PrintWriter out = response.getWriter();
> >         out.write("Every,good,boy,does,fine\r\n");
> >         out.write("face,in,the,space,dude\r\n");
> >         out.flush();
> >     }
> > }
> > 
> > 
> > klute wrote:
> > 
> >> Hi All,
> >>
> >> I am looking for some best practices advice on
> >> handling this task:
> >> I have a web application (written in Struts) that
> >> talks to some database. A browser user will be
> able
> >> user to export tabular data from the db in a
> comma
> >> delimited file and get a save as dialog box
> prompting
> >> to name the resulting file.
> >>
> >> I have not done this before so i am looking for
> >> suggestions on how to accomplish it (in terms of
> java
> >> object interaction and whatever else).
> >> Thanks a lot,
> >> James
> >> ---
> >> http://www.devbistro.com
> >>
> >>
> >>        
> >> __________________________________
> >> Do you Yahoo!?
> >> Read only the mail you want - Yahoo! Mail
> SpamGuard.
> >> http://promotions.yahoo.com/new_mail 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: OT: exporting data as .csv in Struts webapp

Posted by Bill Siggelkow <bi...@bellsouth.net>.
Ooh ... I was just reminded that the values between the commas should be
quoted in case there are internal commas ...

         out.write("\"Every\",\"good\",\"boy\",\"does\",\"fine\"\r\n");
         out.write("\"face\",\"in\",\"the\",\"space\",\"dude\"\r\n");


Bill Siggelkow wrote:

> Try something like this little servlet:
> 
> import java.io.IOException;
> import java.io.PrintWriter;
> 
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> 
> public class CsvServlet extends HttpServlet {
> 
>     protected void doGet(HttpServletRequest request, HttpServletResponse 
> response)
>             throws ServletException, IOException {
>         doPost(request, response);
>     }
>     protected void doPost(HttpServletRequest request, 
> HttpServletResponse response)
>             throws ServletException, IOException {
>         response.setContentType("text/csv");
>         PrintWriter out = response.getWriter();
>         out.write("Every,good,boy,does,fine\r\n");
>         out.write("face,in,the,space,dude\r\n");
>         out.flush();
>     }
> }
> 
> 
> klute wrote:
> 
>> Hi All,
>>
>> I am looking for some best practices advice on
>> handling this task:
>> I have a web application (written in Struts) that
>> talks to some database. A browser user will be able
>> user to export tabular data from the db in a comma
>> delimited file and get a save as dialog box prompting
>> to name the resulting file.
>>
>> I have not done this before so i am looking for
>> suggestions on how to accomplish it (in terms of java
>> object interaction and whatever else).
>> Thanks a lot,
>> James
>> ---
>> http://www.devbistro.com
>>
>>
>>        
>> __________________________________
>> Do you Yahoo!?
>> Read only the mail you want - Yahoo! Mail SpamGuard.
>> http://promotions.yahoo.com/new_mail 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: OT: exporting data as .csv in Struts webapp

Posted by Bill Siggelkow <bi...@bellsouth.net>.
Try something like this little servlet:

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class CsvServlet extends HttpServlet {

     protected void doGet(HttpServletRequest request, 
HttpServletResponse response)
             throws ServletException, IOException {
         doPost(request, response);
     }
     protected void doPost(HttpServletRequest request, 
HttpServletResponse response)
             throws ServletException, IOException {
         response.setContentType("text/csv");
         PrintWriter out = response.getWriter();
         out.write("Every,good,boy,does,fine\r\n");
         out.write("face,in,the,space,dude\r\n");
         out.flush();
     }
}


klute wrote:

> Hi All,
> 
> I am looking for some best practices advice on
> handling this task: 
> 
> I have a web application (written in Struts) that
> talks to some database. A browser user will be able
> user to export tabular data from the db in a comma
> delimited file and get a save as dialog box prompting
> to name the resulting file.
> 
> I have not done this before so i am looking for
> suggestions on how to accomplish it (in terms of java
> object interaction and whatever else). 
> 
> Thanks a lot,
> James 
> 
> ---
> http://www.devbistro.com
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: OT: exporting data as .csv in Struts webapp

Posted by DG...@EvergreenInvestments.com.
My suggestion is to get the source for displayTag 
(http://displaytag.sourceforge.net) and look at TableTag.doExport() and 
CsvView.

Dennis




klute <so...@yahoo.com> 
07/07/2004 10:28 AM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>


To
Struts Users Mailing List <us...@struts.apache.org>
cc

Subject
OT: exporting data as .csv in Struts webapp






Hi All,

I am looking for some best practices advice on
handling this task: 

I have a web application (written in Struts) that
talks to some database. A browser user will be able
user to export tabular data from the db in a comma
delimited file and get a save as dialog box prompting
to name the resulting file.

I have not done this before so i am looking for
suggestions on how to accomplish it (in terms of java
object interaction and whatever else). 

Thanks a lot,
James 

---
http://www.devbistro.com


 
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



OT: exporting data as .csv in Struts webapp

Posted by klute <so...@yahoo.com>.
Hi All,

I am looking for some best practices advice on
handling this task: 

I have a web application (written in Struts) that
talks to some database. A browser user will be able
user to export tabular data from the db in a comma
delimited file and get a save as dialog box prompting
to name the resulting file.

I have not done this before so i am looking for
suggestions on how to accomplish it (in terms of java
object interaction and whatever else). 

Thanks a lot,
James 

---
http://www.devbistro.com


		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org