Main Menu

Instalare

Creat de Andrei, Octombrie 19, 2008, 12:18:13 PM

« precedentul - următorul »

Velucu

Aseara eram obosit si nu am scris pe inteles. Mai sus v-am aratat cum am modificat fisierul "tomcat-users.xml". La username si password va rog sa va uitati si sa-mi spuneti daca am procedat corect. Dupa ce am creat directorul /usr/share/tomcat6/lib/wglib si am extras librariile,  am inchis terminalul.   M-am uitat din nou la directorul wglib, si am vazut ca era marcat cu un "X" la coltul din dreapta sus la fel si fisierul tomcat-users.xml. Incep sa va dau toate detaliile pe care le cred in neregula ca nu mai stiu ce sa fac si imi cer scuze, poate ele asa ar trebui sa fie. Cand introduc adresa "http://localhost:8080/webgest" in browser imi arata aceasta fereastra:

HTTP Status 404 - /webgest

type Status report

message /webgest

description The requested resource (/webgest) is not available.
Apache Tomcat/6.0.28

Acum am pus mai multe detalii si sper sa intelegeti .
Cu stima Velucu
  •  

cios

#31
Din pagina în care ai ajuns, citire:

Citattomcat6-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.

NOTE: For security reasons, using the manager webapp is restricted to users with role "manager". The host-manager webapp is restricted to users with role "admin". Users are defined in /etc/tomcat6/tomcat-users.xml.

Ai instalat din synaptic și tomcat6-admin?
Ai încercat să mergi pe link-ul "manager webapp"? Acolo e pagina de administrare, din care vei putea instala aplicația Webgest (deploy). Abia apoi o să-ți apară ceva la http://localhost:8080/webgest .

Deci, în tomcat-users.xml, importante sunt două linii de felul:

  <role rolename="manager"/>
  <user username="Velucu" password="parola ( NU de la mysql )" roles="manager"/>

Când ai ajuns în pagina de administrare ( http://localhost:8080/manager/html ), mergi pe "War file to deploy" și arăți fișierul webgest.war .
  •  

Velucu

Buna dimineata! Aseara intr-un tarziu am reusit si am ajuns in fereastra de setup, "http://localhost:8080/webgest/Setup.jsp?op" care sa deschis frumos "Administrare aplicatie Webgest". La Nume am pus root la Parola am pus parola de la MYSQL si pe celelalte doua le-am lasat asa.. Cand am dat clic pe Login a aparut fereastra:

EROARE conectare la baza de date!!!  ->  Nu gasesc driverul de mysql (mysql-connector.jar).

Ce credeti ca trebuie facut in continuare?
  •  

cios

Dacă serverul MySQL este pornit înseamnă că mysql-connector.jar nu este accesibil. L-ai pus împreună cu celelalte în /usr/share/tomcat6/lib/wglib/ ? Trebuie repornit Tomcat-ul după adăugarea de librării !!!
  •  

Velucu

Da am copiat in /usr/share/tomcat6/lib/wglib/. Iar pentru a reporni Tomcat-ul am folosit urmatoarele comenzi in terminal:

sudo /etc/init.d/tomcat6 stop

sudo /etc/init.d/tomcat6 restart

si nu sa intamplat nimic. Am si reinstalat Tomcat-ul din Sinaptic si tot acelasi mesaj mi-a dat. Acum urmeaza sa extrag jar-ul din nou si sal pun din nou in wglib. Daca-mi da din nou aceiasi eroare nu mai stiu ce sa fac.
  •  

cios

CitatSe editează fișierul catalina.properties din Tomcat/conf pentru a defini locațiile în care se află librăriile proprii aplicației. Se completeaza linia "shared.loader=" cu "${catalina.home}/lib/wglib,${catalina.home}/lib/wglib/*.jar,${catalina.home}/webapps/ReportEngine/lib,${catalina.home}/webapps/ReportEngine/lib/*.jar"

Asta ai făcut corect ?
  •  

Velucu

Da, ma-m uitat si e corect, daca vreti pot sa dau un copy, paste.
  •  

elis

Linia din catalina.properties  trebuie să arate astfel:

shared.loader=${catalina.home}/lib/wglib,${catalina.home}/lib/wglib/*.jar,${catalina.home}/webapps/ReportEngine/lib,${catalina.home}/webapps/ReportEngine/lib/*.jar

Poți da copy/paste de aici.

Dacă nu merge nici așa (Tomcat-ul trebuie repornit), înlocuiește "${catalina.home}" cu calea absolută - " /usr/share/tomcat6 " (în toate cele patru locuri). Adică așa:

shared.loader=/usr/share/tomcat6/lib/wglib,/usr/share/tomcat6/lib/wglib/*.jar,/usr/share/tomcat6/webapps/ReportEngine/lib,/usr/share/tomcat6/webapps/ReportEngine/lib/*.jar
  •  

Velucu

Am incercat si cu varianta a 2-a si am primit acelasi mesaj.
Aici va pun prima varianta ca ma-m intors din nou. Ma gandesc, ca poate nu e bine ceva pe aici.

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageDefinition unless the
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
# by default, no packages are restricted for definition, and none of
# the class loaders supplied with the JDK call checkPackageDefinition.
#
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.

#
#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank,the JVM system loader will be used as Catalina's "common"
# loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/var/lib/tomcat6/common/*.jar

#
# List of comma-separated paths defining the contents of the "server"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank, the "common" loader will be used as Catalina's "server"
# loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar

#
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
shared.loader=${catalina.home}/lib/wglib,${catalina.home}/lib/wglib/*.jar,${catalina.home}/webapps/ReportEngine/lib,${catalina.home}/webapps/ReportEngine/lib/*.jar

#
# String cache configuration.
tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000
  •  

cios

Am făcut o probă pe Ubuntu (de fapt Kiwi, care e același lucru) și merge cu varianta cu cale absolută. Într-adevăr, nu merge cu cea relativă. E o diferență în organizare față de Fedora.

Trimite-ne fișierul catalina.out (sau cel puțin partea de la sfârșit din el), care se găsește în /var/log/tomcat6. Asta după ce încerci din nou cu shared.loader din catalina.properties cu cale absolută.
  •  

Velucu

03.02.2011 16:54:22 org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
03.02.2011 16:54:22 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
03.02.2011 16:54:22 org.apache.catalina.core.StandardContext start
SEVERE: Context [/docs] startup failed due to previous errors
03.02.2011 16:54:22 org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/docs] has not been started
03.02.2011 16:54:22 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive webgest.war
03.02.2011 16:54:22 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
03.02.2011 16:54:22 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1077 ms
JSP(/webgest/Setup.jsp)------Load page cu op: null
JSP(/webgest/Setup.jsp)------Load page cu op: login
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:186)
   at mirabit.gest.util.WebgestSetup.getConn(WebgestSetup.java:35)
   at org.apache.jsp.Setup_jsp._jspService(Setup_jsp.java:176)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:636)

Sper sa fie deajuns! Am luat ultima parte din fisier. Cu calea absoluta am incercat ciar de atunci de cand ati aratat pe forum, si nu a mers.
  •  

Velucu

03.02.2011 17:20:22 org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
03.02.2011 17:20:22 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
03.02.2011 17:20:22 org.apache.catalina.core.StandardContext start
SEVERE: Context [/examples] startup failed due to previous errors
03.02.2011 17:20:22 org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples] has not been started
03.02.2011 17:20:22 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
03.02.2011 17:20:23 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
03.02.2011 17:20:23 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
03.02.2011 17:20:23 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor docs.xml
03.02.2011 17:20:23 org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /usr/share/tomcat6-docs/docs does not exist or is not a readable directory
   at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
   at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4249)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4418)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
03.02.2011 17:20:23 org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
03.02.2011 17:20:23 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
03.02.2011 17:20:23 org.apache.catalina.core.StandardContext start
SEVERE: Context [/docs] startup failed due to previous errors
03.02.2011 17:20:23 org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/docs] has not been started
03.02.2011 17:20:23 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive webgest.war
03.02.2011 17:20:23 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
03.02.2011 17:20:23 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1058 ms
JSP(/webgest/Setup.jsp)------Load page cu op: login
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:186)
   at mirabit.gest.util.WebgestSetup.getConn(WebgestSetup.java:35)
   at org.apache.jsp.Setup_jsp._jspService(Setup_jsp.java:176)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:636)

Aici am pus si dupa ce am modificat catalina cu calea absoluta.
  •  

cios

E suficientă partea asta din catalina.out. Pune-ne și conținutul catalina.properties cu calea absolută.
  •  

dfreddie

In Ubuntu server am fost nevoit sa pun timcat-ul "la mana" in /opt/tomcat6/ ca sa mearga!!
Not too bad for a blind man ...
  •  

Velucu

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageDefinition unless the
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
# by default, no packages are restricted for definition, and none of
# the class loaders supplied with the JDK call checkPackageDefinition.
#
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.

#
#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank,the JVM system loader will be used as Catalina's "common"
# loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/var/lib/tomcat6/common/*.jar

#
# List of comma-separated paths defining the contents of the "server"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank, the "common" loader will be used as Catalina's "server"
# loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar

#
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
shared.loader=/usr/share/tomcat6/lib/wglib,/usr/share/tomcat6/lib/wglib/*.jar,/usr/share/tomcat6/webapps/ReportEngine/lib,/usr/share/tomcat6/webapps/ReportEngine/lib/*.jar

#
# String cache configuration.
tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000


Asta este. Cred ca am procedat corect.
  •