RE: insert-procedure

2005-03-09 Thread BURT, RANDALL \(CONTRACTOR\)
The insert procedure by-passes OJB's normal insert. Your procedure must
handle the actual insert as well. 

 -Original Message-
 From: Ismail Siddiqui [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 09, 2005 9:49 AM
 To: OJB Users List
 Subject: insert-procedure
 
 Hi All,
 I am trying to execute a stored procedure after a class get 
 inserted in database..
 
 this is the code snippet from my action class
 
 VoteForm vForm = (VoteForm)form;
 Vote v = new Vote();
 voteLogic.createVote(vForm);
 return mapping.findForward( success );
 
  where createVote simply store in databse.
 
 
 
 i am using following descriptor:
 class-descriptor
 class=com.alloyinc.rater.bean.Vote
 table=RATER_VOTE
 field-descriptor
 name=id
 column=vote_id
 jdbc-type=INTEGER
 primarykey=true
 autoincrement=true
 access=readonly/
 field-descriptor
 name=itemId
 column=item_id
 jdbc-type=INTEGER
 access=readwrite/
 !--
 
   field-descriptor
 name=personId
 column=person_id
 jdbc-type=INTEGER
 access=readwrite/
 field-descriptor
 name=weight
 column=weight
 jdbc-type=FLOAT
 access=readwrite/
 
 
  insert-procedure name=update_avg_weight
 runtime-argument field-ref=itemId /
  /insert-procedure
 
 
 
 /class-descriptor
 
 
 
 when i include insert-procedure line , surely its getting 
 executed but no record in RATER_VOTE table is getting added . 
 when i remove insert-procedure line .. the records get added 
 but of course no stored procedure get executed.
 
 Any Idea??
 
 
 
 thanks
 
 Ismail Siddiqui
 
 
 -
 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: Vulnerabilities

2004-12-22 Thread BURT, RANDALL \(CONTRACTOR\)
Coincidentally and completely by accident, my team found a small vulnerability 
today in PBKey. The hashcode is calculated such that the following usernames 
and passwords will result in the same broker being returned from the pool:

Username: user
Password: password

is the same to OJB as

Username: userp
Password: assword

This only works if your application requires the user to supply database login 
information, the correct username/password is used before the invalid one, 
broker pooling is turned on, and the invalid login is used while there are 
still appropriate brokers in the pool.

The fix is simple, change the hashcode method in PBKey as follows:

/**
 * Return the hash code of this PBKey,
 * formed by the repository-, user-, password-name.
 */
public int hashCode()
{
if(hashCode == 0)
{
/* this doesn't work...
hashCode = (this.jcdAlias + this.user + 
this.password).hashCode();
*/
hashCode = (this.jcdAlias +   + this.user +   + 
this.password).hashCode();
}
return hashCode;
}


Sorry for no patch. We can't access OJB CVS from work.

 -Original Message-
 From: Edson Carlos Ericksson Richter
 [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 22, 2004 5:34 AM
 To: OJB Users List
 Subject: Re: Vulnerabilities
 
 
 One: jdbc-connection in .xml file has database password in plain text 
 (besides there is workarounds) - as it's does in every tomcat install 
 around the world... Depends where you puts your .xml files!
 
 Two: there is no encryption over data transferred (in real, it's a 
 database dependant protocol issue. As workaround, you could write 
 converters that does the job).
 
 Three: it has no clue about password bad user choices (for paranoids, 
 huh? :-D ).
 
 Richter
 
 Daniel Perry escreveu:
 
 I dont think such a list exists.  What sort of security 
 vunerabilities are
 you talking about?  Due to the nature of OJB i cant think of 
 any security
 vunerabilities it could suffer? OJB doesnt store any data 
 itself.  Any
 vunerabilities i can think of would be introduced by a 
 database server ojb
 is using, the JVM, the OS, the filesystem, or the 
 application that is using
 OJB.
 
 I think the only obvious security vunerability is that 
 (normally) you have
 the database server username and password in the plaintext 
 repository file.
 This is a problem with all If you set the file permissions 
 properly, no one
 can access this.
 
 Daniel.
 
   
 
 -Original Message-
 From: Pulat Yunusov [mailto:[EMAIL PROTECTED]
 Sent: 21 December 2004 22:29
 To: OJB Users List
 Subject: Vulnerabilities
 
 
 Is there a list of OJB security vulnerabilities: current 
 and closed? Is
 this information regularly collected or posted and where, 
 in this list?
 
 Thank you,
 
 Pulat
 
 
 -
 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]
 
 
 
   
 
 
 
 -- 
 Edson Carlos Ericksson Richter
 MGR Informática Ltda.
 Fones: 3347-0446 / 9259-2993
 
 
 

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



RE : Network error- Socket closed

2004-10-15 Thread BURT, RANDALL \(CONTRACTOR\)
I just recently switched to the jDTS driver (free and supports Windows(TM) 
authentication) and ran into the problems described below. Was this ever resolved in 
your offlist discussions?

--
From: Matthew Baird 

I'm very interested in resolving this issue. Please contact me offlist and I can help 
you.

-Original Message-
From: Ryan Vanderwerf [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 8:26 AM
To: OJB Users List
Subject: RE: RE : Network error- Socket closed


I am only doing transactions when I do a write.. currently I don't have begin and end 
transactions on database reads. Also I don't do a t.close, I do a broker.commit() or 
broker.abortTransaction(). I don't call close on the broker until I'm totally done 
with it. Also after chatting with the inetsoftware.de folks for a bit, they think OJB 
isn't returning connections a fast as it asks, causing weird behavior. It could be 
that the validation code isn't removing connections from the pool or something else. I 
will try to make a test case for this as well.

I've noticed this problem since I have to edit OJB.properties to whenExhaustedAction=2 
or I'll get connection errors pretty quick (even though I have maxActive set to 100!)

I don't think the problem is in the ConnectionFactoryPooledImpl either, since I write 
my own implementation that has the same exact problem (I'll send the code over if 
anyone cares to have it - it uses the inetsoftware PoolManager class wrappered for 
OJB). If I set the connection limit to something like 10 (seems reasonable), I run out 
of connections right away, even with mild load on my development box. It seems like 
the connection closed problem is related to this, almost like thrown away connections 
are getting back into the pool after connection.close() was called on them.



Perhaps this is fixed in 1.0rc1, or maybe it's a combination of these settings
maxActive=100
maxIdle=-1
maxWait=2000
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=100
whenExhaustedAction=2
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl


More to come...

Ryan

-Original Message-
From: Emmanuel Dupont [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 25, 2003 1:37 AM
To: 'OJB Users List'
Subject: RE : Network error- Socket closed

I noticed that these errors disapeared when I put the request inside  :
t.begin() and t.close().

Is it because we have to put the request inside a transaction ?

My settings are :

SQLServer with JSQLConnect driver and net.sourceforge.jtds.jdbc.Driver. With
both I have the problem...

As you say, it is really weird. Did you try inside a begin/close transaction
and without ?




-Message d'origine-
De : Ryan Vanderwerf [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 24 mars 2003 20:53
À : OJB Users List
Objet : RE: Network error- Socket closed

I too get these errors quite a bit. It looks like you are using SQL
server, I am also. I am using the Opta2000 driver (commercial) from
inetsoftware.de, and right now I've found best results using their
pooled driver, turning off OJB's connection pool. I'm still trying to
unravel this mystery, it seems to happen on multiple environments, and
the only common element is OJB. What's weirder if I use the Opta Plexa
driver connection manager instead of OJB's (I wrote a OJB plugin
Connection Factory) the errors manifest as 'Connection timed out while
logging in' instead of the opposed 'Connection is closed' messages. I'm
quite confused as to what is going on.

What are your settings?

Ryan

-Original Message-
From: Emmanuel Dupont [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2003 4:48 AM
To: OJB Users List
Subject: Network error- Socket closed

All,

 

I'm playing with Ojb and the Kategorien/Artikel tutorial. I noticed that
when I ask 3 times the same request to the database, I have this error
below.

 

Why it is not possible to request more than3 time the same request to
the
database? ???

 

 

java.sql.SQLException: Network error-  Socket closed

  at net.sourceforge.jtds.jdbc.Tds.executeProcedure(Unknown Source)

  at net.sourceforge.jtds.jdbc.TdsStatement.executeCallImpl(Unknown
Source)

  at
net.sourceforge.jtds.jdbc.TdsStatement.internalExecuteCall(Unknown
Source)

  at
net.sourceforge.jtds.jdbc.PreparedStatement_base.execute(Unknown
Source)

  at
net.sourceforge.jtds.jdbc.PreparedStatement_base.executeQuery(Unknown
Source)

  at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccess
Impl
.java:259)[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR:
SQLException during the execution of the query (for a
com.jware.test.ojb.Fournisseur): Network error-  Socket closed

Network error-  Socket closed

 

  at
org.apache.ojb.broker.accesslayer.RsIterator.init(RsIterator.java:175)

  at
org.apache.ojb.broker.singlevm.RsIteratorFactoryImpl.createRsIterator(Rs
Iter
atorFactoryImpl.java:95)

  at

RE: Stored procedures in MS SQL

2003-11-19 Thread BURT, RANDALL (CONTRACTOR)
I don't think that the current documentation was meant to imply that it only works for 
Oracle, however, the docs are out of sync with CVS at the moment. OJB CVS has support 
for using repository.xml to define sp's for insert, update, and delete of objects.

If you can't/do not wish to get CVS code, you should still be able to make it work 
with MS SQL using the current documentation, just implement your stored procedures as 
you would normally and ignore the Oracle-specific parts of the docs.

 -Original Message-
 From: Sergey V. Oudaltsov [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 19, 2003 8:46 AM
 To: [EMAIL PROTECTED]
 Subject: Stored procedures in MS SQL
 
 
 Hello all
 
 I am trying to make OJB work with the stored procedures on MS SQL
 server. In the documentation, it is mentioned that only Oracle SPs are
 supported. Is it difficult to add support for MS SQL? What 
 are the main
 problems? Anyone tried?
 
 Regards,
 
 Sergey
 
 
 -
 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: Stored procedures in MS SQL

2003-11-19 Thread BURT, RANDALL (CONTRACTOR)
Hi,

  I don't think that the current documentation was meant to imply that
  it only works for Oracle, however, the docs are out of sync with CVS
  at the moment. OJB CVS has support for using repository.xml to define
  sp's for insert, update, and delete of objects.
 
 Well, the question is how stable is CVS now - and when could we expect
 the version supporting stored procs? Week, month, year?

If you mean an official release, that I can't say for sure, but talk on the dev list 
gives me the impression that it will be soon. Sorry I can't be more specific than 
that, perhaps Thomas or Armin could provide a better estimate.

I don't mind
 trying CVS - but I have to be sure the release of our project 
 will have
 some stable version of OJB to ship with.

Well, that will likely depend on your release date and the schedules of OJB developers.

  If you can't/do not wish to get CVS code, you should still be able to
  make it work with MS SQL using the current documentation, just
  implement your stored procedures as you would normally and ignore the
  Oracle-specific parts of the docs.
 
 Well, current documentation only explains some steps people taken to
 support Oracle stored procs (in some package com.xxx:) - not even the
 existing support in OJB. 

Right. The current docs don't address native stored proc support, because it wasn't 
there at the time. You would have to create the customized OJB components as stated in 
the docs (using your own packaging scheme, com.xxx is just illustrative), and then 
configure OJB.properties to use these components.

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



RE: Stored Procedure Question ? ( from newbies )

2003-11-05 Thread BURT, RANDALL (CONTRACTOR)
Yes, I think you may need the CVS version for this.

 -Original Message-
 From: Thierry Hanot [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 05, 2003 8:04 AM
 To: 'OJB Users List'
 Subject: RE: Stored Procedure Question ? ( from newbies ) 
 
 
 May be I have the wrong version but there is nothing about 
 the procedure in
 the dtd. ( Not even in the code I think ,there is only 
 Some CallableStatement in SequenceManagerStoredProcedure 
 implementation I
 think  )
 My version is the 1.0RC4.
 May be I need to download a new version from the cvs repository ???
 B.R
 
 Thierry 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 05, 2003 2:33 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Stored Procedure Question ? ( from newbies ) 
 
 
 Thierry -- 
 
 Support for using stored procedures for insert, update and 
 delete operations
 has been incorporated into the 'internals' of the PB api, so 
 there's no
 longer any need to implement the extensions that are 
 described in the HOWTO
 Work With Stored Procedures document.  I apologize for not 
 getting around
 to updating the 'how to' documentation to reflect this capability.
 
 The repository.dtd file has been updated with some basic 
 information about
 the various descriptors that you need to include in your 
 repository.  Just
 search on 'procedure' and you'll find all of the relevant information.
 
 I'll try to get the 'how to' documentation updated over the 
 next few days.
 In the meantime, if you have any questions, just post them to 
 the mailing
 lists and I'll answer them as best I can.
 
 Ron Gallagher
 Atlanta, GA
 [EMAIL PROTECTED]
 
 
 -Original Message-
 From: Thierry Hanot [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 05, 2003 6:02 AM
 To: [EMAIL PROTECTED]
 Subject: Stored Procedure Question ? ( from newbies ) 
 
 
 Hello All
  
 I'm new to ojb and i'm currently trying to implement the 
 method describe in
 the HowTo  Stored Procedure with Ojb. And i have a few 
 questions First :
 Is the code for this Howto available somewhere ? Even if i 
 know that the
 code is a bit specific, i just want to have for validating my own
 implementation ( on missing method description such as
 getObjectFromStatement ... )
  
 My second question is 
 -the howto describe a method which is extending the 
 StatementManager ,
 is it possible for avoiding this 
 to use the a StatementFactory which is allocating a
 CallableStatementForClass is the class has stored procedure
 or an other ( StatementsForClassImpl ) if the class 
 descriptor hasn't.
 Instead of registring OutParameters in the 
 StatementManger can we do it
 in the StatementForClass implementation.
   
  
 Tks
  
 Thierry Hanot 
  
 
 -
 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: Wrong class materialized when selecting from an extent mapped to a multi-table join

2003-10-20 Thread BURT, RANDALL (CONTRACTOR)
So, changing the class descriptor for B to read something like:

class-descriptor class=polymorphtest.B table=B_TABLE
field-descriptor name=id column=ID jdbc-type=INTEGER 
  primarykey=true 
  autoincrement=true /
field-descriptor name=a_id column=A_ID jdbc-type=INTEGER/
field-descriptor name=someValueFromB column=VALUE_ 
  jdbc-type=INTEGER /
reference-descriptor name=super class-ref=polymorphtest.A
foreignkey field-ref=a_id /
/reference-descriptor
/class-descriptor

should clear up any ambiguity and give me behavior more in-line with my original 
message, yes? Thanks for your help!

 -Original Message-
 From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
 Sent: Sunday, October 19, 2003 3:26 AM
 To: OJB Users List
 Subject: Re: Wrong class materialized when selecting from an extent
 mapped to a multi-table join
 
 
 hi justis,
 
 ojb needs the pk to be unique within a hierarchy. 
 Identity#equals just 
 checks for the toplevel class not the real class, that's why. 
 changing 
 this behaviour is delicate.
 
 afaik the tutorial simply uses the super-reference (with the same pk) 
 but it does _not_ use extent-definitions. so the classes do 
 not belong 
 to the same hierarchy and thus an identical pk does not hurt.
 
 jakob
 
 Justis Peters wrote:
  Hi Jakob,
  
  The answers you provide Burt imply that it is possible to 
 do exactly what I am trying to do.  What is it that I am 
 doing wrong?  My test cases seem to follow exactly what Burt is doing.
  
  Also, I do not understand your comment about the primary 
 key needing to be unique.  The tutorial specifically 
 recommends using the same primary key for both, in order to 
 link the rows together.  In the case we are discussing below, 
 the data in A_TABLE is not an object referenced by B_TABLE -- 
 it is actually the data that comprises the remainder of 
 B_TABLE.  It is just stored in A_TABLE instead, to avoid 
 redundancy and to allow for selecting from the entire extent 
 when using tools other than OJB.
  
  Am I misunderstanding something?  I realize that the 
 current implementation of the super-reference does not do 
 what I am requesting.  It seems to me, though, that it should 
 eventually do this.
  
  Thanks in advance for your reply!
  
  Sincerely yours,
  Justis Peters
  Oculan Corp.
  [EMAIL PROTECTED]
  
  Jakob Braeuchi [EMAIL PROTECTED] wrote:
  
 hi burt,
 
 1.) this is partly correct:
 three queries will be executed to load the extents. 
 problems could arise 
 when materializing the objects. ojb assumes that a primary key is 
 _unique_ within a class hierarchy. if this is not true the 
 wrong object 
 will be returned. this could be solved here by _not_ using 
 the pk in 
 super-reference.
 
 2.) same problem as in 1.)
 
 3.) that's true atm.
 
 4.) also true if the auto-settings of the reference 
 descriptor are not 
 set to false.
 
 jakob
 
 BURT, RANDALL (CONTRACTOR) wrote:
 
 
 Jumping in late, but its germane to what I'm working on. 
 So, if I read 
 what everyone is saying correctly, the following:
 
 class-descriptor class=polymorphtest.InterfaceA
extent-class class-ref=polymorphtest.A /
extent-class class-ref=polymorphtest.B /
extent-class class-ref=polymorphtest.C /
 /class-descriptor
 
 class-descriptor class=polymorphtest.A table=A_TABLE
extent-class class-ref=polymorphtest.B /
  field-descriptor name=id column=ID jdbc-type=INTEGER 
primarykey=true 
 autoincrement=true /
field-descriptor name=someValueFromA column=VALUE_ 
jdbc-type=INTEGER /
 /class-descriptor
 
 class-descriptor class=polymorphtest.B table=B_TABLE
field-descriptor name=id column=ID jdbc-type=INTEGER 
primarykey=true 
 autoincrement=true /
field-descriptor name=someValueFromB column=VALUE_ 
jdbc-type=INTEGER /
reference-descriptor name=super class-ref=polymorphtest.A
foreignkey field-ref=id /
/reference-descriptor
 /class-descriptor
 
 class-descriptor class=polymorphtest.C table=C_TABLE
field-descriptor name=id column=ID jdbc-type=INTEGER 
primarykey=true 
 autoincrement=true /
field-descriptor name=someValueFromC column=VALUE_ 
jdbc-type=INTEGER /
 /class-descriptor
 
 does not do what I would expect? :
 
 1. Queries for collections of InterfaceA would give me all 
 the A's, B's, 
 and C's.
 2. Queries for collections of A's would give me A's and 
 B's, but the A's 
 would be only those rows in A_TABLE that did not have 
 matching keys in 
 B_TABLE.
 3. If I queried for an A, but there is a B that matches, 
 I'd get a B and 
 not just an A.
 4. Anytime B's are materialized, they would have their inherited 
 properties from the super class A populated.
 
 Sorry if this is a re-hash, but I'm getting a little 
 confused ATM. Thanks 
 for any

RE: Wrong class materialized when selecting from an extent mapped to a multi-table join

2003-10-17 Thread BURT, RANDALL (CONTRACTOR)
Jumping in late, but its germane to what I'm working on. So, if I read what everyone 
is saying correctly, the following:

class-descriptor class=polymorphtest.InterfaceA
extent-class class-ref=polymorphtest.A /
extent-class class-ref=polymorphtest.B /
extent-class class-ref=polymorphtest.C /
/class-descriptor

class-descriptor class=polymorphtest.A table=A_TABLE
extent-class class-ref=polymorphtest.B /
  field-descriptor name=id column=ID jdbc-type=INTEGER 
primarykey=true autoincrement=true /
field-descriptor name=someValueFromA column=VALUE_ 
jdbc-type=INTEGER /
/class-descriptor
 
class-descriptor class=polymorphtest.B table=B_TABLE
field-descriptor name=id column=ID jdbc-type=INTEGER 
primarykey=true autoincrement=true /
field-descriptor name=someValueFromB column=VALUE_ 
jdbc-type=INTEGER /
reference-descriptor name=super class-ref=polymorphtest.A
foreignkey field-ref=id /
/reference-descriptor
/class-descriptor

class-descriptor class=polymorphtest.C table=C_TABLE
field-descriptor name=id column=ID jdbc-type=INTEGER 
primarykey=true autoincrement=true /
field-descriptor name=someValueFromC column=VALUE_ 
jdbc-type=INTEGER /
/class-descriptor

does not do what I would expect? :

1. Queries for collections of InterfaceA would give me all the A's, B's, and C's.
2. Queries for collections of A's would give me A's and B's, but the A's would be only 
those rows in A_TABLE that did not have matching keys in B_TABLE.
3. If I queried for an A, but there is a B that matches, I'd get a B and not just an A.
4. Anytime B's are materialized, they would have their inherited properties from the 
super class A populated.

Sorry if this is a re-hash, but I'm getting a little confused ATM. Thanks for any 
clarifications.

 -Original Message-
 From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 17, 2003 12:09 PM
 To: OJB Users List; Thomas Mahler; Armin Waibel
 Subject: Re: Wrong class materialized when selecting from an extent
 mapped to a multi-table join
 
 
 hi justis, wallace,
 
 this problem is caused by Identity#equals noch checking 
 objectsRealClass 
 . consider the following situation: a select for InterfaceA 
 fires 2 selects
 SELECT A0.VALUE_,A0.ID FROM A_TABLE A0
 retrieving Table_A objects with ids 1 and 2
 SELECT A0.VALUE_,A0.ID FROM B_TABLE A0 INNER JOIN A_TABLE A1 
 ON A0.ID=A1.ID
 retrieving Table_B object with id 1
 
 when building the objects from the resultset in 
 RsIterator#getObjectFromResultSet an identity is built from 
 the row and 
 looked up in the cache. the object (id = 1) from table_B is 
 considered 
 to be in the cache because the topLevelClass (InterfaceA) and 
 the pk (1) 
 matches !
 
 this problem could be solved by also checking the objectsRealClass in 
 Identity#equals. i remember there was quite a big discussion about 
 Identity, so i'm not sure if this is a correct soluion ??
 
 another solution could be to use a dedicated column to refer to the 
 super-class in the reference-descriptor. this would avoid the 
 pk-clash 
 in the cache.
 
 another way is to completly avoid using extents and 
 super-references ;)
 
 
 class-descriptor class=polymorphtest.InterfaceA
   extent-class class-ref=polymorphtest.A /
   extent-class class-ref=polymorphtest.B /
 /class-descriptor
 
 class-descriptor class=polymorphtest.A table=A_TABLE
   field-descriptor name=id column=ID jdbc-type=INTEGER 
 primarykey=true autoincrement=true /
   field-descriptor name=someValueFromA column=VALUE_ 
 jdbc-type=INTEGER /
 /class-descriptor
 
 class-descriptor class=polymorphtest.B table=B_TABLE
   field-descriptor name=id column=ID jdbc-type=INTEGER 
 primarykey=true autoincrement=true /
   field-descriptor name=someValueFromB column=VALUE_ 
 jdbc-type=INTEGER /
   reference-descriptor name=super class-ref=polymorphtest.A
   foreignkey field-ref=id /
   /reference-descriptor
 /class-descriptor
 
 jakob
 
 Justis Peters wrote:
 
  Hi All!
  
  Just a couple weeks ago I started using OJB, and I am 
 extremely impressed.  My gratitude goes to all who put in the 
 work to make it possible.
  
  Upon converting some of the more complicated parts of my 
 object model, I encountered a strange issue.  Here is the bug 
 I attempted to submit to scarab.  Apparently, scarab is 
 having problems.  At first, it assigned an ID to my issue 
 that was already assigned to another issue, so I can't 
 retrieve it.  Now, it won't let me enter new issues and keeps 
 directing me to the query page isntead.
  
  Anyhow, here is the summary of the bug.  Any help would be 
 appreciated:
  
  
 ==
 
 

RE: Problem with RC4

2003-07-29 Thread BURT, RANDALL (CONTRACTOR)
You can add the 

StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl 

key to your OJB.properties. One of the changes in this release is that your 
implementation of StatementsForClassIF can be configured. Don't know if this made it 
into the changelog, so be sure you update your OJB.properties if you update to rc4.

 -Original Message-
 From: Julian Exenberger [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 29, 2003 8:43 AM
 To: OJB Users List; Armin Waibel
 Subject: RE: Problem with RC4
 
 
 Hi,
 
 Thanks that that seems to work (although some of my RC3 
 workarounds are
 broken :-) ).
 
 For reference could you tell me what has changed in OJB.properties or
 where I can find info on it.
 
 Thanks a lot.
 
 -Original Message-
 From: Armin Waibel [mailto:[EMAIL PROTECTED] 
 Sent: 29 July 2003 03:27
 To: OJB Users List
 Subject: Re: Problem with RC4
 
 please use shipped OJB.properties file
 (replace the old one)
 HTH
 
 regards,
 Armin
 
 - Original Message -
 From: Julian Exenberger [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 29, 2003 3:22 PM
 Subject: Problem with RC4
 
 
 Hi,
 
 I have just installed OJB1.0 RC4 (from the binaries) and I 
 keep getting
 the following
 
 [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG:
 SQL:SELECT
 A0.is_change_password,A0.last_changed_by_userid,A0.password,A0
 .date_time
 _created,A0.user_id,A0.access_rights_code,A0.surname,A0.firstn
 ame,A0.cre
 ated_by_userid,A0.date_time_last_changed FROM manager_administrator A0
 WHERE A0.user_id =  ?
 [org.apache.ojb.broker.accesslayer.StatementsForClassFactory] ERROR:
 ConfigurableFactory configuration key class for
 key'StatementsForClassClass' does not exist.
 [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR:
 PersistenceBrokerException during the execution of the query:
 ConfigurableFactory configuration key class for
 key'StatementsForClassClass' does not exist.
 ConfigurableFactory configuration key class for
 key'StatementsForClassClass' does not exist.
 org.apache.ojb.broker.PersistenceBrokerException: ConfigurableFactory
 configuration key class for key'StatementsForClassClass' does 
 not exist.
   at
 org.apache.ojb.broker.util.factory.ConfigurableFactory.configu
 re(Unknown
 Source)
   at
 org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.
 configure(
 Unknown Source)
   at
 org.apache.ojb.broker.util.factory.ConfigurableFactory.init(Unknown
 Source)
   at
 org.apache.ojb.broker.accesslayer.StatementsForClassFactory.i
 nit(Unkno
 wn Source)
   at
 org.apache.ojb.broker.accesslayer.StatementsForClassFactory.ge
 tInstance(
 Unknown Source)
   at
 org.apache.ojb.broker.accesslayer.StatementManager.getStatemen
 tsForClass
 (Unknown Source)
   at
 org.apache.ojb.broker.accesslayer.StatementManager.getPrepared
 Statement(
 Unknown Source)
   at
 org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown
 Source)
   at org.apache.ojb.broker.accesslayer.RsIterator.init(Unknown
 Source)
   at
 org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsItera
 tor(Unknow
 n Source)
   at
 org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIterator
 FromQuery(
 Unknown Source)
   at
 org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFr
 omQuery(Un
 known Source)
   at
 org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollection
 ByQuery(Un
 known Source)
   at
 org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollection
 ByQuery(Un
 known Source)
   at
 org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollection
 ByQuery(Un
 known Source)
   at
 org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollection
 ByQuery(Un
 known Source)
   at
 org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQu
 ery(Unknow
 n Source)
   at
 org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObje
 ctByQuery(
 Unknown Source)
   at
 org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObje
 ctByQuery(
 Unknown Source)
   at
 com.mweb.persistence.spi.OJBPersistenceService.find(OJBPersist
 enceServic
 e.java:410)
 
 
 I haven't changed anything from when it was running RC3 and it worked
 fine,
 
 Could anybody give me some insight regarding this problem
 
 Thanks in advance
 
 
 Julian Exenberger
 -
 J2EE Developer
 Tel :  +27 11 340 7210
 Fax : +27 11 340 7342
 Cell:  +27 82 493 3352
 E-Mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 -
 M-WEB BUSINESS SOLUTIONS
 
 Go shopping @ http://shopping.mweb.co.za http://shopping.mweb.co.za/
 Get your business online @ http://business.mweb.com
 http://business.mweb.com/
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

RE: Where to find HOWTO for Stored Procedures?

2003-07-24 Thread BURT, RANDALL (CONTRACTOR)
Its in raw xml, but the info is there.

http://cvs.apache.org/viewcvs/db-ojb/xdocs/how-to-work-with-stored-procedures.xml?rev=1.1content-type=text/vnd.viewcvs-markup

 -Original Message-
 From: Alen Ribic [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 1:41 PM
 To: OJB Users List
 Subject: Where to find HOWTO for Stored Procedures?
 
 
 Where in CVS can I find the HOWTO on Using OJB with Stored Procedures?
 
 Thanks
 --Alen
 
 
 
 -
 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: recursive child element mapping

2003-07-22 Thread BURT, RANDALL (CONTRACTOR)
Looks good so far, you'll know more once you test.

 -Original Message-
 From: Durham David Contr 805 CSS/SCBE
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 22, 2003 1:10 PM
 To: OJB Users List
 Subject: RE: recursive child element mapping
 
 
  -Original Message-
  From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
 
  You would need to add one more field-descriptor for the 
  parentId field like so:
  
  field-descriptor id=3 name=parentId column=parentId 
  jdbc-type=INTEGER/
 
 ah, an oversight on my part ...  makes sense.  Anonymous field would
 save me the trouble of writing parentId accessors? (not that that's a
 big deal)
 
  
   I'm not entirely sure what the inverse-foreignkey element means.
  
  The inverse-foreignkey element tells OJB the property(s) of 
  the element-class-ref that points to elements of this class.
 
 Ok, so here's what I have now:
 
 
 class-descriptor
 class=business.Category
 table=categories
  
 sequence-manager=org.apache.ojb.broker.util.sequence.Sequence
 ManagerNex
 tValImpl
 
 
 field-descriptor id=1
 name=id
 column=categoryId
 jdbc-type=INTEGER
 primarykey=true
 autoincrement=true
 /
 field-descriptor id=2
 name=name
 column=NAME
 jdbc-type=VARCHAR
 /
 
 field-descriptor id=3
 name=parentId
 column=parentId
 jdbc-type=INTEGER/
 
 reference-descriptor
 name=parent
 class-ref=business.Category
 foreignkey field-ref=parentId/
 /reference-descriptor
 
 collection-descriptor
 name=subCategories
 element-class-ref=business.Category
 auto-delete=true
 
 inverse-foreignkey field-ref=parentId/
 /collection-descriptor
 
 /class-descriptor
 
 Wondering if this is right ... it's untested until I figure out how to
 test it :)
 
 Thanks,
 
 Dave
 
 
 
 
 
 -
 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: Where Do Stored Procedures Fit Into An O/R Mapping Layer?

2003-07-08 Thread BURT, RANDALL (CONTRACTOR)
The project I'm on has come to the point of integrating sp's into the app, and I was 
wondering if there were any plans to incorporate Mr. Gallagher's ideas into the main 
OJB distribution. If so, I'd be more than willing to lend a hand. 

Also, maybe its my ignorance, but could you expand on the modifications you had to 
make in org.apache.ojb.broker.accesslayer.StatementsForClassImpl and 
org.apache.ojb.broker.accesslayer.StatementManager.getStatementsForClass(ClassDescriptor)?
 My (admittedly very limited) understanding of these classes doesn't clue me as to the 
reason/form of the modifications.

Thanks, BTW, to Mr. Gallagher, Mr. Mahler, and the rest of the OJB team for a great 
framework and documentation.

-Original Message-
From: Ron Gallagher [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 08, 2003 8:26 AM
To: [EMAIL PROTECTED]
Subject: Re: Where Do Stored Procedures Fit Into An O/R Mapping Layer?


Michael --

 I'd appreciate any and all comments on this question. 
 I've often wondered where stored procedures should fit
 in an object-oriented application.  

Thomas just checked in a how-to document 
(xdocs/how-to-work-with-stored-procedures.xml) describing the process that I went 
through to get OJB to utilize stored procedures.

 They're terrific for performance, and they can be a
 great interface between the object and relational
 layers.  Folks who approach problems from a data
 modeling slant are usually enthusiastic about them.
 
 But I've seen them terribly abused.  The object bigot
 in me worries about diffusing business logic - some in
 objects, some in the database.
 
 How would one use stored procedures with OJB?  Thank
 you - MOD

On my current project, we're using stored procedures to handle two situations:
1) All CUD (Create, Update, Delete) operations.
2) Any application function that involves a large amount of data retrieval and/or 
creates a large amount of data.

The first situation is pretty self-explanatory and our implementation is covered in 
the how-to that was just posted.

We use stored procedures in the second scenario for purely performance reasons.  There 
are several functions in our app that create new entities based on either existing 
entities or predefined templates.  In either case, the process requires the retrieval 
of a significant amount of data and the creation of an even larger amount of data.  
While it's possible to do all of this in our java code, it quickly became apparent to 
us that the transmission of that much data back and forth between the database and 
client would be a real performance problem.  The solution was to create stored 
procedures to perform these data-intensive functions.

One thing to be careful of when using stored procedures is that you're basically doing 
data access operations outside of the ojb pipeline.  OJB has no knowledge of 
anything you do through the stored procedure.  If your procedure is creating data, 
there shouldn't be much of an issue.  If your procedure is changing or deleting 
existing data, then you may have a problem depending on the caching mechanism that you 
are using and the various refersh settings that are in your repository.

My $.02, 0.0174421 EUR using current exchange rates.

Ron Gallagher
Atlanta, GA
[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: Ms sql server

2003-06-09 Thread BURT, RANDALL (CONTRACTOR)
I haven't had any luck with anything other than MS's driver, sorry. You may want to 
try the jtds driver from sourceforge.

Any indication as to why the installation failed?

-Original Message-
From: Marcelo Magno [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 3:57 PM
To: OJB Users List
Subject: Ms sql server


I was using ms access to develop a prototype for my final project on the 
graduation course, but reading the mails from the list, I saw that no one managed 
using Memo fields and I was having trouble whith data fields.

So I decided to move to Sql, but I need a free Jdbc Driver. I tryed MS Jdbc 
driver but it did not finished instalation on my maxhine, soh I've got JSQL Connect 
(trial version) just to manage this to work.

What I want is to ask if anyone knows a free or non commercial version of jdbc 
driver for ms sql server.

Thanks in advance,
Marcelo Magno


-
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: How to configure OJB with Tomcat

2003-06-06 Thread BURT, RANDALL (CONTRACTOR)
Pooling other than what OJB provides?

-Original Message-
From: Lukas Severin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 6:36 AM
To: OJB Users List
Subject: How to configure OJB with Tomcat


I read the documentation about setting up OJB in a servlet. However I
couldnt find any instructions on how to configure connection pooling (eg
using jakarta-commons) together with OJB in Tomcat so that connections to
the database is pooled. Are there any synchronization issues to be careful
about ?

Can anyone point me to the right doc, or help me out with example tomcat
descriptors and client code ?

Thanks !


-
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: How to configure OJB with Tomcat

2003-06-06 Thread BURT, RANDALL (CONTRACTOR)
My pleasure. I also am using OJB with Tomcat in my project, but I am not using a JNDI 
datasource. Since I am using the PBAPI, I just configure my connection in my 
repository-database.xml and specify one of the pooled connection manager 
implementations in my OJB.properties. OJB then handles the connection pooling for you.

-Original Message-
From: Lukas Severin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 9:04 AM
To: OJB Users List
Subject: Re: How to configure OJB with Tomcat


Thanks Burt,

Well, first I want to say I am new to OJB so maybe I havent fully understood
what can be read at the website. That said, this is what I mean :

When doing standard BMP EJBs or JDBC I am used to configuring a Datasource
in Tomcat
which is a standard interface to a pool of connections that I can configure
in the Context tag of Tomcats server.xml. I name this myDatasource and cann
access it from my business delegate or any bean using

...
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(java:comp/env/myDatasource);
conn = ds.getConnection();
etc...

Here the Datasource is a common interface to the pool of connections setup
my Tomcat.

Now, in the OJB/JDO case, all examples I have seen (also in the web case)
let the client create a new factory for each access :
PersistenceManagerFactory factory = new OjbStorePMF();
PersistenceManager pm = factory.getPersistenceManager();
Transaction tx = pm.currentTransaction();
etc ...

I thought this was a gigantic overhead creating a new factory for each
client call ?
Are you saying that behind the factory a pool of connections is already
handled and I need to do nothing to configure Tomcat ? Is there no need to
setup a JNDI name ?

I found all the different type of ConnectionFactories in OJB.properties, but
didnt really get it since I thought this was the containers (ie Tomcats) job
to handle, for example using jakarta-commons-dbcp. So what I am saying is
that all I need is a pooled connection to the underlying database.


Thanks for help !



- Original Message - 
From: BURT, RANDALL (CONTRACTOR) [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 3:37 PM
Subject: RE: How to configure OJB with Tomcat


 Pooling other than what OJB provides?

 -Original Message-
 From: Lukas Severin [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 05, 2003 6:36 AM
 To: OJB Users List
 Subject: How to configure OJB with Tomcat


 I read the documentation about setting up OJB in a servlet. However I
 couldnt find any instructions on how to configure connection pooling (eg
 using jakarta-commons) together with OJB in Tomcat so that connections to
 the database is pooled. Are there any synchronization issues to be careful
 about ?

 Can anyone point me to the right doc, or help me out with example tomcat
 descriptors and client code ?

 Thanks !


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


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



RE: How to configure OJB with Tomcat

2003-06-06 Thread BURT, RANDALL (CONTRACTOR)
I can't speak to the JDO implementation, as I have only used the PBAPI. As to what 
component has the responsibility for connection pooling, IMHO, the data access/ORM 
component seems to be the more logical place, regardless of canonical J2EE.

As for your connection manager choices, this is from the OJB.properties file that 
ships with RC3:
#
# ConnectionFactory / Default ConnectionPool
#
# The ConnectionFactoryClass entry determines which kind of ConnectionFactory
# is to be used within org.apache.ojb as connection factory.
# A ConnectionFactory is responsible for creating
# JDBC Connections. Current version ships four implementations:
#
# 1. ConnectionFactoryNotPooledImpl
#No pooling, no playing around.
#Every connection request returns a new connection,
#every connection release close the connection.
# 2. ConnectionFactoryPooledImpl
#This implementation supports connection pooling.
# 3. ConnectionFactoryDBCPImpl
#Using the jakarta-DBCP api for connection management, support
#connection- and prepared statement-pooling, abandoned connection handling.
# 4. ConnectionFactoryManagedImpl
#Connection factory for use within managed environments - e.g. JBoss.
#Every obtained DataSource was wrapped within OJB (and ignore
#e.g. con.commit() calls within OJB).
#Use this implementation e.g if you use Datasources from an application server.
#
# Use the OJB performance tests to decide, which implementation is best for you.
# The proper way of obtaining a connection is configured in
# JDBCConnectionDescriptor entries in the repository.xml file.
# If want a more fine grained control of each connection pool used by OJB,
# take a look at the repository.dtd, there was a possibility to override
# this default connection factory entry in each JDBCConnectionDescriptor.

Sounds to me that if you want to use your container to manage connections, you would 
need to use ConnectionFactoryManagedImpl and not ConnectionFactoryDBCPImpl, but I may 
be missing something.

I can't really speak to PBAPI vs. JDO (haven't used JDO), but I can tell you the PBAPI 
is clean, powerful, and a joy to use!

-Original Message-
From: Lukas Severin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 10:12 AM
To: OJB Users List
Subject: Re: How to configure OJB with Tomcat


Thanks. Would it make a difference in setup of the pooling in the JDO case
compared to the PBAPI ? Is it not strange to have the pooling in OJB, when
this should be the task of the container (at least in the j2ee world) ? Does
it matter which connection manager to choose ? I feel inclined to choose the
DBCP based, but what do I know ;-)

Burt, you are using the PBAPI, and I have decided to go for the java
standard JDO. What difference regarding pooling and synchronization can I
expect ?

Anyone else care to share their opinions on this ?



- Original Message - 
From: BURT, RANDALL (CONTRACTOR) [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 4:12 PM
Subject: RE: How to configure OJB with Tomcat


 My pleasure. I also am using OJB with Tomcat in my project, but I am not
using a JNDI datasource. Since I am using the PBAPI, I just configure my
connection in my repository-database.xml and specify one of the pooled
connection manager implementations in my OJB.properties. OJB then handles
the connection pooling for you.

 -Original Message-
 From: Lukas Severin [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 05, 2003 9:04 AM
 To: OJB Users List
 Subject: Re: How to configure OJB with Tomcat


 Thanks Burt,

 Well, first I want to say I am new to OJB so maybe I havent fully
understood
 what can be read at the website. That said, this is what I mean :

 When doing standard BMP EJBs or JDBC I am used to configuring a Datasource
 in Tomcat
 which is a standard interface to a pool of connections that I can
configure
 in the Context tag of Tomcats server.xml. I name this myDatasource and
cann
 access it from my business delegate or any bean using

 ...
 Context ctx = new InitialContext();
 DataSource ds = (DataSource)ctx.lookup(java:comp/env/myDatasource);
 conn = ds.getConnection();
 etc...

 Here the Datasource is a common interface to the pool of connections setup
 my Tomcat.

 Now, in the OJB/JDO case, all examples I have seen (also in the web case)
 let the client create a new factory for each access :
 PersistenceManagerFactory factory = new OjbStorePMF();
 PersistenceManager pm = factory.getPersistenceManager();
 Transaction tx = pm.currentTransaction();
 etc ...

 I thought this was a gigantic overhead creating a new factory for each
 client call ?
 Are you saying that behind the factory a pool of connections is already
 handled and I need to do nothing to configure Tomcat ? Is there no need to
 setup

RE: How to configure OJB with Tomcat

2003-06-06 Thread BURT, RANDALL (CONTRACTOR)
Good luck, and let us know how it goes!

-Original Message-
From: Lukas Severin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 10:43 AM
To: OJB Users List
Subject: Re: How to configure OJB with Tomcat


Thanks again Burt, Ill try it out and see what happens ...
The problem as I see it is that all these different ORM tools have their own
non standard interfaces... I tried Castor and TJDO before. Thats why I want
an open source JDO ;-)
(preferably as part of j2ee). Well, future will tell...



- Original Message - 
From: BURT, RANDALL (CONTRACTOR) [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 5:26 PM
Subject: RE: How to configure OJB with Tomcat


 I can't speak to the JDO implementation, as I have only used the PBAPI. As
to what component has the responsibility for connection pooling, IMHO, the
data access/ORM component seems to be the more logical place, regardless of
canonical J2EE.

 As for your connection manager choices, this is from the OJB.properties
file that ships with RC3:

#---
-
 # ConnectionFactory / Default ConnectionPool

#---
-
 # The ConnectionFactoryClass entry determines which kind of
ConnectionFactory
 # is to be used within org.apache.ojb as connection factory.
 # A ConnectionFactory is responsible for creating
 # JDBC Connections. Current version ships four implementations:
 #
 # 1. ConnectionFactoryNotPooledImpl
 #No pooling, no playing around.
 #Every connection request returns a new connection,
 #every connection release close the connection.
 # 2. ConnectionFactoryPooledImpl
 #This implementation supports connection pooling.
 # 3. ConnectionFactoryDBCPImpl
 #Using the jakarta-DBCP api for connection management, support
 #connection- and prepared statement-pooling, abandoned connection
handling.
 # 4. ConnectionFactoryManagedImpl
 #Connection factory for use within managed environments - e.g. JBoss.
 #Every obtained DataSource was wrapped within OJB (and ignore
 #e.g. con.commit() calls within OJB).
 #Use this implementation e.g if you use Datasources from an
application server.
 #
 # Use the OJB performance tests to decide, which implementation is best
for you.
 # The proper way of obtaining a connection is configured in
 # JDBCConnectionDescriptor entries in the repository.xml file.
 # If want a more fine grained control of each connection pool used by OJB,
 # take a look at the repository.dtd, there was a possibility to override
 # this default connection factory entry in each JDBCConnectionDescriptor.

 Sounds to me that if you want to use your container to manage connections,
you would need to use ConnectionFactoryManagedImpl and not
ConnectionFactoryDBCPImpl, but I may be missing something.

 I can't really speak to PBAPI vs. JDO (haven't used JDO), but I can tell
you the PBAPI is clean, powerful, and a joy to use!

 -Original Message-
 From: Lukas Severin [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 05, 2003 10:12 AM
 To: OJB Users List
 Subject: Re: How to configure OJB with Tomcat


 Thanks. Would it make a difference in setup of the pooling in the JDO case
 compared to the PBAPI ? Is it not strange to have the pooling in OJB, when
 this should be the task of the container (at least in the j2ee world) ?
Does
 it matter which connection manager to choose ? I feel inclined to choose
the
 DBCP based, but what do I know ;-)

 Burt, you are using the PBAPI, and I have decided to go for the java
 standard JDO. What difference regarding pooling and synchronization can I
 expect ?

 Anyone else care to share their opinions on this ?



 - Original Message - 
 From: BURT, RANDALL (CONTRACTOR) [EMAIL PROTECTED]
 To: OJB Users List [EMAIL PROTECTED]
 Sent: Thursday, June 05, 2003 4:12 PM
 Subject: RE: How to configure OJB with Tomcat


  My pleasure. I also am using OJB with Tomcat in my project, but I am not
 using a JNDI datasource. Since I am using the PBAPI, I just configure my
 connection in my repository-database.xml and specify one of the pooled
 connection manager implementations in my OJB.properties. OJB then handles
 the connection pooling for you.
 
  -Original Message-
  From: Lukas Severin [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 05, 2003 9:04 AM
  To: OJB Users List
  Subject: Re: How to configure OJB with Tomcat
 
 
  Thanks Burt,
 
  Well, first I want to say I am new to OJB so maybe I havent fully
 understood
  what can be read at the website. That said, this is what I mean :
 
  When doing standard BMP EJBs or JDBC I am used to configuring a
Datasource
  in Tomcat
  which is a standard interface to a pool of connections that I can
 configure
  in the Context tag of Tomcats server.xml. I name this myDatasource and
 cann
  access it from my business delegate or any

RE: Cache question

2003-06-04 Thread BURT, RANDALL (CONTRACTOR)
Hi folks,

There is still caching, but is ignored.

So, wouldn't ObjectCacheEmptyImpl be just as good in this situation, or am I missing 
something?

-Original Message-
From: Thomas Mahler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 5:00 AM
To: OJB Users List
Subject: Re: Cache question




[EMAIL PROTECTED] wrote:
To avoid problems you should use Optimistic Locking (OL) to avoid write
conflicts.
 
 
 How do you set it up ?

see
http://db.apache.org/ojb/repository.html#field-descriptor for a 
description of the locking attribute. There are several samples in the 
repository_junit.xml.

 
And if you don't want to handle many OL exception you can set
refresh=true for all persistent classes.
 
 
 Which means there will be no caching at all.

There is still caching, but is ignored.

cheers,
thomas

 Regards,
 
 Patrick Reyes
 
 
  
   
 Thomas Mahler
   
 [EMAIL PROTECTED]   To: OJB Users List [EMAIL 
 PROTECTED]   
 cc: (bcc: Patrick Reyes/CDS/CG/CAPITAL) 
   
 Sent by: Subject: Re: Cache question 
   
 [EMAIL PROTECTED]
   
  
   
  
   
 06/03/2003   
   
 11:38 AM 
   
 Please respond   
   
 to OJB Users
   
 List
   
  
   
  
   
 
 
 
 
 
 
 [EMAIL PROTECTED] wrote:
 
3. you can use the PerBrokerCache so that changes to cached objects are

only visible within one thread.

I don't seem to be able to find PerBrokerCache.
 
 
 See OJB.properties file:
 #
 
 # Object cache
 #
 
 # The ObjectCacheClass entry tells OJB which concrete instance Cache
 # implementation is to be used.
 #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
 #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
 ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
 #ObjectCacheClass=org.apache.ojb.broker.cache.MetaObjectCacheJCSImpl
 #ObjectCacheClass=org.apache.ojb.broker.cache.MetaObjectCachePerClassImpl
 
 
What is the consequence of
the cached objects being only visible within one thread ?
 
 
 Other threads won't see uncommitted changes. thus dirty reads are avoided.
 On the other hand commited changes are also not seen!
 To avoid problems you should use Optimistic Locking (OL) to avoid write
 conflicts.
 Using refresh=true will help to reduce OptimisticLock exceptions in
 such a scenario.
 
 
By default OJB uses a global cache, so changes to any cached objects are

visible across the whole JVM.

What if I use the OJB in server mode with a multiuser environment ?
 
 
 Then you should use
 ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
 + OL.
 And if you don't want to handle many OL exception you can set
 refresh=true for all persistent classes.
 
 cheers,
 Thomas
 
 
Regards,

Patrick Reyes



 
 
Thomas Mahler
 
 
[EMAIL PROTECTED]   To: OJB Users List
 
 [EMAIL PROTECTED]
 
cc: (bcc: Patrick
 
 Reyes/CDS/CG/CAPITAL)
 
Sent by: Subject: Re: Cache question
 
 
[EMAIL PROTECTED]
 
 
 
 
06/03/2003
 
 
10:51 AM
 
 
Please respond
 
 
to OJB Users
 
 
List
 
 
 
 



Hi Patrick,

[EMAIL PROTECTED] wrote:


Hi guys, I am quite sure this is the right behavior of the cache, but I
would like 

RE: repository.xml question

2003-04-04 Thread BURT, RANDALL (CONTRACTOR)
Here's my repository.xml:

?xml version=1.0 encoding=UTF-8?
!-- This is a sample metadata repository for the ObJectBridge System.
 Use this file as a template for building your own mappings--

!-- defining entities for include-files --
!DOCTYPE descriptor-repository SYSTEM repository.dtd [
!ENTITY database SYSTEM repository_database.xml
!ENTITY internal SYSTEM repository_internal.xml
!ENTITY user SYSTEM repository_user.xml
]

descriptor-repository version=1.0 isolation-level=read-uncommitted

!-- include all used database connections --
database;

!-- include ojb internal mappings here --
internal;

!-- include user defined mappings here --
user;

/descriptor-repository

As you can see, I took those lines out completely, as well as the ENTITY entries.

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 9:54 AM
To: OJB Users List
Subject: RE: repository.xml question


Did you comment out the lines in repository.xml which refer
to the other ones? 
I am asking because I tried to do that and am getting
xml parser errors. Obviously I am doing something very
wrong, but a comparison between the original repository.xml
and the one I modified is turning up nothing that I can see.

thanks,
Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:50 AM
To: OJB Users List
Subject: RE: repository.xml question


Don't know about Weblogic, but I am running fine with only the one's you
mentioned plus repository_internal.xml.

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 4:12 PM
To: [EMAIL PROTECTED]
Subject: repository.xml question


Which of the files in the repository.xml hierarchy do I really need
if I am using OJB in a servlet based app under Weblogic?
I know I need repository.xml, repository_database.xml, and
repository_user.xml.

How about repository_junit.xml, repository_ejb.xml, repository_internal.xml,
and repository_jdo.xml?

If I do need them, are there any caveats on how they need to be set up?

thanks,
Bonnie MacKellar

-
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: repository.xml question

2003-04-04 Thread BURT, RANDALL (CONTRACTOR)
Does sound like a typo to me... Did my repository.xml help?

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:31 AM
To: OJB Users List
Subject: RE: repository.xml question


It is a parse error of this form.
java.lang.ExceptionInInitializerError: org.xml.sax.SAXParseException: The
conten
t of elements must consist of well-formed character data or markup.

I notice that I get the same error when I try to verify using an xml plugin
for Eclipse.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 11:13 AM
To: OJB Users List
Subject: RE: repository.xml question


What sort of parser errors, BTW?

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:10 AM
To: OJB Users List
Subject: RE: repository.xml question



Hmph. I tried that already, and it did not work. Maybe I
will try copying your exact xml code below into mine,
in case there is a lurking type in my code.

thanks a million,
Bonnie MacKellar
-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:59 AM
To: OJB Users List
Subject: RE: repository.xml question


Here's my repository.xml:

?xml version=1.0 encoding=UTF-8?
!-- This is a sample metadata repository for the ObJectBridge System.
 Use this file as a template for building your own mappings--

!-- defining entities for include-files --
!DOCTYPE descriptor-repository SYSTEM repository.dtd [
!ENTITY database SYSTEM repository_database.xml
!ENTITY internal SYSTEM repository_internal.xml
!ENTITY user SYSTEM repository_user.xml
]

descriptor-repository version=1.0 isolation-level=read-uncommitted

!-- include all used database connections --
database;

!-- include ojb internal mappings here --
internal;

!-- include user defined mappings here --
user;

/descriptor-repository

As you can see, I took those lines out completely, as well as the ENTITY
entries.

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 9:54 AM
To: OJB Users List
Subject: RE: repository.xml question


Did you comment out the lines in repository.xml which refer
to the other ones? 
I am asking because I tried to do that and am getting
xml parser errors. Obviously I am doing something very
wrong, but a comparison between the original repository.xml
and the one I modified is turning up nothing that I can see.

thanks,
Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:50 AM
To: OJB Users List
Subject: RE: repository.xml question


Don't know about Weblogic, but I am running fine with only the one's you
mentioned plus repository_internal.xml.

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 4:12 PM
To: [EMAIL PROTECTED]
Subject: repository.xml question


Which of the files in the repository.xml hierarchy do I really need
if I am using OJB in a servlet based app under Weblogic?
I know I need repository.xml, repository_database.xml, and
repository_user.xml.

How about repository_junit.xml, repository_ejb.xml, repository_internal.xml,
and repository_jdo.xml?

If I do need them, are there any caveats on how they need to be set up?

thanks,
Bonnie MacKellar

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

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



RE: dynamic repository.xml

2003-04-04 Thread BURT, RANDALL (CONTRACTOR)
Seems that 

org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(java.lang.String
 repositoryFile, java.lang.String user, java.lang.String password)

may be what you are looking for? I'm new to OJB too, so I'm not sure this is right, 
but it seems to be. Found this by grepping through 
http://db.apache.org/ojb/api/index.html, BTW.

-Original Message-
From: Johnson, Nathaniel A [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 11:34 AM
To: OJB Users List
Subject: dynamic repository.xml


Is there a way to dynamically set the location of the 
repository.xml file through code? 

We would like to put it in a settings directory, that 
changes when we migrate to different environments, but 
it seems that OJB is looking in the pwd of the currently 
running process.  So we can not use the OJB.properties 
file to set this location.

Thanks,
Nate

-
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: super simple

2003-04-04 Thread BURT, RANDALL (CONTRACTOR)
you need to rename the file to .tar.gz and it should work.

-Original Message-
From: Clark O'Brien [mailto:Clarke.O'[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: super simple


Hi,
Sorry to post such a newbie question but I am at a loss how to download and
install the product on W2K.

I downloaded the file db-ojb-1.0.rc2.gz from sourceforge but it contains a
single file that does not contain an extension and
I have no idea what to do with it.
  Clark



-
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: super simple

2003-04-04 Thread BURT, RANDALL (CONTRACTOR)
Sorry, that would be db-ojb-1.0.rc2.tar.gz

-Original Message-
From: Clark O'Brien [mailto:Clarke.O'[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: super simple


Hi,
Sorry to post such a newbie question but I am at a loss how to download and
install the product on W2K.

I downloaded the file db-ojb-1.0.rc2.gz from sourceforge but it contains a
single file that does not contain an extension and
I have no idea what to do with it.
  Clark



-
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: super simple

2003-04-04 Thread BURT, RANDALL (CONTRACTOR)
Whoo-hoo, batting 1000 today...

The file name should be db-ojb-1.0.rc2.tgz. When you open it up in WinZip, it should 
tell you that the archive contains one file, and should WZ extract it to a temp file 
and open it. Say yes, then extract the listed contents to your hard drive.

Just as a heads up, do not put the files under Program Files or any other directory 
with spaces, as this causes many problems that can be hard to track down at first. 
Same goes for Tomcat, JBoss, or any other container you may be using.

-Original Message-
From: Clark O'Brien [mailto:Clarke.O'[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: super simple


Hi,
Sorry to post such a newbie question but I am at a loss how to download and
install the product on W2K.

I downloaded the file db-ojb-1.0.rc2.gz from sourceforge but it contains a
single file that does not contain an extension and
I have no idea what to do with it.
  Clark



-
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: core OJB tables; auto-increment

2003-04-04 Thread BURT, RANDALL (CONTRACTOR)
Hello,

To create the core tables in my db, I just ran ${OJB INSTALL 
DIRECTORY}\target\src\sql\ojbcore-schema.sql (the slant of your slashes may vary) 
against a new database after running the prepare-testdb target. There may be a better 
way, I dunno.

As for 2), you can always roll your own, I suppose. From what I understand from 
browsing the posts over the last couple of days, OJB's sequence manager should work by 
calling nextval() or whatever from the sequences you specify, not by creating its own 
sequence. You could always hack a quick test and see.

-Original Message-
From: Duffy Gillman [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 5:22 PM
To: OJB Users List
Subject: core OJB tables; auto-increment


Hi,

   I am trying to use OJB as part of a web-service.  The database may be 
accessed by other software.  I need to find answers to the following 
questions:

1) How do I create the core OJB tables in my database?  In the 
documentation I am only finding the prepare-testdb ant target.  This 
builds a bunch of extra tables that I do not want.  Surely I can drop the 
extra tables... but I would like to know how to just build the core ones 
into my project (OJB_HL_SEQ, OJB_LOCKENTRY, OJB_NRM, OJB_DLIST, etc...).

2) Is using the OJB sequence manager the only way to get OJB to work with 
sequences?  Several PK fields in my database are autoincrement.  Will the 
OJB create its OWN sequences for these (i.e. if another application relies 
on the sequence maintained by the RDBMS itself, will it clash with the 
sequence OJB is maintaining?)?

Thanks in advance,

Duffy

-- 
=
Duffy Gillman
POLIS Systems Programmer

Learning Technology Center
PO Box 210073, CCIT Bldg., Rm. 337
1077 N. Highland Ave.
Tucson, AZ 85721-0073

520.626.0117 (voice)
520.626.8220 (fax)
=


-
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: MSSQL server - error in ojbtest-schema.xml

2003-04-01 Thread BURT, RANDALL (CONTRACTOR)
Well, the JUnit errors *were* nothing to worry about. I've completed some small spikes 
and things are looking good so far. Thanks to everyone for their help and input. I'm 
sure you'll be hearing more from us as this project gets going!

-Original Message-
From: BURT, RANDALL (CONTRACTOR) 
Sent: Monday, March 31, 2003 4:32 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Looking through the JUnit output, I wonder if these are significant as well. I tried 
some of the queries manually against my db, and they failed there too. What kills me 
is that something like SELECT COUNT(F.*) FROM FOO F; fails no matter what driver you 
use in SQL Server 2000 (or so my limited testing shows me...)

Could you send the JUnit output so we could see what those errors were?

GFD, I'll pick this up in the morning...

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 4:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I tested on Friday with the rc1 build, using JSQLConnect,
and got 0 failures, 1 error, which I was told was not important.

Today, testing with the rc2 build, and with the columns modifed
to be NOT NULL as specified earlier, I get 0 failures, 4 errors.
I have no clue if these are important or not.

Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 5:01 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Some issues with the JSQLConnect driver:

1. Due to network restrictions, I suppose, I was getting 403 errors using
the ant task to download the driver. I grabbed it manually without incident,
and commented out the ant call.

2. I am actually getting *more* JUnit failures/errors with this driver,
though I concede it may be due to the changes I mentioned below in the
ojbtest-schema.xml?

3. With the money the PHB's are already throwing at MS licensing, I am loath
to try and work another ($4000+ for us, if I read their pricing correctly)
purchase into the budget...

-Original Message-
From: Matthew Baird [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I don't have any issues with MSSQL, but the driver always makes a
difference. When people ask me I recommend the JSQLConnect #1 and Opta2000
#2. Bother are great drivers.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I'll give it a shot. Truth to tell, *I* wouldn't use MSSQL server at all,
but this is a port of an app we inherited, so we're kinda stuck... :(

-Original Message-
From: Matthew Baird [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


if you are worried about using OJB, I'd be more worried about using the MS
Driver.

Switch over and use the JSQLConnect profile and the build will automatically
download the jsqlconnect driver which is much better.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Glad I could help. I can sympathize with your trepidation about using OJB in
a large project. Seems I've been taking one step forward and two steps back
for the last few days. I like what it is and what it does, though, and I
can't see hacking a persistence service for the projects I have lined up
would be very cost-effective...

As for those JUnit errors I mentioned before, anyone getting anything like
this (from tests-broker.txt):

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
during the execution of the query (SELECT count(A0.*) FROM Artikel A0 WHERE
A0.Kategorie_Nr =  ? ) (for a org.apache.ojb.broker.Article):
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect
syntax near '*'.
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect
syntax near '*'.

I hacked the test a bit so I could see the query that bombed
(pre-preparation), but it doesn't look like it should fail to me. I'm down
to my last three errors (broker tests) and one failure (ODMG tests) and
would like to start testing with real data in my application environment.


-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:09 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Thanks for this post. I was also getting this today (using JTurbo).

Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:05 PM
To: OJB Users List
Subject: MSSQL server - error

RE: Creation of a new PB instance failed

2003-03-31 Thread BURT, RANDALL (CONTRACTOR)
Could be. I know I'm using rc1, but I copied the properties file from one of the 
examples. Going to try rc2 now and see if that helps. Thanks for your assistance, I'll 
let you know how it goes...

-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 8:00 PM
To: OJB Users List
Subject: Re: Creation of a new PB instance failed


Hi,

if you use rc1 all these entries are in OJB.properties file,
thus you don't use rc1 or you mixed some files. Please
check your classpath if you have more than one OJB.properties file
in (maybe from the struts stuff)

regards,
Armin

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



MSSQL server - error in ojbtest-schema.xml

2003-03-31 Thread BURT, RANDALL (CONTRACTOR)
Don't know if I should submit a bug report on this or not, but when I tried to run the 
prepare-testdb target using MSSQL server 2000 (MS's JDBC Driver), I would get the 
following error:

[torque-insert-sql] Executing file: 
C:\java\utils\db-ojb-1.0.rc2\target\src\sql\ojbtest-schema.sql
[torque-insert-sql] Failed to execute: 
/* -- */
[torque-insert-sql]  /* REF_REPOSITORY_FK  
*/ /* -- 
*/ IF EXISTS (SELECT 1 
( ... )

[torque-insert-sql] java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for 
JDBC][SQLServer]Cannot define PRIMARY KEY constraint on nullable column in table 
'REF_REPOSITORY_FK'.

This was fixed by changing the REF_REPOSITORY_FK table description in 
${OJB_HOME}\src\schema\ojbtest-schema.xml to make the required fields not null:

table name=REF_REPOSITORY_FK
column name=REP_ID required=true primaryKey=true type=INTEGER/
column name=REF_FK required=true type=INTEGER primaryKey=true/
column name=REFA_FK required=true type=INTEGER primaryKey=true/
column name=REFB_FK required=true type=INTEGER primaryKey=true/
column name=NAME type=VARCHAR size=100/
/table

The tables now build correctly, though I am still tracking down some failed JUnit 
tests. Hope this helps somebody...

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



RE: MSSQL server - error in ojbtest-schema.xml

2003-03-31 Thread BURT, RANDALL (CONTRACTOR)
Glad I could help. I can sympathize with your trepidation about using OJB in a large 
project. Seems I've been taking one step forward and two steps back for the last few 
days. I like what it is and what it does, though, and I can't see hacking a 
persistence service for the projects I have lined up would be very cost-effective...

As for those JUnit errors I mentioned before, anyone getting anything like this (from 
tests-broker.txt):

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException during the 
execution of the query (SELECT count(A0.*) FROM Artikel A0 WHERE A0.Kategorie_Nr =  ? 
) (for a org.apache.ojb.broker.Article): [Microsoft][SQLServer 2000 Driver for 
JDBC][SQLServer]Line 1: Incorrect syntax near '*'.
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near 
'*'.

I hacked the test a bit so I could see the query that bombed (pre-preparation), but it 
doesn't look like it should fail to me. I'm down to my last three errors (broker 
tests) and one failure (ODMG tests) and would like to start testing with real data 
in my application environment.


-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:09 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Thanks for this post. I was also getting this today (using JTurbo).

Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:05 PM
To: OJB Users List
Subject: MSSQL server - error in ojbtest-schema.xml


Don't know if I should submit a bug report on this or not, but when I tried
to run the prepare-testdb target using MSSQL server 2000 (MS's JDBC Driver),
I would get the following error:

[torque-insert-sql] Executing file:
C:\java\utils\db-ojb-1.0.rc2\target\src\sql\ojbtest-schema.sql
[torque-insert-sql] Failed to execute: 
/* -- */
[torque-insert-sql]  /* REF_REPOSITORY_FK
*/ /* --
*/ IF EXISTS (SELECT 1 
( ... )

[torque-insert-sql] java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC][SQLServer]Cannot define PRIMARY KEY constraint on nullable column
in table 'REF_REPOSITORY_FK'.

This was fixed by changing the REF_REPOSITORY_FK table description in
${OJB_HOME}\src\schema\ojbtest-schema.xml to make the required fields not
null:

table name=REF_REPOSITORY_FK
column name=REP_ID required=true primaryKey=true
type=INTEGER/
column name=REF_FK required=true type=INTEGER
primaryKey=true/
column name=REFA_FK required=true type=INTEGER
primaryKey=true/
column name=REFB_FK required=true type=INTEGER
primaryKey=true/
column name=NAME type=VARCHAR size=100/
/table

The tables now build correctly, though I am still tracking down some failed
JUnit tests. Hope this helps somebody...

-
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: MSSQL server - error in ojbtest-schema.xml

2003-03-31 Thread BURT, RANDALL (CONTRACTOR)
I'll give it a shot. Truth to tell, *I* wouldn't use MSSQL server at all, but this is 
a port of an app we inherited, so we're kinda stuck... :(

-Original Message-
From: Matthew Baird [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


if you are worried about using OJB, I'd be more worried about using the MS Driver.

Switch over and use the JSQLConnect profile and the build will automatically download 
the jsqlconnect driver which is much better.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Glad I could help. I can sympathize with your trepidation about using OJB in a large 
project. Seems I've been taking one step forward and two steps back for the last few 
days. I like what it is and what it does, though, and I can't see hacking a 
persistence service for the projects I have lined up would be very cost-effective...

As for those JUnit errors I mentioned before, anyone getting anything like this (from 
tests-broker.txt):

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException during the 
execution of the query (SELECT count(A0.*) FROM Artikel A0 WHERE A0.Kategorie_Nr =  ? 
) (for a org.apache.ojb.broker.Article): [Microsoft][SQLServer 2000 Driver for 
JDBC][SQLServer]Line 1: Incorrect syntax near '*'.
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near 
'*'.

I hacked the test a bit so I could see the query that bombed (pre-preparation), but it 
doesn't look like it should fail to me. I'm down to my last three errors (broker 
tests) and one failure (ODMG tests) and would like to start testing with real data 
in my application environment.


-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:09 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Thanks for this post. I was also getting this today (using JTurbo).

Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:05 PM
To: OJB Users List
Subject: MSSQL server - error in ojbtest-schema.xml


Don't know if I should submit a bug report on this or not, but when I tried
to run the prepare-testdb target using MSSQL server 2000 (MS's JDBC Driver),
I would get the following error:

[torque-insert-sql] Executing file:
C:\java\utils\db-ojb-1.0.rc2\target\src\sql\ojbtest-schema.sql
[torque-insert-sql] Failed to execute: 
/* -- */
[torque-insert-sql]  /* REF_REPOSITORY_FK
*/ /* --
*/ IF EXISTS (SELECT 1 
( ... )

[torque-insert-sql] java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC][SQLServer]Cannot define PRIMARY KEY constraint on nullable column
in table 'REF_REPOSITORY_FK'.

This was fixed by changing the REF_REPOSITORY_FK table description in
${OJB_HOME}\src\schema\ojbtest-schema.xml to make the required fields not
null:

table name=REF_REPOSITORY_FK
column name=REP_ID required=true primaryKey=true
type=INTEGER/
column name=REF_FK required=true type=INTEGER
primaryKey=true/
column name=REFA_FK required=true type=INTEGER
primaryKey=true/
column name=REFB_FK required=true type=INTEGER
primaryKey=true/
column name=NAME type=VARCHAR size=100/
/table

The tables now build correctly, though I am still tracking down some failed
JUnit tests. Hope this helps somebody...

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


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



RE: MSSQL server - error in ojbtest-schema.xml

2003-03-31 Thread BURT, RANDALL (CONTRACTOR)
Some issues with the JSQLConnect driver:

1. Due to network restrictions, I suppose, I was getting 403 errors using the ant task 
to download the driver. I grabbed it manually without incident, and commented out the 
ant call.

2. I am actually getting *more* JUnit failures/errors with this driver, though I 
concede it may be due to the changes I mentioned below in the ojbtest-schema.xml?

3. With the money the PHB's are already throwing at MS licensing, I am loath to try 
and work another ($4000+ for us, if I read their pricing correctly) purchase into the 
budget...

-Original Message-
From: Matthew Baird [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I don't have any issues with MSSQL, but the driver always makes a difference. When 
people ask me I recommend the JSQLConnect #1 and Opta2000 #2. Bother are great drivers.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I'll give it a shot. Truth to tell, *I* wouldn't use MSSQL server at all, but this is 
a port of an app we inherited, so we're kinda stuck... :(

-Original Message-
From: Matthew Baird [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


if you are worried about using OJB, I'd be more worried about using the MS Driver.

Switch over and use the JSQLConnect profile and the build will automatically download 
the jsqlconnect driver which is much better.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Glad I could help. I can sympathize with your trepidation about using OJB in a large 
project. Seems I've been taking one step forward and two steps back for the last few 
days. I like what it is and what it does, though, and I can't see hacking a 
persistence service for the projects I have lined up would be very cost-effective...

As for those JUnit errors I mentioned before, anyone getting anything like this (from 
tests-broker.txt):

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException during the 
execution of the query (SELECT count(A0.*) FROM Artikel A0 WHERE A0.Kategorie_Nr =  ? 
) (for a org.apache.ojb.broker.Article): [Microsoft][SQLServer 2000 Driver for 
JDBC][SQLServer]Line 1: Incorrect syntax near '*'.
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near 
'*'.

I hacked the test a bit so I could see the query that bombed (pre-preparation), but it 
doesn't look like it should fail to me. I'm down to my last three errors (broker 
tests) and one failure (ODMG tests) and would like to start testing with real data 
in my application environment.


-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:09 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Thanks for this post. I was also getting this today (using JTurbo).

Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:05 PM
To: OJB Users List
Subject: MSSQL server - error in ojbtest-schema.xml


Don't know if I should submit a bug report on this or not, but when I tried
to run the prepare-testdb target using MSSQL server 2000 (MS's JDBC Driver),
I would get the following error:

[torque-insert-sql] Executing file:
C:\java\utils\db-ojb-1.0.rc2\target\src\sql\ojbtest-schema.sql
[torque-insert-sql] Failed to execute: 
/* -- */
[torque-insert-sql]  /* REF_REPOSITORY_FK
*/ /* --
*/ IF EXISTS (SELECT 1 
( ... )

[torque-insert-sql] java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC][SQLServer]Cannot define PRIMARY KEY constraint on nullable column
in table 'REF_REPOSITORY_FK'.

This was fixed by changing the REF_REPOSITORY_FK table description in
${OJB_HOME}\src\schema\ojbtest-schema.xml to make the required fields not
null:

table name=REF_REPOSITORY_FK
column name=REP_ID required=true primaryKey=true
type=INTEGER/
column name=REF_FK required=true type=INTEGER
primaryKey=true/
column name=REFA_FK required=true type=INTEGER
primaryKey=true/
column name=REFB_FK required=true type=INTEGER
primaryKey=true/
column name=NAME type=VARCHAR size=100/
/table

The tables now build correctly, though I am still tracking down some failed
JUnit tests. Hope this helps somebody...

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

RE: MSSQL server - error in ojbtest-schema.xml

2003-03-31 Thread BURT, RANDALL (CONTRACTOR)
Looking through the JUnit output, I wonder if these are significant as well. I tried 
some of the queries manually against my db, and they failed there too. What kills me 
is that something like SELECT COUNT(F.*) FROM FOO F; fails no matter what driver you 
use in SQL Server 2000 (or so my limited testing shows me...)

Could you send the JUnit output so we could see what those errors were?

GFD, I'll pick this up in the morning...

-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 4:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I tested on Friday with the rc1 build, using JSQLConnect,
and got 0 failures, 1 error, which I was told was not important.

Today, testing with the rc2 build, and with the columns modifed
to be NOT NULL as specified earlier, I get 0 failures, 4 errors.
I have no clue if these are important or not.

Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 5:01 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Some issues with the JSQLConnect driver:

1. Due to network restrictions, I suppose, I was getting 403 errors using
the ant task to download the driver. I grabbed it manually without incident,
and commented out the ant call.

2. I am actually getting *more* JUnit failures/errors with this driver,
though I concede it may be due to the changes I mentioned below in the
ojbtest-schema.xml?

3. With the money the PHB's are already throwing at MS licensing, I am loath
to try and work another ($4000+ for us, if I read their pricing correctly)
purchase into the budget...

-Original Message-
From: Matthew Baird [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I don't have any issues with MSSQL, but the driver always makes a
difference. When people ask me I recommend the JSQLConnect #1 and Opta2000
#2. Bother are great drivers.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:25 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


I'll give it a shot. Truth to tell, *I* wouldn't use MSSQL server at all,
but this is a port of an app we inherited, so we're kinda stuck... :(

-Original Message-
From: Matthew Baird [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


if you are worried about using OJB, I'd be more worried about using the MS
Driver.

Switch over and use the JSQLConnect profile and the build will automatically
download the jsqlconnect driver which is much better.

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:20 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Glad I could help. I can sympathize with your trepidation about using OJB in
a large project. Seems I've been taking one step forward and two steps back
for the last few days. I like what it is and what it does, though, and I
can't see hacking a persistence service for the projects I have lined up
would be very cost-effective...

As for those JUnit errors I mentioned before, anyone getting anything like
this (from tests-broker.txt):

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
during the execution of the query (SELECT count(A0.*) FROM Artikel A0 WHERE
A0.Kategorie_Nr =  ? ) (for a org.apache.ojb.broker.Article):
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect
syntax near '*'.
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect
syntax near '*'.

I hacked the test a bit so I could see the query that bombed
(pre-preparation), but it doesn't look like it should fail to me. I'm down
to my last three errors (broker tests) and one failure (ODMG tests) and
would like to start testing with real data in my application environment.


-Original Message-
From: Bonnie MacKellar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:09 PM
To: OJB Users List
Subject: RE: MSSQL server - error in ojbtest-schema.xml


Thanks for this post. I was also getting this today (using JTurbo).

Bonnie MacKellar

-Original Message-
From: BURT, RANDALL (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:05 PM
To: OJB Users List
Subject: MSSQL server - error in ojbtest-schema.xml


Don't know if I should submit a bug report on this or not, but when I tried
to run the prepare-testdb target using MSSQL server 2000 (MS's JDBC Driver),
I would get the following error:

[torque-insert-sql] Executing file:
C:\java\utils\db-ojb-1.0.rc2\target\src\sql\ojbtest-schema.sql
[torque-insert-sql] Failed to execute

Creation of a new PB instance failed

2003-03-29 Thread BURT, RANDALL (CONTRACTOR)
Hi! I'm new to OJB, and was banging my head against the following error:

[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] INFO: Set default 
PBKey: org.apache.ojb.broker.PBKey: repository=default, user=sa, password=*
[org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: Configurable 
Factory configuration key class 'null' does not exist.
[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] ERROR: Creation of a 
new PB instance failed
null

I'm using OJB 1.0-rc1, Tomcat 4.1, Struts (latest stable release), MSSql Server 7, and 
the jtds-0.4 jdbc driver on Windows 2000. I can't seem to find the problem and was 
wondering if anyone had any suggestions. I'll provide my repository metadata and 
database layout if you need it.

As an aside, I tried searching the mailing list archives, but could not get the page 
to display message contents other than: 

$msgHeaders

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



RE: Creation of a new PB instance failed

2003-03-29 Thread BURT, RANDALL (CONTRACTOR)
Yup. My connection descriptor looks like:

jdbc-connection-descriptor
jcd-alias=default
default-connection=true
platform=MsSQLServer
jdbc-level=2.0
driver=net.sourceforge.jtds.jdbc.Driver
protocol=jdbc
subprotocol=jtds
dbalias=//fpe-db-w-fpaydv:1433/WinApps_3
username=sa
password=gators111
batch-mode=false
useAutoCommit=1
ignoreAutoCommitExceptions=false /

-Original Message-
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 1:09 PM
To: OJB Users List
Subject: Re: Creation of a new PB instance failed


hi burt,

do you have a default jcd-alias in your conncetion-descriptor ?

 jdbc-connection-descriptor
default-connection=true
jcd-alias=default  
   platform=MySQL
   jdbc-level=2.0
   driver=com.p6spy.engine.spy.P6SpyDriver
   protocol=jdbc
   subprotocol=mysql
   dbalias=//localhost:3306/brjtest
   username=


jakob

BURT, RANDALL (CONTRACTOR) wrote:

Hi! I'm new to OJB, and was banging my head against the following error:

[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] INFO: Set default 
PBKey: org.apache.ojb.broker.PBKey: repository=default, user=sa, password=*
[org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: Configurable 
Factory configuration key class 'null' does not exist.
[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] ERROR: Creation of a 
new PB instance failed
null

I'm using OJB 1.0-rc1, Tomcat 4.1, Struts (latest stable release), MSSql Server 7, 
and the jtds-0.4 jdbc driver on Windows 2000. I can't seem to find the problem and 
was wondering if anyone had any suggestions. I'll provide my repository metadata and 
database layout if you need it.

As an aside, I tried searching the mailing list archives, but could not get the page 
to display message contents other than: 

$msgHeaders

-
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: Creation of a new PB instance failed

2003-03-29 Thread BURT, RANDALL (CONTRACTOR)
No, this is the only version I have used. However, ConnectionManagerClass does not 
seem to be specified in my OJB.properties file...

-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 1:17 PM
To: OJB Users List
Subject: Re: Creation of a new PB instance failed


Do you update from an older version and
do not replace all configuration files?
E.g. do not replace OJB.properties file?
Or the OJB.properties file was not found?

Seems property 'ConnectionManagerClass' could not be found.

regards,
Armin

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



RE: Creation of a new PB instance failed

2003-03-29 Thread BURT, RANDALL (CONTRACTOR)
Yes, as copied from my OJB.properties:
(...)
# The PersistenceBrokerFactoryClass entry decides which concrete
# PersistenceBrokerFactory implemention is to be used.
# Use this by for non-managed environments:
PersistenceBrokerFactoryClass=org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl
(...)
# The PersistenceBrokerClass entry decides which concrete PersistenceBroker
# implementation is to be served by the PersistenceBrokerFactory.
# This is the singlevm implementation:
PersistenceBrokerClass=org.apache.ojb.broker.singlevm.PersistenceBrokerImpl
(...)

-Original Message-
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 1:22 PM
To: OJB Users List
Subject: Re: Creation of a new PB instance failed


hi burt,

and you also have thse entries in ojb.properties ?

PersistenceBrokerFactoryClass=org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl
PersistenceBrokerClass=org.apache.ojb.broker.singlevm.PersistenceBrokerImpl

jakob

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



RE: Creation of a new PB instance failed

2003-03-29 Thread BURT, RANDALL (CONTRACTOR)
Adding that line to the configuration didn't help, I'm still getting:

[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] INFO: Set default 
PBKey: org.apache.ojb.broker.PBKey: repository=default, user=sa, password=*
[org.apache.ojb.broker.accesslayer.JdbcAccessFactory] ERROR: ConfigurableFactory 
configuration key class 'null' does not exist.
[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] ERROR: Creation of a 
new PB instance failed
null

Still stumped...

Message-
From: BURT, RANDALL (CONTRACTOR) 
Sent: Saturday, March 29, 2003 1:57 PM
To: OJB Users List
Subject: RE: Creation of a new PB instance failed


Nope. I don't have that entry in OJB.properties. I have a ConnectionFactoryClass entry 
like so:

ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDefaultImpl

Not using pooling right now, as we are early in development. I will add the line you 
sent and let you know if it works.

-Original Message-
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 1:43 PM
To: OJB Users List
Subject: Re: Creation of a new PB instance failed


and this is the connection manager entry:

ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl

hth
jakob

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