-->
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.  [ 1 post ] 
Author Message
 Post subject: Harness Hibernate Ch06 -cannot find symbol :constuctor Track
PostPosted: Fri May 07, 2010 3:13 pm 
Newbie

Joined: Thu Mar 18, 2010 6:57 pm
Posts: 8
can you help with the compiling error in Chap06 code? It is like the code constructor is not compatible with declaration in Track.java

Usertypes

In chap06

ant codegen
ant prepare are OK.

ant schema resulted in

/examples/ch10/src/com/oreilly/hh/CreateTest.java:73: cannot find symbol
[javac] symbol : constructor Track(java.lang.String,java.lang.String,java.sql.Time,java.util.HashSet<com.oreilly.hh.data.Artist>,java.util.Date,com.oreilly.hh.StereoVolume,com.oreilly.hh.SourceMedia,java.util.HashSet<java.lang.String>)
[javac] location: class com.oreilly.hh.data.Track
[javac] track = new Track("Video Killed the Radio Star",


The signature of constructor in Track.java generated from Track.hbm.xml is
public Track(String title, String filePath, Date playTime, Set<Artist> artists, Date added, StereoVolumeType volume, SourceMediaType sourceMedia, Set<String> comments) {^M



The constructor in Track.java is like this

Track track = new Track(title, file, length, new HashSet<Artist>(),
new Date(), new StereoVolume(), SourceMedia.CD,
new HashSet<String>());


the type of new StereoVolume(), SourceMedia.CD are incompatible...

this should be OK since ant usertypes work but it did not.


any help please. thanks!

Report this post


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

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.