You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Mi...@iff.fraunhofer.de on 2004/12/08 11:50:00 UTC
PBKey
Hello,
i got setup the database and all Tables. I tried to start my Demo
application bu there is an error:
org.apache.ojb.broker.PBFactoryException: There was no default-PBKey
specified
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown
Source)
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
Source)
at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown
Source)
at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown
Source)
at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
at org.myProject.appli.Demo.storing(Demo.java:97)
at org.myProject.appli.Demo.main(Demo.java:110)
Exception in thread "main"
Do u know what is ment with this massege? What do i have to do to solve
this problem?
regards
Michael
Re: PBKey
Posted by Thomas Franke <fr...@softenergy.de>.
Michael.Sack@iff.fraunhofer.de wrote:
> The xml files are in the resources folder wihich is under classes. I tried
> also to out the files directly in the folder classes - with the same
> result.
Have you removed the old work directory before you restarted? That's
sometimes the reason for an error. The changed xml files couldn't be
compiled.
--
Mit freundlichen Grüßen
Thomas Franke
Geschäftsführer
Leiter Entwicklung
----------------------------
The energy for a better world
----------------------------
softEnergy GmbH
Platz der Freundschaft 1
18059 Rostock
----------------------------
fon: +49 381 40 587 535
fax: +49 381 40 587 555
mobil: +49 1715222015
http://www.softenergy.de
mail: info@softenergy.de
----------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: PBKey
Posted by Mi...@iff.fraunhofer.de.
The xml files are in the resources folder wihich is under classes. I tried
also to out the files directly in the folder classes - with the same
result.
[JDO] DEBUG: OjbStoreConnector.begin: connectionReadyForRelease=false
org.apache.ojb.broker.PBFactoryException: There was no default-PBKey
specified
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown
Source)
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
Source)
at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown
Source)
at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown
Source)
at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
at org.myProject.appli.Demo.storing(Demo.java:97)
at org.myProject.appli.Demo.main(Demo.java:110)
Exception in thread "main"
There must be another mistake.
regards
Re: PBKey
Posted by Thomas Franke <fr...@softenergy.de>.
Michael.Sack@iff.fraunhofer.de wrote:
> Hello,
>
> I want to start the damo.class from the destination folder of this class.
> My repository.xml files are in target \classes\resources. How can i set it
> that he finds this files
I remember at first we had this problem too.
Put it under \classes. That's all.
We have exported our application into a jar file and the repository.xml
is in the root in this jar file. It's the same as under \classes.
regards
Thomas
--
Mit freundlichen Grüßen
Thomas Franke
Geschäftsführer
Leiter Entwicklung
----------------------------
The energy for a better world
----------------------------
softEnergy GmbH
Platz der Freundschaft 1
18059 Rostock
----------------------------
fon: +49 381 40 587 535
fax: +49 381 40 587 555
mobil: +49 1715222015
http://www.softenergy.de
mail: info@softenergy.de
----------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: PBKey
Posted by Mi...@iff.fraunhofer.de.
Hello,
I want to start the damo.class from the destination folder of this class.
My repository.xml files are in target \classes\resources. How can i set it
that he finds this files?
regards
Michael
Re: PBKey
Posted by Thomas Dudziak <to...@first.fhg.de>.
Michael.Sack@iff.fraunhofer.de wrote:
>Hello,
>i got setup the database and all Tables. I tried to start my Demo
>application bu there is an error:
>
>org.apache.ojb.broker.PBFactoryException: There was no default-PBKey
>specified
> at
>org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown
>Source)
> at
>org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
>Source)
> at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown
>Source)
> at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown
>Source)
> at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
> at org.myProject.appli.Demo.storing(Demo.java:97)
> at org.myProject.appli.Demo.main(Demo.java:110)
>Exception in thread "main"
>
>Do u know what is ment with this massege? What do i have to do to solve
>this problem?
>
>
The usual reasons for this error are either that OJB couldn't find the
repository.xml (per default it should be in the directory where you
start the app; if you're using the ojb-blank then you should start the
app in build/resources), or that none of you jdbc-connection-descriptor
entries in repository_database.xml has a default-connection="true" setting.
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
RE: PBKey
Posted by Mi...@iff.fraunhofer.de.
If you mean this part of my repository_database.xml, then "yes" i have set
it. But it can be possible that there is something wrong in my setting. I
use the MySQL 4.1 Server and Java 1.4.2.
<jdbc-connection-descriptor
jcd-alias="default"
default-connection="true"
platform="MySQL"
jdbc-level="3.0"
driver="com.mysql.jdbc.Driver"
protocol="jdbc"
subprotocol="mysql"
dbalias="//localhost/test"
username="root"
password="hannibal"
batch-mode="false"
useAutoCommit="1"
ignoreAutoCommitExceptions="false"
>
regards
Michael
RE: PBKey
Posted by Daniel Perry <d....@netcase.co.uk>.
Have you got a default connection-descriptor set up in
repository_database.xml properly?
Are OJB.properties/repository***.xml (x4) all in classpath?
Daniel.
> -----Original Message-----
> From: Michael.Sack@iff.fraunhofer.de
> [mailto:Michael.Sack@iff.fraunhofer.de]
> Sent: 08 December 2004 10:50
> To: ojb-user@db.apache.org
> Subject: PBKey
>
>
> Hello,
> i got setup the database and all Tables. I tried to start my Demo
> application bu there is an error:
>
> org.apache.ojb.broker.PBFactoryException: There was no default-PBKey
> specified
> at
> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaul
> tPersistenceBroker(Unknown
> Source)
> at
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceB
> roker(Unknown
> Source)
> at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(Unknown
> Source)
> at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown
> Source)
> at com.sun.jdori.common.TransactionImpl.begin(Unknown Source)
> at org.myProject.appli.Demo.storing(Demo.java:97)
> at org.myProject.appli.Demo.main(Demo.java:110)
> Exception in thread "main"
>
> Do u know what is ment with this massege? What do i have to do to solve
> this problem?
>
>
> regards
>
> Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org