You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Tom Schindl <to...@gmx.at> on 2005/06/13 17:32:33 UTC

Beginners Question Tutorial Problem

Hi,

I've some question regarding ojb. I'm an absolute beginner with ojb 
although I've used torque quite a lot.
1. The tutorial uses Java-Classes and generates the repository_user.xml 
is the other way round also possible?
    I ask this because I'm designing my databases using clay an 
eclipse-plugin(it restores the database in an XML-File) and it should be 
straight
    forward to write an XSLT to convert the clay-file to a 
repository_users.xml maybe I'm even releasing this as an eclipse plugin ;-)

2. Following the tutorial when running "ant build setup-db" I get the 
following build error:
-------------------------8<-------------------------
[ojbdoclet] E:\eclipse-workspaces\beso-devel\BesoBug\build.xml:78: 
destDir attribute must be present.
[ojbdoclet] at xdoclet.DocletTask.validateOptions(DocletTask.java:495)
[ojbdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:89)
[ojbdoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[ojbdoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[ojbdoclet] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[ojbdoclet] at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[ojbdoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[ojbdoclet] at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[ojbdoclet] at 
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[ojbdoclet] at 
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[ojbdoclet] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[ojbdoclet] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
-------------------------8<-------------------------

I running all of this from eclipse does anyone have an idea what's going 
wrong?

Tom

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


Re: Beginners Question Tutorial Problem

Posted by Tom Schindl <to...@gmx.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I finally got something going, it's really at the very very early stages
 but I decided to release it to the public. You can find a short
description and the files here:
http://www.bestsolution.at/support/java/clay2ojb.html.en

Tom

Thomas Dudziak schrieb:
>>I've take an closer look a think velocity is the way to go and generate:
>>* The DAO classes
>>* The repository_user.xml
> 
> 
> Please keep us posted, such a thing would certainly be interesting to
> other OJB users.
> 
> 
>>Strange running them individually works running them using ant build
>>setup-db doesn't.
> 
> 
> Yep, there seem to be some problems with resources not released
> properly in the Ant task implementations.
> 
> Tom
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC13X0kVPeOFLgZFIRAgfwAKCWulqjUuITmaorSnXHS7OO3RpufQCcDZ8U
MpXJTlttslXUbPW74AJhGeU=
=v3fd
-----END PGP SIGNATURE-----

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


Re: Beginners Question Tutorial Problem

Posted by Thomas Dudziak <to...@gmail.com>.
> I've take an closer look a think velocity is the way to go and generate:
> * The DAO classes
> * The repository_user.xml

Please keep us posted, such a thing would certainly be interesting to
other OJB users.

> Strange running them individually works running them using ant build
> setup-db doesn't.

Yep, there seem to be some problems with resources not released
properly in the Ant task implementations.

Tom

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


Re: Beginners Question Tutorial Problem

Posted by Tom Schindl <to...@gmx.at>.
Thomas Dudziak wrote:
>>I've some question regarding ojb. I'm an absolute beginner with ojb
>>although I've used torque quite a lot.
>>1. The tutorial uses Java-Classes and generates the repository_user.xml
>>is the other way round also possible?
>>    I ask this because I'm designing my databases using clay an
>>eclipse-plugin(it restores the database in an XML-File) and it should be
>>straight
>>    forward to write an XSLT to convert the clay-file to a
>>repository_users.xml maybe I'm even releasing this as an eclipse plugin ;-)
> 
> 
> Not as such, mainly because OJB does not really require anything of
> the objects that get persisted (POJOs). The code for performing
> operations related to persistence (storing, retrieving, querying) is
> usually not within the persistent classes but instead in specific DAO
> classes or similar.
> So, all you'd require is a stylesheet that generates plain java
> classes, preferably with a no-arg constructor, from the clay mapping.
> And it could also generate basic DAO classes for them. You might want
> to have a look into AppFuse (over at java.net) to see what a basic DAO
> would constitute.
> 

I've take an closer look a think velocity is the way to go and generate:
* The DAO classes
* The repository_user.xml

> 
>>2. Following the tutorial when running "ant build setup-db" I get the
>>following build error:
> 
> 
> Please try the targets individually to see whether that works any better.
> 

Strange running them individually works running them using ant build 
setup-db doesn't.

Thanks for the help

Tom

> Tom
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 


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


Re: Beginners Question Tutorial Problem

Posted by Thomas Dudziak <to...@gmail.com>.
> I've some question regarding ojb. I'm an absolute beginner with ojb
> although I've used torque quite a lot.
> 1. The tutorial uses Java-Classes and generates the repository_user.xml
> is the other way round also possible?
>     I ask this because I'm designing my databases using clay an
> eclipse-plugin(it restores the database in an XML-File) and it should be
> straight
>     forward to write an XSLT to convert the clay-file to a
> repository_users.xml maybe I'm even releasing this as an eclipse plugin ;-)

Not as such, mainly because OJB does not really require anything of
the objects that get persisted (POJOs). The code for performing
operations related to persistence (storing, retrieving, querying) is
usually not within the persistent classes but instead in specific DAO
classes or similar.
So, all you'd require is a stylesheet that generates plain java
classes, preferably with a no-arg constructor, from the clay mapping.
And it could also generate basic DAO classes for them. You might want
to have a look into AppFuse (over at java.net) to see what a basic DAO
would constitute.

> 2. Following the tutorial when running "ant build setup-db" I get the
> following build error:

Please try the targets individually to see whether that works any better.

Tom

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