RE: Most Stable OJB version

2004-03-15 Thread Muhammad Aamir
I think RC5 is better than RC4 in all aspects.


-Original Message-
From: Chris Lewington [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 15, 2004 16:01
To: [EMAIL PROTECTED]
Subject: Most Stable OJB version

Hi all,

I'm planning to upgrade from version 0.9.7 (yes, I know that is rather
old but with some tweaking it has mostly worked for us). Can anyone
suggest the best upgrade? Obviously the CVS head is the most up to date,
but is rc4 or rc5 a better bet for stability right now?

Any (objective) views welcome.

Thanks,

Chris


-
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]



Proxy collection

2004-03-08 Thread Muhammad Aamir
If there is a class which returns a collection that is defined as a
proxy collection in repository.xml, should it return this collection
after persistence broker is closed (by pb.close() ).
 
I have a class Role and there is a method getUsers(). getUsers() returns
a collection and I define it as a proxy collection in repository.xml,
After querying and displaying role name by role.getName() I close
persistent broker. After that I try to get user by getUsers() and it
still returns the collection. ??
 
Should not it give exception because persistence broker is closed or
released this call needs a connection to materialize the collection ??
 
Thank you,
 
Muhammad Aamir
Senior Software Engineer
Karachi International Container Terminal
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com
 


RE: Mapping Inheritance

2004-03-03 Thread Muhammad Aamir
Well, I read the documentation that there is a way to do say. But I want
that when I query on Task class all objects of Task as well as Complaint
should be returned, because Complaint is a sub class of Task. But
document says that you cannot do so!

Is there any workaround ?  

Thank you

-Original Message-
From: Muhammad Aamir 
Sent: Wednesday, March 03, 2004 3:08 PM
To: [EMAIL PROTECTED]
Subject: Mapping Inheritance

How can we implement inheritance with one table for each class and
tables are joined with foreign key (no duplicating columns)
 
Thank you,
 
Muhammad Aamir
Senior Software Engineer
Karachi International Container Terminal
Tel:  (9221) 2316401-20 
Fax: (9221) 2313816 
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com
 

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



Mapping Inheritance

2004-03-03 Thread Muhammad Aamir
How can we implement inheritance with one table for each class and
tables are joined with foreign key (no duplicating columns)
 
Thank you,
 
Muhammad Aamir
Senior Software Engineer
Karachi International Container Terminal
Tel:  (9221) 2316401-20 
Fax: (9221) 2313816 
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com
 


Proxy collection and persistence broker

2004-02-25 Thread Muhammad Aamir
If there is a class which returns a collection that is defined as a
proxy collection in repository.xml, should it return this collection
after persistence broker is closed (by pb.close() ).
 
I have a class Role and there is a method getUsers(). getUsers() returns
a collection and I define it as a proxy collection in repository.xml,
After querying and displaying role name by role.getName() I close
persistent broker. After that I try to get user by getUsers() and it
still returns the collection. ??
 
Should not it give exception because persistence broker is closed or
released this call needs a connection to materialize the collection ??
 
Thank you,
 
Muhammad Aamir
Senior Software Engineer
Karachi International Container Terminal
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com
 


OJB and NetBeans modules

2004-02-19 Thread Muhammad Aamir
Does anyone know how to develop NetBeans module with Apache OJB ? I mean
where to put OJB.properties, repository.xml etc. and OJB and JDBC driver
jar files.
 
To test, I've developed a small module and put library jar files in
$NBHOME/modules/ext and OJB.properties, repository.xml etc in
$NBHOME/bin. It gives following exceptions (in ide.log file) when
installing module: (I've also added Class-Path entry in my manifest.mf) 
 
java.lang.NoClassDefFoundError
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
at
kict.wf.module.nodes.UsersNode.getDefault(UsersNode.java:55)
at
kict.wf.module.UsersTreePanel.(UsersTreePanel.java:45)
at
kict.wf.module.UsersTreePanel.getDefault(UsersTreePanel.java:49)
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.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsReco
gnizer.createFromMethod(XMLSettingsSupport.java:633)
at
org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsReco
gnizer.instanceCreate(XMLSettingsSupport.java:548)
at
org.netbeans.modules.settings.convertors.SerialDataConvertor$SettingsIns
tance.instanceCreate(SerialDataConvertor.java:350)
[catch] at
org.netbeans.core.windows.persistence.PersistenceManager.getTopComponent
PersistentForID(PersistenceManager.java:457)
at
org.netbeans.core.windows.persistence.PersistenceManager.getTopComponent
ForID(PersistenceManager.java:565)
at
org.netbeans.core.windows.PersistenceHandler.getTopComponentForID(Persis
tenceHandler.java:337)
at
org.netbeans.core.windows.PersistenceHandler.initModeFromConfig(Persiste
nceHandler.java:304)
at
org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.jav
a:174)
at
org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.jav
a:91)
at
org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:39
)
at org.netbeans.core.Main$8.run(Main.java:435)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
java:151)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
 
 
Thanks,
 
Muhammad Aamir
Senior Software Engineer
Karachi International Container Terminal
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com


RE: Unique column

2004-02-13 Thread Muhammad Aamir
Emp table cannot have ename as it's primary key e.g., (because empno is
it's PK). Further, although I asked particularly about unique column
actually I wanted to ask that how can we implement business rule that
depends on the same table.

For example if I don't want to use UNIQE constraint on database level or
want to do some query on same table

Thank you,
Aamir

-Original Message-
From: Edson Carlos Ericksson Richter
[mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 6:46 PM
To: OJB Users List
Subject: Re: Unique column

Short answer: it's all in documentation. Look there.

Long answer:
As far you have not give more details, just set it as primary key. This
guarantee no duplicates, and no nulls. Don't forget to set this in
database too (all good databases around the world support primary keys).

Other way: in OJB uses it as normal field, and in database create a
UNIQUE index. Almost all databases knows the UNIQUE concept.

If it need be auto-generated, look docs about auto-increment. If it
isn't numeric, and need be unique, you can create your own Sequence
Manager. Check docs.

Best regards,

Edson Richter

  - Original Message - 
  From: Muhammad Aamir 
  To: OJB Users List 
  Sent: Friday, February 13, 2004 9:25 AM
  Subject: RE: Unique column



  Re-post
  -Original Message-
  From: Muhammad Aamir 
  Sent: Wednesday, February 11, 2004 9:51 AM
  To: [EMAIL PROTECTED]
  Subject: Unique column

  There is a column that I want it to be unique in the table. How can I
  implement this business rule ??
   
  Thanks
  Aamir

  -
  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.587 / Virus Database: 371 - Release Date: 12/2/2004

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



RE: Unique column

2004-02-13 Thread Muhammad Aamir

Re-post
-Original Message-
From: Muhammad Aamir 
Sent: Wednesday, February 11, 2004 9:51 AM
To: [EMAIL PROTECTED]
Subject: Unique column

There is a column that I want it to be unique in the table. How can I
implement this business rule ??
 
Thanks
Aamir

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



reverse-db

2004-02-12 Thread Muhammad Aamir
I understand there is a tool to generate OJB mappings (repository.xml),
named reverse-db ?
 
>From where can I download it ?
 
Muhammad Aamir
Senior Software Engineer
Information Resource Dept.
Karachi International Container Terminal
Tel:  (9221) 2316401-20 
Fax: (9221) 2313816 
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com
 


Unique column

2004-02-10 Thread Muhammad Aamir
There is a column that I want it to be unique in the table. How can I
implement this business rule ??
 
Thanks
Aamir


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 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 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-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 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 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 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]



FW: NetBeans and OJB

2004-01-09 Thread Muhammad Aamir
Moreover, I've set property as: System.setProperty("OJB.properties",
c:/work/easy/OJB.properties");

Aamir

-Original Message-
From: Muhammad Aamir 
Sent: Friday, January 09, 2004 4:35 PM
To: OJB Users List
Subject: RE: NetBeans and OJB

Thank you for your quick reply. It's a simple application that prints
values of from small table from a main() method.

I've mounted C:\work\easy in my IDE along with commons-pool*.jar,
commons-lang*.jar, commons-collection*.jar, commons-dbcp*.jar,
db-ojb-1.0.rc5.jar and classes111.jar.

I've defined my persistent classes in kict.easy package, which resides
on disk as c:\work\easy\kict\easy.

Because OJB.properties, repository.xml and repository.dtd resides in
c:\work\easy it has also been mounted and appears in my IDE under
c:\work\easy node.

Regards
Aamir

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

Could you post the directory layout of your project, what type of
project
(application, webapp etc.) it is, and with what values you use
System.setProperty ?

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]


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



RE: NetBeans and OJB

2004-01-09 Thread Muhammad Aamir
Thank you for your quick reply. It's a simple application that prints
values of from small table from a main() method.

I've mounted C:\work\easy in my IDE along with commons-pool*.jar,
commons-lang*.jar, commons-collection*.jar, commons-dbcp*.jar,
db-ojb-1.0.rc5.jar and classes111.jar.

I've defined my persistent classes in kict.easy package, which resides
on disk as c:\work\easy\kict\easy.

Because OJB.properties, repository.xml and repository.dtd resides in
c:\work\easy it has also been mounted and appears in my IDE under
c:\work\easy node.

Regards
Aamir

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

Could you post the directory layout of your project, what type of
project
(application, webapp etc.) it is, and with what values you use
System.setProperty ?

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]



NetBeans and OJB

2004-01-09 Thread Muhammad Aamir
I've develop a small application to test OJB. It works fine, but when I
change Execution Type (in NetBeans IDE) to 'Internal Execution' from
'External Execution' it gives an error like OJB.properties not found. 
 
I used System.setProperty() to tell OJB specifically that where my
OJB.properties is. But it also doesn't work and it give an error like
ExceptionInitializ(ation)Error. I've spent hours in it and tried
different possible solutions but didn't succeed.
 
Is there anyone who faced the same problem and tells me the solution?
 
Thank you,
Muhammad Aamir