ojb first use

Dolphin06 <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hello i m trying to use ojb, but i m having problem getting a default
persistence broker.
I got an exception when executing this statement :
broker = PersistenceBrokerFactory.defaultPersistenceBroker();

the exception i got is the following : 
java.lang.ExceptionInInitializerError
        at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
Source)
Caused by: org.apache.ojb.broker.OJBRuntimeException: Property for key
'PersistenceBrokerFactoryClass' can not be found in properties file
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown
Source)

In my project web-inf folder i got the following file, OJB.properties (left
unchange), repository.dtd and repository.xml that i modified the following
way :
<!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"
                       proxy-prefetching-limit="50">
    
    <!-- include all used database connections -->
    <jdbc-connection-descriptor jcd-alias="default"
                                default-connection="true"
                                platform="MySQL"
                                jdbc-level="2.0"
                                driver="org.gjt.mm.mysql.Driver"
                                protocol="jdbc"
                                subprotocol="@OJB_DB_URL@"
                                dbalias="weblog"
                                username="root"
                                password="supports"/>
    
    <!-- include ojb internal mappings here; comment this if you don't need
them -->
    &internal;
    
    <!-- include user defined mappings here -->
    <class-descriptor class="member.Member" table="member">
        <field-descriptor name="id" column="member_id" jdbc-type="BIGINT"
primarykey="true" autoincrement="true"/>
        <field-descriptor name="name" column="member_name"
jdbc-type="VARCHAR"/>
    </class-descriptor>
</descriptor-repository>
The jar containing all the ojb class is in my lib folder.
I am using jdk 1.6, struts 1.2.9, ojb 1.0.4,netbeans ide.
Thanks for helping setting up ojb.
-- 
View this message in context: http://www.nabble.com/ojb-first-use-tf3432210.html#a9567937
Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.