- This topic has 6 replies, 5 voices, and was last updated 14 years, 1 month ago by support-shalini.
-
AuthorPosts
-
Ramiro OrdonezParticipantI saw a posting regarding this issue, however this solution wouldn’t apply to my project. My current set up is using hibernate and spring capabilities. The whole DB has already been mapped using hibernate’s reverse engineering. We had to add 2 extra tables to the schema. Now we have two issues:
First: if we want to execute an HSQL Query we get: Session factory not created for configuration: <Project>
Second: When reverse engineering the tables we get: An internal error occurred during: “Generating Artifacts”. java.lang.NoClassDefFoundError.
So following all the threads on this site, I verified that I have the correct jtds driver in our classpath. Obviously, it was working before while we were reverse engineering the Database at the beginning of the project. Also, I created another dabase connection using the same driver and we are able to browse the schema without an issue. Some how the session created by Hibernate is lost?
This is the session configuration in my Hibernate.conf.xml:
<?xml version=’1.0′ encoding=’UTF-8′?>
<!DOCTYPE hibernate-configuration PUBLIC
“-//Hibernate/Hibernate Configuration DTD 3.0//EN”
“http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”><!– Generated by MyEclipse Hibernate Tools. –>
<hibernate-configuration><session-factory>
<property name=”connection.username”>******</property>
<property name=”connection.url”>jdbc:jtds:sqlserver://devre10:1433/MSSRELENG_NEWER</property>
<property name=”dialect”>org.hibernate.dialect.SQLServerDialect</property>
<property name=”myeclipse.connection.profile”>
jTDS SQL Driver
</property>
<property name=”connection.password”>*******</property>
<property name=”connection.driver_class”>
net.sourceforge.jtds.jdbc.Driver
</property>
<property name=”query.factory_class”>
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
</property>
<property name=”current_session_context_class”>
<!– org.hibernate.context.ManagedSessionContext –>
thread</property>ALL MAPPINGS…
</session-factory>
</hibernate-configuration>
Also when reverse engineering I defined the location of the Spring’s applicationContext.xml. The session is defined as follows:
<tx:annotation-driven/>
<!– Default sessionFactory –>
<bean id=”sessionFactory”
class=”org.springframework.orm.hibernate3.LocalSessionFactoryBean” lazy-init=”false” scope=”singleton”>
<property name=”configLocation” value=”classpath:hibernate.cfg.xml”>
</property>
</bean><!– Default transactionManager –>
<bean id=”transactionManager”
class=”org.springframework.orm.hibernate3.HibernateTransactionManager”>
<property name=”sessionFactory” ref=”sessionFactory” />
</bean><!– Implemented sessionManager to handle long conversations –>
<bean id=”hibernateSessionManager” class=”com.crd.sessionmanagement.HibernateSessionManager” scope=”singleton” lazy-init=”false”>
<property name=”sessionFactory” ref=”sessionFactory” />
</bean>Why did we all of a sudden lose the capability to reverse engineer the tables? Why are those errors showing up? This project is just too big for us to create a new project and implement Hibernate capabilities from the start. There has to be a way to provide back that capability to our project.
Any suggestions are welcome
thanks.
support-shaliniMemberrso2003,
I could not reproduce your issue at my end.
Can you give more information –
1. Can you copy paste your installation details? You can get them from MyEclipse > Installation Summary > Installation Details
2. What are the versions of Spring and Hibernate you are using?
3. Are there any errors logged in the log files(workspace > .metadata > .log)?
4. Are there any errors in your error window? can you send us the screen shots?
Ramiro OrdonezParticipant@support-shalini wrote:
rso2003,
I could not reproduce your issue at my end.
Can you give more information –
1. Can you copy paste your installation details? You can get them from MyEclipse > Installation Summary > Installation Details
2. What are the versions of Spring and Hibernate you are using?
3. Are there any errors logged in the log files(workspace > .metadata > .log)?
4. Are there any errors in your error window? can you send us the screen shots?Installation details:
*** Date:
Tuesday, May 26, 2009 10:03:22 AM EDT** System properties:
OS=WindowsXP
OS version=5.1.0
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 7.1.1
Build id: 7.1.1-20090310*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 7.1.1
Build id: 7.1.1-20090310Eclipse Platform
Version: 3.4.1.r341_v20080731-9I96EiDElYevwz-p1bP5z-NlAaP7vtX6Utotqsu
Build id: M20080911-1700Eclipse Java Development Tools
Version: 3.4.1.r341_v20080709-0800-7o7tEAfEF_U5qyUgrb2HAp539P97
Build id: M20080709-0800Eclipse Plug-in Development Environment
Version: 3.4.1.r341_v20080731-7T7U0E9mlRIuGUYviF_VP
Build id: M20080703-0800Eclipse Graphical Editing Framework GEF
Version: 3.4.1.v20080806-67718083A56B4H2A3213573
Build id: 200809101400Eclipse RCP
Version: 3.4.100.r341_v20080814-989JESIEdAciFYfkZZsBfSwQ2341
Build id: M20080703-0800Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Program Files\Genuitec\MyEclipse 7.0\myeclipse.exe
-name
Myeclipse
–launcher.library
C:\Program Files\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
-startup
C:\Program Files\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
-clean
-configuration
configuration
-vm
C:\Program Files\Genuitec\Common\binary\com.sun.java.jre.win32.x86_1.5.0.011\bin\client\jvm.dllUsing Hibernate 3.2 and Spring 2.5
These are the detail steps of what’s happening:
1. I right click on the table that I want to reverse engineer.
2. I have the wizard create the abstract class and the DAO (Spring DAO) for me and click nextOnce I click finish I get the following error:
Problem Occured:
An internal error occurred during: “Generating Artifacts”.
java.lang.NoClassDefFoundErrorerror from the .metadata/log:
!ENTRY org.eclipse.core.jobs 4 2 2009-05-26 10:11:40.419
!MESSAGE An internal error occurred during: “Generating Artifacts”.
!STACK 0
java.lang.NoClassDefFoundError
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.checkRESettingsFile(GenerateArtifactsJob.java:184)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:379)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)!ENTRY org.eclipse.core.jobs 4 2 2009-05-26 10:17:33.379
!MESSAGE An internal error occurred during: “Generating Artifacts”.
!STACK 0
java.lang.NoClassDefFoundError
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.checkRESettingsFile(GenerateArtifactsJob.java:184)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:379)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Brian FernandesModeratorRso,
Have you installed any other plugins (like Hibernate Tools) or is this a clean MyEclipse 7.1.1. install? You seem to be running into an issue where the plugin providing some functionality cannot be loaded.
Can you clean your error log, restart your workspace and then attempt to reverse engineer; please paste the entire contents of the .log file here so we can figure out if anything is causing the plugin load / init to fail.
How did you install MyEclipse? Perhaps we can provide some instructions on resetting the installation. Alternatively, you could try to download MyEclipse 7.5M1 and see if that solves your problem.
onewaydspMemberI am having the same exact problem. I am trying to install 7.5; hopefully, this will fix this issue.
meadMemberI am using the Oracle database. but encounter the same problem.
But, if I use MySQL, it will work fine.
I have no clue.
support-shaliniMembermeadlai,
Can you give us some more information on this?
1. Can you copy paste your installation details from MyEclipse > Installation Summary > Installation Details?
2.I am using the Oracle database
what is the jar file that your are using and what is the version of Oracle?
3. What are the errors logged in the log file located at workspace dir > .metadata > .log? Please clear your log file, save it and then RE the new tables to get relevant errors -
AuthorPosts