db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murugan Ramu" <mr...@trulogica.com>
Subject RE: servlet OJB
Date Wed, 14 Jan 2004 00:33:50 GMT
I am relatively new to OJB. I have the common-pool-1.1.jar in the
classpath.  I am giving you as much as information as possible so that I
could just get past this error. 

This is my classpath
C:\db-ojb-1.0.rc5\lib\commons-pool-1.1.jar;C:\db-ojb-1.0.rc5\lib\db-ojb-
1.0.rc5.jar;C:\db-ojb-1.0.rc5\lib\commons-lang-2.0.jar;C:\db-ojb-1.0.rc5
\test\mappingclass.jar;C:\db-ojb-1.0.rc5\doc\OJB.properties;C:\db-ojb-1.
0.rc5\doc\repository.xml;

The jsp code snippet is 



<%@ page import="com.trulogica.truaccess.util.*, 
 org.apache.ojb.broker.*, import org.apache.ojb.broker.query.*,
java.util.*,
 org.apache.commons.lang.exception.NestableRuntimeException,
ClassToBeMapped" %>
<%
 String classpath =  System.getProperty("java.class.path");
<!-- JUST FOR CHECKING THE CLASSPATH -->
%>
<%= classpath %>
<%	

 PersistenceBroker _broker;
 _broker = PersistenceBrokerFactory.defaultPersistenceBroker();
 Class clazz =  ClassToBeMapped.class; 
 String critStr = null;
       Criteria crit = null;
       if( critStr != null ) {
         crit = new Criteria();
         crit.addSql(critStr);
       }
       Query query = new QueryByCriteria( clazz, crit);

%>


	The first time when I run the servlet I get this error (stack
trace) 

java.lang.NoClassDefFoundError:
org/apache/commons/pool/PoolableObjectFactory
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:115)
        at
org.apache.ojb.broker.util.configuration.impl.OjbConfiguration.class$(Un
known Source)
        at
org.apache.ojb.broker.util.configuration.impl.OjbConfiguration.load(Unkn
own Source)
        at
org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl.
<init>(Unknown Source)
        at
org.apache.ojb.broker.util.configuration.impl.OjbConfiguration.<init>(Un
known Source)
        at
org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.<init>(Unk
nown Source)
        at
org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.<clinit>(U
nknown Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unkn
own Source)
        at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
        at jsp_servlet.__setproperty._jspService(__setproperty.java:119)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:262)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:198)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:2678)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2412)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:140)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:121)




then the next time I try to run the servlet I get the following error.




java.lang.NoClassDefFoundError
        at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
        at jsp_servlet.__setproperty._jspService(__setproperty.java:119)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:262)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:198)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:2678)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2412)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:140)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:121)




ANY HELP IS GREATLY APPRECIATED!

Thanks

MR
-----Original Message-----
From: Larry V. Streepy, Jr. [mailto:streepy@healthlanguage.com] 
Sent: Tuesday, January 13, 2004 6:00 PM
To: OJB Developers List
Subject: Re: servlet OJB

I would assume that you don't have commons-pool.jar in your classpath.

Murugan Ramu wrote:

>Hello:
>
> 
>
>I keep getting this error when I invoke the servlet that contains the
>OJB access code. Anyone had such a problem and rectified it? 
>
> 
>
> 
>
>java.lang.NoClassDefFoundError:
>org/apache/commons/pool/PoolableObjectFactory
>
>        at java.lang.Class.forName0(Native Method)
>
> 
>
>MR
>
>
>  
>

-- 
Larry V. Streepy, Jr.
Senior Vice President and CTO
Health Language, Inc.


---------------------------------------------------------------------
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