Re: FW: NetBeans and OJB

2004-01-16 Thread Gus Heck
Although you have a solution, in reading this thread, and having just 
spent some timeplaying with URL Classloader, it occured to me that if 
you can execute the following on the Thread that loads those files, 
before they are loaded you could probably put them anywhere you wanted:

--- untested code follows ---
URL myFileLocation = new URL("file:///where/my/files/are/");
URL[] myURLs = new URL[] {myFileLocation};
ClassLoader loader = new URLClassLoader(myURLs,
   Thread.currentThread.getContextClassLoader());
Thread.currentThread.setContextClassLoader(loader);
-
I leave it to the experts to tell us where the hook for customizing your 
Classloader in OJB is :). It would make a lot of sense if there were a 
way to get OJB to grab a custom classloader at startup, but I don't have 
a clue if it can or how it might be implemented if it is.

Just a thought,
-Gus
Muhammad Aamir wrote:

At last it's done!

I put all ojb jars and db driver jar and my jar file (persistence
classes) in nb-home/lib/ext directory.
No there is only one thing remaining, I've to mention OJB.properties
using absolute path like:
System.setProperty("OJB.properties", "c:/work/test/OJB.properties");

And in OJB.properties:

file:///c:/work/test/repository.xml

Is there any way to get rid of this ?

Thanx a lot!
Aamir
-Original Message-
From: Coup, Robert Muir [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 13, 2004 12:49 AM
To: OJB Users List
Subject: RE: FW: NetBeans and OJB

Hi,
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: FW: NetBeans and OJB

2004-01-13 Thread Coup, Robert Muir
Hi,

I really strongly suggest you make a module using an ANT build file.
There are lots of docs on the netbeans site and templates in the
OpenAPIs Support module. Otherwise it will just get messier and messier
every time you try to do something.

Once you have a module, use nice netbeans-style paths to access all your
resources.

Rob :)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: NetBeans and OJB

2004-01-12 Thread Muhammad Aamir
At last it's done!

I put all ojb jars and db driver jar and my jar file (persistence
classes) in nb-home/lib/ext directory.

No there is only one thing remaining, I've to mention OJB.properties
using absolute path like:

System.setProperty("OJB.properties", "c:/work/test/OJB.properties");

And in OJB.properties:

file:///c:/work/test/repository.xml

Is there any way to get rid of this ?

Thanx a lot!
Aamir

-Original Message-
From: Coup, Robert Muir [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 13, 2004 12:49 AM
To: OJB Users List
Subject: RE: FW: NetBeans and OJB

Hi,

> No Success! :(  I've mounted a directory c:\work\test and 
> OJB.properties is in it. What should I type after nz/ ?

Ah. By nz/... I meant your path to the OJB properties file relative to
the mount point
It needs to be in a subfolder under the mountpoint otherwise NB won't
resolve it.

E.g.
C:\bob\jim\ojb\OJB.properties
C:\bob is mounted in the filesystem
System.setProperty("OJB.properties", "jim/ojb/OJB.properties");

> 
> What about repository.dtd ? How should I reference it from 
> repository.xml ? using file:///c://... ?

Change it to "repository.dtd" and put it in the same folder as the
respository.xml

> Should I also put jdbc driver jar in nb-home/lib/ext ?
> 
> Sould I also put my own application classes ?

Depends on the options I described previously, but yes, your JDBC driver
jar should be included somewhere.

Good Luck,

Rob :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: NetBeans and OJB

2004-01-12 Thread Coup, Robert Muir
Hi,

> No Success! :(  I've mounted a directory c:\work\test and 
> OJB.properties is in it. What should I type after nz/ ?

Ah. By nz/... I meant your path to the OJB properties file relative to
the mount point
It needs to be in a subfolder under the mountpoint otherwise NB won't
resolve it.

E.g.
C:\bob\jim\ojb\OJB.properties
C:\bob is mounted in the filesystem
System.setProperty("OJB.properties", "jim/ojb/OJB.properties");

> 
> What about repository.dtd ? How should I reference it from 
> repository.xml ? using file:///c://... ?

Change it to "repository.dtd" and put it in the same folder as the
respository.xml

> Should I also put jdbc driver jar in nb-home/lib/ext ?
> 
> Sould I also put my own application classes ?

Depends on the options I described previously, but yes, your JDBC driver
jar should be included somewhere.

Good Luck,

Rob :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: NetBeans and OJB

2004-01-12 Thread Edson Carlos Ericksson Richter
Has more details? The stack trace, as example?

Richter

  - Original Message - 
  From: Muhammad Aamir 
  To: OJB Users List 
  Sent: Monday, January 12, 2004 10:28 AM
  Subject: RE: FW: NetBeans and OJB


  Yes Edson you are right and I've already done it and in this way
  OJB.properties is found but it give ExceptionInitilizer.. something
  exception.

  I want to know about netbeans-style referencing ?

  Aamir
  -Original Message-
  From: Edson Carlos Ericksson Richter
  [mailto:[EMAIL PROTECTED] 
  Sent: Monday, January 12, 2004 7:22 PM
  To: OJB Users List
  Subject: Re: FW: NetBeans and OJB

  You can try to put OJB .jar files in nb-home/lib/ext, as the JDBC
  driver. I think this because the DatabaseExplorer, as sample, allow you
  to work with some driver only if it is in ./lib/ext of netbeans.

  Try to put OJB.properties in nb-home/bin directory...

  Best regards,

  Edson Richter
- Original Message - 
From: Muhammad Aamir 
To: OJB Users List 
Sent: Monday, January 12, 2004 9:39 AM
Subject: RE: FW: NetBeans and OJB


No Success! :(  I've mounted a directory c:\work\test and
  OJB.properties
is in it. What should I type after nz/ ?

What about repository.dtd ? How should I reference it from
repository.xml ? using file:///c://... ?

Should I also put jdbc driver jar in nb-home/lib/ext ?

Sould I also put my own application classes ?

Thank you v. much.
Aamir

-Original Message-
From: Coup, Robert Muir [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 12, 2004 1:28 AM
To: OJB Users List
    Subject: RE: FW: NetBeans and OJB

Hello,

Sorry about the late reply.
We're using Netbeans to develop an app which also uses OJB, so I've
  been
there and done this :)

Before initialisation (ie. Any ojb-calls )
...
System.setProperty("OJB.Properties",
"nz/ac/auckland/markit/ojb/OJB.properties")
...
ie. Using the netbeans-style resource referencing...
I also found if you wanted to set spy.properties/log4j.properties then
you needed to do the same thing

In OJB.properties
...
repositoryFile=nz/ac/auckland/markit/ojb/respository.xml
...

Now, here's the trick.
You need the ojb libraries in your classpath. This either means - 
 - make a module, declare dependencies and install the libs in
netbeans-dir/modules/ext
 - do it the nasty way and install in netbeans-dir/lib/ext

Good luck.

Rob :)

> -Original Message-
> From: Muhammad Aamir [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, 10 January 2004 3:04 a.m.
    > To: OJB Users List
> Subject: RE: FW: NetBeans and OJB
> 
> 
> Edson,
> 
> Although I had tried to set complete path of OJB.properties 
> (by System.setProperty("OJB.properties", 
> "C:/work/easy/OJB.properties") ) and repository.xml (I've 
> changed the repository.xml path in OJB.properties using 
> file:///c:/work/easy/repository.xml) the problem had not been
  solved.
> 
> But I'll try to apply this again. In the mean time I'll be 
> appreciate if someone could give me a clue for this problem.
> 
> Thank you v. much
> Aamir
> 
> -Original Message-
> From: Edson Carlos Ericksson Richter 
> [mailto:[EMAIL PROTECTED] 
> Sent: Friday, January 09, 2004 6:47 PM
> To: OJB Users List
> Subject: Re: FW: NetBeans and OJB
> 
> Hi!
> 
> I could answer you question. In NetBeans, go to
> 
> Tools -> Options -> Debbuging and Executing -> Execution 
> Types -> External Execution -> Expert -> Working Directory.
> 
> Unfortunately, there is no equivalent option for Internal 
> Execution (but the default execution for NetBeans apps is 
> External Execution). In Internal Execution mode, the Working 
> Directory is the NetBeans bin directory. So, if you need to 
> use Internal Execution, you should set complete path for 
> repository/ojb.properties.
> 
> I sugest you to use External Execution, and set Working 
> Directory (to avoid annoiances).
> 
> I've collected these info in more than a year working with 
> OJB inside NetBeans.
    > 
> 
> Best regards,
> 
> Edson Richter
> 
>   - Original Message - 
>   From: Muhammad Aamir 
>   To: OJB Users List 
>   Sent: Friday, January 09, 2004 9:38 AM
>   Subject: RE: FW: NetBeans and OJB
> 
> 
>   NetBeans IDE is a wonderful modular application and you can 
> develop your
>   own application on top of NetBeans platform. I want to use

RE: FW: NetBeans and OJB

2004-01-12 Thread Muhammad Aamir
Yes Edson you are right and I've already done it and in this way
OJB.properties is found but it give ExceptionInitilizer.. something
exception.

I want to know about netbeans-style referencing ?

Aamir
-Original Message-
From: Edson Carlos Ericksson Richter
[mailto:[EMAIL PROTECTED] 
Sent: Monday, January 12, 2004 7:22 PM
To: OJB Users List
Subject: Re: FW: NetBeans and OJB

You can try to put OJB .jar files in nb-home/lib/ext, as the JDBC
driver. I think this because the DatabaseExplorer, as sample, allow you
to work with some driver only if it is in ./lib/ext of netbeans.

Try to put OJB.properties in nb-home/bin directory...

Best regards,

Edson Richter
  - Original Message - 
  From: Muhammad Aamir 
  To: OJB Users List 
  Sent: Monday, January 12, 2004 9:39 AM
  Subject: RE: FW: NetBeans and OJB


  No Success! :(  I've mounted a directory c:\work\test and
OJB.properties
  is in it. What should I type after nz/ ?

  What about repository.dtd ? How should I reference it from
  repository.xml ? using file:///c://... ?

  Should I also put jdbc driver jar in nb-home/lib/ext ?

  Sould I also put my own application classes ?

  Thank you v. much.
  Aamir

  -Original Message-
  From: Coup, Robert Muir [mailto:[EMAIL PROTECTED] 
  Sent: Monday, January 12, 2004 1:28 AM
  To: OJB Users List
  Subject: RE: FW: NetBeans and OJB

  Hello,

  Sorry about the late reply.
  We're using Netbeans to develop an app which also uses OJB, so I've
been
  there and done this :)

  Before initialisation (ie. Any ojb-calls )
  ...
  System.setProperty("OJB.Properties",
  "nz/ac/auckland/markit/ojb/OJB.properties")
  ...
  ie. Using the netbeans-style resource referencing...
  I also found if you wanted to set spy.properties/log4j.properties then
  you needed to do the same thing

  In OJB.properties
  ...
  repositoryFile=nz/ac/auckland/markit/ojb/respository.xml
  ...

  Now, here's the trick.
  You need the ojb libraries in your classpath. This either means - 
   - make a module, declare dependencies and install the libs in
  netbeans-dir/modules/ext
   - do it the nasty way and install in netbeans-dir/lib/ext

  Good luck.

  Rob :)

  > -Original Message-
  > From: Muhammad Aamir [mailto:[EMAIL PROTECTED] 
  > Sent: Saturday, 10 January 2004 3:04 a.m.
  > To: OJB Users List
  > Subject: RE: FW: NetBeans and OJB
  > 
  > 
  > Edson,
  > 
  > Although I had tried to set complete path of OJB.properties 
  > (by System.setProperty("OJB.properties", 
  > "C:/work/easy/OJB.properties") ) and repository.xml (I've 
  > changed the repository.xml path in OJB.properties using 
  > file:///c:/work/easy/repository.xml) the problem had not been
solved.
  > 
  > But I'll try to apply this again. In the mean time I'll be 
  > appreciate if someone could give me a clue for this problem.
  > 
  > Thank you v. much
  > Aamir
  > 
  > -Original Message-
  > From: Edson Carlos Ericksson Richter 
  > [mailto:[EMAIL PROTECTED] 
  > Sent: Friday, January 09, 2004 6:47 PM
  > To: OJB Users List
  > Subject: Re: FW: NetBeans and OJB
  > 
  > Hi!
  > 
  > I could answer you question. In NetBeans, go to
  > 
  > Tools -> Options -> Debbuging and Executing -> Execution 
  > Types -> External Execution -> Expert -> Working Directory.
  > 
  > Unfortunately, there is no equivalent option for Internal 
  > Execution (but the default execution for NetBeans apps is 
  > External Execution). In Internal Execution mode, the Working 
  > Directory is the NetBeans bin directory. So, if you need to 
  > use Internal Execution, you should set complete path for 
  > repository/ojb.properties.
  > 
  > I sugest you to use External Execution, and set Working 
  > Directory (to avoid annoiances).
  > 
  > I've collected these info in more than a year working with 
  > OJB inside NetBeans.
  > 
  > 
  > Best regards,
  > 
  > Edson Richter
  > 
  >   - Original Message - 
  >   From: Muhammad Aamir 
  >   To: OJB Users List 
  >   Sent: Friday, January 09, 2004 9:38 AM
  >   Subject: RE: FW: NetBeans and OJB
  > 
  > 
  >   NetBeans IDE is a wonderful modular application and you can 
  > develop your
  >   own application on top of NetBeans platform. I want to use
NetBeans
  >   platform and my developed modules to build my application.
  > 
  >   The answer of your question that why I am using internal 
  > execution, is
  >   that I want to do some experiments with Open IDE API (an API to
  >   communicate with NetBeans IDE components). And internal 
  > execution uses
  >   the same virtual machine in which NetBeans IDE is running.
  > 
  >   Aamir
  > 
  >   -Original Message

Re: FW: NetBeans and OJB

2004-01-12 Thread Edson Carlos Ericksson Richter
You can try to put OJB .jar files in nb-home/lib/ext, as the JDBC driver. I think this 
because the DatabaseExplorer, as sample, allow you to work with some driver only if it 
is in ./lib/ext of netbeans.

Try to put OJB.properties in nb-home/bin directory...

Best regards,

Edson Richter
  - Original Message - 
  From: Muhammad Aamir 
  To: OJB Users List 
  Sent: Monday, January 12, 2004 9:39 AM
  Subject: RE: FW: NetBeans and OJB


  No Success! :(  I've mounted a directory c:\work\test and OJB.properties
  is in it. What should I type after nz/ ?

  What about repository.dtd ? How should I reference it from
  repository.xml ? using file:///c://... ?

  Should I also put jdbc driver jar in nb-home/lib/ext ?

  Sould I also put my own application classes ?

  Thank you v. much.
  Aamir

  -Original Message-
  From: Coup, Robert Muir [mailto:[EMAIL PROTECTED] 
  Sent: Monday, January 12, 2004 1:28 AM
  To: OJB Users List
  Subject: RE: FW: NetBeans and OJB

  Hello,

  Sorry about the late reply.
  We're using Netbeans to develop an app which also uses OJB, so I've been
  there and done this :)

  Before initialisation (ie. Any ojb-calls )
  ...
  System.setProperty("OJB.Properties",
  "nz/ac/auckland/markit/ojb/OJB.properties")
  ...
  ie. Using the netbeans-style resource referencing...
  I also found if you wanted to set spy.properties/log4j.properties then
  you needed to do the same thing

  In OJB.properties
  ...
  repositoryFile=nz/ac/auckland/markit/ojb/respository.xml
  ...

  Now, here's the trick.
  You need the ojb libraries in your classpath. This either means - 
   - make a module, declare dependencies and install the libs in
  netbeans-dir/modules/ext
   - do it the nasty way and install in netbeans-dir/lib/ext

  Good luck.

  Rob :)

  > -Original Message-
  > From: Muhammad Aamir [mailto:[EMAIL PROTECTED] 
  > Sent: Saturday, 10 January 2004 3:04 a.m.
  > To: OJB Users List
  > Subject: RE: FW: NetBeans and OJB
  > 
  > 
  > Edson,
  > 
  > Although I had tried to set complete path of OJB.properties 
  > (by System.setProperty("OJB.properties", 
  > "C:/work/easy/OJB.properties") ) and repository.xml (I've 
  > changed the repository.xml path in OJB.properties using 
  > file:///c:/work/easy/repository.xml) the problem had not been solved.
  > 
  > But I'll try to apply this again. In the mean time I'll be 
  > appreciate if someone could give me a clue for this problem.
  > 
  > Thank you v. much
  > Aamir
  > 
  > -Original Message-
  > From: Edson Carlos Ericksson Richter 
  > [mailto:[EMAIL PROTECTED] 
  > Sent: Friday, January 09, 2004 6:47 PM
  > To: OJB Users List
  > Subject: Re: FW: NetBeans and OJB
  > 
  > Hi!
  > 
  > I could answer you question. In NetBeans, go to
  > 
  > Tools -> Options -> Debbuging and Executing -> Execution 
  > Types -> External Execution -> Expert -> Working Directory.
  > 
  > Unfortunately, there is no equivalent option for Internal 
  > Execution (but the default execution for NetBeans apps is 
  > External Execution). In Internal Execution mode, the Working 
  > Directory is the NetBeans bin directory. So, if you need to 
  > use Internal Execution, you should set complete path for 
  > repository/ojb.properties.
  > 
  > I sugest you to use External Execution, and set Working 
  > Directory (to avoid annoiances).
  > 
  > I've collected these info in more than a year working with 
  > OJB inside NetBeans.
  > 
  > 
  > Best regards,
  > 
  > Edson Richter
  > 
  >   - Original Message - 
  >   From: Muhammad Aamir 
  >   To: OJB Users List 
  >   Sent: Friday, January 09, 2004 9:38 AM
  >   Subject: RE: FW: NetBeans and OJB
  > 
  > 
  >   NetBeans IDE is a wonderful modular application and you can 
  > develop your
  >   own application on top of NetBeans platform. I want to use NetBeans
  >   platform and my developed modules to build my application.
  > 
  >   The answer of your question that why I am using internal 
  > execution, is
  >   that I want to do some experiments with Open IDE API (an API to
  >   communicate with NetBeans IDE components). And internal 
  > execution uses
  >   the same virtual machine in which NetBeans IDE is running.
  > 
  >   Aamir
  > 
  >   -Original Message-
  >   From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
  >   Sent: Friday, January 09, 2004 5:20 PM
  >   To: OJB Users List
  >   Subject: RE: FW: NetBeans and OJB
  > 
  >   Well, I'm no expert when it comes to NetBeans (I prefer 
  > Eclipse). What
  >   is
  >   the benefit of internal execution vs. external execution ?
  > 
  >   Tom
  > 

RE: FW: NetBeans and OJB

2004-01-12 Thread Muhammad Aamir
No Success! :(  I've mounted a directory c:\work\test and OJB.properties
is in it. What should I type after nz/ ?

What about repository.dtd ? How should I reference it from
repository.xml ? using file:///c://... ?

Should I also put jdbc driver jar in nb-home/lib/ext ?

Sould I also put my own application classes ?

Thank you v. much.
Aamir

-Original Message-
From: Coup, Robert Muir [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 12, 2004 1:28 AM
To: OJB Users List
Subject: RE: FW: NetBeans and OJB

Hello,

Sorry about the late reply.
We're using Netbeans to develop an app which also uses OJB, so I've been
there and done this :)

Before initialisation (ie. Any ojb-calls )
...
System.setProperty("OJB.Properties",
"nz/ac/auckland/markit/ojb/OJB.properties")
...
ie. Using the netbeans-style resource referencing...
I also found if you wanted to set spy.properties/log4j.properties then
you needed to do the same thing

In OJB.properties
...
repositoryFile=nz/ac/auckland/markit/ojb/respository.xml
...

Now, here's the trick.
You need the ojb libraries in your classpath. This either means - 
 - make a module, declare dependencies and install the libs in
netbeans-dir/modules/ext
 - do it the nasty way and install in netbeans-dir/lib/ext

Good luck.

Rob :)

> -Original Message-
> From: Muhammad Aamir [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, 10 January 2004 3:04 a.m.
> To: OJB Users List
> Subject: RE: FW: NetBeans and OJB
> 
> 
> Edson,
> 
> Although I had tried to set complete path of OJB.properties 
> (by System.setProperty("OJB.properties", 
> "C:/work/easy/OJB.properties") ) and repository.xml (I've 
> changed the repository.xml path in OJB.properties using 
> file:///c:/work/easy/repository.xml) the problem had not been solved.
> 
> But I'll try to apply this again. In the mean time I'll be 
> appreciate if someone could give me a clue for this problem.
> 
> Thank you v. much
> Aamir
> 
> -Original Message-
> From: Edson Carlos Ericksson Richter 
> [mailto:[EMAIL PROTECTED] 
> Sent: Friday, January 09, 2004 6:47 PM
> To: OJB Users List
> Subject: Re: FW: NetBeans and OJB
> 
> Hi!
> 
> I could answer you question. In NetBeans, go to
> 
> Tools -> Options -> Debbuging and Executing -> Execution 
> Types -> External Execution -> Expert -> Working Directory.
> 
> Unfortunately, there is no equivalent option for Internal 
> Execution (but the default execution for NetBeans apps is 
> External Execution). In Internal Execution mode, the Working 
> Directory is the NetBeans bin directory. So, if you need to 
> use Internal Execution, you should set complete path for 
> repository/ojb.properties.
> 
> I sugest you to use External Execution, and set Working 
> Directory (to avoid annoiances).
> 
> I've collected these info in more than a year working with 
> OJB inside NetBeans.
> 
> 
> Best regards,
> 
> Edson Richter
> 
>   - Original Message - 
>   From: Muhammad Aamir 
>   To: OJB Users List 
>   Sent: Friday, January 09, 2004 9:38 AM
>   Subject: RE: FW: NetBeans and OJB
> 
> 
>   NetBeans IDE is a wonderful modular application and you can 
> develop your
>   own application on top of NetBeans platform. I want to use NetBeans
>   platform and my developed modules to build my application.
> 
>   The answer of your question that why I am using internal 
> execution, is
>   that I want to do some experiments with Open IDE API (an API to
>   communicate with NetBeans IDE components). And internal 
> execution uses
>   the same virtual machine in which NetBeans IDE is running.
> 
>   Aamir
> 
>   -Original Message-
>   From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
>   Sent: Friday, January 09, 2004 5:20 PM
>   To: OJB Users List
>   Subject: RE: FW: NetBeans and OJB
> 
>   Well, I'm no expert when it comes to NetBeans (I prefer 
> Eclipse). What
>   is
>   the benefit of internal execution vs. external execution ?
> 
>   Tom
> 
> 
> 
>   
> -
>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>   For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
>   
> -
>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>   For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
>   ---
>   Outgoing mail is certified Virus Free.
>   Checked by AVG anti-virus system (http://www.grisoft.com).
>   Version: 6.0.558 / Virus Database: 350 - Release Date: 2/1/2004
> 
> ---

RE: FW: NetBeans and OJB

2004-01-11 Thread Coup, Robert Muir
> You need the ojb libraries in your classpath. This either means - 
>  - make a module, declare dependencies and install the libs 
> in netbeans-dir/modules/ext
>  - do it the nasty way and install in netbeans-dir/lib/ext
> 

Or alternatively, the pinnacle of nastiness, build a jar file with all
the OJB dependent classes from all the jars included directly.

Rob :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: NetBeans and OJB

2004-01-11 Thread Coup, Robert Muir
Hello,

Sorry about the late reply.
We're using Netbeans to develop an app which also uses OJB, so I've been
there and done this :)

Before initialisation (ie. Any ojb-calls )
...
System.setProperty("OJB.Properties",
"nz/ac/auckland/markit/ojb/OJB.properties")
...
ie. Using the netbeans-style resource referencing...
I also found if you wanted to set spy.properties/log4j.properties then
you needed to do the same thing

In OJB.properties
...
repositoryFile=nz/ac/auckland/markit/ojb/respository.xml
...

Now, here's the trick.
You need the ojb libraries in your classpath. This either means - 
 - make a module, declare dependencies and install the libs in
netbeans-dir/modules/ext
 - do it the nasty way and install in netbeans-dir/lib/ext

Good luck.

Rob :)

> -Original Message-
> From: Muhammad Aamir [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, 10 January 2004 3:04 a.m.
> To: OJB Users List
> Subject: RE: FW: NetBeans and OJB
> 
> 
> Edson,
> 
> Although I had tried to set complete path of OJB.properties 
> (by System.setProperty("OJB.properties", 
> "C:/work/easy/OJB.properties") ) and repository.xml (I've 
> changed the repository.xml path in OJB.properties using 
> file:///c:/work/easy/repository.xml) the problem had not been solved.
> 
> But I'll try to apply this again. In the mean time I'll be 
> appreciate if someone could give me a clue for this problem.
> 
> Thank you v. much
> Aamir
> 
> -Original Message-
> From: Edson Carlos Ericksson Richter 
> [mailto:[EMAIL PROTECTED] 
> Sent: Friday, January 09, 2004 6:47 PM
> To: OJB Users List
> Subject: Re: FW: NetBeans and OJB
> 
> Hi!
> 
> I could answer you question. In NetBeans, go to
> 
> Tools -> Options -> Debbuging and Executing -> Execution 
> Types -> External Execution -> Expert -> Working Directory.
> 
> Unfortunately, there is no equivalent option for Internal 
> Execution (but the default execution for NetBeans apps is 
> External Execution). In Internal Execution mode, the Working 
> Directory is the NetBeans bin directory. So, if you need to 
> use Internal Execution, you should set complete path for 
> repository/ojb.properties.
> 
> I sugest you to use External Execution, and set Working 
> Directory (to avoid annoiances).
> 
> I've collected these info in more than a year working with 
> OJB inside NetBeans.
> 
> 
> Best regards,
> 
> Edson Richter
> 
>   - Original Message - 
>   From: Muhammad Aamir 
>   To: OJB Users List 
>   Sent: Friday, January 09, 2004 9:38 AM
>   Subject: RE: FW: NetBeans and OJB
> 
> 
>   NetBeans IDE is a wonderful modular application and you can 
> develop your
>   own application on top of NetBeans platform. I want to use NetBeans
>   platform and my developed modules to build my application.
> 
>   The answer of your question that why I am using internal 
> execution, is
>   that I want to do some experiments with Open IDE API (an API to
>   communicate with NetBeans IDE components). And internal 
> execution uses
>   the same virtual machine in which NetBeans IDE is running.
> 
>   Aamir
> 
>   -Original Message-
>   From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
>   Sent: Friday, January 09, 2004 5:20 PM
>   To: OJB Users List
>   Subject: RE: FW: NetBeans and OJB
> 
>   Well, I'm no expert when it comes to NetBeans (I prefer 
> Eclipse). What
>   is
>   the benefit of internal execution vs. external execution ?
> 
>   Tom
> 
> 
> 
>   
> -
>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>   For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
>   
> -
>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>   For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
>   ---
>   Outgoing mail is certified Virus Free.
>   Checked by AVG anti-virus system (http://www.grisoft.com).
>   Version: 6.0.558 / Virus Database: 350 - Release Date: 2/1/2004
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: NetBeans and OJB

2004-01-10 Thread edson . richter
t;OqlCollectionClass" (should be a class, using default
>> value class org.apache.ojb.odmg.collections.DListImpl)
>> [BOOT] WARN: Value
>> "org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl" is
>> illegal for key "PersistenceBrokerFactoryClass" (should be a class,
>> using default value null)
>> [BOOT] ERROR: Creation of PersistenceBrokerFactory (PBF) instance
>> failed, can't get PBF class object
>> java.lang.ExceptionInInitializerError
>> at
>> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
>> Unknown Source)
>> at kict.Test.main(Test.java:11)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
>> a:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
>> Impl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at
>> org.openide.execution.ThreadExecutor.executeClass(ThreadExecutor.java:11
>> 6)
>> at
>> org.openide.execution.ThreadExecutor$TERunnable.run(ThreadExecutor.java:
>> 183)
>> at
>> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)
>> Caused by: org.apache.ojb.broker.OJBRuntimeException: Property for key
>> 'PersistenceBrokerFactoryClass' can not be found in properties file
>> at
>> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
>> Source)
>> at
>> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.(Unkn
>> own Source)
>> ... 9 more
>>
>>
>>
>> Following is the first line of my main method:
>>
>> System.setProperty("OJB.properties", "c:/work/test/OJB.properties");
>>
>>
>> Following is the line from OJB.properties:
>>
>> repositoryFile=c:/work/test/repository.xml
>>
>>
>> Following segment has been taken from repository.xml:
>>
>> >"-//Apache Software Foundation//DTD OJB Repository//EN"
>>"file:///c:/work/test/repository.dtd"
>>
>>
>> One thing is to remember that it goes well when Executor is External.
>>
>> I am will be thankful if someone gives me a solution. I have also used
>> Oracle TopLink and was really happy with that. I am really disappointing
>> to think that I've wasted 1 week just to setup that small application.
>>
>> Regards
>> Aamir
>>
>> -Original Message-
>> From: Edson Carlos Ericksson Richter
>> [mailto:[EMAIL PROTECTED]
>> Sent: Friday, January 09, 2004 6:47 PM
>> To: OJB Users List
>> Subject: Re: FW: NetBeans and OJB
>>
>> Hi!
>>
>> I could answer you question. In NetBeans, go to
>>
>> Tools -> Options -> Debbuging and Executing -> Execution Types ->
>> External Execution -> Expert -> Working Directory.
>>
>> Unfortunately, there is no equivalent option for Internal Execution (but
>> the default execution for NetBeans apps is External Execution).
>> In Internal Execution mode, the Working Directory is the NetBeans bin
>> directory. So, if you need to use Internal Execution, you should set
>> complete path for repository/ojb.properties.
>>
>> I sugest you to use External Execution, and set Working Directory (to
>> avoid annoiances).
>>
>> I've collected these info in more than a year working with OJB inside
>> NetBeans.
>>
>>
>> Best regards,
>>
>> Edson Richter
>>
>>   - Original Message -
>>   From: Muhammad Aamir
>>   To: OJB Users List
>>   Sent: Friday, January 09, 2004 9:38 AM
>>   Subject: RE: FW: NetBeans and OJB
>>
>>
>>   NetBeans IDE is a wonderful modular application and you can develop
>> your
>>   own application on top of NetBeans platform. I want to use NetBeans
>>   platform and my developed modules to build my application.
>>
>>   The answer of your question that why I am using internal execution, is
>>   that I want to do some experiments with Open IDE API (an API to
>>   communicate with NetBeans IDE components). And internal execution uses
>>   the same virtual machine in which NetBeans IDE is running.
>>
>>   Aamir
>>
>>   -Original Message-
>>   From: Thomas Dudziak [mailto:[EMAIL PROTECTED]
>>   Sent: Friday, January 09, 2004 5:20 PM
>>   To: OJB Users List
>>   Subject: RE: FW: NetBeans and OJB
>>
>>   Well, I'm no expert when it comes to NetBeans (I prefer Eclipse). What
>>   is
>>   the benefit of internal execution vs. external execution ?
>>
>>   Tom
>>
>>
>>
>>   -
>>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>>   For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>   -
>>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>>   For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>   ---
>>   Outgoing mail is certified Virus Free.
>>   Checked by AVG anti-virus system (http://www.grisoft.com).
>>   Version: 6.0.558 / Virus Database: 350 - Release Date: 2/1/2004
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: NetBeans and OJB

2004-01-10 Thread Armin Waibel
Hi Aamir,

first, the following lines can be completely nonsense (never used 
Netbean, don't have a clue in ClassLoader problematic ;-))

But this sounds like a typical ClassLoader problem. On OJB startup the 
classes specified in OJB.properties file are loaded. Maybe the OJB 
config files or/and OJB jars use "wrong"/different ClassLoader.

Maybe you need to notify netbean to include OJB jars(+ used jars) in 
Internal Execution mode ClassLoader, or you need to move this jars in a 
directory included by the netbeans "Internal ClassLoader". Or does 
netbeans read the jars two times by different ClassLoader.

regards,
Armin
Muhammad Aamir wrote:

Well, I develop and setup my small test application from scratch. There
is one persistent class, a Test class which has main method,
OJB.properties, repository.xml and repository.dtd.
It all goes well but when I change Executor to Internal Execution it
generates some warnings and exceptions as follows:
[BOOT] WARN: Value "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"
is illegal for key "ObjectCacheClass" (should be a class, using default
value class org.apache.ojb.broker.cache.ObjectCacheDefaultImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl" is
illegal for key "ConnectionFactoryClass" (should be a class, using
default value class
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl)
[BOOT] WARN: Value "org.apache.ojb.odmg.locking.LockManagerDefaultImpl"
is illegal for key "LockManagerClass" (should be a class, using default
value class org.apache.ojb.odmg.locking.LockManagerDefaultImpl)
[BOOT] WARN: Value "org.apache.ojb.odmg.locking.InMemoryLockMapImpl" is
illegal for key "LockMapClass" (should be a class, using default value
class org.apache.ojb.odmg.locking.PersistentLockMapImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.util.logging.PoorMansLoggerImpl" is illegal for
key "LoggerClass" (should be a class, using default value class
org.apache.ojb.broker.util.logging.PoorMansLoggerImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessI
mpl" is illegal for key "PersistentFieldClass" (should be a class, using
default value class
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessIm
pl)
[BOOT] WARN: Value "org.apache.ojb.broker.core.PersistenceBrokerImpl" is
illegal for key "PersistenceBrokerClass" (should be a class, using
default value class org.apache.ojb.broker.core.PersistenceBrokerImpl)
[BOOT] WARN: Value "org.apache.ojb.odmg.collections.DListImpl_2" is
illegal for key "OqlCollectionClass" (should be a class, using default
value class org.apache.ojb.odmg.collections.DListImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl" is
illegal for key "PersistenceBrokerFactoryClass" (should be a class,
using default value null)
[BOOT] ERROR: Creation of PersistenceBrokerFactory (PBF) instance
failed, can't get PBF class object
java.lang.ExceptionInInitializerError
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
at kict.Test.main(Test.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.openide.execution.ThreadExecutor.executeClass(ThreadExecutor.java:11
6)
at
org.openide.execution.ThreadExecutor$TERunnable.run(ThreadExecutor.java:
183)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)
Caused by: org.apache.ojb.broker.OJBRuntimeException: Property for key
'PersistenceBrokerFactoryClass' can not be found in properties file
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
Source)
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.(Unkn
own Source)
... 9 more


Following is the first line of my main method:

System.setProperty("OJB.properties", "c:/work/test/OJB.properties");

Following is the line from OJB.properties:

repositoryFile=c:/work/test/repository.xml

Following segment has been taken from repository.xml:


One thing is to remember that it goes well when Executor is External.

I am will be thankful if someone gives me a solution. I have also used
Oracle TopLink and was really happy with that. I am really disappointing
to think that I've wasted 1 week just to setup that small application. 

Regards
Aamir
-Original Message-
From: Edson Carlos Ericksson Richter
[mailto:[EMAIL PROTECTED] 
Sent: Friday, January 09, 2004 6

RE: FW: NetBeans and OJB

2004-01-10 Thread Muhammad Aamir
Well, I develop and setup my small test application from scratch. There
is one persistent class, a Test class which has main method,
OJB.properties, repository.xml and repository.dtd.

It all goes well but when I change Executor to Internal Execution it
generates some warnings and exceptions as follows:

[BOOT] WARN: Value "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"
is illegal for key "ObjectCacheClass" (should be a class, using default
value class org.apache.ojb.broker.cache.ObjectCacheDefaultImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl" is
illegal for key "ConnectionFactoryClass" (should be a class, using
default value class
org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl)
[BOOT] WARN: Value "org.apache.ojb.odmg.locking.LockManagerDefaultImpl"
is illegal for key "LockManagerClass" (should be a class, using default
value class org.apache.ojb.odmg.locking.LockManagerDefaultImpl)
[BOOT] WARN: Value "org.apache.ojb.odmg.locking.InMemoryLockMapImpl" is
illegal for key "LockMapClass" (should be a class, using default value
class org.apache.ojb.odmg.locking.PersistentLockMapImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.util.logging.PoorMansLoggerImpl" is illegal for
key "LoggerClass" (should be a class, using default value class
org.apache.ojb.broker.util.logging.PoorMansLoggerImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessI
mpl" is illegal for key "PersistentFieldClass" (should be a class, using
default value class
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessIm
pl)
[BOOT] WARN: Value "org.apache.ojb.broker.core.PersistenceBrokerImpl" is
illegal for key "PersistenceBrokerClass" (should be a class, using
default value class org.apache.ojb.broker.core.PersistenceBrokerImpl)
[BOOT] WARN: Value "org.apache.ojb.odmg.collections.DListImpl_2" is
illegal for key "OqlCollectionClass" (should be a class, using default
value class org.apache.ojb.odmg.collections.DListImpl)
[BOOT] WARN: Value
"org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl" is
illegal for key "PersistenceBrokerFactoryClass" (should be a class,
using default value null)
[BOOT] ERROR: Creation of PersistenceBrokerFactory (PBF) instance
failed, can't get PBF class object
java.lang.ExceptionInInitializerError
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
at kict.Test.main(Test.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.openide.execution.ThreadExecutor.executeClass(ThreadExecutor.java:11
6)
at
org.openide.execution.ThreadExecutor$TERunnable.run(ThreadExecutor.java:
183)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)
Caused by: org.apache.ojb.broker.OJBRuntimeException: Property for key
'PersistenceBrokerFactoryClass' can not be found in properties file
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
Source)
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.(Unkn
own Source)
... 9 more



Following is the first line of my main method:

System.setProperty("OJB.properties", "c:/work/test/OJB.properties");


Following is the line from OJB.properties:

repositoryFile=c:/work/test/repository.xml


Following segment has been taken from repository.xml:



One thing is to remember that it goes well when Executor is External.

I am will be thankful if someone gives me a solution. I have also used
Oracle TopLink and was really happy with that. I am really disappointing
to think that I've wasted 1 week just to setup that small application. 

Regards
Aamir

-Original Message-
From: Edson Carlos Ericksson Richter
[mailto:[EMAIL PROTECTED] 
Sent: Friday, January 09, 2004 6:47 PM
To: OJB Users List
Subject: Re: FW: NetBeans and OJB

Hi!

I could answer you question. In NetBeans, go to

Tools -> Options -> Debbuging and Executing -> Execution Types ->
External Execution -> Expert -> Working Directory.

Unfortunately, there is no equivalent option for Internal Execution (but
the default execution for NetBeans apps is External Execution).
In Internal Execution mode, the Working Directory is the NetBeans bin
directory. So, if you need to use Internal Execution, you should set
complete path for repository/ojb.properties.

I sugest you to use External Execution, and set Working Directory (to
avoid annoiances).

I've 

RE: FW: NetBeans and OJB

2004-01-09 Thread Durham David Contr 805 CSPTS/SCE
> Did you try this?
> 
>   System.setProperty("OJB.properties", "/OJB.properties");
> 

Well, I just read Edson's post and it looks like you should disregard my
suggestion.  I'll go back to my work in shame.

Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: NetBeans and OJB

2004-01-09 Thread Durham David Contr 805 CSPTS/SCE
From: Muhammad Aamir [mailto:[EMAIL PROTECTED] 
 
> Problem only occurs when I changed the execution type to 
> Internal execution. And as far as I understood so far, 
> NetBeans have custom class
> loader(s) and that might be the reason. But I am not sure.

Excuse my ignorance if you already know this info.

Yeah, it's all about the classloader.
Here's the line that loads properties in rc4:

URL url =
Thread.currentThread().getContextClassLoader().getResource(getFilename()
);

where getFilename() pulls in the system property or defaults to
"OJB.properties".


Did you try this?

System.setProperty("OJB.properties", "/OJB.properties");

It's been awhile since I've used Netbeans and I don't know much about
it's classloading. It seems to me that if it can find your main(), then
it should be able to find the properties file.

Hope this helps,


Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: NetBeans and OJB

2004-01-09 Thread Muhammad Aamir
Edson,

Although I had tried to set complete path of OJB.properties (by
System.setProperty("OJB.properties", "C:/work/easy/OJB.properties") )
and repository.xml (I've changed the repository.xml path in
OJB.properties using file:///c:/work/easy/repository.xml) the problem
had not been solved.

But I'll try to apply this again. In the mean time I'll be appreciate if
someone could give me a clue for this problem.

Thank you v. much
Aamir

-Original Message-
From: Edson Carlos Ericksson Richter
[mailto:[EMAIL PROTECTED] 
Sent: Friday, January 09, 2004 6:47 PM
To: OJB Users List
Subject: Re: FW: NetBeans and OJB

Hi!

I could answer you question. In NetBeans, go to

Tools -> Options -> Debbuging and Executing -> Execution Types ->
External Execution -> Expert -> Working Directory.

Unfortunately, there is no equivalent option for Internal Execution (but
the default execution for NetBeans apps is External Execution).
In Internal Execution mode, the Working Directory is the NetBeans bin
directory. So, if you need to use Internal Execution, you should set
complete path for repository/ojb.properties.

I sugest you to use External Execution, and set Working Directory (to
avoid annoiances).

I've collected these info in more than a year working with OJB inside
NetBeans.


Best regards,

Edson Richter

  - Original Message - 
  From: Muhammad Aamir 
  To: OJB Users List 
  Sent: Friday, January 09, 2004 9:38 AM
  Subject: RE: FW: NetBeans and OJB


  NetBeans IDE is a wonderful modular application and you can develop
your
  own application on top of NetBeans platform. I want to use NetBeans
  platform and my developed modules to build my application.

  The answer of your question that why I am using internal execution, is
  that I want to do some experiments with Open IDE API (an API to
  communicate with NetBeans IDE components). And internal execution uses
  the same virtual machine in which NetBeans IDE is running.

  Aamir

  -Original Message-
  From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
  Sent: Friday, January 09, 2004 5:20 PM
  To: OJB Users List
  Subject: RE: FW: NetBeans and OJB

  Well, I'm no expert when it comes to NetBeans (I prefer Eclipse). What
  is
  the benefit of internal execution vs. external execution ?

  Tom



  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.558 / Virus Database: 350 - Release Date: 2/1/2004

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: NetBeans and OJB

2004-01-09 Thread Thomas Dudziak
I guess there might be one way of manipulating the working directory
which is to set the system property "user.dir" at the start of the
program.

Tom



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: NetBeans and OJB

2004-01-09 Thread Edson Carlos Ericksson Richter
Hi!

I could answer you question. In NetBeans, go to

Tools -> Options -> Debbuging and Executing -> Execution Types -> External Execution 
-> Expert -> Working Directory.

Unfortunately, there is no equivalent option for Internal Execution (but the default 
execution for NetBeans apps is External Execution).
In Internal Execution mode, the Working Directory is the NetBeans bin directory. So, 
if you need to use Internal Execution, you should set complete path for 
repository/ojb.properties.

I sugest you to use External Execution, and set Working Directory (to avoid 
annoiances).

I've collected these info in more than a year working with OJB inside NetBeans.


Best regards,

Edson Richter

  - Original Message - 
  From: Muhammad Aamir 
  To: OJB Users List 
  Sent: Friday, January 09, 2004 9:38 AM
  Subject: RE: FW: NetBeans and OJB


  NetBeans IDE is a wonderful modular application and you can develop your
  own application on top of NetBeans platform. I want to use NetBeans
  platform and my developed modules to build my application.

  The answer of your question that why I am using internal execution, is
  that I want to do some experiments with Open IDE API (an API to
  communicate with NetBeans IDE components). And internal execution uses
  the same virtual machine in which NetBeans IDE is running.

  Aamir

  -Original Message-
  From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
  Sent: Friday, January 09, 2004 5:20 PM
  To: OJB Users List
  Subject: RE: FW: NetBeans and OJB

  Well, I'm no expert when it comes to NetBeans (I prefer Eclipse). What
  is
  the benefit of internal execution vs. external execution ?

  Tom



  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.558 / Virus Database: 350 - Release Date: 2/1/2004

RE: FW: NetBeans and OJB

2004-01-09 Thread Muhammad Aamir
NetBeans IDE is a wonderful modular application and you can develop your
own application on top of NetBeans platform. I want to use NetBeans
platform and my developed modules to build my application.

The answer of your question that why I am using internal execution, is
that I want to do some experiments with Open IDE API (an API to
communicate with NetBeans IDE components). And internal execution uses
the same virtual machine in which NetBeans IDE is running.

Aamir

-Original Message-
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 09, 2004 5:20 PM
To: OJB Users List
Subject: RE: FW: NetBeans and OJB

Well, I'm no expert when it comes to NetBeans (I prefer Eclipse). What
is
the benefit of internal execution vs. external execution ?

Tom



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: NetBeans and OJB

2004-01-09 Thread Thomas Dudziak
Well, I'm no expert when it comes to NetBeans (I prefer Eclipse). What is
the benefit of internal execution vs. external execution ?

Tom



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: NetBeans and OJB

2004-01-09 Thread Muhammad Aamir
Q- Does it work when you run it from the command line (not from within
the IDE) in directory c:\work\easy ?

A- Not only does it execute from command line it also executes from
within IDE when the execution type is External.


Q- You should check that in OJB.properties the repository.xml file is
correctly referenced (e.g. without any path info).

A- I've tried both ways by adding path info and by removing path info.


I think OJB.properties and repository.xml are okay because application
is working fine from command line and from with IDE (with external
execution).

Problem only occurs when I changed the execution type to Internal
execution. And as far as I understood so far, NetBeans have custom class
loader(s) and that might be the reason. But I am not sure.

Thank you again
Aamir




-Original Message-
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 09, 2004 4:55 PM
To: OJB Users List
Subject: Re: FW: NetBeans and OJB

Looks ok so far. Does it work when you run it from the commandline (not
from within the IDE) in directory c:\work\easy ?
If so, then you probably have a mistake in the IDE setting for the
directory where the app is executed.
If not then you should check that in OJB.properties the repository.xml
file is correctly referenced (e.g. without any path info).
If the initialization fails, then you usually get one of two possible
errors. The first one states that no properties have been found and that
the default ones are used. The second one states that the repository
descriptor was not found. Depending on which one you get, you have to
correct the OJB.properties system setting (first error) or the
repository.xml path in the properties file (second error).
Also note that you must set the "OJB.properties" before you use any OJB
class.

Tom




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: NetBeans and OJB

2004-01-09 Thread Thomas Dudziak
Looks ok so far. Does it work when you run it from the commandline (not
from within the IDE) in directory c:\work\easy ?
If so, then you probably have a mistake in the IDE setting for the
directory where the app is executed.
If not then you should check that in OJB.properties the repository.xml
file is correctly referenced (e.g. without any path info).
If the initialization fails, then you usually get one of two possible
errors. The first one states that no properties have been found and that
the default ones are used. The second one states that the repository
descriptor was not found. Depending on which one you get, you have to
correct the OJB.properties system setting (first error) or the
repository.xml path in the properties file (second error).
Also note that you must set the "OJB.properties" before you use any OJB
class.

Tom




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]