From: Andrew Kornilov <akornilov@gmail.com> To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org> Subject: [sisyphus] java, tomcat5, alternatives и все-все-все... Date: Thu, 30 Aug 2007 20:23:52 +0300 Message-ID: <46D6FD28.2020909@gmail.com> (raw) Привет всем. 1. Уже больше часа пытаюсь понять, как у нас правильно переключать java через alternatives. Кто-нибудь знает? 2. Вот этот код set_jvm_dirs() из /usr/share/java-utils/java-functions: ========================================= JAVA_VERSION= re='\([[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\(\.[[:digit:]]\{1,\}\)*\)' for opt in -fullversion -version ; do # Yuck, "grep -o" would be cleaner, but requires GNU grep >= 2.5. # This could be improved/simplified if sed had non-greedy matching. JAVA_VERSION=$($JAVACMD $opt 2>&1 | sed -n \ -e '/java \(full \)*version "/s/'$re'/<<<\1>>>/' \ -e '/java \(full \)*version "/s/.*<<<\([^>]\{1,\}\)>>>.*/\1/p') if [ -n "$JAVA_VERSION" ] ; then break fi done ========================================= не работает с java-1.7.0 (вывод -version и -fullversion совсем не такой, как был раньше в java). Соответственно, поломалось всё :) 3. tomcat5 хочет именно java-1.7.0 или что-то из неё, не разбирался глубоко пока, но при попытке удалить 1.7.0 (и наличии 1.5, 1.6), apt хочет удалить и сам tomcat5. 4. Как же запустить tomcat5? ========================================= service tomcat5 start Starting tomcat5: lock file found but no process running for pid 25688, continuing /usr/bin/rebuild-jar-repository: error: JAVAVER_LIBDIR /usr/share/java- does not exist or is not a directory /usr/bin/rebuild-jar-repository: error: JAVAVER_LIBDIR /usr/share/java- does not exist or is not a directory /usr/bin/rebuild-jar-repository: error: JAVAVER_LIBDIR /usr/share/java- does not exist or is not a directory /usr/bin/rebuild-jar-repository: error: JAVAVER_LIBDIR /usr/share/java- does not exist or is not a directory ========================================= Даже если вбить в ту функцию явно версию 1.7.0, все равно не работает, видимо, еще где-то что-то определяет, в логах вот такое: ========================================= Using CATALINA_BASE: /usr/share/tomcat5 Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /usr/share/tomcat5/temp Using JRE_HOME: java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina at java.net.URLClassLoader$1.run(URLClassLoader.java:221) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:209) at java.lang.ClassLoader.loadClass(ClassLoader.java:324) at java.lang.ClassLoader.loadClass(ClassLoader.java:269) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:222) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410) ========================================= Похоже, jre_home определить не может. Такой запутанной системы работы я уже давно не видел, куча функций, альтернатив, runtime определений. Оно действительно нужно и работает? :-)
next reply other threads:[~2007-08-30 17:23 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-08-30 17:23 Andrew Kornilov [this message] 2007-08-30 19:40 ` Igor Vlasenko 2007-08-30 20:27 ` Andrew Kornilov 2007-08-30 20:47 ` Andrew Kornilov 2007-08-30 21:05 ` Igor Vlasenko 2007-08-30 21:10 ` Andrew Kornilov 2007-08-30 21:24 ` Igor Vlasenko 2007-08-30 21:06 ` Igor Vlasenko 2007-08-30 21:08 ` Vladimir A. Svyatoshenko 2007-08-30 21:09 ` Andrew Kornilov 2007-08-30 21:17 ` Vladimir A. Svyatoshenko 2007-08-30 21:26 ` Igor Vlasenko 2007-08-30 21:24 ` Andrew Kornilov 2007-08-30 21:47 ` Vladimir A. Svyatoshenko 2007-09-14 19:06 ` Andrew Kornilov 2007-09-14 20:41 ` Andrew Kornilov 2007-09-14 20:49 ` Andrew Kornilov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=46D6FD28.2020909@gmail.com \ --to=akornilov@gmail.com \ --cc=sisyphus@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git