facebook

Spring-Hibernate HQL editor not working.

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #298543 Reply

    Dennis
    Participant

    *** Date:
    Tuesday, May 19, 2009 2:37:32 PM CDT

    ** 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 Workbench

    Version: 7.1.1
    Build id: 7.1.1-20090310

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\MyEclipse7.1\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    C:\Genuitec\Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
    -startup
    C:\Genuitec\Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
    -clean
    -configuration
    C:\MyEclipse7.1\configuration
    -vm
    C:\Genuitec\Common\binary\com.sun.java.jre.win32.x86_1.5.0.011\bin\client\jvm.dll

    I have installed the native jars for Spring & Hibernate because I had nothing but trouble when trying the MyEclipse versions in version 6.5. I am also running Spring Security.

    When I try to test an HQL query I get an error that the Namespace handler in the Spring Security Application Context is not valid. It is valid and Security works fine.

    I have the Project Preferences pointing at the correct application-context for Hibernate.

    Not sure what to do.

    Dennis

    #298552 Reply

    djwaters,
    Can you give us more information on this.
    1. What are the versions of Spring and Hibernate you are using?
    2. Can you send some screen shots of your error and contents of your log files from [workspace dir]/.metadata/.log?

    #298579 Reply

    Dennis
    Participant

    Spring 2.5.5
    Spring Security 2.0.4
    Hibernate 3.2.5

    !ENTRY org.hibernate.eclipse.console 4 4 2009-05-20 09:25:34.631
    !MESSAGE Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    !SUBENTRY 1 org.hibernate.eclipse.console 4 150 2009-05-20 09:25:34.631
    !MESSAGE org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    !STACK 0
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1294)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    at com.genuitec.eclipse.hibernate.tool.MEFileSystemXmlApplicationContext.<init>(MEFileSystemXmlApplicationContext.java:32)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:174)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170)
    at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:113)
    at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    !SUBENTRY 2 org.hibernate.eclipse.console 4 150 2009-05-20 09:25:34.631
    !MESSAGE org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    !STACK 0
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1294)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    at com.genuitec.eclipse.hibernate.tool.MEFileSystemXmlApplicationContext.<init>(MEFileSystemXmlApplicationContext.java:32)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:174)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170)
    at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:113)
    at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

    !ENTRY org.hibernate.eclipse.console 1 0 2009-05-20 09:25:34.631
    !MESSAGE Could not refresh Hibernate project context com.genuitec.eclipse.hibernate.action.MERefreshCCAction$InProgressException

    !ENTRY org.hibernate.eclipse.console 4 4 2009-05-20 09:25:40.631
    !MESSAGE Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    !SUBENTRY 1 org.hibernate.eclipse.console 4 150 2009-05-20 09:25:40.631
    !MESSAGE org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    !STACK 0
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1294)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    at com.genuitec.eclipse.hibernate.tool.MEFileSystemXmlApplicationContext.<init>(MEFileSystemXmlApplicationContext.java:32)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:174)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170)
    at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:113)
    at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    !SUBENTRY 2 org.hibernate.eclipse.console 4 150 2009-05-20 09:25:40.631
    !MESSAGE org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    !STACK 0
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    Offending resource: URL [file:D:/myeclipse/workspace/pd/WebRoot/WEB-INF/applicationContext-security.xml]

    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1294)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    at com.genuitec.eclipse.hibernate.tool.MEFileSystemXmlApplicationContext.<init>(MEFileSystemXmlApplicationContext.java:32)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:174)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170)
    at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:113)
    at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

    !ENTRY org.hibernate.eclipse.console 1 0 2009-05-20 09:25:40.631
    !MESSAGE Could not refresh Hibernate project context com.genuitec.eclipse.hibernate.action.MERefreshCCAction$InProgressException

    I’m trying to run an HQL query when this happens. Screen shot is same message as in the log.

    I’ve added the .xsd for 2.0.4 into the XML catalog under user entries just to try to resolve this. There is no entry for 2.0.4 for the Spring plugin. I had an earlier version in my applicationcontext-security.xml which worked fine in the running application, as does this.

    The entries from the Spring plugin displays errors in the XML catalog. Here’s an example of an entry that’s in error:

    Location: platform:/plugin/org.springframework.security.core/org/springframework/security/config/spring-security-2.0.xsd
    URI: platform:/plugin/org.springframework.security.core/org/springframework/security/config/spring-security-2.0.xsd
    Key Type: Schema Location
    Key: http://www.springframework.org/schema/security

    #298598 Reply

    djwaters,
    Looking at the log files, it looks like the issue is with Spring. I would recommend you to cross post to Spring forums.

    Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]

    While searching over the net I came across a similar post on Spring Security
    Refer to http://forum.springsource.org/showthread.php?t=71171

    When I try to test an HQL query I get an error that the Namespace handler in the Spring Security Application Context is not valid. It is valid and Security works fine.

    How could you say that your Spring Security Application Context is valid?

    #298613 Reply

    Dennis
    Participant

    I can say my security applicationcontext is valid because I get no errors within Spring itself, or the xml editor, only when I use the HQL editor. There are no other errors associated with the Security and it works perfectly in the application.

    I’ll check out further the errors on the Spring forum.

    As I said, I’m getting errors in the xml catalog within ME for the Spring Security xsds that you loaded?[/img]

    #298806 Reply

    Loyal Water
    Member

    djwaters,
    I just got a reply from the dev team and it seems like this is a known issue. I’m sorry you ran into it. We will try and address it in the 8.x release series.

    #298888 Reply

    Dennis
    Participant

    8.x release? We’re only at 7.1. How about sooner?

    #298906 Reply

    Loyal Water
    Member

    djwaters,
    I’ll forward your request.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Spring-Hibernate HQL editor not working.

You must be logged in to post in the forum log in