- This topic has 3 replies, 3 voices, and was last updated 16 years, 3 months ago by Brian Fernandes.
-
AuthorPosts
-
gerbdlaMemberI reversed engineered a mysql table with annontations but it is not working with the session factory created when I created the the project. Can anyone recommend what changes I need to make to make the annontations sessionfactory work?
Loyal WaterMemberYou said “Its not working with the session factory”. Are you getting some error or is the wizard not moving forward ? What exactly is happening.
Can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.
gerbdlaMemberHere is my istallation summary
*** Date:
Thursday, September 11, 2008 8:42:38 PM PDT** System properties:
OS=WindowsVista
OS version=6.0
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 6.5.1 GA
Build id: 6.5.1-GA-20080715*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 6.5.1 GA
Build id: 6.5.1-GA-20080715Eclipse Platform
Version: 3.3.3.r33x_r20080129-_19UEl7Ezk_gXF1kouft
Build id: M20080221-1800Eclipse RCP
Version: 3.3.3.r33x_r20080129-8y8eE9UEUWI6qujeED0xT7bc
Build id: M20080221-1800Eclipse Java Development Tools
Version: 3.3.2.r33x_r20080129-7o7jE7_EDhYDiyVEnjb1pFd7ZGD7
Build id: M20080221-1800Eclipse Plug-in Development Environment
Version: 3.3.3.r33x_r20080129-7N7M5DQVIA_6oJsEFkEL
Build id: M20080221-1800Eclipse Project SDK
Version: 3.3.3.r33x_r20080129-7M7J7LB-u3aphGW6o3_VmiVfGXWO
Build id: M20080221-1800Eclipse Graphical Editing Framework
Version: 3.3.2.v20080129
Build id: 20080221-1602Eclipse startup command=-data
C:\MyEclipseWorkspaces
-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\MyEclipse 6.0\eclipse\eclipse.exe
-name
Eclipse
–launcher.library
C:\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll
-startup
C:\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
-exitdata
1644_64
-vm
C:\MyEclipse 6.0\jre\bin\javaw.exeI tried to run this simple script and I got an error
EventsDAO events = new EventsDAO();
List test = events.findAll();
Iterator pairs = test.iterator();
while ( pairs.hasNext()){
Object[] pair = (Object[]) pairs.next();
Events event = (Events) pair[0];This is the error I received
log4j:WARN No appenders could be found for logger (com.gerberdata.hibernate.EventsDAO).
log4j:WARN Please initialize the log4j system properly.
Exception in thread “main” java.lang.ClassCastException: com.gerberdata.hibernate.Events
at com.gerberdata.hibernate.testhibernate.main(testhibernate.java:19)}
Brian FernandesModeratorThe “pears” iterator will return a list of Events; pairs.next() will return an Events object but you are casting it to Object[], hence the ClassCastException.
Hope this helps.
-
AuthorPosts