You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ea...@gmx.de on 2004/02/24 22:07:07 UTC

Petshop example still does not compile :-(

I included j2ee.jar now in the classpath and I get the following errors:

C:\java\tapestry\petshop\petshop>ant run
Buildfile: build.xml

run:

start-mckoidb:
   [delete] Deleting directory C:\java\tapestry\petshop\petshop\mckoidb

compile:
    [javac] Compiling 94 source files to
C:\java\tapestry\petshop\petshop\build\
classes
    [javac]
C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
tation\pages\EditAccountPage.java:86: cannot resolve symbol
    [javac] symbol  : constructor Locale  (java.lang.String)
    [javac] location: class java.util.Locale
    [javac]                                     getEngine().setLocale(new
Locale
(newCustomer.getProfile().getLangPref()));
    [javac]                                                               ^
    [javac]
C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
tation\pages\OrderProcessPage.java:22: cannot resolve symbol
    [javac] symbol  : constructor Locale  (java.lang.String)
    [javac] location: class java.util.Locale
    [javac]                    
setCurrencyFormat(NumberFormat.getCurrencyInstan
ce((new Locale(getUserLanguage()))));
    [javac]
        ^
    [javac]
C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
tation\pages\SignInPage.java:45: cannot resolve symbol
    [javac] symbol  : constructor Locale  (java.lang.String)
    [javac] location: class java.util.Locale
    [javac]             engine.setLocale(new
Locale(customer.getProfile().getLan
gPref()));
    [javac]                                  ^
    [javac]
C:\java\tapestry\petshop\petshop\src\pt\waveweb\core\AplicationExcep
tion.java:7: cannot resolve symbol

> AFAIK javax.sql.Datasource is part of the j2ee.jar that comes with the 
> j2sdkee distro. When you compile apps for application servers op web 
> containers you generally need to add it to your classpath.
> 
> David Moran wrote:
> > I was able to download it and it ran 
> > with no modifications. 
> > 
> > 
> > 
> > On Mon, 2004-02-23 at 18:00, easy-to-remember@gmx.de wrote:
> > 
> >>Hi there!
> >>
> >>I just downloaded the PetShop example from this location
> >>here:
> >>
>
>>http://pwp.netcabo.pt/users/164/0229592601/tapestryapps/files/petshop-0.4.1.tar.gz
> >>
> >>I entered ant run but I still get error messages.
> >>
> >>Do you know how to correct the build.xml file in order to run properly?
> >>
> >>I guess some jars have not been included as well, eg.
> javax.sql.DataSource
> >>has not been found and I dont know which jar file this one should be.
> >>
> >>Or does anyone have a working version of the PetShop example?
> >>
> >>
> >>Thanks!
> >>
> >>Toby
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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


Re: Petshop example still does not compile :-(

Posted by ea...@gmx.de.
Hello!

I managed to compile it with eclipse. Ant runs though without any error
messages, but when I go to the url localhost:8081:petshop I get the following:


HTTP ERROR: 500 Could not load class org.apache.tapestry.pets.PetshopEngine
from
org.mortbay.http.ContextLoader(file:/C:/DOKUME~1/root/LOKALE~1/Temp/Jetty__8081__petshop/lib/Jetty-60937.jar) /
sun.misc.Launcher$AppClassLoader@e80a59: org/apache/tapestry/pets/PetshopEngine (wrong name:
src/org/apache/tapestry/pets/PetshopEngine)
RequestURI=/petshop/app


Any ideas?

Thanks!

> I included j2ee.jar now in the classpath and I get the following errors:
> 
> C:\java\tapestry\petshop\petshop>ant run
> Buildfile: build.xml
> 
> run:
> 
> start-mckoidb:
>    [delete] Deleting directory C:\java\tapestry\petshop\petshop\mckoidb
> 
> compile:
>     [javac] Compiling 94 source files to
> C:\java\tapestry\petshop\petshop\build\
> classes
>     [javac]
> C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
> tation\pages\EditAccountPage.java:86: cannot resolve symbol
>     [javac] symbol  : constructor Locale  (java.lang.String)
>     [javac] location: class java.util.Locale
>     [javac]                                     getEngine().setLocale(new
> Locale
> (newCustomer.getProfile().getLangPref()));
>     [javac]                                                              
> ^
>     [javac]
> C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
> tation\pages\OrderProcessPage.java:22: cannot resolve symbol
>     [javac] symbol  : constructor Locale  (java.lang.String)
>     [javac] location: class java.util.Locale
>     [javac]                    
> setCurrencyFormat(NumberFormat.getCurrencyInstan
> ce((new Locale(getUserLanguage()))));
>     [javac]
>         ^
>     [javac]
> C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
> tation\pages\SignInPage.java:45: cannot resolve symbol
>     [javac] symbol  : constructor Locale  (java.lang.String)
>     [javac] location: class java.util.Locale
>     [javac]             engine.setLocale(new
> Locale(customer.getProfile().getLan
> gPref()));
>     [javac]                                  ^
>     [javac]
> C:\java\tapestry\petshop\petshop\src\pt\waveweb\core\AplicationExcep
> tion.java:7: cannot resolve symbol
> 
> > AFAIK javax.sql.Datasource is part of the j2ee.jar that comes with the 
> > j2sdkee distro. When you compile apps for application servers op web 
> > containers you generally need to add it to your classpath.
> > 
> > David Moran wrote:
> > > I was able to download it and it ran 
> > > with no modifications. 
> > > 
> > > 
> > > 
> > > On Mon, 2004-02-23 at 18:00, easy-to-remember@gmx.de wrote:
> > > 
> > >>Hi there!
> > >>
> > >>I just downloaded the PetShop example from this location
> > >>here:
> > >>
> >
>
>>http://pwp.netcabo.pt/users/164/0229592601/tapestryapps/files/petshop-0.4.1.tar.gz
> > >>
> > >>I entered ant run but I still get error messages.
> > >>
> > >>Do you know how to correct the build.xml file in order to run
> properly?
> > >>
> > >>I guess some jars have not been included as well, eg.
> > javax.sql.DataSource
> > >>has not been found and I dont know which jar file this one should be.
> > >>
> > >>Or does anyone have a working version of the PetShop example?
> > >>
> > >>
> > >>Thanks!
> > >>
> > >>Toby
> > >>
> > >>
> > >>
> > >>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >>
> > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > > 
> > > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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


Re: Petshop example still does not compile :-(

Posted by Jonny Wray <jo...@yahoo.com>.
This is pretty basic java stuff.

If you compare the APIs of Java 1.3 and 1.4 you will see that the
constructor for Locale(String) is only added in 1.4, as was Datasource.
Hence I assume you are trying to compile with a 1.3 SDK.

It looks like the example requires 1.4
Jonny

--- easy-to-remember@gmx.de wrote:
> I included j2ee.jar now in the classpath and I get the following
> errors:
> 
> C:\java\tapestry\petshop\petshop>ant run
> Buildfile: build.xml
> 
> run:
> 
> start-mckoidb:
>    [delete] Deleting directory
> C:\java\tapestry\petshop\petshop\mckoidb
> 
> compile:
>     [javac] Compiling 94 source files to
> C:\java\tapestry\petshop\petshop\build\
> classes
>     [javac]
> C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
> tation\pages\EditAccountPage.java:86: cannot resolve symbol
>     [javac] symbol  : constructor Locale  (java.lang.String)
>     [javac] location: class java.util.Locale
>     [javac]                                    
> getEngine().setLocale(new
> Locale
> (newCustomer.getProfile().getLangPref()));
>     [javac]                                                          
>     ^
>     [javac]
> C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
> tation\pages\OrderProcessPage.java:22: cannot resolve symbol
>     [javac] symbol  : constructor Locale  (java.lang.String)
>     [javac] location: class java.util.Locale
>     [javac]                    
> setCurrencyFormat(NumberFormat.getCurrencyInstan
> ce((new Locale(getUserLanguage()))));
>     [javac]
>         ^
>     [javac]
> C:\java\tapestry\petshop\petshop\src\org\apache\tapestry\pets\presen
> tation\pages\SignInPage.java:45: cannot resolve symbol
>     [javac] symbol  : constructor Locale  (java.lang.String)
>     [javac] location: class java.util.Locale
>     [javac]             engine.setLocale(new
> Locale(customer.getProfile().getLan
> gPref()));
>     [javac]                                  ^
>     [javac]
> C:\java\tapestry\petshop\petshop\src\pt\waveweb\core\AplicationExcep
> tion.java:7: cannot resolve symbol
> 
> > AFAIK javax.sql.Datasource is part of the j2ee.jar that comes with
> the 
> > j2sdkee distro. When you compile apps for application servers op
> web 
> > containers you generally need to add it to your classpath.
> > 
> > David Moran wrote:
> > > I was able to download it and it ran 
> > > with no modifications. 
> > > 
> > > 
> > > 
> > > On Mon, 2004-02-23 at 18:00, easy-to-remember@gmx.de wrote:
> > > 
> > >>Hi there!
> > >>
> > >>I just downloaded the PetShop example from this location
> > >>here:
> > >>
> >
>
>>http://pwp.netcabo.pt/users/164/0229592601/tapestryapps/files/petshop-0.4.1.tar.gz
> > >>
> > >>I entered ant run but I still get error messages.
> > >>
> > >>Do you know how to correct the build.xml file in order to run
> properly?
> > >>
> > >>I guess some jars have not been included as well, eg.
> > javax.sql.DataSource
> > >>has not been found and I dont know which jar file this one should
> be.
> > >>
> > >>Or does anyone have a working version of the PetShop example?
> > >>
> > >>
> > >>Thanks!
> > >>
> > >>Toby
> > >>
> > >>
> > >>
> >
>
>>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > >>
> > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > > 
> > > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 


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