db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r409111 - /db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml
Date Wed, 24 May 2006 10:23:19 GMT
Author: arminw
Date: Wed May 24 03:23:18 2006
New Revision: 409111

URL: http://svn.apache.org/viewvc?rev=409111&view=rev
Log:
add beginner error messages faq

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml?rev=409111&r1=409110&r2=409111&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml
Wed May 24 03:23:18 2006
@@ -348,7 +348,7 @@
                     database.
                 </p>
                 <p>
-                    First thing to do is to build the cvs's with the default database HSQL,
+                    First thing to do is to build the SVN with the default database HSQL,
                     because you know it will work. If you get past this point you should
have a
                     working OJB compiled. Now if your using JDK 1.4 you will need to set
in
                     build.properties JDBC=+JDBC30 and do a
@@ -380,7 +380,8 @@
                 </p>
                 <p>
                     The final thing to do is to make sure the OJB core tables are in your
-                    database. Look on this page for <a href="site:platform">the core
tables</a>. These core tables are used by
+                    database. Look on this page for <a href="site:platform">the core
tables</a>.
+                    These core tables are used by
                     OJB to store internal data while it's running. It needs these. Then there's
                     the tables you define. The ones you mapped in the repository_user.xml
file.
                 </p>
@@ -435,36 +436,113 @@
 
         <faq id="internalTables">
             <question>
-                What are the OJB internal tables for?
+                Does OJB need internal tables to run?
             </question>
             <answer>
                 <p>
-                    <a href="site:platform">Please refer to this document</a>.
+                    <strong>No</strong>, internal tables only needed for specific
services/fetures.
+                    For more detailed information about OJB's internal used tables
+                    <a href="site:platform">please refer to this document</a>.
                 </p>
             </answer>
         </faq>
 
-        <faq id="couldNotBorrow">
+        <faq id="anyTools">
             <question>
-                What does the exception <em>Could not borrow connection from pool</em>
mean?
+                Any tools help to generate the metadata files?
             </question>
             <answer>
                 <p>
-                    There can be several reasons
+                    <a href="site:large-metadata">Please refer to this document</a>.
                 </p>
             </answer>
         </faq>
 
-        <faq id="anyTools">
+
+
+        <faqsection id="mistakes">
+            <title>Beginner's mistakes: Frequently error logs</title>
+
+            <faq id="generalRecommendations">
+                <question>
+                    General recommendations for all errors
+                </question>
+                <answer>
+                    <p>
+                        Please search the whole stack trace and all logging output to find
+                        the reason of the error.
+                    </p>
+                    <note>
+                        General recommendations:
+                        <br/>
+                        - Search for error and warn messages in logged before exception stack
trace.
+                        <br/>
+                        - Try to find the <em>root exception</em> causing the
error (OJB normally wraps
+                        exceptions).
+                    </note>
+                </answer>
+            </faq>
+
+            <faq id="couldNotBorrowConnection">
             <question>
-                Any tools help to generate the metadata files?
+                Error message: <em>Could not borrow connection from pool</em>
+            </question>
+            <answer>
+                <ul>
+                    <li>
+                        Connection pool is exhausted, because pool size is too low or the
database
+                        maximum connection limit is reached.
+                    </li>
+                    <li>
+                        Jdbc-Driver issues (wrong arguments, classpath issues, missing driver
jar, ...).
+                    </li>
+                    <li>
+                        Specified <em>validation query</em> (in
+                        <a href="site:repository/jdbc-connection-descriptor">jdbc-connection-descriptor</a>)
+                        cause an error.
+                    </li>
+                    <li>
+                        Too many concurrent threads exhaust connection pool.
+                    </li>
+                    <li>
+                        Persistence broker <a href="site:pb-guide/detect-leak">leak</a>.
+                    </li>
+                </ul>
+            </answer>
+            </faq>
+
+            <faq id="couldNotBorrowBroker">
+            <question>
+                Error message: <em>Borrow broker from pool failed,...</em>.
+            </question>
+            <answer>
+                <ul>
+                    <li>
+                        <code>PersistenceBroker</code> instance pool is exhausted,
because pool size is too
+                        low or too many concurrent threads exhaust connection pool.
+                    </li>
+                    <li>
+                        Persistence broker <a href="site:pb-guide/detect-leak">leak</a>,
missing
+                        <code>PersistenceBroker.close()</code> calls.
+                    </li>
+                </ul>
+            </answer>
+            </faq>
+
+            <faq id="noDefaultConnection">
+            <question>
+                Error message: <em>... no 'default-connection' attribute enabled in
the jdbc connection descriptor...</em>.
             </question>
             <answer>
                 <p>
-                    <a href="site:large-metadata">Please refer to this document</a>.
+                    Set attribute <a href="site:repository/default-connection"><em>default-connection</em></a>
in
+                    <a href="site:repository/jdbc-connection-descriptor">jdbc-connection-descriptor</a>
before using
+                    the <em>shortcut</em>-method to lookup <code>PersistenceBroker</code>
instances.
                 </p>
             </answer>
-        </faq>
+            </faq>
+
+        </faqsection>
     </faqsection>
 
 
@@ -677,13 +755,14 @@
                     If you follow these rules, then OJB works fine in web apps:
                 </p>
                 <ul>
-                	<li>Don't put OJB's jars into one of the servers directories but rather
put them into the <code>WEB-INF/lib</code>
-                	    folder of your web app.</li>
-                	<li>OJB searches for its configuration files (<code>OJB.properties</code>,
<code>repository.xml</code>) in the classpath.
-                	    Therefore, it is easiest if you put them in the <code>WEB-INF/classes</code>
folder which is automatically in the
-                	    classpath of the web app</li>
-                	<li>Don't hold onto the <code>PersistenceBroker</code>
instances, rather get one whenever you want to do something, and close
-                	    it once you're done.</li>
+                	<li>Don't put OJB's jars into one of the servers directories but rather
put
+                        them into the <code>WEB-INF/lib</code> folder of your
web app.</li>
+                	<li>OJB searches for its configuration files (<code>OJB.properties</code>,
+                        <code>repository.xml</code>) in the classpath.
+                	    Therefore, it is easiest if you put them in the <code>WEB-INF/classes</code>
+                        folder which is automatically in the classpath of the web app</li>
+                	<li>Don't hold onto the <code>PersistenceBroker</code>
instances, rather get one
+                        whenever you want to do something, and close it once you're done.</li>
                 </ul>
                 <p>
                     See <a href="site:deployment">deployment doc</a> for more
information.
@@ -902,9 +981,10 @@
             </question>
             <answer>
                 <p>
-                    Primitive values (int, long, ...) can't be <code>null</code>,
so OJB interpret '0' as <code>null</code>
-                    for primitive PK/FK fields in persistent objects. Thus primitive PK fields
of persistent objects should
-                    never be represented by a '0' value in DB and never used as a
+                    Primitive values (int, long, ...) can't be <code>null</code>,
so OJB interpret '0'
+                    as <code>null</code>
+                    for primitive PK/FK fields in persistent objects. Thus primitive PK fields
of
+                    persistent objects should never be represented by a '0' value in DB and
never used as a
                     <a href="site:sequence-manager">sequence key</a> value.
                     <br/>
                     This is only true for primitive PK/FK fields (e.g. <code>Integer(0)</code>
is allowed).
@@ -947,7 +1027,8 @@
                 </p>
                 <note>
                     If method <code>getIteratorByQuery()</code> was used keep
in mind that the used
-                    Iterator instance is only valid as long as the used <code>org.apache.ojb.broker.PersistenceBroker</code>
+                    Iterator instance is only valid as long as the used
+                    <code>org.apache.ojb.broker.PersistenceBroker</code>
                     instance ends transaction or be closed. So it is NOT possible to get
an Iterator, close the
                     PersistenceBroker and pass the Iterator instance to a servlet or client.
In that case use
                     <code>getCollectionByQuery()</code>.
@@ -981,7 +1062,8 @@
                     <br/>
                     b) use the Object2ByteArrFieldConversion. See jdbc-types.html for details
on conversion strategies.
                     <br/>
-                    c) use the StringVector2VarcharFieldConversion. See jdbc-types.html for
details on conversion strategies.
+                    c) use the StringVector2VarcharFieldConversion. See jdbc-types.html for
details on
+                    conversion strategies.
                     <br/>
                     d) provide a field-descriptor for each element.
 



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


Mime
View raw message