cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zulhisham abu nawar" <ijoi7...@gmail.com>
Subject Re: cocoon&hibernate tutorial
Date Wed, 22 Feb 2006 06:54:37 GMT
i'm back ;-)...now i'm using cocoon 2.1.7, hibernate 2.1.6 (same like
tutorial). I'm still got the errors when i compiled file.java...

Through this tutorial, i should download hibernate and copy some
files.jarto /WEB-INF/lib. Here should i build hibernate file??Then for
files.java (PersistenceFactory.java n HibernateFactory.java) i put at
/WEB-INF/classes/hib. From tutorial i should copy avalon-framework-api.jar,
excalibur-datasource.jar to WEB-INF/lib folder and compile java files..So my
problem is the java file cant compiled and the errrors:

mac:/usr/opt/tomcat/jakarta-tomcat-5.0.28/webapps/cocoon/WEB-INF/classes/hib
root# javac PersistenceFactory.java
PersistenceFactory.java:8: package
org.apache.avalon.framework.componentdoes not exist
import org.apache.avalon.framework.component.*;
^
PersistenceFactory.java:10: cannot resolve symbol
symbol  : class Component
location: interface hib.PersistenceFactory
public interface  PersistenceFactory extends Component {
                                             ^
PersistenceFactory.java:13: package net.sf.hibernate does not exist
    public net.sf.hibernate.Session createSession();
                           ^
3 errors

On 2/14/06, Thomas Lutz <mattom@gmx.at> wrote:
>
> sorry for the noise, rereading your post, I think i replied too short.
>
> you have to include the avalon jars in your build path. this is hast to
> be done in your ide and in your build file. so search for configure
> build path in your ide, adapt my build.xml to your ant script, or use
> the classpath argument of the javac to reference to the avalong jar (in
> /WEB-INF/lib, that's right).


actually i'm just using VI in my mac os X

usually you can't just unzip a jar and take one class file out, much too
> much dependencies :-)
>
> hth better :-),
> tom
>
> Thomas Lutz wrote:
> > this is a part of my build file which should fit your needs, too.
> > (it's a bit too much, as i use javaflow, just comment the not needed
> > jars)
> >
> >    <javac srcdir="${src.server.war.dir}"
> > destdir="${build.server.war.ant.dir}" debug="on">
> >            <classpath>
> >                <path refid="build.path"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/avalon-framework-api-4.3.jar"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/avalon-framework-impl-4.3.jar"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/avalon-logkit-2.1.jar"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/excalibur-datasource-2.1.jar"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/excalibur-pool-api-2.1.jar"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/cocoon-javaflow-block.jar"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/cocoon-2.1.8.jar"/>
> >                <pathelement
> > location="${lib.dir}/cocoon/commons-lang-2.1.jar"/>
> >            </classpath>
> >        </javac>
> >
> > hth,
> > tom
> >
> > zulhisham abu nawar wrote:
> >> hi..
> >> now i'm in process to get hibernate and cocoon run together...i found
> >> some documentation at wiki. I try to follow cocoon and hibernate
> >> tutorial. I've problem when i try to compile PersistenceFactory.java
> >> and HibernateFactory.java
> >>
> >> the errors:
> >> javac PersistenceFactory.java
> >> PersistenceFactory.java:3: package
> >> org.apache.avalon.framework.component does not exist
> >> import org.apache.avalon.framework.component.Component;
> >>                                              ^
> >> PersistenceFactory.java:5: cannot resolve symbol
> >> symbol  : class Component
> >> location: interface org.test.PersistenceFactory
> >> public interface PersistenceFactory extends Component {
> >>                                             ^
> >> PersistenceFactory.java:8: package net.sf.hibernate does not exist
> >>         public net.sf.hibernate.Session createSession();
> >>                                ^
> >> 3 errors
> >>
> >> >From the errors, it look like avalon package not exist in my
> >> directory. Then i look into /WEB-INF/classes and don't have folder for
> >> avalon. So my question is where the imported avalon classess from
> >> (from lib or /classes/avalon...). Cause no sure what im doing, i try
> >> to extarct avalon-framework-api-4.3.jar and put it in
> >> /classes/org/avalon and so. But i still got the same errors
> >>
> >> any ideas??
> >>
> >> req:
> >> cocoon 2.1.8
> >> tomcat 5.0.28
> >> hibernate 3.1
> >> avalon-framework-api-4.3.jar
> >>
> >> --
> >> ::)- mister ijoi
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >> For additional commands, e-mail: users-help@cocoon.apache.org
> >>
> >>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


--
::)- mister ijoi

Mime
View raw message