- This topic has 8 replies, 2 voices, and was last updated 18 years, 7 months ago by
Brian Fernandes.
-
AuthorPosts
-
ksgettingParticipantI am trying to run the example in the MyEclipse Hibernate Quickstart guide. I fixed the problem with the outdated import as reported by others, but I still have 1 error:
EchoMessage cannot be resolved to a type.
Reorganize does not fix the problem. Am I missing a jar? What does EchoMessage do?
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_08*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.1.1 GA
Build id: 20060309-4.1.1-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.2
Build id: M20060118-1600Eclipse Platform
Version: 3.1.2
Build id: M20060118-1600Eclipse RCP
Version: 3.1.2
Build id: M20060118-1600Eclipse Java Development Tools
Version: 3.1.2
Build id: M20060118-1600Eclipse Plug-in Development Environment
Version: 3.1.2
Build id: M20060118-1600Eclipse Project SDK
Version: 3.1.2
Build id: M20060118-1600Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Program Files\eclipse 3.1\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
358_2c
-vm
C:\WINDOWS\system32\javaw.exe
ksgettingParticipantLooking further, I am guessing this is supposed to be the object created for the table. EchoMessage does not match the table name used earlier in the example.
This example appears to be an INSERT example. Do you have any example of reading data?
Brian FernandesModeratorHi,
First, I would advise you to move to the latest version of MyEclipse – version 5.0.1- which includes an updated guide and many fixes and enhancements.
I’m not sure where you are accessing the Quickstart from, but the version in 5.0.1 or the version online provides the latest instructions, including a demo application and read / write code snippets. The current version of the guide, available online [URL=http://www.myeclipseide.com/images/tutorials/quickstarts/hibernate/]here[/URL] should work with 4.1.1 as well, should you choose not to upgrade.
If you are using the updated guide but still experience issues, do let us know.
Best,
Brian.
ksgettingParticipantI got the outdate quickstart guide from your website http://www.myeclipseide.com/ContentExpress-display-ceid-67.html
The HTML link points to the new guide (date today), but I had clicked on the PDF link, which is still the older version from January. You need to update the PDF here.
I tried upgrading to 5.0, but I ran into a problem where a bunch of my JSP’s were failing to compile (they work fine with MyEclipse 4.1.1).
Brian FernandesModeratorHi,
Thanks for pointing out the dated guides, we will get those fixed. The html guide should work with 4.1.1 as well.
If you open another thread related to the JSP issues, I’m sure the appropriate support personnel will help out.
Best,
Brian.
ksgettingParticipantOkay, I have switched to 5.0. Following the new quick start, I am trying to open the HQL editor (Step 6). Everytime I try this, I get “Error Creating Configuration: A configuration object could not be built, autocomplete and dynamic query translation will be unavailable. Queries cannot be execute. Reason: Could not parse configuration: C:\data\workspace5\Cybra\src\hibernate.cfg.xml”.
The XML file is at that location and contains:
<?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”>WOW</property>
<property name=”connection.url”>
jdbc:mysql://localhost/PJUSER64
</property>
<property name=”dialect”>
org.hibernate.dialect.MySQLDialect
</property>
<property name=”myeclipse.connection.profile”>
MySqlLocal
</property>
<property name=”connection.password”>wow</property>
<property name=”connection.driver_class”>
com.mysql.jdbc.Driver
</property>
<mapping
resource=”com/cybra/dispatcher/hibernate/Admin.hbm.xml” /></session-factory>
</hibernate-configuration>
Brian FernandesModeratorHi,
Some users are reporting issues with the HQL editor when not connected to the internet. This is under investigation right now, are you connected when you try this?
Try pressing refresh once the HQL editor is open.Is the path C:\data\workspace5\Cybra\src\hibernate.cfg.xml correct for your configuration file?
There should be a larger stack trace associated with this error in your error log. Could you please paste that here?
Thanks,
Brian.
ksgettingParticipantIt seems to work from home, so I would guess it may have something to do with the proxy server that I have to use fpr LAN at work. Yes the location is correct for the config file.
One question before I post the errors. I accidentally closed the views on the right side of my Hibernate perspective (2 tabs – Result properties, Query …). They are supposed to be just to the right of the HQL editor. How do I get those back?
!ENTRY com.genuitec.org.hibernate.eclipse.console 1 0 2006-09-21 12:26:05.953
!MESSAGE Could not refresh Hibernate project context com.genuitec.eclipse.hibernate.action.MERefreshCCAction$InProgressException!ENTRY com.genuitec.org.hibernate.eclipse.console 4 4 2006-09-21 12:38:14.265
!MESSAGE Could not parse configuration: C:\data\workspace5\Cybra\src\hibernate.cfg.xml
!STACK 0
org.hibernate.HibernateException: Could not parse configuration: C:\data\workspace5\Cybra\src\hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1376)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1344)
at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:211)
at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:158)
at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:134)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:115)
at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:120)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:100)
at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:90)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: org.dom4j.DocumentException: Connection reset by peer: connect Nested exception: Connection reset by peer: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1366)
… 10 more
!SUBENTRY 1 com.genuitec.org.hibernate.eclipse.console 4 150 2006-09-21 12:38:14.265
!MESSAGE org.dom4j.DocumentException: Connection reset by peer: connect Nested exception: Connection reset by peer: connect
!STACK 0
org.dom4j.DocumentException: Connection reset by peer: connect Nested exception: Connection reset by peer: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1366)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1344)
at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:211)
at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:158)
at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:134)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:115)
at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:120)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:100)
at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:90)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Nested exception:
java.net.SocketException: Connection reset by peer: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1366)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1344)
at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:211)
at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:158)
at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:134)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:115)
at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:120)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:100)
at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:90)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Brian FernandesModeratorHi,
I apologize for the delayed response, I seem to have missed the notification for this thread.
One question before I post the errors. I accidentally closed the views on the right side of my Hibernate perspective (2 tabs – Result properties, Query …). They are supposed to be just to the right of the HQL editor. How do I get those back?
You can get to the Hibernate perspective and click Window > Reset Perspective or you can open the Views manually using Window > Show View > Other > MyEclipse Enterprise Workbench and selecting the views you wish to open.
Do you still see the stack trace you mentione above when at work? Could you give me a few more details about your setup?
1) What is the path at which you have installed MyEclipse?
2) Have you made any changes to the MyEclipse configuration or installed any other plugins like Hibernate Tools or WTP?
3) Could you go here: Window>Preferences>MyEclipse>Editors>XML>XML Catalog and see if a
-//Hibernate/Hibernate Configuration DTD 3.0//EN entry is present? If you observe the Details Pane when you select this entry, you should get a file system URI – can you go to this location and check if the corresponding DTD file is OK? The file size should be 2547 bytes.4) Have you added any libraries, (notably Xerces) to your hibernate project?
Best,
Brian. -
AuthorPosts