> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ravi
> Deshmukh
> Sent: 31. august 2002 08:42
> To: Eivind Waaler
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Middlegen-user] Can't get it working.
>
>
> Hi Eivind,
>
> OK, I tried it out, but it looks like it can't correctly find the
> database on the server. I'm
It has obviously found the database and successfully connected to it.
Otherwise you wouldn't
get the exceptions you get. Here are some tips to get you further:
1) Try to connect to your db with
ant hsqldb-gui
This pops up hsqldb's admin tool, and it connects to your db using the same
settings as Middlegen (from your sybase.xml file). You should see your
tables here. If you don't, try to create some tables with this tool.
2) Turn on debugging. Open samples/log4j.properties and set the debug level
for MiddlegenPopulator to debug. Run the middlegen target again.
This should give you some more info. Hopefully enough to solve your problem.
Let us know how it goes. Post the logging statements too.
Cheers
Aslak
> working with Sybase 11 on Linux. The older Middlegen 1.0 was
> able to connect, extract metadata,
> and build the beans. With the new version, if I specify a table
> name, I get the following error:
>
> middlegen:
> [middlegen] Database URL:jdbc:sybase:Tds:linux:7100/court
>
> BUILD FAILED
> file:C:/middlegen/samples/build.xml:134:
> middlegen.MiddlegenException: The datab
> ase doesn't have any table named pbcattbl. Please make sure the
> table exists. A
> lso note that some databases are case sensitive.
>
> If I don't specify any table names, I get this error:
>
> middlegen:
> [middlegen] Database URL:jdbc:sybase:Tds:linux:7100/court
> [middlegen] No <table> elements specified. Reading all tables.
> This might take a
> while...
>
> BUILD FAILED
> file:C:/middlegen/samples/build.xml:135:
> middlegen.MiddlegenException: Middlegen
> successfully connected to the database, but couldn't find any
> tables. Perhaps t
> he specified schema or catalog is wrong? -Or maybe there aren't
> any tables in th
> e database at all?
>
>
> I also tried it with the JDBC/ODBC bridge driver against an MS
> SQL Server database on my local
> machine, but got the same errors.
>
> For Sybase I'm using the jConnect driver. I created a sybase.xml
> file in \config\database with
> the following entries:
>
> <property name="database.driver.file"
> value="${lib.dir}/jconn2.jar"/>
> <property name="database.driver.classpath"
> value="${database.driver.file}"/>
> <property name="database.driver"
> value="com.sybase.jdbc2.jdbc.SybDriver"/>
> <property name="database.url"
> value="jdbc:sybase:Tds:linux:7100/court"/>
> <property name="database.userid" value="sa"/>
> <property name="database.password" value=""/>
> <property name="database.schema" value=""/>
> <property name="database.catalog" value=""/>
>
> For jConnect the database url syntax is:
> jdbc:sybase:Tds:<server>:<port>/<database>
>
> My server is named linux, and my database is named court, so:
> jdbc:sybase:Tds:linux:7100/court
>
> I used the exact same syntax with Middlegen 1.0 (where it worked).
>
> In the middlegen section of build.xml, jndi properties are also
> passed - I thought these might
> override the jdbc url so I took them out, but no change.
>
> Is there a problem using the "/" in the database url? Is there
> any other section in build.xml or
> somewhere else that I need to change ?
>
> Thanks for your help,
> Ravi
>
> --- Eivind Waaler <[EMAIL PROTECTED]> wrote:
> > Hi Ravi, I'll try to answer your questions below.
> >
> > .eivind
> >
> > On Thu, 29 Aug 2002, Ravi Deshmukh wrote:
> >
> > > Hi Aslak,
> > >
> > > With middlegen I'm a user, not a developer. Nonetheless,
> based on your reply I did the
> > following:
> > >
> > > - Installed WinCVS
> > > - Downloaded the middlegen CVS - note: middlegen CVS page
> says specify the "modulename" but I
> > > couldn't find the value anywhere. I guessed and used "middlegen"
> > > - Installed Ant 1.5
> > > - Ran Ant against build.xml, got a docs, lib, and samples dir
> > > - Unlike v1.0 there is no build.bat file. There is one set
> of jars in \lib, and a different
> > set
> > > in \samples\lib. Which jars are required in the cp to run
> middlegen ? Or let's just say, how
> > do I
> > > run middlegen ?
> >
> > No jars are required in the CP to run middlegen. The build.xml script
> > starts by setting up classpath. In fact try to make sure your
> CP is empty
> > before running it.
> >
> > To build middlegen, make sure you have ant in your path. Simply
> type 'ant'
> > in the middlegen basedir.
> >
> > To build the samples, use 'ant' in the samples dir.
> >
> > > - Installed maven to generate docs. Maven version is
> maven-1.0-beta-6. On executing "maven
> > xdoc"
> > > it generates a bunch of errors looking for jar files in
> MAVEN_HOME\repository\XXX\jars where
> > XXX
> > > is ant, velocity, log4j, junit, and commons-collections. I
> found the jar files in
> > MAVEN_HOME\lib
> > > and copied them. I found velocity in middlegen\samples\lib
> and copied it. Running it again
> > > produced NoClassDefFoundError on: org/apache/tools/dvsl/DVSL.
> This class is not in any of the
> > > Maven jars - where do I get it ?
> >
> > Maven is supposed to download all the files it need from a central
> > repository. Please refer to the maven docs to read about this. Of course
> > this requires you to be online the first time you run maven.
> >
> > I would recommend building maven from cvs, as you will see
> quite clear how
> > maven works (maven is build using maven).
> >
> > >
> > > I also saw your posting on the users mailing list saying that
> a new release should be out soon
> > -
> > > any idea on the date ? Also from the mails it appears some
> people have got it working - what
> > am I
> > > doing wrong ?
> >
> > Hope you get a bit further. Let us know.. :)
> >
> > >
> > > I don't want to be a pest, but I really like this stuff and
> would love to get it working.
> > >
> > > Thanks,
> > > Ravi
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Finance - Get real-time stock quotes
> > > http://finance.yahoo.com
> > >
> > >
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by: OSDN - Tired of that same old
> > > cell phone? Get a new here for FREE!
> > > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> > > _______________________________________________
> > > middlegen-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/middlegen-user
> > >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> middlegen-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user