Doh, I should read the current list a bit also.  I'm having the same trouble as 
joe/mohana

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] Behalf Of joe
> Sent: Monday, July 19, 2004 7:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: $intake.declareGroups NOt resolved
> 
> 
> Hi Mohana,
> 
> How did you fix your $Intake decalre problem...I am running 
> into the same
> road block as you...????
> 
> Thanks
> --joe
> 
> "Mohana Ramaratnam" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> >
> > Can anybody help me with the following problem:
> >
> >
> >
> > I am trying to use Intake and I have made sure that all the 
> necessary
> > steps have been taken. When I compile the project, start 
> tomcat and get
> > to the
> >
> > TestIntake.vm file in the browser, I get $intake.declareGroups() as
> > text, it is not resolved. However, when I copy the same 
> project on some
> > other machine running the same version of TDK-2.2,
> > $intake.declareGroups() is resolved (project is NOT 
> recompiled on that
> > machine.just copied).
> >
> >
> >
> > What is missing?
> >
> >
> >
> > Here are the necessary files:
> >
> >
> >
> > **************************************
> >
> > Error message in turbine.log
> >
> > *************************************
> >
> >
> >
> > [Mon Sep 22 14:58:35 GMT-06:00 2003] -- ERROR -- Could not 
> instantiate
> > tool org.apache.turbine.services.intake.IntakeTool to add 
> to the context
> >
> >       Exception:  org.apache.turbine.util.TurbineException:
> > Instantiation failed for 
> org.apache.turbine.services.intake.IntakeTool
> >
> >       Stack Trace follows:
> >
> >       java.lang.NullPointerException
> >
> >       at
> > 
> org.apache.turbine.services.intake.IntakeTool.<init>(IntakeToo
> l.java:90)
> >
> >       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> >
> >       at
> > 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo
> nstructorA
> > ccessorImpl.java:39)
> >
> >       at
> > 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele
> gatingCons
> > tructorAccessorImpl.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.turbine.services.factory.TurbineFactoryService.getI
> nstance(Tu
> > rbineFactoryService.java:396)
> >
> > rethrown as org.apache.turbine.util.TurbineException: Instantiation
> > failed for org.apache.turbine.services.intake.IntakeTool
> >
> >       at
> > 
> org.apache.turbine.services.factory.TurbineFactoryService.getI
> nstance(Tu
> > rbineFactoryService.java:400)
> >
> >       at
> > 
> org.apache.turbine.services.pool.TurbinePoolService.getInstanc
> e(TurbineP
> > oolService.java:484)
> >
> >       at
> > 
> org.apache.turbine.services.pull.TurbinePullService.populateWi
> thRequestT
> > ools(TurbinePullService.java:474)
> >
> >       at
> > 
> org.apache.turbine.services.pull.TurbinePullService.populateCo
> ntext(Turb
> > inePullService.java:406)
> >
> >       at
> > 
> org.apache.turbine.services.pull.TurbinePull.populateContext(T
> urbinePull
> > .java:145)
> >
> >       at
> > 
> org.apache.turbine.services.velocity.TurbineVelocityService.ge
> tContext(T
> > urbineVelocityService.java:249)
> >
> >       at
> > 
> org.apache.turbine.services.velocity.TurbineVelocity.getContex
> t(TurbineV
> > elocity.java:156)
> >
> >       at
> > 
> org.apache.turbine.modules.pages.VelocityPage.doBuildBeforeAct
> ion(Veloci
> > tyPage.java:84)
> >
> >       at
> > 
> org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPa
> ge.java:13
> > 7)
> >
> >       at org.apache.turbine.modules.Page.build(Page.java:90)
> >
> >       at 
> org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
> >
> >       at org.apache.turbine.Turbine.doGet(Turbine.java:563)
> >
> >       at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >
> >       at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >
> >       at
> > 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Applica
> > tionFilterChain.java:247)
> >
> >       at
> > 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilt
> > erChain.java:193)
> >
> >       at
> > 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValv
> > e.java:243)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:566)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> > 72)
> >
> >       at
> > 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >
> >       at
> > 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValv
> > e.java:190)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:566)
> >
> >       at
> > 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut
> henticator
> > Base.java:475)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:564)
> >
> >       at
> > 
> org.apache.catalina.valves.CertificatesValve.invoke(Certificat
> esValve.ja
> > va:246)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:564)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> > 72)
> >
> >       at
> > 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >
> >       at
> > 
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:234
> > 7)
> >
> >       at
> > 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java
> > :180)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:566)
> >
> >       at
> > 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherVa
> > lve.java:170)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:564)
> >
> >       at
> > 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java
> > :170)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:564)
> >
> >       at
> > 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:468
> > )
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:564)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> > 72)
> >
> >       at
> > 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >
> >       at
> > 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.
> > java:174)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.ja
> > va:566)
> >
> >       at
> > 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> > 72)
> >
> >       at
> > 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >
> >       at
> > 
> org.apache.catalina.connector.http.HttpProcessor.process(HttpP
> rocessor.j
> > ava:1027)
> >
> >       at
> > 
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
> ssor.java:
> > 1125)
> >
> >       at java.lang.Thread.run(Thread.java:534)
> >
> >
> >
> >
> >
> >
> >
> > **************************************
> >
> > Intake.xml (in webapps/Mohana/web-inf/conf folder)
> >
> > **************************************
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!DOCTYPE input-data SYSTEM
> > "http://jakarta.apache.org/turbine/dtd/intake.dtd";>
> >
> > <input-data basePackage="org.mycompany.mohana.">
> >
> >       <group key="participant" name="participant">
> >
> >             <field key="map" name="map">
> >
> >                   <rule name="maxValue" value="100"> At most 100
> > allowed</rule>
> >
> >             </field>
> >
> >       </group>
> >
> > </input-data>
> >
> >
> >
> > ************************
> >
> > TestIntake.vm (in templates/app/screens folder)
> >
> > ************************
> >
> >
> >
> > $page.setTitle("Test Intake")
> >
> >
> >
> > #set ($pargr=$intake.participant.Default)
> >
> >
> >
> > <meta http-equiv="Content-Type" content="text/html; 
> charset=iso-8859-1">
> >
> >
> >
> >
> >
> >
> >
> > </head>
> >
> >
> >
> > <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0"
> > marginheight="0">
> >
> >
> >
> > <form name="TestIntake" method="post"
> > action="$link.setAction("TestIntakeAction")">
> >
> >
> >
> >   <div align="left">
> >
> >
> >
> >    <b><u><font face="$ui.sansSerifFonts" size="4">
> >
> >       New archive subject
> >
> >       </u></b>
> >
> >
> >
> >       <br><br>
> >
> >
> >
> >       <table>
> >
> >             <tr>
> >
> >                   #formLabel("Map number")
> >
> >                   #formTextField("map" "")
> >
> >             </tr>
> >
> >
> >
> >       </table>
> >
> >
> >
> >        <input type="submit" name="eventSubmit_doSubmit" 
> value="Submit"
> > />
> >
> >   </div>
> >
> >       $intake.declareGroups()
> >
> > </form>
> >
> >
> >
> >
> >
> > ***********************
> >
> > TestIntakeAction.java (in modules/actions folder)
> >
> > ***********************
> >
> >
> >
> > package org.mycompany.mohana.modules.actions;
> >
> >
> >
> > import java.util.List;
> >
> > import java.util.Date;
> >
> > import java.util.GregorianCalendar;
> >
> > import java.util.Enumeration;
> >
> > import javax.servlet.*;
> >
> > import javax.servlet.http.*;
> >
> >
> >
> > import org.apache.velocity.context.Context;
> >
> >
> >
> > import org.apache.turbine.services.intake.IntakeTool;
> >
> > import org.apache.turbine.services.intake.model.*;
> >
> > import org.apache.turbine.services.intake.TurbineIntake;
> >
> >
> >
> > import org.apache.turbine.util.RunData;
> >
> > import org.apache.turbine.modules.actions.VelocityAction;
> >
> > import org.apache.torque.util.Criteria;
> >
> >
> >
> >
> >
> >
> >
> > /**
> >
> >  * This class provides a simple set of methods to
> >
> >  * insert/update/delete records in a database.
> >
> >  */
> >
> >
> >
> > public class TestIntakeAction extends SecureAction
> >
> > {
> >
> >
> >
> >
> >
> >    public void doSubmit(RunData data, Context context)
> >
> >         throws Exception
> >
> >     {
> >
> >       //Get the instance of the Intake tool being used for 
> this request
> >
> >
> >
> >       IntakeTool intake = (IntakeTool)context.get("intake");
> >
> >       Group g =intake.get("participant",
> >
> > 
> data.getParameters().getString(TurbineIntake.getGroupKey("part
> icipant"))
> > );
> >
> >
> >
> >       if (g.isAllValid() ){
> >
> >         data.setMessage("All is well");
> >
> >
> >
> >       }
> >
> >       else {
> >
> >             data.setMessage("There were errors in your form
> > submission.");
> >
> >       }
> >
> >
> >
> >       data.setScreenTemplate("Mohana.vm");
> >
> >
> >
> >     }
> >
> >
> >
> >
> >
> >     /**
> >
> >      * This is used in the event that the doInsert
> >
> >      * above fails.
> >
> >      */
> >
> >     public void doPerform(RunData data, Context context)
> >
> >         throws Exception
> >
> >     {
> >
> >         data.setMessage("Can't find the button!");
> >
> >     }
> >
> > }
> >
> >
> >
> > **********************************************
> >
> > The following lines from TurbineResources.properties are 
> uncommented:
> >
> > **********************************************
> >
> >
> >
> > 
> services.IntakeService.classname=org.apache.turbine.services.i
> ntake.Turb
> > ineIntakeService
> >
> > # These are intake tools.
> >
> > tool.request.om=org.apache.turbine.om.OMTool
> >
> > tool.request.intake=org.apache.turbine.services.intake.IntakeTool
> >
> >
> >
> >
> >
> > # The location of the xml file specifying valid inputs
> >
> > #
> >
> > # Example: org.foo.bar.MyClassLoader, org.ack.joe.YourClassLoader
> >
> > #
> >
> > services.IntakeService.xml.path=WEB-INF/conf/intake.xml
> >
> >
> >
> >
> >
> >
> >
> > *************************************
> >
> > Environment:
> >
> > *************************************
> >
> >
> >
> > JDK 1.4.2
> >
> > TDK-2.2
> >
> > Ant 1.5
> >
> > Windows XP
> >
> >
> >
> >
> >
> > #########################
> >
> > thanking in advance
> >
> >
> >
> > Mohana Ramaratnam
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to