• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SQL Generation Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQL Generation Issue


  • Subject: Re: SQL Generation Issue
  • From: David Avendasora <email@hidden>
  • Date: Thu, 24 Apr 2014 12:31:07 -0400

Either that or I’m doing something fundamentally wrong. Place your bets!

Okay all you people that bet on “SQL generation is busted” are out of luck! 

Shockingly *I* was doing something wrong.

What? Nobody bet against it being my fault? Sigh.

Anyway, here’s what I was doing “wrong”:

We are using the ERCAuditTrail functionality in ERCoreBusinessLogic and since parts of ERCoreBusinessLogic require ERDirectToWeb we had that on our classpath as well.

But not JavaDirectToWeb.

Since we weren’t actually using any of the direct to web stuff, there were no compile-time or run-time problems.

But When NSBundle did the work to initialize the framework principal classes in all the frameworks on the classpath, *it* tried to load com.webobjects.directtoweb.D2W, which was not available because JavaDirectToWeb wasn’t in the project’s classpath.

So, here’s a lesson for you:

Generating SQL in EntityModeler is more picky about dependency resolution than launching and running an application is.

However, I still maintain that initializing the EO to do SQL generation is kinda weird. What does the EO know that the EOEntity or class description doesn’t about SQL generation.

Isn’t one of the entire points of EOF is that the EO doesn’t know jack shit about how it’s persisted?

Sigh.

Dave



On Apr 24, 2014, at 11:42 AM, David Avendasora <email@hidden> wrote:


On Apr 24, 2014, at 11:05 AM, David Avendasora <email@hidden> wrote:

 If ERXEnterpriseObjectCache breaks it, what else can?

That was *supposed* to be rhetorical. But, well, guess what?  I can tell you at least one other thing that breaks it: ERXFrameworkPrincipal.setUpFrameworkPrincipalClass(Class)

Seriously, does SQL Generation work for anyone using Wonder? I’m just curious because I can’t see how it does.

Either that or I’m doing something fundamentally wrong. Place your bets!

Dave


java.lang.NoClassDefFoundError: com/webobjects/directtoweb/D2W
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2348)
at java.lang.Class.getField0(Class.java:2675)
at java.lang.Class.getField(Class.java:1554)
at er.extensions.ERXFrameworkPrincipal.setUpFrameworkPrincipalClass(ERXFrameworkPrincipal.java:157)
at er.extensions.ERXFrameworkPrincipal.setUpFrameworkPrincipalClass(ERXFrameworkPrincipal.java:163)
at er.corebusinesslogic.ERCoreBusinessLogic.<clinit>(ERCoreBusinessLogic.java:82)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:348)
at com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:335)
at com.webobjects.foundation.NSBundle.initPrincipalClass(NSBundle.java:1760)
at com.webobjects.foundation.NSBundle.InitPrincipalClasses(NSBundle.java:700)
at com.webobjects.foundation.NSBundle.<clinit>(NSBundle.java:344)
at com.webobjects.eoaccess.EOAdaptor.infoDictionaryForAdaptorNamed(EOAdaptor.java:230)
at com.webobjects.eoaccess.EOAdaptor.classNameForAdaptorNamed(EOAdaptor.java:246)
at com.webobjects.eoaccess.EOAdaptor.classForAdaptorNamed(EOAdaptor.java:262)
at com.webobjects.eoaccess.EOAdaptor.adaptorWithName(EOAdaptor.java:287)
at com.webobjects.eoaccess.EOAdaptor.adaptorWithModel(EOAdaptor.java:312)
at com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:624)
at com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699)
at com.webobjects.eoaccess.EOAttribute.<init>(EOAttribute.java:998)
at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816)
at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGenerator53.createLocalizedAttributes(EOFSQLGenerator53.java:339)
at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGenerator53.localizeEntities(EOFSQLGenerator53.java:276)
at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGenerator53.<init>(EOFSQLGenerator53.java:206)
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:513)
at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory.sqlGenerator(EOFSQLGeneratorFactory.java:43)
at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog.generateSql(GenerateSQLDialog.java:297)
at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog$1.run(GenerateSQLDialog.java:279)
at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.ClassNotFoundException: com.webobjects.directtoweb.D2W
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 34 more




—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.





—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [Wonder-disc] SQL Generation Issue
      • From: David Avendasora <email@hidden>
References: 
 >Re: SQL Generation Issue (From: David Avendasora <email@hidden>)
 >Re: SQL Generation Issue (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: SQL Generation Issue
  • Next by Date: Re: JNDI JDBC entry in web.xml Servlet Deployment vs. Migrations
  • Previous by thread: Re: [Wonder-disc] SQL Generation Issue
  • Next by thread: Re: [Wonder-disc] SQL Generation Issue
  • Index(es):
    • Date
    • Thread