facebook

A configuration object could not be built

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 15 posts - 31 through 45 (of 62 total)
  • Author
    Posts
  • #260095 Reply

    Haris Peco
    Member

    Travis,

    It is probably problem, because MyEclipse contents xerces 2.8.0 (this is bigger version – it is xerces2 and xerces 4.0.13 is old plugin which was in eclipse before jdk 1.4).I will try find this plugin and check is problem exists for me

    Regards,
    Peco

    #260096 Reply

    Haris Peco
    Member

    Travis,

    I have found xerces version 4.0.13 (in eclipse 2.1.3), but I can’t reproduce your case with simple adding plugins
    Please, try disable StarTeam feature

    Thanks
    Peco

    #260134 Reply

    Peco,
    I deactivated the Borland stuff and now I get the following error:

    A configuration object could not be built, autocomplete and dynamic query translation will be unavailable. Queries cannot be executed.

    Reason:
    Could not read mappings from resource:
    com/label/dao/hibernate/Artist.hbm.xml

    The mapping it claims not to read exists, it is in the proper directory and it is currently being read during execution of my jUnit tests. Again, this all happens when I right click on the project >> MyEclipse >> HQL Editor

    Travis

    #260139 Reply

    Haris Peco
    Member

    Travis,

    Great.This was hard, because we couldn’t reproduce

    For problem with hbm.xml please try next :

    – remove hbm.xml mapping from hibernate.cfg and add it with cfg.xml configuration
    editor

    This is possible :

    – hbm.xml are not in source directory
    – hbm.xml are in other project (HQL editor doesn’t work with dependency project – this will be possibel in next release)

    Thanks
    Peco

    #260239 Reply

    Peco,

    I looked and don’t see a “cfg.xml configuration editor” and I’m unfamiliar with it.

    FYI: I used the generation tool to generate the mapping files in a *different* directory than the source (same project).

    Travis

    #260244 Reply

    Haris Peco
    Member

    Travis,

    Your hibernate.cfg.xml and all mapping files have to be in source folder

    Best
    Peco

    #260247 Reply

    I looked again…my pojos and the mapping files are in a source folder and they actually are in the same packgage. The hibernate.cfg.xml, however, is on the project root. Of all the tools I’ve tried this is the only one that has complained about anything…and this doesn’t seem to be the thing it’s complaining about really. Here’s what it looks like:

    [project root] / [src] / hibernate.cfg.xml
    [project root] / [src] / … / [mapping] / AbstractPojo.java
    [project root] / [src] / … / [mapping] / Pojo.java
    [project root] / [src] / … / [mapping] / PojoDAO.java
    [project root] / [src] / … / [mapping] / Pojo.hbm.xml

    Travis

    #260250 Reply

    Haris Peco
    Member

    Travis,

    Can you send your project to
    mailto:support@genuitec.com with subject ATTN: support-snpe
    I will try reproduce your case

    Thanks
    Peco

    #260254 Reply

    I just sent it

    #260272 Reply

    Haris Peco
    Member

    Travis,

    I can reproduce your case with broken libraries.However, when I fix broken libraries in classpath (build path) it works fine
    Check your build path and remove broken (unexisting) libraries – You have 2 paths to jconn2.jar and strange path for junit.jar

    Best
    Peco

    #260307 Reply

    ok…how do I get access to the jUnit library? I had to add it in there manually to get it to compile and run tests. I was sure that there’s access to it but I could only figure out how to add it manually.

    Travis

    #260310 Reply

    Haris Peco
    Member

    Travis,

    You can do it in different way, but it is better that you import jar in project and call ‘Add jar’ in BuildPath.

    Best
    Peco

    #260316 Reply

    Peco,

    Ok…import how? I right-click project and select import but that gives me no opportunity that I can see to import a jar file. I guess I’m confused generally about adding to the build path and adding to the classpath. I’m also having an issue deploying b/c the Spring libraries that were added to the project when I added Spring capabilities is not part of the packages that are being deployed to Apache. My .classpath looks like this:

    <classpath>
    <classpathentry kind=”src” path=”src/main/java”/>
    <classpathentry kind=”src” path=”src/test/java”/>
    <classpathentry kind=”con” path=”org.eclipse.jdt.launching.JRE_CONTAINER”/>
    <classpathentry kind=”con” path=”com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER”/>
    <classpathentry kind=”con” path=”melibrary.com.genuitec.eclipse.hibernate.MYECLIPSE_HIBERNATE3_EXTRAS”/>
    <classpathentry kind=”con” path=”melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING12_DAO”/>
    <classpathentry kind=”con” path=”melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING12_AOP”/>
    <classpathentry kind=”con” path=”melibrary.com.genuitec.eclipse.hibernate.MYECLIPSE_HIBERNATE3_CORE”/>
    <classpathentry kind=”lib” path=”lib/mysql-connector-java-3.1.13-bin.jar”/>
    <classpathentry kind=”lib” path=”E:/projects/label/lib/junit.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/antlr.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/commons-beanutils.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/commons-digester.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/commons-fileupload.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/commons-logging.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/commons-validator.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/jakarta-oro.jar”/>
    <classpathentry kind=”lib” path=”WebRoot/WEB-INF/lib/struts.jar”/>
    <classpathentry kind=”con” path=”melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING12_CORE”/>
    <classpathentry kind=”con” path=”melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING12_WEB”/>
    <classpathentry kind=”output” path=”WebRoot/WEB-INF/classes”/>
    </classpath>

    It’s not deploying any of the .jar files associated wtih the kind=”con” types or so it’d seem. It is launching the kind=”lib” types.

    So, I guess that’s two related questions. How do you “import” a package like jUnit and is there something specific I need to do with the framework libraries to get all the packages to deploy without manually putting them into the Apache lib directory…I’m afraid if I do that, I’ll have issues similar to what we’ve been experiencing…

    Thanks for your patience.

    Travis

    #260333 Reply

    Haris Peco
    Member

    Travis,

    Importing files (jars) in project :

    – right click on folder where you want import jar (for example lib) and choose Import
    – choose file system
    – show to directory where is jar
    – check jar which you want import
    – press finish

    Add in build path :
    – rigth click on project and choose Properties
    – click on Java Build Path page
    – choose Libraries tab
    – click on ‘Add Jars’ and show to project’s lib directory from previous import

    You second problem is related with build path – If you have nonexisting library in build path (like your unit.jar) then deployment fail

    Best
    Peco

    #260334 Reply

    Peco,

    I think that I’ve got the issue resolved we’ve been working on. Thanks for your dedication to my issue.

    The second issue below isn’t really related to this stuff except that it’s classpath stuff. Basically, I added Spring capabilities to my project the usual way and it builds fine. I can run it flawlessly in jUnit tests. When I add the web end of things, though, I find that my deploy isn’t deploying properly to Tomcat. I was expecting that by adding these libraries through myEclipse that I would automatically get all of the associated jar files in my deploy area under tomcat. However, none of the “con” entries from the below .classpath file are actually getting deployed. For example, the following is not promoted to the server:

    melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING12_DAO

    I suspect that if I added the individual .jar files associated with this library reference for Spring that it would work. However, this whole experience has taught me that I probably ought to use the myEclipse tools to make this happen. That way I can take advantage of the jar management features you guys work hard on. Am I missing something? Why are these jar files not being promoted by the deploy function?

    Travis

Viewing 15 posts - 31 through 45 (of 62 total)
Reply To: A configuration object could not be built

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