| Author |
Message |
|
|
Post subject: MyEclipse Hibernate Introduction Tutorial
Posted: Feb 26, 2010 - 09:41 AM
|
|
Joined: Feb 26, 2010
Posts: 5
|
|
I use the newest MyEclipse-version
Your example works very well.
It works not with an RCP Application with an GUI.
I want ot show the data of the database in an Table in UI.
Following the Code of the class View:
| Code: | import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.server.model.provider.TitleProvider;
public class View extends ViewPart {
public static final String ID = "org.javacrm.view";
public void createPartControl(Composite parent) {
TitleProvider titleProvider = new TitleProvider();
titleProvider.addTitle();
}
public void setFocus() {
}
} |
Following the Code, where I instance the class DAO | Code: | import java.sql.Timestamp;
import org.hibernate.Transaction;
import org.server.model.hibernate.*;
public class TitleProvider {
public void addTitle() {
// Create Title
Title title = new Title();
title.setTitleid(1);
title.setCreationuser("user01");
title.setCreationdate(Timestamp.valueOf("2010-02-25 09:01:10"));
title.setModifyuser("user02");
title.setModifydate(Timestamp.valueOf("2010-02-25 11:11:11"));
title.setListposition(4);
title.setTitlevalue("Frau");
title.setTitlenotice("keine Anmerkung");
// Create DAO
TitleDAO dao = new TitleDAO();
// Start the transaction
Transaction tx = dao.getSession().beginTransaction();
// Add Title
dao.save(title);
// Write to database
tx.commit();
// Close the session
dao.getSession().close();
}
} |
I get the following error: | Quote: | java.lang.ClassNotFoundException: org.hibernate.criterion.Criterion
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.javacrm.server.model.provider.TitleProvider.addTitle(TitleProvider.java:29)
at org.javacrm.client.view.View.createPartControl(View.java:32)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:367)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:226)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:529)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:649)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:576)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:982)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2626)
at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:2965)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2946)
at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:761)
at org.eclipse.ui.internal.Workbench$21.runWithException(Workbench.java:1045)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3855)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3476)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$28.runWithException(Workbench.java:1384)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4312)
at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1379)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2335)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.javacrm.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
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) |
|
|
|
| |
|
|
|
 |
|
|
Post subject: RE: MyEclipse Hibernate Introduction Tutorial
Posted: Feb 26, 2010 - 09:56 AM
|
|
Registered Member

Joined: May 18, 2009
Posts: 1532
|
|
|
_________________ Shalini
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: Hibernate Core itself is in hibernate3.jar
Posted: Feb 26, 2010 - 02:31 PM
|
|
Joined: Feb 26, 2010
Posts: 5
|
|
All of the three solutions are not working.
I get allways the same error. |
|
|
| |
|
|
|
 |
|
|
Post subject: Cannot find required plug-in: org.jboss.tools.jsf.ui
Posted: Feb 26, 2010 - 02:54 PM
|
|
Joined: Feb 26, 2010
Posts: 5
|
|
I get the following error:
Cannot find required plug-in: org.jboss.tools.jsf.ui |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Cannot find required plug-in: org.jboss.tools.jsf.ui
Posted: Mar 01, 2010 - 05:07 AM
|
|
Registered Member

Joined: May 18, 2009
Posts: 1532
|
|
haglo,
Do you have any 3rd party plugins installed?
Are there any relevant errors logged in the log file located at workspace dir > .metadata > .log? |
_________________ Shalini
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: No 3rd party plugins
Posted: Mar 01, 2010 - 08:13 AM
|
|
Joined: Feb 26, 2010
Posts: 5
|
|
I have not any 3rd party plugins installed.
Attached I send you the logfile.
Attached I send you my Demo-Porject as rar-file |
|
|
| |
|
|
|
 |
|
|
Post subject: logfile
Posted: Mar 01, 2010 - 08:16 AM
|
|
Joined: Feb 26, 2010
Posts: 5
|
|
| Quote: |
!SESSION 2010-02-22 09:31:51.156 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_13
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.equinox.p2.repository 4 0 2010-02-22 09:31:55.281
!MESSAGE ProvisioningEventBus could not be obtained. Metadata caches may not be cleaned up properly.
!ENTRY org.eclipse.jface 2 0 2010-02-22 09:32:39.265
!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2010-02-22 09:32:39.265
!MESSAGE A conflict occurred for SHIFT+DEL:
Binding(SHIFT+DEL,
ParameterizedCommand(Command(org.eclipse.datatools.sqltools.result.removeAllInstances,Remove All Visible Results,
,
Category(org.eclipse.datatools.sqltools.result.category,SQL Results View,null,true),
,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(SHIFT+DEL,
ParameterizedCommand(Command(org.eclipse.ui.edit.cut,Cut,
Cut the selection to the clipboard,
Category(org.eclipse.ui.category.edit,Edit,null,true),
org.eclipse.ui.internal.handlers.WidgetMethodHandler@1e17cff,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.dialogAndWindow,,,system)
Binding(SHIFT+DEL,
ParameterizedCommand(Command(org.topcased.modeler.deleteModelObject,remove from Model,
Allows the user to delete the selected graph element and its associated model element in a Topcased editor.,
Category(org.eclipse.ui.category.edit,Edit,null,true),
,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
!ENTRY com.genuitec.eclipse.core 1 0 2010-02-22 09:32:39.765
!MESSAGE Unable to locate .myeclipse.properties file
!ENTRY com.genuitec.eclipse.core.common 1 0 2010-02-22 09:32:39.812
!MESSAGE Missing action set: com.genuitec.eclipse.dashboard
!ENTRY com.genuitec.eclipse.wizards 1 0 2010-02-22 09:33:03.515
!MESSAGE Installed snippet library: C:\Programme\Genuitec\MyEclipse 8.x Latest\configuration\org.eclipse.osgi\bundles1
|
| |
|
|
|
 |
|
|
Post subject: RE: logfile
Posted: Mar 02, 2010 - 06:18 AM
|
|
Registered Member

Joined: May 18, 2009
Posts: 1532
|
|
haglo,
I did not receive your demo project.
Can you send your project to support@myeclipseide.com? Please add ATTN:Shalini in the subject and refer to this post. |
_________________ Shalini
MyEclipse Support
|
| |
|
|
|
 |
|
|
| |
MYECLIPSE LINKS
Home
Download
Buy
New & Noteworthy
MyEclipse Blue Edition
MyEclipse for Spring
MyEclipse Bling
MyEclipse Secure
Support
Features
Contact
|
OTHER USEFUL STUFF
Popular Add-Ons
Who's using MyEclipse?
Customer Testimonials
Documentation
Webinars
Partners and Training
Reseller Network
Product History
Mobile News
Member Services
MyEclipse Roadmap
|
ABOUT MYECLIPSE
Developers worldwide choose MyEclipse because it is the most affordable and comprehensive J2EE IDE and Web development tool suite for the Eclipse open-source platform. MyEclipse is the Eclipse plugin-based solution for all your UML, AJAX, Web, Web Services, J2EE, JSP, XML, Struts, JSF, Java Persistence, EJB, extended database support and app server integration needs.
|
CONTACT US
North American Headquarters Genuitec, LLC 2221 Justin Road #119-340 Flower Mound, TX 75028
info@genuitec.com
(+1) 214.614.8328 (direct)
888.914.6620 (toll free)
(+1) 214.853.4284 (fax)
WE'RE SOCIAL CREATURES
|
|