-->
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.  [ 8 posts ] 
Author Message
 Post subject: Stuck at the gate: gij: unrecognized option -- `-classpath`
PostPosted: Tue May 18, 2004 12:15 pm 
Newbie

Joined: Tue May 18, 2004 11:57 am
Posts: 7
Location: Mountain View, CA
I am new to hibernate, so just trying to get things installed and running.

My platform is RedHat WS 3.0
I've installed Hibernate 2.1.3
I've got mysql 4.0.18-standard installed as well.

I'm trying to build the demo, per instructions in the readme.
I have copied mysql-connector-java-3.0.11-stable-bin.jar to lib/
I have chosen mysql in hibernate.properties (and unchosen hsqldb)
I have chosen mysql in build.xml (driver.jar) -- not specified in readme, but seemed to make sense.
The error I am getting is:

==============
$ ant eg
Buildfile: build.xml
[taskdef] Could not load definitions from resource clovertasks. It could not be found.

eg:
[echo] remember to place your JDBC driver in the lib directory
[java] gij: unrecognized option -- `-classpath'
[java] Try `gij --help' for more information.

BUILD FAILED
file:/opt/hibernate_distribs/hibernate-2.1/build.xml:458: Java returned: 1

Total time: 0 seconds
=================

I don't think this is related to clover missing -- when I remove the clover lines from build.xml, I still get the gij error.

I don't think this is related to mysql. When I specify another persistence layer, the same thing happens.

gij is installed as part of package libgcj-3.2.3-20

================
$ gij --help
Usage: gij [OPTION] ... CLASS [ARGS] ...
to interpret Java bytecodes, or
gij -jar [OPTION] ... JARFILE [ARGS] ...
to execute a jar file

-DVAR=VAL define property VAR with value VAL
--help print this help, then exit
--ms=NUMBER set initial heap size
--mx=NUMBER set maximum heap size
--showversion print version number, then keep going
--version print version number, then exit

See http://gcc.gnu.org/java/ for information on reporting bugs
===================

I looked through all the files in my hibernate install, but see no reference to gij, so I don't know how to change the call.

Any suggestions? I can get a debug hibernate log if that would help, but my guess is that logging may not have anything to say this early on...

Thanks,

-- Sherry Listgarten
TimesTen, Inc.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 6:57 pm 
Newbie

Joined: Tue May 18, 2004 11:57 am
Posts: 7
Location: Mountain View, CA
I will answer my own question here.
The problem is an 'old' version of gij. Newer versions appear to take a -classpath parameter, but older versions do not. Compare, for example:
http://gcc.gnu.org/onlinedocs/gcj/Invok ... king%20gij
and
http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcj_8.html

I don't know how gij is getting invoked (ant? other?), but it seems to assume a 'newer' version of gij.

The solution for me was to download and build gcc 3.3.3 and use that gij.

Another possibility might be to modify build.xml to not use gij, for example, or to indicate an older version of gij, if that's possible. I don't know ant well enough to know.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 12:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
I have no idea about this gij command. I would guess that it is "tinkering" with the java-related env vars. By default Ant will simply use the standard executables (i.e., java and javac) it finds through the JAVA_HOME for the environment from which it was invoked. Try using Ant's -verbose option to see from where it is detecting this gij thing.

And the clover tasks are optional tasks for the Hibernate build; that failure will have no bearing on the actual Hibernate build.


Top
 Profile  
 
 Post subject: gij problem: ant vs classic-ant
PostPosted: Wed May 19, 2004 12:39 pm 
Newbie

Joined: Tue May 18, 2004 11:57 am
Posts: 7
Location: Mountain View, CA
Ah, thanks, the -verbose option was helpful. It indicated it was finding java in /usr, even though JAVA_HOME was set to point elsewhere. No matter what I did, it kept finding java in /usr.

It turns out there are two versions of ant -- 'classic-ant' and 'ant', both of which are installed on my system. 'ant' is compiled with libgcj, so it uses gij. (At least, that's my interpretation of what's going on. And it finds it in /usr.) When I switch to 'classic-ant', it uses 'regular' java.

I appear to be able to build hibernate with classic-ant, but not with ant.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 12:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
I would venture a guess that what you call "classic ant" is really ant and that what you call "ant" is really some other version bundled with this java lib thing you are using.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 1:11 pm 
Newbie

Joined: Tue May 18, 2004 11:57 am
Posts: 7
Location: Mountain View, CA
Well, all I know for sure is that RedHat WS3 ships both these versions. The compiled version (linked with libgcj) is called 'ant', and the interpreted version is called 'classic-ant'.

I just looked up "classic ant redhat" on the web, and there are several references to the two versions.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 1:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Well I'm pretty sure that if you search for "clasic ant" on the actual ant site you'll get no hits :)

And I just googled [+"classic ant" +"build tool"-redhat] http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=%2B%22classic+ant%22+%2B%22build+tool%22-redhat to find references to classic ant as a build tool, without any references to redhat and got exactly one hit. And that one hit was an anomoly.

Are you familiar with ant and/or have you checked out the ant site? http://ant.apache.orgPersonally, I always use the real deals rather than these pre-packaged versions...


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 2:21 pm 
Newbie

Joined: Tue May 18, 2004 11:57 am
Posts: 7
Location: Mountain View, CA
Well, I'd say I am *getting* familiar with ant :)

Yes, the classic-ant shipped with Red Hat is a shell script, which is similar to what ant ships. (I had separately downloaded ant 1.6.1 while looking into this.)

The compiled ant must be Red Hat's invention. What's the saying: If it's not broken, break it? :)

What I searched for was: classic ant redhat

Anyway, thanks for your help. I'm moving on now to dialect problems :) (Well, not exactly problems. Just that TimesTen doesn't support circular foreign key references, and Hibernate generates them. Though it continues to work despite the error.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.