Re[2]: Barracuda: Gettin Started with Barracuda

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Organization Springfield Nuclear Plant
Message-ID <[email protected]>
Hello Ravi,

Seems like you have everything set up correctly except for one
possible thing.  Do you have anything set in your system CLASSPATH
variable?  I think you have some .jar file in your CLASSPATH which
contains the servlet-2.2 api.  I hadn't thought about this being an
issue, but now that I look at the compile errors you are getting, it
most certainly is.  At compile-time, you need to have the servlet-2.3
jar file (which is included in WEB-INF/jars) to compile against.
However, at runtime, it should still work under a servlet-2.2 (I
haven't tested that recently) but Tomcat, ever since 4.0 has supported
the servlet-2.3 api, so it is kind of a moot point.  Most servers
support servlet-2.3 by now.

So, clean your CLASSPATH and make it look like the following...

CLASSPATH = .
or, if you use jikes for compilation...
CLASSPATH = .;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\htmlconverter.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\jre\lib\rt.jar

the latter is what I have on my CLASSPATH.

YOu should be building custom classpaths dynamically in your build.xml
files or batch files instead of hardcoding it in the system CLASSPATH
variable.  That will avoid the problem you are having now on future
projects.

As far as where to put your own project, what exactly do you mean?  Do
you mean your build.  Are you very familiar with Ant?  If not, I
suggest looking at the build.xml file (and the whole build structure
in general) of Diez' contrib project.  You can run it directly by
pointing your command line to:

Barracuda/src/org/enhydra/barracuda/contrib/dbroggisch/webapp

The one caveat is that the contrib package must have been built
already from the main bulid.  I will fix this later so that proper
dependency checking is done but, for now, just make sure the
baracuda-contrib.jar file has been built and then you can run Diez'
contrib package build file directly.  Use "ant -projecthelp" to see
the available targets.

So, to answer your question, you can copy Diez contrib project and
modify it for your needs.  Put it anywhere on your filesystem and call
it any name you want.

Jake


Tuesday, December 31, 2002, 1:38:55 AM, you wrote:

RA> Hello Jake 
RA> Thanx for ur time .I hv followed the steps but i m
RA> getting some problem, please hv a look at it:
RA> I am using j2sdk1.4.1_01, Tomcat4.1.18 and
RA> jakarta-ant-1.5.1 on windows os.

RA> these are the steps i performed:
RA> 1) Installed jakarta-ant-1.5.1 and set ANT_HOME and
RA> put ANT_HOME/bin in my system path

RA> 2) removed XercesImpl.jar and xmp-apis.jar frm
RA> ANT_HOME/lib.

RA> 3) Installed Tomcat4.1.18 and set CATALINA_HOME.

RA> 4) Installed latest cvs-1-11-4 that contains a
RA> Barracuda folder, a cvs-1-11-4.exe file, a NEWS file
RA> and a README file : a total of four things. I hv put
RA> this cvs as "C:\cvs-1-11-4".

RA> 5) copied  jtidy-r7-xmlc-2.1.jar, gnu-regexp-1.1.4,
RA> xerces-1.4.4-xmlc-2.1.jar, xmlc-2.1.jar from 
RA> "C:\cvs-1-11-4\Barracuda\WEB-INF\jars" to
RA> "CATALINA_HOME:\shared\lib".

RA> 6) started TOMCAT

RA> 7) run "C:\cvs-1-11-4\Barracuda\src\ ant contrib  "
RA> frm command prompt
RA> the RESULT is :

RA> ------
RA> C:\cvs-1-11-4\Barracuda\src>ant contrib
RA> Buildfile: build.xml

RA> sample.init:
RA>      [copy] Copying 1 file to
RA> C:\cvs-1-11-4\Barracuda\src
RA>      [copy] Copying 5 files to
RA> C:\cvs-1-11-4\Barracuda\WEB-INF

RA> taskdefs.init:
RA>     [mkdir] Created dir:
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\classes

RA> source.init:
RA>     [mkdir] Created dir:
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\classes\xlib
RA>     [mkdir] Created dir:
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\tmp$\src_events
RA>     [mkdir] Created dir:
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\tmp$\src_xmlc
RA>     [mkdir] Created dir:
RA> C:\cvs-1-11-4\Barracuda\unit_tests
RA>     [mkdir] Created dir:
RA> C:\cvs-1-11-4\Barracuda\unit_tests\reports

RA> init:

RA> taskdefs.compile:
RA>     [javac] Compiling 8 source files to
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\classes
RA>      [copy] Copying 1 file to
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\classes\org\enhydra\barracuda\taskdefs
RA>      [copy] Copying 2 files to
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\classes\xlib\dtds

RA> taskdefs:
RA>       [jar] Building jar:
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\jars\barracuda-ant.jar

RA> compile_core:
RA>     [javac] Compiling 232 source files to
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\classes
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\core\helper\servlet\HttpServletRequest
RA>     [javac] symbol  : method getRequestURL ()
RA>     [javac] location: interface
RA> javax.servlet.http.HttpServletRequest
RA>     [javac]     public StringBuffer getRequestURL()
RA> {return req.getRequestURL();}
RA>     [javac]                                           
RA>         ^
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\core\helper\servlet\HttpServletRequest
RA>     [javac] symbol  : method setCharacterEncoding
RA> (java.lang.String)
RA>     [javac] location: interface
RA> javax.servlet.http.HttpServletRequest
RA>     [javac]         req.setCharacterEncoding(env);
RA>     [javac]            ^
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\core\helper\servlet\HttpServletRequest
RA>     [javac] symbol  : method getParameterMap ()
RA>     [javac] location: interface
RA> javax.servlet.http.HttpServletRequest
RA>     [javac]             return req.getParameterMap();
RA>     [javac]                       ^
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\webapp\log4j\Log4jApplicationWatch.jav
RA>     [javac] symbol  : method getServletContextName ()
RA>     [javac] location: interface
RA> javax.servlet.ServletContext
RA>     [javac]         context.log("Cleaning up Log4j
RA> resources for context: " + context.getServletCont
RA>     [javac]                                           
RA>                               ^
RA>     [javac] Note: Some input files use or override a
RA> deprecated API.
RA>     [javac] Note: Recompile with -deprecation for
RA> details.
RA>     [javac] 4 errors

RA> BUILD FAILED
RA> file:C:/cvs-1-11-4/Barracuda/src/build.xml:527:
RA> Compile failed; see the compiler error output for de

RA> Total time: 43 seconds
RA> C:\cvs-1-11-4\Barracuda\src>
RA> -----------------------------------------------

RA>         Again after this I copied "xerces-1.4.4-xmlc-2.1.jar"
RA> from "C:\cvs-1-11-4\Barracuda\WEB-INF\jars" to
RA> "ANT_HOME\lib" and then again tried to run it
RA> "C:\cvs-1-11-4\Barracuda\src\ ant contrib " frm
RA> command prompt. then i got this :

RA> ---------
RA> C:\cvs-1-11-4\Barracuda\src>ant contrib
RA> Buildfile: build.xml

RA> sample.init:

RA> taskdefs.init:

RA> source.init:

RA> init:

RA> taskdefs.compile:

RA> taskdefs:

RA> compile_core:
RA>     [javac] Compiling 135 source files to
RA> C:\cvs-1-11-4\Barracuda\WEB-INF\classes
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\core\helper\servlet\HttpServletRequest
RA>     [javac] symbol  : method getRequestURL ()
RA>     [javac] location: interface
RA> javax.servlet.http.HttpServletRequest
RA>     [javac]     public StringBuffer getRequestURL()
RA> {return req.getRequestURL();}
RA>     [javac]                                           
RA>         ^
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\core\helper\servlet\HttpServletRequest
RA>     [javac] symbol  : method setCharacterEncoding
RA> (java.lang.String)
RA>     [javac] location: interface
RA> javax.servlet.http.HttpServletRequest
RA>     [javac]         req.setCharacterEncoding(env);
RA>     [javac]            ^
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\core\helper\servlet\HttpServletRequest
RA>     [javac] symbol  : method getParameterMap ()
RA>     [javac] location: interface
RA> javax.servlet.http.HttpServletRequest
RA>     [javac]             return req.getParameterMap();
RA>     [javac]                       ^
RA>     [javac]
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\webapp\log4j\Log4jApplicationWatch.jav
RA>     [javac] symbol  : method getServletContextName ()
RA>     [javac] location: interface
RA> javax.servlet.ServletContext
RA>     [javac]         context.log("Cleaning up Log4j
RA> resources for context: " + context.getServletCont
RA>     [javac]                                           
RA>                               ^
RA>     [javac] Note:
RA> C:\cvs-1-11-4\Barracuda\src\org\enhydra\barracuda\core\helper\servlet\HttpServletR
RA>     [javac] Note: Recompile with -deprecation for
RA> details.
RA>     [javac] 4 errors

RA> BUILD FAILED
RA> file:C:/cvs-1-11-4/Barracuda/src/build.xml:527:
RA> Compile failed; see the compiler error output for de

RA> Total time: 31 seconds
RA> C:\cvs-1-11-4\Barracuda\src>
RA> --------------------------------

RA> Please help me out with this as i m not able to figure
RA> out as what is going wrong. An earliest response on
RA> this is requested.

RA> one more thing where to put my own project??

RA> Wish u all a very happy and prosperus new year 

RA> regards,
RA> Ravi Anand

RA> --- Jacob Kjome <[email protected]> wrote:
>> Hello Ravi,
>> 
>> Sorry I didn't get to this earlier.  I got a late
>> start today.
>> 
>> First, I would start with the latest CVS.  It is
>> quite
>> stable...more so, in fact, than Barracuda-1.1.1. 
>> Second, I think you
>> will find a great example in the contrib project
>> that Diez B. Roggisch
>> provided.  It exists in the latest CVS.
>> 
>> As far as instructions on use, I don't have time to
>> lay out how to use
>> the Forms models.  We really do need some better
>> docs on that, but I
>> have no time to do that right now.  In fact, I think
>> there are others
>> in the Barracuda community who would be able to do a
>> better job with
>> this than myself.  I can tell you how to set things
>> up for a quick
>> start.
>> 
>> 1.  I suggest using j2sdk1.4.1_01 rather than JDK1.3
>> but either will
>> work.
>> 
>> 2.  Install Ant-1.5.1 and set ANT_HOME and put
>> ANT_HOME/bin in your
>> system Path.  Remove XercesImpl.jar and xml-apis.jar
>> from
>> ANT_HOME/lib.
>> 
>> 3.  Install the latest version of Tomcat (currently
>> Tomcat-4.1.18).
>> Set CATALINA_HOME.
>> 
>> 4.  Get the latest Barracuda CVS (
>> http://barracuda.enhydra.org/software/cvs/index.html
>> ).  I suggest
>> using TortoiseCVS if you are using Windows (
>> http://www.tortoisecvs.org/ ).  If you are using
>> JDK1.3, make sure to
>> copy xerces-1.4.4-xmlc-2.1.jar from
>> Barracuda/WEB-INF/jars to
>> ANT_HOME/lib.  In addition, copy said jar,
>> xmlc-2.1.jar,
>> gnu-regexp-1.1.4.jar, and jtidy-r7-xmlc-2.1.jar to
>> CATALINA_HOME/shared/lib.
>> 
>> 5.  Start Tomcat and then run:
>> 
>> ant contrib
>> 
>> You will, eventually be prompted for the project to
>> build and the
>> target.  For the project, either type "all" or
>> "dbroggisch" and for
>> target type "install".
>> 
>> Alternatively, to do this in a more batch type
>> process, you can run
>> this:
>> 
>> ant contrib -Dsubproject=dbroggisch
>> -Dsubtarget=install
>> 
>> 6.  Access Diez contrib project by pointing your
>> browser to:
>> 
>> http://localhost:8080/contrib-dbroggisch/
>> 
>> 
>> At this point, you can test his app out and then
>> look at the
>> sourcecode to see what is going on.  Anything
>> specific to the webapp
>> will in
>>
RA> Barracuda/src/org/enhydra/barracuda/contrib/dbroggisch/webapp
>> and any general libraries for this contrib project
>> will be one
>> directory back from "webapp".  You can use this
>> app's build.xml
>> (inside "webapp") for your own project.  It will
>> provide a pretty good
>> starter project for Barracuda apps.
>> 
>> That's all I can provide for you at the moment.  I
>> have a deadline of
>> my own to meet today and tomorrow.  Send any further
>> questions to the
>> list.  I'm sure there are other people who are
>> willing to help you
>> out.
>> 
>> Good luck!
>> 
>> Jake
>> 
>> Monday, December 30, 2002, 4:17:20 AM, you wrote:
>> 
>> RA> Hi!!
>> 
>> RA> I am very new to Barracuda. I need to get
>> started with
>> RA> Barracuda in order to develop some sample
>> RA> applications.
>> 
>> RA> I have downloaded Barracuda1.1.1.zip . I need
>> step by
>> RA> step procedures to build it as i am a novice. I
>> am
>> RA> using JDK1.3, Tomcat3.2.1.
>> 
>> RA> I need to use form validation and Client
>> idetification
>> RA> for my application plus i need to use page
>> design
>> RA> tools in order to see that how this framework
>> provides
>> RA> cleaner seperation betn presentation & logic.I
>> need to
>> RA> know how to start writing my application and frm
>> RA> where?
>> 
>> RA> I hv gone through previous listings in the mail
>> RA> archive bt that didnt helped me i got confused.
>> If you
>> RA> could provide me with a simple step by step
>> procedures
>> RA> based on my requirements it would be of great
>> help.
>> 
>> RA> I am really in bad need of this information and
>> i am
>> RA> left with a little time for this.
>> RA> regards,
>> RA> Anand
>> 
>> 
>> 
>> RA>
>> __________________________________________________
>> RA> Do you Yahoo!?
>> RA> Yahoo! Mail Plus - Powerful. Affordable. Sign up
>> now.
>> RA> http://mailplus.yahoo.com
>> RA> _______________________________________________
>> RA> Barracuda mailing list
>> RA> [email protected]
>> RA>
>>
RA> http://www.enhydra.org/mailman/listinfo.cgi/barracuda
>> RA> FAQ - http://www.jguru.com/faq/Barracuda
>> 
>> 
>> 
>> -- 
>> Best regards,
>>  Jacob                           
>> mailto:[email protected]
>> 
>> _______________________________________________
>> Barracuda mailing list
>> [email protected]
>>
RA> http://www.enhydra.org/mailman/listinfo.cgi/barracuda
>> FAQ - http://www.jguru.com/faq/Barracuda


RA> __________________________________________________
RA> Do you Yahoo!?
RA> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
RA> http://mailplus.yahoo.com
RA> _______________________________________________
RA> Barracuda mailing list
RA> [email protected]
RA> http://www.enhydra.org/mailman/listinfo.cgi/barracuda
RA> FAQ - http://www.jguru.com/faq/Barracuda



-- 
Best regards,
 Jacob                            mailto:[email protected]

_______________________________________________
Barracuda mailing list
[email protected]
http://www.enhydra.org/mailman/listinfo.cgi/barracuda
FAQ - http://www.jguru.com/faq/Barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.