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 Roland Carlsson <ma...@javalia.se> on 2003/07/25 12:55:53 UTC

Errormessages again

Hi!
Sorry for the repost but I'm getting a little frustrated here.

The problem I have is that OJB doesn't tell me whats wrong. All I get is a
very long stack-trace that says "Borrow broker from pool failed".

caused by... caused by... caused by... etc etc etc... but with no
information about what line, what part it got stuck on or any information
that could help me fix the error.

I post my repository.xml below. The errormessage can you find in my earlier
thread that I posted yesterday.

So, please, please help me out with what's wrong.

Regards
Roland

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


<descriptor-repository version="1.0" isolation-level="read-uncommitted">
<!-- The Default JDBC Connection. If a class-descriptor does not specify its
own JDBC Connection,
     the Connection specified here will be used. -->

   <jdbc-connection-descriptor
                jcd-alias="localhost"
        platform="MySQL"
     jdbc-level="1.0"
     driver="com.mysql.jdbc.Driver"
     protocol="jdbc"
                subprotocol="mysql"
                dbalias="//localhost:3306/picture"
     username="root"
     password="">
    </jdbc-connection-descriptor>


   <class-descriptor
      class="se.javalia.picture.Picture"
      table="PICTURE"
   >
     <field-descriptor id="1"
         name="id"
         column="ID"
         jdbc-type="INTEGER"
         primarykey="true"
         autoincrement="true"
      />
     <field-descriptor id="2"
         name="pictData"
         column="PICTDATA"
         jdbc-type="LONGVARBINARY"
      />
      <!--
      <collection-descriptor
         name="metadata"
         element-class-ref="se.javalia.picture.Metadata"
      >
         <inverse-foreignkey field-id-ref="pictId"/>
      </collection-descriptor>
      -->

    </class-descriptor>



   <class-descriptor
      class="se.javalia.picture.Metadata"
      table="METADATA"
   >
     <field-descriptor id="1"
         name="id"
         column="ID"
         jdbc-type="INTEGER"
         primarykey="true"
         autoincrement="true"
      />
     <field-descriptor id="2"
         name="directory"
         column="DIRECTORY"
         jdbc-type="VARCHAR"
      />
      <field-descriptor id="3"
         name="tagName"
         column="TAGNAME"
         jdbc-type="VARCHAR"
      />
      <field-descriptor id="4"
         name="tagValue"
         column="TAGVALUE"
         jdbc-type="VARCHAR"
      />

    </class-descriptor>

   <!-- The OJB HIGH/LOW SequenceManagerTable -->
   <class-descriptor
      class="org.apache.ojb.broker.util.sequence.HighLowSequence"
      table="OJB_HL_SEQ"
   >
      <field-descriptor
         name="tableName"
         column="TABLENAME"
         jdbc-type="VARCHAR"
         primarykey="true"
      />
      <field-descriptor
         name="fieldName"
         column="FIELDNAME"
         jdbc-type="VARCHAR"
         primarykey="true"
      />
      <field-descriptor
         name="maxKey"
         column="MAX_KEY"
         jdbc-type="INTEGER"
      />
      <field-descriptor
         name="grabSize"
         column="GRAB_SIZE"
         jdbc-type="INTEGER"
      />
      <field-descriptor
         name="version"
         column="VERSION"
         jdbc-type="INTEGER"
      />
   </class-descriptor>

</descriptor-repository>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Errormessages again

Posted by Roland Carlsson <ma...@javalia.se>.
Hmm... i wrote a single class that only does a call to
PB.getDefaultBroker()....and got a new set of error... It seems lite you
said that there are are something wrong with the xml-parsing...

I got this error:
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] ERROR: null

but I don't know what to do about it.

Thanks in advance
Roland



----- Original Message ----- 
From: "Armin Waibel" <ar...@code-au-lait.de>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Friday, July 25, 2003 1:14 PM
Subject: Re: Errormessages again


> Hi,
>
> ----- Original Message -----
> From: "Roland Carlsson" <ma...@javalia.se>
> To: "OJB Users List" <oj...@db.apache.org>; <th...@apache.org>
> Sent: Friday, July 25, 2003 12:55 PM
> Subject: Errormessages again
>
>
> > Hi!
> > Sorry for the repost but I'm getting a little frustrated here.
> >
> > The problem I have is that OJB doesn't tell me whats wrong. All I get
> is a
> > very long stack-trace that says "Borrow broker from pool failed".
> >
> > caused by... caused by... caused by... etc etc etc... but with no
> > information about what line, what part it got stuck on or any
> information
> > that could help me fix the error.
> >
>
> from your stack trace:
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1111)
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1139)
> at
> org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Unkno
> wn
>
> seems the problem isn't OJB by itself. xml-parser has problems to read
> repository information.
> Check your repository file with xml-editor.
> Try to start OJB standalone.
>
> regards,
> Armin
>
> > I post my repository.xml below. The errormessage can you find in my
> earlier
> > thread that I posted yesterday.
> >
> > So, please, please help me out with what's wrong.
> >
> > Regards
> > Roland
> >
> > ------------------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" [
> > ]>
> >
> >
> > <descriptor-repository version="1.0"
> isolation-level="read-uncommitted">
> > <!-- The Default JDBC Connection. If a class-descriptor does not
> specify its
> > own JDBC Connection,
> >      the Connection specified here will be used. -->
> >
> >    <jdbc-connection-descriptor
> >                 jcd-alias="localhost"
> >         platform="MySQL"
> >      jdbc-level="1.0"
> >      driver="com.mysql.jdbc.Driver"
> >      protocol="jdbc"
> >                 subprotocol="mysql"
> >                 dbalias="//localhost:3306/picture"
> >      username="root"
> >      password="">
> >     </jdbc-connection-descriptor>
> >
> >
> >    <class-descriptor
> >       class="se.javalia.picture.Picture"
> >       table="PICTURE"
> >    >
> >      <field-descriptor id="1"
> >          name="id"
> >          column="ID"
> >          jdbc-type="INTEGER"
> >          primarykey="true"
> >          autoincrement="true"
> >       />
> >      <field-descriptor id="2"
> >          name="pictData"
> >          column="PICTDATA"
> >          jdbc-type="LONGVARBINARY"
> >       />
> >       <!--
> >       <collection-descriptor
> >          name="metadata"
> >          element-class-ref="se.javalia.picture.Metadata"
> >       >
> >          <inverse-foreignkey field-id-ref="pictId"/>
> >       </collection-descriptor>
> >       -->
> >
> >     </class-descriptor>
> >
> >
> >
> >    <class-descriptor
> >       class="se.javalia.picture.Metadata"
> >       table="METADATA"
> >    >
> >      <field-descriptor id="1"
> >          name="id"
> >          column="ID"
> >          jdbc-type="INTEGER"
> >          primarykey="true"
> >          autoincrement="true"
> >       />
> >      <field-descriptor id="2"
> >          name="directory"
> >          column="DIRECTORY"
> >          jdbc-type="VARCHAR"
> >       />
> >       <field-descriptor id="3"
> >          name="tagName"
> >          column="TAGNAME"
> >          jdbc-type="VARCHAR"
> >       />
> >       <field-descriptor id="4"
> >          name="tagValue"
> >          column="TAGVALUE"
> >          jdbc-type="VARCHAR"
> >       />
> >
> >     </class-descriptor>
> >
> >    <!-- The OJB HIGH/LOW SequenceManagerTable -->
> >    <class-descriptor
> >       class="org.apache.ojb.broker.util.sequence.HighLowSequence"
> >       table="OJB_HL_SEQ"
> >    >
> >       <field-descriptor
> >          name="tableName"
> >          column="TABLENAME"
> >          jdbc-type="VARCHAR"
> >          primarykey="true"
> >       />
> >       <field-descriptor
> >          name="fieldName"
> >          column="FIELDNAME"
> >          jdbc-type="VARCHAR"
> >          primarykey="true"
> >       />
> >       <field-descriptor
> >          name="maxKey"
> >          column="MAX_KEY"
> >          jdbc-type="INTEGER"
> >       />
> >       <field-descriptor
> >          name="grabSize"
> >          column="GRAB_SIZE"
> >          jdbc-type="INTEGER"
> >       />
> >       <field-descriptor
> >          name="version"
> >          column="VERSION"
> >          jdbc-type="INTEGER"
> >       />
> >    </class-descriptor>
> >
> > </descriptor-repository>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Errormessages again

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi,

----- Original Message -----
From: "Roland Carlsson" <ma...@javalia.se>
To: "OJB Users List" <oj...@db.apache.org>; <th...@apache.org>
Sent: Friday, July 25, 2003 12:55 PM
Subject: Errormessages again


> Hi!
> Sorry for the repost but I'm getting a little frustrated here.
>
> The problem I have is that OJB doesn't tell me whats wrong. All I get
is a
> very long stack-trace that says "Borrow broker from pool failed".
>
> caused by... caused by... caused by... etc etc etc... but with no
> information about what line, what part it got stuck on or any
information
> that could help me fix the error.
>

from your stack trace:
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1111)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1139)
at
org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Unkno
wn

seems the problem isn't OJB by itself. xml-parser has problems to read
repository information.
Check your repository file with xml-editor.
Try to start OJB standalone.

regards,
Armin

> I post my repository.xml below. The errormessage can you find in my
earlier
> thread that I posted yesterday.
>
> So, please, please help me out with what's wrong.
>
> Regards
> Roland
>
> ------------------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" [
> ]>
>
>
> <descriptor-repository version="1.0"
isolation-level="read-uncommitted">
> <!-- The Default JDBC Connection. If a class-descriptor does not
specify its
> own JDBC Connection,
>      the Connection specified here will be used. -->
>
>    <jdbc-connection-descriptor
>                 jcd-alias="localhost"
>         platform="MySQL"
>      jdbc-level="1.0"
>      driver="com.mysql.jdbc.Driver"
>      protocol="jdbc"
>                 subprotocol="mysql"
>                 dbalias="//localhost:3306/picture"
>      username="root"
>      password="">
>     </jdbc-connection-descriptor>
>
>
>    <class-descriptor
>       class="se.javalia.picture.Picture"
>       table="PICTURE"
>    >
>      <field-descriptor id="1"
>          name="id"
>          column="ID"
>          jdbc-type="INTEGER"
>          primarykey="true"
>          autoincrement="true"
>       />
>      <field-descriptor id="2"
>          name="pictData"
>          column="PICTDATA"
>          jdbc-type="LONGVARBINARY"
>       />
>       <!--
>       <collection-descriptor
>          name="metadata"
>          element-class-ref="se.javalia.picture.Metadata"
>       >
>          <inverse-foreignkey field-id-ref="pictId"/>
>       </collection-descriptor>
>       -->
>
>     </class-descriptor>
>
>
>
>    <class-descriptor
>       class="se.javalia.picture.Metadata"
>       table="METADATA"
>    >
>      <field-descriptor id="1"
>          name="id"
>          column="ID"
>          jdbc-type="INTEGER"
>          primarykey="true"
>          autoincrement="true"
>       />
>      <field-descriptor id="2"
>          name="directory"
>          column="DIRECTORY"
>          jdbc-type="VARCHAR"
>       />
>       <field-descriptor id="3"
>          name="tagName"
>          column="TAGNAME"
>          jdbc-type="VARCHAR"
>       />
>       <field-descriptor id="4"
>          name="tagValue"
>          column="TAGVALUE"
>          jdbc-type="VARCHAR"
>       />
>
>     </class-descriptor>
>
>    <!-- The OJB HIGH/LOW SequenceManagerTable -->
>    <class-descriptor
>       class="org.apache.ojb.broker.util.sequence.HighLowSequence"
>       table="OJB_HL_SEQ"
>    >
>       <field-descriptor
>          name="tableName"
>          column="TABLENAME"
>          jdbc-type="VARCHAR"
>          primarykey="true"
>       />
>       <field-descriptor
>          name="fieldName"
>          column="FIELDNAME"
>          jdbc-type="VARCHAR"
>          primarykey="true"
>       />
>       <field-descriptor
>          name="maxKey"
>          column="MAX_KEY"
>          jdbc-type="INTEGER"
>       />
>       <field-descriptor
>          name="grabSize"
>          column="GRAB_SIZE"
>          jdbc-type="INTEGER"
>       />
>       <field-descriptor
>          name="version"
>          column="VERSION"
>          jdbc-type="INTEGER"
>       />
>    </class-descriptor>
>
> </descriptor-repository>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org