[OS-JIRA] Created: (WOL-403) EntityModeler java.lang.NoClassDefFoundError with framework linked from workspace

From: Denis Frolov (JIRA) ("Denis)
Date: Fri Apr 20 2007 - 03:58:59 EDT

  • Next message: Andrus Adamchik: "Re: Confluence and User Count Problem?"

    EntityModeler java.lang.NoClassDefFoundError with framework linked from workspace
    ---------------------------------------------------------------------------------

                     Key: WOL-403
                     URL: http://issues.objectstyle.org/jira/browse/WOL-403
                 Project: WOProject/WOLips
              Issue Type: Bug
              Components: wolips
        Affects Versions: 2.0.0.* (unreleased please specify)
             Environment: 2.0.0.3921, Eclipse 3.2.2, Mac OS X 10.4
                Reporter: Denis Frolov

    I have Wonder as one project in workspace (folder named Wonder) checked out from CVS and all it's frameworks imported to workspace using Import Existing Projects into Workspace from Wonder/Common/Framewoks.

    1. Create a new framework using wizard.
    2. Add ERExtensions to Java Build Path - Projects. (importing from installed location will NOT trigger the reported problem)
    3. Create new EOModel using wizard with one entity NewEntity.
    4. Generate classes for entity using eogenerator.
    5. Subclass _NewEntity from ERXGenericRecord.
    6. Open EOModel and click SQL. Get a dialog box with exception:

    java.lang.NoClassDefFoundError: er/extensions/ERXGenericRecord
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:580)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:580)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:164)
            at com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:307)
            at com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:291)
            at com.webobjects.eoaccess.EOModel._setEntityForEntityNameClassName(EOModel.java:1242)
            at com.webobjects.eoaccess.EOModel._addFakeEntityWithPropertyList(EOModel.java:1280)
            at com.webobjects.eoaccess.EOModel._initWithTableOfContentsPropertyListPathURL(EOModel.java:1092)
            at com.webobjects.eoaccess.EOModel.<init>(EOModel.java:802)
            at com.webobjects.eoaccess.EOModelGroup.addModelWithPathURL(EOModelGroup.java:498)
            at org.objectstyle.wolips.eomodeler.sql.EOFSQLGenerator.<init>(EOFSQLGenerator.java:125)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
            at org.objectstyle.wolips.eomodeler.sql.SQLUtils.createEOFSQLGenerator(Unknown Source)
            at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog.generateSql(Unknown Source)
            at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog$1.run(Unknown Source)
            at java.lang.Thread.run(Thread.java:613)

    7. Change "_NewEntity extends ERXGenericRecord" to "_NewEntity extends EOEnterpriseObject" - the problem goes away.
    8. Change back "_NewEntity extends EOEnterpriseObject" to "_NewEntity extends ERXGenericRecord" - the problem is now NOT reproducable.
    9. Switch workspace. The problem is back again.

    ps. After writing this report I've thought that a problem can be caused by importing existing Wonder frameworks from Wonder project instead of importing them directly from CVS (as suggested here: http://wiki.objectstyle.org/confluence/display/WOL/Project+Wonder+woa+with+Linked+Source). I've tried the suggested approach - and the problem went away. Am I not supposed to import existing projects from Wonder project in workspace or is there a workaround? This approach has additional benefit - you can still build/install using ant from Wonder/ folder.

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.objectstyle.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Fri Apr 20 2007 - 03:59:14 EDT