Opened 14 years ago

Closed 13 years ago

#28508 closed defect (wontfix)

hibernate2 using enum as identifier .. building with wrong version of Java?

Reported by: vulcan_@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: java, hibernate, enum, 1.4 Cc: ryandesign (Ryan Carsten Schmidt)
Port: hibernate2

Description

i want to work with hibernate3, but that port is also failing (ticket #26828 ) so i tried the older version .. no go

--->  Building hibernate2
Buildfile: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/build.xml
  [taskdef] Could not load definitions from resource clovertasks. It could not be found.

splash:

init:
     [echo] Build Hibernate-2.1 (2011-02-22 02:03:25)
    [mkdir] Created dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/build/classes
     [copy] Copying 5 files to /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/build/classes

compile:
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/build.xml:158: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 491 source files to /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/build/classes
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/src/net/sf/hibernate/Hibernate.java:188: as of release 5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (use -source 1.4 or lower to use 'enum' as an identifier)
    [javac] 	public static Type enum(Class enumClass) throws MappingException {
    [javac] 	                   ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/src/net/sf/hibernate/impl/AbstractQueryImpl.java:246: as of release 5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (use -source 1.4 or lower to use 'enum' as an identifier)
    [javac] 		setParameter( position, val, Hibernate.enum( val.getClass() ) );
    [javac] 		                                       ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/src/net/sf/hibernate/impl/AbstractQueryImpl.java:306: as of release 5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (use -source 1.4 or lower to use 'enum' as an identifier)
    [javac] 		setParameter( name, val, Hibernate.enum( val.getClass() ) );
    [javac] 		                                   ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/src/net/sf/hibernate/type/TypeFactory.java:169: as of release 5, 'enum' is a keyword, and may not be used as an identifier
    [javac] (use -source 1.4 or lower to use 'enum' as an identifier)
    [javac] 					type = Hibernate.enum(typeClass);
    [javac] 					                 ^
    [javac] 4 errors

BUILD FAILED
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1/build.xml:158: Compile failed; see the compiler error output for details.

Total time: 9 seconds
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate2/work/hibernate-2.1" && ant jar " returned error 1

my machine is a MacBook 13" intel Core Duo (32 bit only) Mac OS X 10.6.6 Snow Leopard Macports 1.9.6

what else do you need to diagnose this one pls?

Change History (8)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

hibernate2 is from 2005; I'm not sure it's interesting anymore. Maybe we should delete the hibernate2 port.

hibernate3 was for a version from 2007; I updated it to the latest version released a few days ago. Does that help?

comment:2 Changed 14 years ago by vulcan_@…

heh, one way to know if H2 is still needed is to remove the port, then count how many people scream that they are missing it. Note that hibernate is a significant part of a LOT of enterprise level applications which tend to have very long life times, so a 5 year old app is still a young one in that world. I will try H3 again.

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Well, it can't be a part of anyone's current Mac setup via MacPorts since it doesn't build...

comment:4 Changed 14 years ago by vulcan_@…

a good point .. and i should have also observed that using hibernate outside of Eclipse (built in by plugin) or some other J2EE IDE is going to be a very rare thing.

so yes, one could think that removing the port for H2 would be okay .. and perhaps even the one for H3 .. but not just yet please, i am about to re-try the install ;-)

comment:5 Changed 14 years ago by vulcan_@…

interesting i thot that antlr might be messed up so i did clean --all on it the hibernate install correctly saw the dependency on it and installed antlr 2.7.7_1 then H3 was downloaded and we resume our story ...

--->  Building hibernate3
Buildfile: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate3/work/hibernate-3.2/build.xml
  [taskdef] Could not load definitions from resource clovertasks. It could not be found.

splash:

init:
     [echo] Build Hibernate-3.2.5.ga (2011-02-23 10:01:36)
     [echo] JDK version: 1.6

init.antlr:

antlr:
    [mkdir] Created dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate3/work/hibernate-3.2/build/gensrc/org/hibernate/hql/antlr
[antlrtask] Exception in thread "main" java.lang.NoClassDefFoundError: antlr/Tool
[antlrtask] Caused by: java.lang.ClassNotFoundException: antlr.Tool
[antlrtask] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[antlrtask] 	at java.security.AccessController.doPrivileged(Native Method)
[antlrtask] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[antlrtask] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[antlrtask] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[antlrtask] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

BUILD FAILED
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_hibernate3/work/hibernate-3.2/build.xml:174: ANTLR returned: 1

as the word Splash appeared i did see the hibernate splash screen for a second .. then crash any idea what clovertasks could be?

comment:6 Changed 14 years ago by vulcan_@…

oops this is the wrong ticket .. this should be on the hibernate3 port .. sorry and .. i forgot to selfupdate after Ryan said he had updated the H3 port .. so i was still trying v 3.2.5, not the newer 3.6.1 double sorry off to update, upgrade and try again

comment:7 Changed 14 years ago by vulcan_@…

still the wrong ticket, but since the maintainer mentioned that he updated the H3 port .. i just did self update/ update all and install hibernate3 and it worked .. good going

comment:8 Changed 13 years ago by jmroot (Joshua Root)

Resolution: wontfix
Status: newclosed

Still fails even with -Dant.build.javac.source=1.4 like so:

[javac] work/hibernate-2.1/src/net/sf/hibernate/impl/ResultSetWrapper.java:30: net.sf.hibernate.impl.ResultSetWrapper is not abstract and does not override abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet

Deleted in r89764.

Note: See TracTickets for help on using tickets.