Ok, i understand.
But is it possible, that madragora works together with ojb in the same project ?
My app is very big and i dont want to change everything now.
The idea was, that new code can use mandragora and the old code will be changed step by step later.


however, the code ist now:
       try {
BD bd = ServiceLocator.getInstance().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
           bd.findByPrimaryKey(Partner.class,"Repcom");
           //this class is persistant in db with data
       } catch (ApplicationException e) {
       }


i get now this error (all libs are included, prop file are in the same dir as repository.xml, the other files in class dir from blank i have already:

[INFO] SimpleThreadPool - Job execution threads will use class loader of thread: main
[INFO] RAMJobStore - RAMJobStore initialized.
[INFO] StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.pro
perties'
[INFO] StdSchedulerFactory - Quartz scheduler version: 1.4.5
[BOOT] INFO: -- boot log messages -->
[BOOT] INFO: Loading OJB's properties: jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/nadragora-lib/mandragora-0.1-20070912.204127-17
.jar!/Mandragora.properties
[BOOT] INFO: Loading OJB's properties: jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/nadragora-lib/mandragora-0.1-20070912.204127-17
.jar!/OJB.properties
[BOOT] INFO: Found logging properties file: OJB-logging.properties
[BOOT] INFO: Logging: Found logger class 'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl

org.apache.ojb.broker.PBFactoryException: There was no 'default-connection' attribute enabled in the jdbc connection descriptor at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at it.aco.mandragora.common.ServiceLocator.findBroker(ServiceLocator.java:451) at it.aco.mandragora.dao.ojb.pb.OjbPbDAO.findByPrimaryKey(OjbPbDAO.java:453) at it.aco.mandragora.bd.standard.StandardManagerBD.findByPrimaryKey(StandardManagerBD.java:442)
   at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:28)
   at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:19)
   at de.repcom.osfaktura.aStartups.Test.main(Test.java:16)
0 ERROR [main] pb.OjbPbDAO - ServiceLocatorException thrown in OjbPbDAO.findByPrimaryKey(Class realClass, java.lang.Object pkValue): it .aco.mandragora.exception.ServiceLocatorException: PBFactoryException error occurred while parsing the repository.xml file in ServiceLocator
.findBroker()




Hans

Alessandro Colantoni schrieb:
Hi Hans.

Yes you have to add lots of jar.
You can see the dependencies here

http://mandragora.sourceforge.net/dependencies.html


Then you have to add the Mandragora.properties file to your classpath.

Anyway you find all jar you need int the mandragora-blank.zip.

1 open mandrgora-blank.zip;
2 in Web-Inf/lib you have all the jar you need.
3 in Web-inf/classes you find the Mandragora.properties. Put it in your
classpath, (in the same directory of your repository.xml). You can see other
properies files, add the log4.properties if you have not already yours (but
I think you have). The other file I think you already have in your
classpath, if so don't add.

Here
http://mandragora.sourceforge.net/quickstart.html

there is a quick start, but I wrote it thinking at web-app. I will change
it.

I always work with web-app. So I will appreciate if , when you make it work
, write a small quickstart for Swing.

I keep here to help.

Regards


On 9/13/07, Hans Novak <[EMAIL PROTECTED]> wrote:
Alessandro Colantoni schrieb:
HI, I upload a new release and improved a bit documentation.
I solved (I think) the problem noticed by Hans, so it is not need put
the
quartz servlet in the web.xml, and it should work in no web application.
I
hope this helps you Hans.

Hi Alessandro,

i have try the new Version, but the same Problem.
The Code was only:
       try {
           BD bd =
ServiceLocator.getInstance
().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
       } catch (ApplicationException e) {
           //manage the exception
       }


Exception in thread "main" java.lang.NoClassDefFoundError:
org/quartz/SchedulerException
   at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
   at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
   at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)

When i start my standard App with the Mandragora jar addedd, then i get
this error:


osf] INFO : AppStart
[BOOT] INFO: -- boot log messages -->
[BOOT] INFO: Loading OJB's properties:
jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/mandragora-
0.1-20070912.204127-17.jar!/OJB.prop
erties
[BOOT] INFO: Found logging properties file: OJB-logging.properties
[BOOT] INFO: Logging: Found logger class
'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl

Exception in thread "main" org.apache.ojb.broker.PBFactoryException:
There was no 'default-connection' attribute enabled in the jdbc connect
ion descriptor
   at

org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
(Unknown
Source)
   at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
(Unknown
Source)
   at
de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(
PartnerFactoryCore.java:28)
   at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java
:50)
   at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java
:43)
   at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java:29)


Do i need any jar of yor "blank" project into my ojb_blank projekt (more
then the mandragora jar) ?
Your Project looks good to me, have intresting features, what can help
me to minimize complexity of code.
Hope you can help :-)

Hans

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




--


        
------------------------------------------------------------------------

        
Repcom Datentechnik GmbH <http://www.repcom.de/>
Hauptstr. 103 - 63110 Rodgau
Tel. 06106-638081
Fax 06106-638083
Steuernummer 03524225030 Ust-IdNr.: DE151061445 Bankverbindung:
Deutsche Bank Dietzenbach,
Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik

Internationale  Zahlungen
Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
de54505700240151030400 BIC deutdedb538
Öffnungszeiten: Mo.-Fr. 14.00-18.30 Uhr Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr Sie finden uns hier: Anfahrtsbeschreibung <http://www.repcom.de/images/repcom/anfahrt.jpg>
Messenger
Yahoo
ICQ
        : bforpc
: 174290900
        MSN
Skype
        : [EMAIL PROTECTED]
: bforpc

Unsere primären Web Adressen www.repcom.de <http://www.repcom.de/> und www.dataportal.de <http://www.dataportal.de/>

Unsere AGB's finden Sie hier <http://www.repcom.de/index.php?main_page=conditions>.
Vertraulichkeitshinweis
Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail nebst Anhängen und aller Kopien.

        
------------------------------------------------------------------------


Reply via email to