Re: Entity Modeler SQL generation exception
Re: Entity Modeler SQL generation exception
- Subject: Re: Entity Modeler SQL generation exception
- From: Samuel Pelletier <email@hidden>
- Date: Thu, 07 May 2015 15:25:06 -0400
Ângelo,
I added some debug output and I think I found the problem but have no solution yet...
Activator.getDefault().log("IEOSQLGeneratorFactory object class : " + o.getClass().getName()); for (Class anInterface : o.getClass().getInterfaces()) { Activator.getDefault().log("interface : " + anInterface.getName()); } Activator.getDefault().log("IEOSQLGeneratorFactory object class Loader : " + o.getClass().getClassLoader()) Activator.getDefault().log("IEOSQLGeneratorFactory class Loader : " + IEOSQLGeneratorFactory.class.getClassLoader());
The output: !MESSAGE IEOSQLGeneratorFactory object class : org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory !MESSAGE interface : org.objectstyle.wolips.eomodeler.core.sql.IEOSQLGeneratorFactory !MESSAGE IEOSQLGeneratorFactory object class Loader : org.eclipse.osgi.internal.loader.EquinoxClassLoader@289c2793[org.objectstyle.wolips.eomodeler.eclipse:4.4.20150506.01(id=1470)] !MESSAGE IEOSQLGeneratorFactory class Loader : org.eclipse.osgi.internal.loader.EquinoxClassLoader@2dcbf825[org.objectstyle.wolips.eomodeler.core:4.4.20150506.01(id=1469)]
So these are 2 different class objects from 2 class loader for the same class.
Anyone know how to fix this ?
Samuel
Le 2015-05-07 à 12:06, Ângelo Andrade Cirino < email@hidden> a écrit :
In IEOSQLGeneratorFactory.java I made this
Object o = configurationElement.createExecutableExtension("class"); System.out.println("object class : " + o.getClass().getName()); IEOClassLoaderFactory classLoaderFactory = (IEOClassLoaderFactory) o;
And got this output
object class : org.objectstyle.wolips.eomodeler.eclipse.EclipseEOModelGroupFactory
The returned class is neither EOFSQLGeneratorFactory nor IEOSQLGeneratorFactory
Em 07/05/2015, à(s) 12:33, Samuel Pelletier < email@hidden> escreveu:
I also get the same error. I modified a plugin.xml file that seemed incorrect and now I have this one:
java.lang.ClassCastException: org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory cannot be cast to org.objectstyle.wolips.eomodeler.core.sql.IEOSQLGeneratorFactory at org.objectstyle.wolips.eomodeler.core.sql.IEOSQLGeneratorFactory$Utility.sqlGeneratorFactory(IEOSQLGeneratorFactory.java:29) 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:745)
I do not understand how it is possible; EOFSQLGeneratorFactory implements IEOSQLGeneratorFactory !
public class EOFSQLGeneratorFactory implements IEOSQLGeneratorFactory { ... }
Ângelo Andrade Cirino email@hidden"O homem sensato se adapta ao mundo. O insensato insiste em tentar adaptar o mundo a ele. Todo o progresso depende, portanto, do homem insensato" Sir George Benard Shaw
"The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." Sir George Benard Shaw
|
_______________________________________________
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