-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Hibernate 3.2.2 build.xml depends on clover
PostPosted: Sun Feb 18, 2007 3:01 pm 
Newbie

Joined: Sun Feb 18, 2007 2:54 pm
Posts: 6
Hibernate version: 3.2.1, 3.2.2

Mapping documents: N/A (trying to build examples)

I get the following when trying to build examples using 'ant eg' -- HSQLDB has been copied to lib, but the failure occurs earlier than that.

I tried commenting out the clover parts of build.xml but, not being that familiar with ant makes it harder. Could we get a build.xml that does not use clover?

--
Michel

Buildfile: build.xml
Trying to override old definition of datatype splash
[taskdef] Could not load definitions from resource clovertasks. It could not be found.

eg:
[javac] Compiling 8 source files to /media/My Book/Downloads/Java/hibernate-3.2.2/build/eg
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:10: cannot find symbol
[javac] symbol : class FetchMode
[javac] location: package org.hibernate
[javac] import org.hibernate.FetchMode;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:11: cannot find symbol
[javac] symbol : class FlushMode
[javac] location: package org.hibernate
[javac] import org.hibernate.FlushMode;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:12: cannot find symbol
[javac] symbol : class LockMode
[javac] location: package org.hibernate
[javac] import org.hibernate.LockMode;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:13: cannot find symbol
[javac] symbol : class Session
[javac] location: package org.hibernate
[javac] import org.hibernate.Session;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:14: cannot find symbol
[javac] symbol : class SessionFactory
[javac] location: package org.hibernate
[javac] import org.hibernate.SessionFactory;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:15: cannot find symbol
[javac] symbol : class Transaction
[javac] location: package org.hibernate
[javac] import org.hibernate.Transaction;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:16: package org.hibernate.cfg does not exist
[javac] import org.hibernate.cfg.Configuration;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:17: package org.hibernate.cfg does not exist
[javac] import org.hibernate.cfg.Environment;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:18: package org.hibernate.criterion does not exist
[javac] import org.hibernate.criterion.Example;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:19: package org.hibernate.criterion does not exist
[javac] import org.hibernate.criterion.Expression;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:20: package org.hibernate.criterion does not exist
[javac] import org.hibernate.criterion.MatchMode;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:30: cannot find symbol
[javac] symbol : class SessionFactory
[javac] location: class org.hibernate.auction.Main
[javac] private SessionFactory factory;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:38: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:39: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx=null;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:81: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:82: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx=null;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:84: cannot find symbol
[javac] symbol : variable FlushMode
[javac] location: class org.hibernate.auction.Main
[javac] s.setFlushMode(FlushMode.NEVER); //entirely optional!!
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:123: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:124: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx=null;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:128: cannot find symbol
[javac] symbol : variable LockMode
[javac] location: class org.hibernate.auction.Main
[javac] s.lock(item, LockMode.NONE);
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:129: cannot find symbol
[javac] symbol : variable LockMode
[javac] location: class org.hibernate.auction.Main
[javac] s.lock(bidder, LockMode.NONE);
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:156: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:157: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx=null;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:180: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:181: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx=null;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:206: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:207: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx=null;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:213: cannot find symbol
[javac] symbol : variable FetchMode
[javac] location: class org.hibernate.auction.Main
[javac] .setFetchMode("auctions", FetchMode.JOIN)
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:212: cannot find symbol
[javac] symbol : variable Expression
[javac] location: class org.hibernate.auction.Main
[javac] .add( Expression.eq("id", sellerId) )
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:246: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:247: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx=null;
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:253: cannot find symbol
[javac] symbol : variable MatchMode
[javac] location: class org.hibernate.auction.Main
[javac] .enableLike(MatchMode.ANYWHERE)
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:252: cannot find symbol
[javac] symbol : variable Example
[javac] location: class org.hibernate.auction.Main
[javac] .add( Example.create(item)
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:284: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.hibernate.auction.Main
[javac] Session s = factory.openSession();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:285: cannot find symbol
[javac] symbol : class Transaction
[javac] location: class org.hibernate.auction.Main
[javac] Transaction tx = s.beginTransaction();
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:361: cannot find symbol
[javac] symbol : class Configuration
[javac] location: class org.hibernate.auction.Main
[javac] Configuration cfg = new Configuration()
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:365: cannot find symbol
[javac] symbol : variable Environment
[javac] location: class org.hibernate.auction.Main
[javac] .setProperty(Environment.HBM2DDL_AUTO, "create");
[javac] ^
[javac] /media/My Book/Downloads/Java/hibernate-3.2.2/eg/org/hibernate/auction/Main.java:361: cannot find symbol
[javac] symbol : class Configuration
[javac] location: class org.hibernate.auction.Main
[javac] Configuration cfg = new Configuration()
[javac] ^
[javac] 38 errors

BUILD FAILED
/media/My Book/Downloads/Java/hibernate-3.2.2/build.xml:409: Compile failed; see the compiler error output for details.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 3:09 pm 
Newbie

Joined: Sun Feb 18, 2007 2:54 pm
Posts: 6
From reading other posts, seems like the problem has nothing to do with clover. Anyway, Here's a small snippet of what I get from trying to build junitreport:
Code:
    [javac] /media/My Book/Downloads/Java/hibernate-3.2.2/src/org/hibernate/jdbc/ResultSetWrapper.java:30: org.hibernate.jdbc.ResultSetWrapper is not abstract and does not override abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
    [javac] public class ResultSetWrapper implements ResultSet {
    [javac]        ^
    [javac] /media/My Book/Downloads/Java/hibernate-3.2.2/src/org/hibernate/lob/BlobImpl.java:16: org.hibernate.lob.BlobImpl is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
    [javac] public class BlobImpl implements Blob {
    [javac]        ^


Running this on Sun JDK 1.6.0 -- it is a supported configuration, right?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 3:40 pm 
Regular
Regular

Joined: Sun Sep 17, 2006 2:48 am
Posts: 81
Location: California
ResultSet interface has been extended (sadly) in java 6. So currently hibernate code wont compile with JDK 6. Please use JDK5 for compilation. Once you have compiled you can use either 5 or 6 for running.

Hope that helps.
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 4:55 pm 
Newbie

Joined: Sun Feb 18, 2007 2:54 pm
Posts: 6
With JDK5, ant eg fails as before; ant junitreport returns the output below. Are the two build targets supposed to be working out-of-the-box? It does not quite inspire confidence, so I hope I'm doing something really silly.

Code:
Buildfile: build.xml
Trying to override old definition of datatype splash
  [taskdef] Could not load definitions from resource clovertasks. It could not be found.

splash:
   [splash] failed to display SplashScreen, caught java.lang.IllegalAccessError with message: tried to access class org.apache.tools.ant.taskdefs.optional.splash.SplashScreen from class org.apache.tools.ant.taskdefs.optional.splash.SplashTask

init:
     [echo] Build Hibernate-3.2.2.ga (2007-02-18 03:52:53)
     [echo] JDK version: 1.5

cleantestdb:

init.antlr:

antlr:

compile:
    [javac] Compiling 515 source files to /media/My Book/Downloads/Java/hibernate-3.2.2/build/classes
    [javac] /media/My Book/Downloads/Java/hibernate-3.2.2/src/org/hibernate/event/EventListeners.java:27: cannot access org.hibernate.event.def.DefaultReplicateEventListener
    [javac] bad class file: /media/My Book/Downloads/Java/hibernate-3.2.2/build/classes/org/hibernate/event/def/DefaultReplicateEventListener.class
    [javac] illegal start of class file
    [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
    [javac] import org.hibernate.event.def.DefaultReplicateEventListener;
    [javac]                                ^
    [javac] 1 error

BUILD FAILED
/media/My Book/Downloads/Java/hibernate-3.2.2/build.xml:209: Compile failed; see the compiler error output for details.

Total time: 14 seconds
[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 5:23 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
http://www.hibernate.org/6.html#A4

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 5:24 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Because this might not be clear: This happens because the Ant distribution and default install is broken. It has been in their FAQ for years. How is that for "inspiring confidence"?

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 5:47 pm 
Newbie

Joined: Sun Feb 18, 2007 2:54 pm
Posts: 6
christian wrote:
Because this might not be clear: This happens because the Ant distribution and default install is broken. It has been in their FAQ for years. How is that for "inspiring confidence"?


Very scary indeed (what's their claimed reason for not fixing it, I wonder?). Unfortunately, removing ant-junit.jar and ant-antlr.jar does not work (I still get the same compile errors). I also tried using build.sh, that uses the ant jar that HIbernate ships with, and now get this error instead, with both './build.sh eg' and './build.sh junitreport':

Code:
Buildfile: build.xml
  [taskdef] Could not load definitions from resource clovertasks. It could not be found.

BUILD FAILED
' does not exist in this project.

Total time: 2 seconds


The readme.txt bundled in the distribution does not mention the ant bug, by the way


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 6:39 pm 
Regular
Regular

Joined: Sun Sep 17, 2006 2:48 am
Posts: 81
Location: California
In windows this works for me.

1. ant clean
2. build.bat
3. ant


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 19, 2007 1:23 am 
Newbie

Joined: Sun Feb 18, 2007 2:54 pm
Posts: 6
salimma wrote:
christian wrote:
Because this might not be clear: This happens because the Ant distribution and default install is broken. It has been in their FAQ for years. How is that for "inspiring confidence"?


Very scary indeed (what's their claimed reason for not fixing it, I wonder?). Unfortunately, removing ant-junit.jar and ant-antlr.jar does not work (I still get the same compile errors). I also tried using build.sh, that uses the ant jar that HIbernate ships with, and now get this error instead, with both './build.sh eg' and './build.sh junitreport':

The readme.txt bundled in the distribution does not mention the ant bug, by the way


Apache's packaging of ant 1.6.5 works just fine for 'ant junitreport', actually (there are changes in 1.7.0, it turns out, that makes it not backward compatible).

I did not even have to replace ant-junit and ant-antlr ! Unfortunately, 'ant eg' still fails - it seems that the classpath is not set properly in the build.xml, because ant complaint that it could not find definitions for all the org.hibernate classes?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.