Sven --

The problem is found in the stack trace:

JGeo2] Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/lang/exception/NestableRuntimeException

You need to ensure that the commons-lang jar file is in your class path.

Check out http://db.apache.org/ojb/dependencies.html and
http://db.apache.org/ojb/deployment.html#3.%20Additional%20jar%20archives
for info on the JARs that are required.

Ron Gallagher
Atlanta, GA
rongallagher at bellsouth dot net

-----Original Message-----
From: Sven Alisch [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 12:01 PM
To: [EMAIL PROTECTED]
Subject: Project start failed with Exception
java.lang.NoClassDefFoundError:
org/apache/commons/lang/exception/NestableRuntimeException


Hello ML,

I'am an absolute newbie with OJB. I finished installing. I use the ojb-blank
project as a template and try to compilate the following example:

class INSTITUT {

        public INSTITUT(String name) {
                iNST_NAME = name;
        }

        private Integer iNST_NR;

        private String iNST_NAME;

        private String sITZ;

        private Integer gEH_NR;

        private Date sEIT_DATUM;

        public void showObjectContent() {
                System.out.println("Objekt Inhalt");
                System.out.println(iNST_NAME);
        }

}


public class JGeo2 {

        public static void main(String args[]) {
                System.out.println("Hello OJB!");

                PersistenceBroker broker = null;
                try {
                        broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
                        //QueryByCriteria query = new QueryByCriteria(new
INSTITUT("Informatik"));
                        //INSTITUT result = (INSTITUT)
broker.getObjectByQuery(query);
                        //result.showObjectContent();
                }
                finally {
                        if (broker != null) broker.close();
                }
        }

}

The Database also exists. The repository.xml for my INSTITUT class looks
like:

<class-descriptor class="geo2.INSTITUT" table="INSTITUT">
                <field-descriptor name="iNST_NR" primarykey="true"
default-fetch="true" column="INST_NR" jdbc-type="INTEGER"/>
                <field-descriptor name="iNST_NAME" nullable="false"
default-fetch="true" column="INST_NAME" jdbc-type="VARCHAR"/>
                <field-descriptor name="sITZ" default-fetch="true"
column="SITZ" jdbc-type="VARCHAR"/>
                <field-descriptor name="gEH_NR" nullable="false"
default-fetch="true" column="GEH_NR" jdbc-type="SET('A', 'B')"/>
                <field-descriptor name="sEIT_DATUM" default-fetch="true"
column="SEIT_DATUM" jdbc-type="DATE"
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDateFi
eldConversion"/>
        </class-descriptor>

if i start my project with

ant geotest (i included this target in my build.xml file)

i get following error:

 [JGeo2] Hello OJB!
    [JGeo2] Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/lang/exception/NestableRuntimeException
    [JGeo2]     at java.lang.ClassLoader.defineClass0(Native Method)
    [JGeo2]     at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    [JGeo2]     at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    [JGeo2]     at
java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    [JGeo2]     at
java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    [JGeo2]     at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    [JGeo2]     at java.security.AccessController.doPrivileged(Native
Method)
    [JGeo2]     at
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    [JGeo2]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    [JGeo2]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    [JGeo2]     at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    [JGeo2]     at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unkn
own
Source)
    [JGeo2]     at JGeo2.main(Unknown Source)

Please help me, i can't find any solution for my Problem.

Thank you,
Greetings from Sven


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




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

Reply via email to