[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: Extending but still work with 2.0 and 2.1 WAS: Re: [dali-dev] Error opening persistence.xml
|
Hi, guys,
I've finished our changes to support Dali 2.0 and Dali 2.1 for
HibernatePlatform.
When I review my changes I found a solution you can use to prevent me
(and other plugins developers) to do such things after you build new
version of Dali.
Instead of giving to us changing classes(like GenericPersistenceUnit,
GenericJpaPlatform, GenericJpaProject... ) give us their adopters which
will guarantee to us that old public and protected methods exist and work.
For example, let's see in GenericJpaPlatform and renamed public method
addToMessages/validate.
Why do not use following adopter:
//in Dali 2.0
GenericJpaPlatformAdopter extends GenericJpaPlatform {
...
public void addToMessages(JpaProject project, List<IMessage> messages) {
super.addToMessages(messages);
}
}
//in Dali 2.1
GenericJpaPlatformAdopter extends GenericJpaPlatform {
...
public void addToMessages(JpaProject project, List<IMessage> messages) {
validate(messages);
}
public void validate(JpaProject project, List<IMessage> messages) {
super.validate(messages);
}
}
Neil Hauge wrote:
Max,
I don't think there are any good alternatives for this situation.
Dali 2.1 was a full feature release, and shouldn't be considered as
maintenance for 2.0.x. As a result, there have been changes in
provisional API, and in this case, many changes in private UI
classes. I would recommend narrow compatibility ranges for Dali
plugins, especially where internal code is being used. Preventing
this scenario is probably the best path.
Not sure if anyone else has any ideas.
Neil
Max Rydahl Andersen wrote:
Hi guys,
We are in a bit of a squeeze with this issue.
As far as we can see there is no way as an extender that we can have
our JPAPlatform work on both Dali 2.0 (included in WTP 3.0.x)
and Dali 2.1.
We are still looking into the specifics on what the problem is and
will be back with the details but the problem Luigi saw is that
the UI classes for persistence.xml editing has changed. We also know
about the validation changes, but that I think is a less of a problem
since it does not involve inheritance and we can "work around" that
by reflection (yuck)
Do you got any input on how we could avoid having to maintain two
branches of the code to work on the Dali bundled with Ganymede and
on the newer Dali 2.1.x versions.
/max
Hi Luigi,
The error you see is inside JBoss Tools so you should report it in
jira http://jira.jboss.com/jira/browse/JBIDE with steps to repreduce.
/max
Hi,
I've installed Dali ver. 2.1, but creating a new project and configuring it to use Hibernate and Tomcat (see attachments) when I try to open the persistence.xml file I get the error shown below. Using Dali ver. 2.0 everything works fine.
Any ideas/suggestions?
Thank you.
Regards,
Luigi
===============================================
ERROR GENERATED TRYING TO OPEN PERSISTENCE.XML
eclipse.buildId=M20080911-1700
java.version=1.6.0_10
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
Command-line arguments: -os win32 -ws win32 -arch x86
Error
Mon Jan 26 15:18:39 CET 2009
Problems occurred when invoking code from plug-in: "org.eclipse.jface".
java.lang.InstantiationError: org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitGeneralComposite
at org.jboss.tools.hibernate.jpt.ui.internal.platform.HibernateUiFactory.createPersistenceUnitComposites(HibernateUiFactory.java:27)
at org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPersistenceUnitPages(PersistenceEditor.java:130)
at org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPages(PersistenceEditor.java:109)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:146)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:310)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:266)
at org.eclipse.ui.internal.WorkbenchPage.makeActiveEditor(WorkbenchPage.java:1246)
at org.eclipse.ui.internal.WorkbenchPage.updateActivePart(WorkbenchPage.java:1204)
at org.eclipse.ui.internal.WorkbenchPage.partAdded(WorkbenchPage.java:1665)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:210)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:779)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:678)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:639)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2817)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2635)
at org.eclipse.jpt.ui.internal.actions.OpenJpaResourceAction.openEditor(OpenJpaResourceAction.java:92)
at org.eclipse.jpt.ui.internal.actions.OpenJpaResourceAction.run(OpenJpaResourceAction.java:73)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
at org.eclipse.ui.internal.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:184)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:372)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
Rispetta l'ambiente. Non stampare questa mail se non e' necessario.
www.avoicomunicare.it Ogni giorno, il tuo luogo di dialogo.
------------------------------------------------------------------------
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
------------------------------------------------------------------------
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
------------------------------------------------------------------------
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
------------------------------------------------------------------------
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
--
Best regards,
Dmitry Geraskov
dgeraskov@xxxxxxxxxx
Senior Developer
Exadel Inc