MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Fripp
Post subject: MyEclipse 9.1: Spring wiht Hibernate and Reverse Engineering  PostPosted: Sep 27, 2011 - 05:23 PM



Joined: Sep 20, 2011
Posts: 4

Hi,
I have problem to configure project.
add capability: Spring 2.0, Hiberante 3.1
db: PostgresSql
IDE: MyEclipse 9.1

When I try to make the Reverse Engineering the output console is:

ERROR Worker-10 org.hibernate.util.XMLHelper - Error parsing XML: C:\...\applicationContext.xml(2) Document is invalid: no grammar found.
2011-09-27 17:46:50,785 ERROR Worker-10 org.hibernate.util.XMLHelper - Error parsing XML: C:\...\applicationContext.xml(2) Document root element "beans", must match DOCTYPE root "null".

in the log:



Code:
!ENTRY org.eclipse.ui 4 0 2011-09-27 17:46:51.304
!MESSAGE Unable to create editor ID com.genuitec.eclipse.springframework.springconfigeditor: Invalid thread access
!STACK 0
org.eclipse.swt.SWTException: Invalid thread access
   at org.eclipse.swt.SWT.error(SWT.java:4083)
   at org.eclipse.swt.SWT.error(SWT.java:3998)
   at org.eclipse.swt.SWT.error(SWT.java:3969)
   at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
   at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
   at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:279)
   at org.eclipse.swt.widgets.Widget.<init>(Widget.java:149)
   at org.eclipse.swt.widgets.Control.<init>(Control.java:108)
   at org.eclipse.swt.widgets.Scrollable.<init>(Scrollable.java:75)
   at org.eclipse.swt.widgets.Composite.<init>(Composite.java:95)
   at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:148)
   at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:637)
   at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
   at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
   at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
   at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:403)
   at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:381)
   at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:2102)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.getXMLModelFromOpenEditors(SpringBeansConfigFile.java:128)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.configureModel(SpringBeansConfigFile.java:71)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:61)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:55)
   at com.genuitec.eclipse.hibernate.wizards.MEDAOExporter.doStart(MEDAOExporter.java:154)
   at com.genuitec.eclipse.hibernate.tool.hbm2x.VAbstractExporter.start(VAbstractExporter.java:97)
   at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:631)
   at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
   at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
   at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:419)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.core.jobs 4 2 2011-09-27 17:46:51.354
!MESSAGE An internal error occurred during: "Generating Artifacts".
!STACK 0
org.eclipse.swt.SWTException: Invalid thread access
   at org.eclipse.swt.SWT.error(SWT.java:4083)
   at org.eclipse.swt.SWT.error(SWT.java:3998)
   at org.eclipse.swt.SWT.error(SWT.java:3969)
   at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
   at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
   at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:279)
   at org.eclipse.swt.widgets.Widget.<init>(Widget.java:149)
   at org.eclipse.swt.widgets.Control.<init>(Control.java:108)
   at org.eclipse.swt.widgets.Scrollable.<init>(Scrollable.java:75)
   at org.eclipse.swt.widgets.Composite.<init>(Composite.java:95)
   at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:148)
   at org.eclipse.ui.internal.EditorReference.getEmptyEditor(EditorReference.java:787)
   at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:486)
   at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
   at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
   at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:403)
   at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:381)
   at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:2102)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.getXMLModelFromOpenEditors(SpringBeansConfigFile.java:128)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.configureModel(SpringBeansConfigFile.java:71)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:61)
   at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:55)
   at com.genuitec.eclipse.hibernate.wizards.MEDAOExporter.doStart(MEDAOExporter.java:154)
   at com.genuitec.eclipse.hibernate.tool.hbm2x.VAbstractExporter.start(VAbstractExporter.java:97)
   at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:631)
   at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
   at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
   at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:419)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)



I have tried with various versions of Spring and Hibernate but the result is the same.
An equal configuration wiht MyEclipse 5.5.1 works, the Hibernate Reverse soo.
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Sep 28, 2011 - 08:11 AM



Joined: Nov 11, 2010
Posts: 2154

Fripp ,

Sorry that you are seeing this issue with MyEclipse.

1) Can you switch to a new workspace, create a new project,try the hibernate reverse engineering process and check if this issue persists?

2) Clear the contents of the .log file which is located at <workspace dir>/.metadata/.log , replicate the issue and paste the entire contents of .log file here.

Let me know how it works for you.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Fripp
Post subject: procedure:  PostPosted: Sep 28, 2011 - 10:22 AM



Joined: Sep 20, 2011
Posts: 4

Ok, thanks.

1)switch workspace
2)new project java
3)add spring capability, 2.0, use userLibrary
spring.jar
spring-hibernate3.jar
asm.jar
cglib-2.1.jar
dom4j-1.6.jar
ehcache-1.1.jar
hibernate3.jar
4)add hibernate capability, 3.0, use userLibrary,
-spring configuration file (applicationContext.xml)
-use exisisting spring configuration file
5)Dialect postgresSql not found in mylibrary while wiht hibernate 3.3 found org.hibernate.dialect.PostgresPlusDialect and I rename dialect in the applicationContext wiht org.hibernate.dialect.PostgresSQLDialect.
6)I retry reverse wiht DAO spring ...
log in .metadata is empty
log in console is:
Code:
2011-09-28 11:18:35,963 ERROR Worker-10 org.hibernate.util.XMLHelper - Error parsing XML: C:\workspace\progettoCGILTestHibernate\testHibernateSpringReverse\applicationContext.xml(2) Document is invalid: no grammar found.
2011-09-28 11:18:35,964 ERROR Worker-10 org.hibernate.util.XMLHelper - Error parsing XML: C:\workspace\progettoCGILTestHibernate\testHibernateSpringReverse\applicationContext.xml(2) Document root element "beans", must match DOCTYPE root "null".
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Sep 29, 2011 - 09:50 AM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2515

Fripp,

After switching your workspace, do you still see the errors you reported in your first post? Those would indicate a serious issue.

The errors you see now, should be ignorable - your classes should be generated and the beans should be correctly defined in the applicationContext.xml file. Can you please confirm if classes are being generated and your applicationContext.xml file is modified with the DAO reference?

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Fripp
Post subject:   PostPosted: Sep 29, 2011 - 12:56 PM



Joined: Sep 20, 2011
Posts: 4

After switching my workspace log in .metadata is empty.

then it is ignorabile ERROR paste in the precedent post, this is more important . Thanks!!

When I do Reverse, the window pop up it opens and then it is closed, without showing errors.

If I can reverse wiht MyEclipse Derby Connection, the generation pojo and DAO it correctly happens and my applicationContext.xml file is modified with the DAO reference!

Is a issue of Driver? If yes, why does it work in the myEclipse 5.5 ?
a lot of graces
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Sep 30, 2011 - 10:51 AM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2515

Fripp,

I'm afraid your response was not clear.

1) Are your classes generated? If yes, no problem.

2) Do you still see the errors that you reported in your first post? If no, then we have no problem.

3) Is it working with Derby but not with your other database?

Could you please clarify explicitly?

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Fripp
Post subject:   PostPosted: Sep 30, 2011 - 02:08 PM



Joined: Sep 20, 2011
Posts: 4

ok

1) No, isn't generated.
2) No, this is not problem more.
3) Yes, I working with Derby but not with my other database (PostgresSql)

thanks
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits