Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-17 Thread Boyd Stephen Smith Jr.
On Tuesday 16 May 2006 10:05, wu chuanwen [EMAIL PROTECTED] wrote 
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
 Now my problem is :
 I have both jdk1.5 and 1.4 now.
 $ java-config -L
 [sun-jdk-1.4.2.10] Sun JDK 1.4.2.10
 (/etc/env.d/java/20sun-jdk-1.4.2.10) [sun-jdk-1.5.0.06] Sun JDK
 1.5.0.06 (/etc/env.d/java/20sun-jdk-1.5.0.06) * I compiled all the
 dev-java packages by javac1.5.Now when i compile
 commons-pool-1.2-r1,enum can't be recognized as a keyword.And when i
 switch to jdk 1.4,the message is UnsupportedClassVersionError. How can
 i fix this problem now besides re-emerge all the packages in dev-java?

Find what package owns the class/jar that's giving a 
UnsupportedClassVersionError (you might find equery from gentoolkit suited 
to this task) and recompile it with javac 1.4.  This /could/ end 
up chaining down (meaning, that package requires you to compile a 
different package with 1.4 and so on)to where you have to compile 
everything with JDK 1.4, but maybe not.

As covered before, JDK 5 (1.5) is masked for a reason.  You really 
shouldn't unmask it unless you are ready to deal with the problems 
*yourself*.  Many on the list will be either unable or unwilling to help 
you, and I have severe limits in my knowledge, having never actually 
installed JDK 1.5 on Gentoo, only the Windows boxes I've been forced to 
use for various work-related tasks.

-- 
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


pgphd4y7uorfq.pgp
Description: PGP signature


Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-17 Thread wu chuanwen

2006/5/17, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:

On Tuesday 16 May 2006 10:05, wu chuanwen [EMAIL PROTECTED] wrote
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
Find what package owns the class/jar that's giving a
UnsupportedClassVersionError (you might find equery from gentoolkit suited
to this task) and recompile it with javac 1.4.  This /could/ end
up chaining down (meaning, that package requires you to compile a
different package with 1.4 and so on)to where you have to compile
everything with JDK 1.4, but maybe not.

As covered before, JDK 5 (1.5) is masked for a reason.  You really
shouldn't unmask it unless you are ready to deal with the problems
*yourself*.

I know i have made a big mistake now!

Many on the list will be either unable or unwilling to help
you, and I have severe limits in my knowledge, having never actually
installed JDK 1.5 on Gentoo, only the Windows boxes I've been forced to
use for various work-related tasks.

Oh!You are a nice man! Many people here are very nice!


--
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh






--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-17 Thread wu chuanwen

Done! I have fix my *big* problem now and have installed tomcat!
I just want to thank everybody!
You know your advices are so important to me!
Without your help,I can hardly fix this problem.You have let me learn a lot!

Thanks! You are all nice men!

--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread wu chuanwen

2006/5/15, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:

On Sunday 14 May 2006 13:32, wu chuanwen [EMAIL PROTECTED] wrote
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
 java.lang.UnsupportedClassVersionError:

A 1.4 vm refuses to load the output from a 1.5 javac because of the
classfile format bump.  A 1.5 vm will load both 1.4 and 1.5 classfiles.
Try running w/ 1.5.

what does this mean?



--
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh






--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread Uwe Klosa
Hi

You can find information about java on Gentoo here 
http://www.gentoo.org/doc/en/java.xml. There are a lot of problems that can 
occur if
you use java 1.5 as system vm. Have a look here: 
http://www.gentoo.org/proj/en/java/tiger-faq.xml

I recommend to use the java migration-overlay 
https://projects.gentooexperimental.org/expj/wiki/Using_migration-overlay

Uwe

wu chuanwen wrote:
 Hi!Everybody!
 I have emerge sun-jdk1.5.**(i download it and ebuild it by
 myself).Now, i want to emerge tomcat,and it is dependent of
 dev-java/commons-daemon-1.0.1 .But when i emerge it,errors just occur:
 
  enum in jdk1.5 is a keyword,but it is used as a variable in
 the dev-java/commons-daemon-1.0.1.
 
 So now is there anyway to emerge tomcat?
 Thanks in advance!
 
begin:vcard
fn:Uwe Klosa
n:Klosa;Uwe
org:Uppsala University;Electronic Publishing Centre
adr:;;;Uppsala;;75120;Sweden
email;internet:[EMAIL PROTECTED]
tel;work:+46 (0)18 471 7658
url:http://publications.uu.se/epcentre
version:2.1
end:vcard



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread wu chuanwen

2006/5/16, Uwe Klosa [EMAIL PROTECTED]:

Hi

You can find information about java on Gentoo here 
http://www.gentoo.org/doc/en/java.xml. There are a lot of problems that can 
occur if
you use java 1.5 as system vm. Have a look here: 
http://www.gentoo.org/proj/en/java/tiger-faq.xml

I  have tried this way,but i can' t work.I think just it can't fix my
problem cause i have used jdk1.5 to compile many packages.


I recommend to use the java migration-overlay 
https://projects.gentooexperimental.org/expj/wiki/Using_migration-overlay

Why i can't emerge  =java-config-2*


Uwe




--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread Uwe Klosa
You have to emerge java 1.4 and set this to your system vm first. Thena you can 
follow the migration-overlay description.

I also had once java 1.5 as system vm. But there have been problems like that 
you're describing. the solution was to use the
migration-overlay. Now I'm able to use java 1.5 without problems.

Uwe

wu chuanwen wrote:
 2006/5/16, Uwe Klosa [EMAIL PROTECTED]:
 Hi

 You can find information about java on Gentoo here
 http://www.gentoo.org/doc/en/java.xml. There are a lot of problems
 that can occur if
 you use java 1.5 as system vm. Have a look here:
 http://www.gentoo.org/proj/en/java/tiger-faq.xml
 I  have tried this way,but i can' t work.I think just it can't fix my
 problem cause i have used jdk1.5 to compile many packages.

 I recommend to use the java migration-overlay
 https://projects.gentooexperimental.org/expj/wiki/Using_migration-overlay
 Why i can't emerge  =java-config-2*

 Uwe
 
 
 
begin:vcard
fn:Uwe Klosa
n:Klosa;Uwe
org:Uppsala University;Electronic Publishing Centre
adr:;;;Uppsala;;75120;Sweden
email;internet:[EMAIL PROTECTED]
tel;work:+46 (0)18 471 7658
url:http://publications.uu.se/epcentre
version:2.1
end:vcard



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread wu chuanwen

2006/5/16, Uwe Klosa [EMAIL PROTECTED]:

You have to emerge java 1.4 and set this to your system vm first. Thena you can 
follow the migration-overlay description.

I also had once java 1.5 as system vm. But there have been problems like that 
you're describing. the solution was to use the
migration-overlay. Now I'm able to use java 1.5 without problems.


I mean one step is to emerge =java-config-1* =java-config-2*,but i
just can't find the java-config-2*?

Uwe

wu chuanwen wrote:
 2006/5/16, Uwe Klosa [EMAIL PROTECTED]:
 Hi

 You can find information about java on Gentoo here
 http://www.gentoo.org/doc/en/java.xml. There are a lot of problems
 that can occur if
 you use java 1.5 as system vm. Have a look here:
 http://www.gentoo.org/proj/en/java/tiger-faq.xml
 I  have tried this way,but i can' t work.I think just it can't fix my
 problem cause i have used jdk1.5 to compile many packages.

 I recommend to use the java migration-overlay
 https://projects.gentooexperimental.org/expj/wiki/Using_migration-overlay
 Why i can't emerge  =java-config-2*

 Uwe









--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread Boyd Stephen Smith Jr.
On Tuesday 16 May 2006 02:28, wu chuanwen [EMAIL PROTECTED] wrote 
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
 2006/5/15, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:
  On Sunday 14 May 2006 13:32, wu chuanwen [EMAIL PROTECTED] wrote
 
  about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
   java.lang.UnsupportedClassVersionError:
 
  A 1.4 vm refuses to load the output from a 1.5 javac because of the
  classfile format bump.  A 1.5 vm will load both 1.4 and 1.5
  classfiles. Try running w/ 1.5.

 what does this mean?

javac compiles .java files into (one or more) .class files.  Multiple class 
files plus metadata files are zip'd into a .jar file.

.class files have a very specific format.  In particular there's the 
classfile magic (0xCAFEBABE) that confirms that a file with the .class 
extension is really in the classfile format, and can be used to identify 
un- or mis-named classfiles.

Further on in the classfile header (before the data specific to the .java 
file) is a classfile version.  Different versions of javac write out 
different classfile versions.  Presumably to make sure a vm can /safely/ 
load a class.  In particular, there've been at least 2 version bumps.  One 
from somewhere between 1.0 and 1.2 and one between 1.4 and 1.5.  I'm not 
sure on the /exact/ chanages associated with each of those bumps.

Each vm has a whitelist of classfile versions it will load.  The default 
version output by a 1.5 javac is not on the whitelist for a 1.4 vm.  You 
can change the classfile version output with the --target argument to 
javac.

Also, javac actually runs inside a vm, and will attempt to load classfiles 
that are used by your program, but not available on the source path, in an 
attempt to ensure you are using those classes correctly.  The classfiles 
must have a version loadable by javac's vm or you get the same error.

-- 
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


pgp40SSjzUNog.pgp
Description: PGP signature


Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread wu chuanwen

2006/5/16, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:

On Tuesday 16 May 2006 02:28, wu chuanwen [EMAIL PROTECTED] wrote
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
 2006/5/15, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:
  On Sunday 14 May 2006 13:32, wu chuanwen [EMAIL PROTECTED] wrote



javac compiles .java files into (one or more) .class files.  Multiple class
files plus metadata files are zip'd into a .jar file.

.class files have a very specific format.  In particular there's the
classfile magic (0xCAFEBABE) that confirms that a file with the .class
extension is really in the classfile format, and can be used to identify
un- or mis-named classfiles.

Further on in the classfile header (before the data specific to the .java
file) is a classfile version.  Different versions of javac write out
different classfile versions.  Presumably to make sure a vm can /safely/
load a class.  In particular, there've been at least 2 version bumps.  One
from somewhere between 1.0 and 1.2 and one between 1.4 and 1.5.  I'm not
sure on the /exact/ chanages associated with each of those bumps.

Each vm has a whitelist of classfile versions it will load.  The default
version output by a 1.5 javac is not on the whitelist for a 1.4 vm.  You
can change the classfile version output with the --target argument to
javac.

Also, javac actually runs inside a vm, and will attempt to load classfiles
that are used by your program, but not available on the source path, in an
attempt to ensure you are using those classes correctly.  The classfiles
must have a version loadable by javac's vm or you get the same error.

Thank you very much!I have learned a lot.

Now my problem is :
I have both jdk1.5 and 1.4 now.
$ java-config -L
[sun-jdk-1.4.2.10] Sun JDK 1.4.2.10 (/etc/env.d/java/20sun-jdk-1.4.2.10)
[sun-jdk-1.5.0.06] Sun JDK 1.5.0.06 (/etc/env.d/java/20sun-jdk-1.5.0.06) *
I compiled all the dev-java packages by javac1.5.Now when i compile
commons-pool-1.2-r1,enum can't be recognized as a keyword.And when i
switch to jdk 1.4,the message is UnsupportedClassVersionError.
How can i fix this problem now besides re-emerge all the packages in dev-java?



--
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh






--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-16 Thread wu chuanwen

2006/5/16, Uwe Klosa [EMAIL PROTECTED]:

You have to emerge java 1.4 and set this to your system vm first. Thena you can 
follow the migration-overlay description.

I also had once java 1.5 as system vm. But there have been problems like that 
you're describing. the solution was to use the
migration-overlay. Now I'm able to use java 1.5 without problems.

I can't download the package  javatoolkit-0.1.8.tar.bz2 from
http://www.kerami-tek.com/~chewi/chewi-overlay/distfiles/javatoolkit-0.1.8.tar.bz2.
I just wonder if you can send it to my mailbox and it will be very
appreciated(maybe it's still in your /usr/portage/distfiles).
Thanks in advance!


Uwe



--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-15 Thread wu chuanwen

2006/5/15, Alexander Skwar [EMAIL PROTECTED]:

wu chuanwen wrote:
 I have unmerge the sun-jdk1.5 and emerge sun-jdk1.4 and it success.
 But now there is new problem when i emerge the one which tomcat dependen on:

Yep. That's because you used JDK 5.0. In bugzilla you can find
a lot of reports - BTW: You searched bugs.gentoo.org first?

My network is edu net which can't connect the foreign web sites.


Either fix all the packages yourself as you insisted on
using JDK 5.0, despite it being hardmasked. Or you remove
all the Java packages which got installed after you installed
JDK 5.0 and install them new, now that you're back with JDK 1.4.2.

OMG!But how can i find out all the packages installed after JDK1.5?
I hope they are not all the packages in the dev-java.

Alexander Skwar
--
No spitting on the Bus!
Thank you, The Mgt.
--
gentoo-user@gentoo.org mailing list





--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-14 Thread wu chuanwen

I have unmerge the sun-jdk1.5 and emerge sun-jdk1.4 and it success.
But now there is new problem when i emerge the one which tomcat dependen on:
---
#emerge tomcat
Calculating dependencies... done!

Emerging (1 of 30) dev-java/commons-pool-1.2-r1 to /
checking ebuild checksums ;-)
checking auxfile checksums ;-)
checking miscfile checksums ;-)
checking commons-pool-1.2-src.tar.gz ;-)
Unpacking source...
Unpacking commons-pool-1.2-src.tar.gz to

/var/tmp/portage/commons-pool-1.2-r1/work
tar: a long zero block at 1325.

Source unpacked.
Compiling source in

/var/tmp/portage/commons-pool-1.2-r1/work/commons-pool-1.2 ...
Buildfile: build.xml

BUILD FAILED
java.lang.UnsupportedClassVersionError:
org/apache/xerces/jaxp/SAXParserFactoryImpl (Unsupported major.minor
version 49.0)
   at java.lang.ClassLoader.defineClass0(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:93)
   at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:174)
   at 
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:87)
   at 
org.apache.tools.ant.util.JAXPUtils.newParserFactory(JAXPUtils.java:114)
   at 
org.apache.tools.ant.util.JAXPUtils.getNSParserFactory(JAXPUtils.java:100)
   at 
org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:163)
   at 
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:193)
   at 
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
   at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
   at org.apache.tools.ant.Main.runBuild(Main.java:653)
   at org.apache.tools.ant.Main.startAnt(Main.java:187)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 0 seconds
java.lang.UnsupportedClassVersionError:
org/apache/xerces/jaxp/SAXParserFactoryImpl (Unsupported major.minor
version 49.0)
   at java.lang.ClassLoader.defineClass0(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:93)
   at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:174)
   at 
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:87)
   at 
org.apache.tools.ant.util.JAXPUtils.newParserFactory(JAXPUtils.java:114)
   at 
org.apache.tools.ant.util.JAXPUtils.getNSParserFactory(JAXPUtils.java:100)
   at 
org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:163)
   at 
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:193)
   at 
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
   at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
   at org.apache.tools.ant.Main.runBuild(Main.java:653)
   at org.apache.tools.ant.Main.startAnt(Main.java:187)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
org/apache/xerces/jaxp/SAXParserFactoryImpl (Unsupported major.minor
version 49.0)

!!! ERROR: dev-java/commons-pool-1.2-r1 failed.
Call stack:
 ebuild.sh, line 1527:   Called dyn_compile
 ebuild.sh, line 931:   Called src_compile
 commons-pool-1.2-r1.ebuild, line 37:   Called die

!!! Compilation Failed
!!! If you need support, post 

Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-14 Thread Alexander Skwar

wu chuanwen wrote:

I have unmerge the sun-jdk1.5 and emerge sun-jdk1.4 and it success.
But now there is new problem when i emerge the one which tomcat dependen on:


Yep. That's because you used JDK 5.0. In bugzilla you can find
a lot of reports - BTW: You searched bugs.gentoo.org first?

http://bugs.gentoo.org/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=long_desc_type=substringlong_desc=java.lang.UnsupportedClassVersionError%3Abug_file_loc_type=allwordssubstrbug_file_loc=status_whiteboard_type=allwordssubstrstatus_whiteboard=keywords_type=allwordskeywords=bug_status=UNCONFIRMEDbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDbug_status=RESOLVEDbug_status=VERIFIEDbug_status=CLOSEDemailassigned_to1=1emailtype1=substringemail1=emailassigned_to2=1emailreporter2=1emailcc2=1emailtype2=substringemail2=bugidtype=includebug_id=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Reuse+same+sort+as+last+timefield0-0-0=nooptype0-0-0=noopvalue0-0-0=

http://bugs.gentoo.org/show_bug.cgi?id=121177 emerging
dev-java/commons-cli-1.0-r4 fails


Is the version of the package error?


No, all is fine. Everything is going as expected.


What should i do now?


Either fix all the packages yourself as you insisted on
using JDK 5.0, despite it being hardmasked. Or you remove
all the Java packages which got installed after you installed
JDK 5.0 and install them new, now that you're back with JDK 1.4.2.

Alexander Skwar
--
No spitting on the Bus!
Thank you, The Mgt.
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-14 Thread Boyd Stephen Smith Jr.
On Sunday 14 May 2006 13:32, wu chuanwen [EMAIL PROTECTED] wrote 
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
 java.lang.UnsupportedClassVersionError:

A 1.4 vm refuses to load the output from a 1.5 javac because of the 
classfile format bump.  A 1.5 vm will load both 1.4 and 1.5 classfiles.  
Try running w/ 1.5.

Of course, if you are compiling, which seems to be the case, you'll need to 
recompile this classfile with 1.4, so that it can be loaded by the 1.4 
javac.

-- 
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


pgpkuBwHkNp1T.pgp
Description: PGP signature


Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread Boyd Stephen Smith Jr.
On Saturday 13 May 2006 00:10, wu chuanwen [EMAIL PROTECTED] wrote 
about '[gentoo-user] cause jdk1.5 emerge tomcat error!':
 I have emerge sun-jdk1.5.**(i download it and ebuild it by
 myself).Now, i want to emerge tomcat,and it is dependent of
 dev-java/commons-daemon-1.0.1 .But when i emerge it,errors just occur:

   enum in jdk1.5 is a keyword,but it is used as a variable in
 the dev-java/commons-daemon-1.0.1.

 So now is there anyway to emerge tomcat?

Change your system javac to a 1.4 for the emerge of commons-daemon.  The 
resulting class/jar files will run in a 1.5 vm -- since enum and assert 
(introduced in 1.4) are both still valid identifiers in bytecode under a 
1.5 vm.

Bytecode also allows two methods with the same name that only differ in 
return type, which allows generics that only compile under 1.5 (and 
modified versions of 1.4) javac to work under a vm as far back as (at 
least) 1.2 -- as long as the requisite libraries are in place.

Sun and the JCP have been very good to modify the bytecode specification 
sparingly, if at all, so that valid class files output from any javac will 
run on almost all vms.  This common binary format goes a long way toward 
the goal of WORA.

-- 
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


pgpv80XTNtpNu.pgp
Description: PGP signature


Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread Boyd Stephen Smith Jr.
On Saturday 13 May 2006 03:19, wu chuanwen [EMAIL PROTECTED] wrote 
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
 2006/5/13, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:
  Change your system javac to a 1.4 for the emerge of commons-daemon. 
  The resulting class/jar files will run in a 1.5 vm -- since enum and
  assert (introduced in 1.4) are both still valid identifiers in
  bytecode under a 1.5 vm.

 How can i change my javac to 1.4?

Use java-config.

 You mean re-emerge sun-jdk1.4?

You will have to have /a/ 1.4 javac, not necessarily Sun's.

 Is  
 there any other ways?

Sure, write and apply a patch to tomcat that removes all uses of enum as an 
identifier.  For extra points, submit it back to the community.

Or write and apply a patch to tomcat's native build process and/or the 
ebuild so that '--source 1.4' and possibly '--target 1.4' is passed to 
javac whenever it is called.  I'd say give this back to the community, 
too, but we probably don't want it:  Passing those options unconditionally 
breaks backwards compatibility and forward progress.

-- 
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


pgpLgFFPOdbfQ.pgp
Description: PGP signature


Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread Alexander Skwar

wu chuanwen wrote:


  enum in jdk1.5 is a keyword,but it is used as a variable in
the dev-java/commons-daemon-1.0.1.

So now is there anyway to emerge tomcat?


Yep. Probably you need to de-install JDK 5.0 (1.5.0) and install
the Gentoo approved JDK 1.4.x.

You know, there IS a reason why there's (not yet) a JDK  5.0 in
portage...

Alexander Skwar
--
try again
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread Alexander Skwar

wu chuanwen wrote:

2006/5/13, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:


Change your system javac to a 1.4 for the emerge of commons-daemon.  The
resulting class/jar files will run in a 1.5 vm -- since enum and assert
(introduced in 1.4) are both still valid identifiers in bytecode under a
1.5 vm.

How can i change my javac to 1.4?You mean re-emerge sun-jdk1.4?


That's probably what he mans.


Is
there any other ways?


Why? That's a good enough way, IMO.


Thanks!


Bytecode also allows two methods with the same name that only differ in
return type, which allows generics that only compile under 1.5 (and
modified versions of 1.4) javac to work under a vm as far back as (at
least) 1.2 -- as long as the requisite libraries are in place.

Sun and the JCP have been very good to modify the bytecode specification
sparingly, if at all, so that valid class files output from any javac will
run on almost all vms.  This common binary format goes a long way toward
the goal of WORA.

--
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


PS: Please delete text which you don't need, like the one which
I've just quoted.

Alexander Skwar
--
Would ye both eat your cake and have your cake?
-- John Heywood
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread wu chuanwen

2006/5/13, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:

On Saturday 13 May 2006 03:19, wu chuanwen [EMAIL PROTECTED] wrote



 You mean re-emerge sun-jdk1.4?

You will have to have /a/ 1.4 javac, not necessarily Sun's.

Can i just change the 1.5 javac to the 1.4 one?I have never try to do this.
Can it work?


 Is
 there any other ways?

Sure, write and apply a patch to tomcat that removes all uses of enum as an
identifier.

It needs a lot of work!
Besides there is many packages behind of which tomcat  dependens on.I
can't be sure all of them can be compile by jdk1.5.

Besides,install tomcat is a painful thing.You know,you have to
download many packages manually and still there are other problems.For
example:

!!! jmx-1_2_1-scsl.zip not found in /usr/portage/distfiles

!!! dev-java/sun-jmx-1.2.1-r1 has fetch restriction turned on.
!!! This probably means that this ebuild's files must be downloaded
!!! manually.  See the comments in the ebuild for more information.

*
*  Due to license restrictions, we cannot fetch the
*  distributables automagically.
*
*  1. Visit http://wwws.sun.com/software/communitysource/jmx/download.html
and follow instructions
*  2. Download jmx-1_2_1-scsl.zip
*  3. Move file to /usr/portage/distfiles
*  4. Run emerge on this package again to complete
*

There are several packages having the same information just as above.
Is there anybody else having  ever install tomcat? Do you have the
same situation as me?


--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread wu chuanwen

2006/5/13, Alexander Skwar [EMAIL PROTECTED]:

wu chuanwen wrote:

   enum in jdk1.5 is a keyword,but it is used as a variable in
 the dev-java/commons-daemon-1.0.1.

 So now is there anyway to emerge tomcat?

Yep. Probably you need to de-install JDK 5.0 (1.5.0) and install
the Gentoo approved JDK 1.4.x.

Maybe i will do that since there is not anyother ways.


You know, there IS a reason why there's (not yet) a JDK  5.0 in
portage...

Yep,i understand now!


Alexander Skwar
--
try again
--
gentoo-user@gentoo.org mailing list





--
wcw

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread Boyd Stephen Smith Jr.
On Saturday 13 May 2006 21:56, wu chuanwen [EMAIL PROTECTED] wrote 
about 'Re: [gentoo-user] cause jdk1.5 emerge tomcat error!':
 2006/5/13, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:
  On Saturday 13 May 2006 03:19, wu chuanwen [EMAIL PROTECTED] wrote
   You mean re-emerge sun-jdk1.4?
  You will have to have /a/ 1.4 javac, not necessarily Sun's.
 Can i just change the 1.5 javac to the 1.4 one?I have never try to do
 this. Can it work?

Sure, you can emerge -C jdk 1.5 AND emerge jdk 1.4, but wouldn't it be 
easier to just emerge jdk 1.4 and use the java-config tool provided by 
Gentoo to change your system jdk?

   Is
   there any other ways?
  Sure, write and apply a patch to tomcat that removes all uses of enum
  as an identifier.
 It needs a lot of work!

That was my point.  I already TOLD you the easy way.

 !!! jmx-1_2_1-scsl.zip not found in /usr/portage/distfiles
 !!! dev-java/sun-jmx-1.2.1-r1 has fetch restriction turned on.

 There are several packages having the same information just as above.
 Is there anybody else having  ever install tomcat? Do you have the
 same situation as me?

Yes, there are a number of packages in the tree with fetch restriction 
turned on.  Due to non-free licenses AND annoying download policies this 
software may not be downloaded automatically or put on any Gentoo mirror.

Gentoo has a choice: do not provide these packages AT ALL, or require you 
do manually download them.  Aren't you glad they chose the former?

-- 
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


pgpGqXA5mbrPq.pgp
Description: PGP signature


Re: [gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-13 Thread Alexander Skwar

wu chuanwen wrote:

2006/5/13, Boyd Stephen Smith Jr. [EMAIL PROTECTED]:

On Saturday 13 May 2006 03:19, wu chuanwen [EMAIL PROTECTED] wrote



 You mean re-emerge sun-jdk1.4?

You will have to have /a/ 1.4 javac, not necessarily Sun's.

Can i just change the 1.5 javac to the 1.4 one?


No.

What's wrong with the proper solution that's been given to you?


There are several packages having the same information just as above.
Is there anybody else having  ever install tomcat? Do you have the
same situation as me?


As these are fetch restrictions: Yes, everybody will have the same
situation.

Alexander Skwar
--
Campus sidewalks never exist as the straightest line between two points.
-- M. M. Johnston
--
gentoo-user@gentoo.org mailing list



[gentoo-user] cause jdk1.5 emerge tomcat error!

2006-05-12 Thread wu chuanwen

Hi!Everybody!
I have emerge sun-jdk1.5.**(i download it and ebuild it by
myself).Now, i want to emerge tomcat,and it is dependent of
dev-java/commons-daemon-1.0.1 .But when i emerge it,errors just occur:

 enum in jdk1.5 is a keyword,but it is used as a variable in
the dev-java/commons-daemon-1.0.1.

So now is there anyway to emerge tomcat?
Thanks in advance!

--
wcw

--
gentoo-user@gentoo.org mailing list