IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Tomcat et TomEE Java Discussion :

message d'erreur :java.lang.reflect.InvocationTargetException


Sujet :

Tomcat et TomEE Java

  1. #1
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut message d'erreur :java.lang.reflect.InvocationTargetException
    Bonjour,
    J'aimerai avoir une installation propre de Tomcat (interfacer avec Eclipse) avant de me lancer dans le code.
    Je rencontre donc ce message d'erreur.
    J'ai cherché mais je n'ai rien trouvé. Est ce une "vraie" erreur ?
    De plus, le lancement des exemples sur mon Tomcat (partie JSP-examples) se passe sans problème.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
     
     
    Created MBeanServer with ID: glb6j4:fdq1fi9r.0:coccigrue:1
    12-mar-08 4:19:15  org.apache.catalina.startup.Catalina load
    WARNING: Can't load server.xml from /usr/share/tomcat5.5/conf/server.xml
    12-mar-08 4:19:15  org.apache.catalina.startup.Catalina load
    WARNING: Can't load server.xml from /usr/share/tomcat5.5/conf/server.xml
    12-mar-08 4:19:15  org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1 ms
    java.lang.reflect.InvocationTargetException
       at java.lang.reflect.Method.invoke(libgcj.so.90)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Caused by: java.lang.NullPointerException
       at org.apache.catalina.startup.Catalina.await(Catalina.java:616)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
       at java.lang.reflect.Method.invoke(libgcj.so.90)
       ...2 more
    J'ai une question de compréhension du systéme aussi : quand je fais du JSP est ce que je dois générer aussi le servlet ou bien c'est le compilateur qui le fait ?
    Je commence à peine à me documenter donc ne m'envoulez pas si ma question est bête.

    Merci

  2. #2
    Membre confirmé Avatar de JoloKossovar
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    532
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 532
    Points : 576
    Points
    576
    Par défaut
    Je répond a ta deuxième question : tu as juste a coder la jsp ^^

    EDIT : je vais essayer de t'aider pour ton serveur tomcat, même si je te conseille de le réinstaller entièrement.
    Le problème vient du fait qu'il ne trouve pas le server.xml. Voila un exemple de fichier server.xml pour tomcat 5.5, tu n'aura plus qu'a le placer au bon endroit :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Example Server Configuration File --><!-- Note that component elements are nested corresponding to their
         parent-child relationships with each other --><!-- A "Server" is a singleton element that represents the entire JVM,
         which may contain one or more "Service" instances.  The Server
         listens for a shutdown command on the indicated port.
     
         Note:  A "Server" is not itself a "Container", so you may not
         define subcomponents such as "Valves" or "Loggers" at this level.
     --><Server port="8005" shutdown="SHUTDOWN">
     
      <!-- Comment these entries out to disable JMX MBeans support used for the 
           administration web application -->
      <Listener className="org.apache.catalina.core.AprLifecycleListener"/>
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
      <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
     
      <!-- Global JNDI resources -->
      <GlobalNamingResources>
     
        <!-- Test entry for demonstration purposes -->
        <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
     
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users -->
        <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
     
      </GlobalNamingResources>
     
      <!-- A "Service" is a collection of one or more "Connectors" that share
           a single "Container" (and therefore the web applications visible
           within that Container).  Normally, that Container is an "Engine",
           but this is not required.
     
           Note:  A "Service" is not itself a "Container", so you may not
           define subcomponents such as "Valves" or "Loggers" at this level.
       -->
     
      <!-- Define the Tomcat Stand-Alone Service -->
      <Service name="Catalina">
     
        <!-- A "Connector" represents an endpoint by which requests are received
             and responses are returned.  Each Connector passes requests on to the
             associated "Container" (normally an Engine) for processing.
     
             By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
             You can also enable an SSL HTTP/1.1 Connector on port 8443 by
             following the instructions below and uncommenting the second Connector
             entry.  SSL support requires the following steps (see the SSL Config
             HOWTO in the Tomcat 5 documentation bundle for more detailed
             instructions):
             * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
               later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
             * Execute:
                 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
                 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
               with a password value of "changeit" for both the certificate and
               the keystore itself.
     
             By default, DNS lookups are enabled when a web application calls
             request.getRemoteHost().  This can have an adverse impact on
             performance, so you can disable it by setting the
             "enableLookups" attribute to "false".  When DNS lookups are disabled,
             request.getRemoteHost() will return the String version of the
             IP address of the remote client.
        -->
     
        <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
        <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8180" redirectPort="8443"/>
        <!-- Note : To disable connection timeouts, set connectionTimeout value
         to 0 -->
     
    	<!-- Note : To use gzip compression you could set the following properties :
     
    			   compression="on" 
    			   compressionMinSize="2048" 
    			   noCompressionUserAgents="gozilla, traviata" 
    			   compressableMimeType="text/html,text/xml"
    	-->
     
        <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
        <!--
        <Connector port="8443" maxHttpHeaderSize="8192"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" disableUploadTimeout="true"
                   acceptCount="100" scheme="https" secure="true"
                   clientAuth="false" sslProtocol="TLS" />
        -->
     
        <!-- Define an AJP 1.3 Connector on port 8009 -->
        <Connector enableLookups="false" port="8009" protocol="AJP/1.3" redirectPort="8443"/>
     
        <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
        <!-- See proxy documentation for more information about using this. -->
        <!--
        <Connector port="8082" 
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" acceptCount="100" connectionTimeout="20000"
                   proxyPort="80" disableUploadTimeout="true" />
        -->
     
        <!-- An Engine represents the entry point (within Catalina) that processes
             every request.  The Engine implementation for Tomcat stand alone
             analyzes the HTTP headers included with the request, and passes them
             on to the appropriate Host (virtual host). -->
     
        <!-- You should set jvmRoute to support load-balancing via AJP ie :
        <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">         
        --> 
     
        <!-- Define the top level container in our container hierarchy -->
        <Engine defaultHost="localhost" name="Catalina">
     
          <!-- The request dumper valve dumps useful debugging information about
               the request headers and cookies that were received, and the response
               headers and cookies that were sent, for all requests received by
               this instance of Tomcat.  If you care only about requests to a
               particular virtual host, or a particular application, nest this
               element inside the corresponding <Host> or <Context> entry instead.
     
               For a similar mechanism that is portable to all Servlet 2.4
               containers, check out the "RequestDumperFilter" Filter in the
               example application (the source for this filter may be found in
               "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
     
               Request dumping is disabled by default.  Uncomment the following
               element to enable it. -->
          <!--
          <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
          -->
     
          <!-- Because this Realm is here, an instance will be shared globally -->
     
          <!-- This Realm uses the UserDatabase configured in the global JNDI
               resources under the key "UserDatabase".  Any edits
               that are performed against this UserDatabase are immediately
               available for use by the Realm.  -->
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
     
          <!-- Comment out the old realm but leave here for now in case we
               need to go back quickly -->
          <!--
          <Realm className="org.apache.catalina.realm.MemoryRealm" />
          -->
     
          <!-- Replace the above Realm with one of the following to get a Realm
               stored in a database and accessed via JDBC -->
     
          <!--
          <Realm  className="org.apache.catalina.realm.JDBCRealm"
                 driverName="org.gjt.mm.mysql.Driver"
              connectionURL="jdbc:mysql://localhost/authority"
             connectionName="test" connectionPassword="test"
                  userTable="users" userNameCol="user_name" userCredCol="user_pass"
              userRoleTable="user_roles" roleNameCol="role_name" />
          -->
     
          <!--
          <Realm  className="org.apache.catalina.realm.JDBCRealm"
                 driverName="oracle.jdbc.driver.OracleDriver"
              connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
             connectionName="scott" connectionPassword="tiger"
                  userTable="users" userNameCol="user_name" userCredCol="user_pass"
              userRoleTable="user_roles" roleNameCol="role_name" />
          -->
     
          <!--
          <Realm  className="org.apache.catalina.realm.JDBCRealm"
                 driverName="sun.jdbc.odbc.JdbcOdbcDriver"
              connectionURL="jdbc:odbc:CATALINA"
                  userTable="users" userNameCol="user_name" userCredCol="user_pass"
              userRoleTable="user_roles" roleNameCol="role_name" />
          -->
     
          <!-- Define the default virtual host
               Note: XML Schema validation will not work with Xerces 2.2.
           -->
          <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
     
            <!-- Defines a cluster for this node,
                 By defining this element, means that every manager will be changed.
                 So when running a cluster, only make sure that you have webapps in there
                 that need to be clustered and remove the other ones.
                 A cluster has the following parameters:
     
                 className = the fully qualified name of the cluster class
     
                 clusterName = a descriptive name for your cluster, can be anything
     
                 mcastAddr = the multicast address, has to be the same for all the nodes
     
                 mcastPort = the multicast port, has to be the same for all the nodes
     
                 mcastBindAddress = bind the multicast socket to a specific address
     
                 mcastTTL = the multicast TTL if you want to limit your broadcast
     
                 mcastSoTimeout = the multicast readtimeout 
     
                 mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
     
                 mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
     
                 tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes 
     
                 tcpListenAddress = the listen address (bind address) for TCP cluster request on this host, 
                                    in case of multiple ethernet cards.
                                    auto means that address becomes
                                    InetAddress.getLocalHost().getHostAddress()
     
                 tcpListenPort = the tcp listen port
     
                 tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
                                      has a wakup bug in java.nio. Set to 0 for no timeout
     
                 printToScreen = true means that managers will also print to std.out
     
                 expireSessionsOnShutdown = true means that 
     
                 useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
                                false means to replicate the session after each request.
                                false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
                                <%
                                HashMap map = (HashMap)session.getAttribute("map");
                                map.put("key","value");
                                %>
                 replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
                                   * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
                                   * Synchronous means that the thread that executes the request, is also the
                                   thread the replicates the data to the other nodes, and will not return until all
                                   nodes have received the information.
                                   * Asynchronous means that there is a specific 'sender' thread for each cluster node,
                                   so the request thread will queue the replication request into a "smart" queue,
                                   and then return to the client.
                                   The "smart" queue is a queue where when a session is added to the queue, and the same session
                                   already exists in the queue from a previous request, that session will be replaced
                                   in the queue instead of replicating two requests. This almost never happens, unless there is a 
                                   large network delay.
            -->             
            <!--
                When configuring for clustering, you also add in a valve to catch all the requests
                coming in, at the end of the request, the session may or may not be replicated.
                A session is replicated if and only if all the conditions are met:
                1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
                2. a session exists (has been created)
                3. the request is not trapped by the "filter" attribute
     
                The filter attribute is to filter out requests that could not modify the session,
                hence we don't replicate the session after the end of this request.
                The filter is negative, ie, anything you put in the filter, you mean to filter out,
                ie, no replication will be done on requests that match one of the filters.
                The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
     
                filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
                ending with .gif and .js are intercepted.
     
                The deployer element can be used to deploy apps cluster wide.
                Currently the deployment only deploys/undeploys to working members in the cluster
                so no WARs are copied upons startup of a broken node.
                The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
                When a new war file is added the war gets deployed to the local instance,
                and then deployed to the other instances in the cluster.
                When a war file is deleted from the watchDir the war is undeployed locally 
                and cluster wide
            -->
     
            <!--
            <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                     managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                     expireSessionsOnShutdown="false"
                     useDirtyFlag="true"
                     notifyListenersOnReplication="true">
     
                <Membership 
                    className="org.apache.catalina.cluster.mcast.McastService"
                    mcastAddr="228.0.0.4"
                    mcastPort="45564"
                    mcastFrequency="500"
                    mcastDropTime="3000"/>
     
                <Receiver 
                    className="org.apache.catalina.cluster.tcp.ReplicationListener"
                    tcpListenAddress="auto"
                    tcpListenPort="4001"
                    tcpSelectorTimeout="100"
                    tcpThreadCount="6"/>
     
                <Sender
                    className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                    replicationMode="pooled"
                    ackTimeout="15000"
                    waitForAck="true"/>
     
                <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
                       filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
     
                <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                          tempDir="/tmp/war-temp/"
                          deployDir="/tmp/war-deploy/"
                          watchDir="/tmp/war-listen/"
                          watchEnabled="false"/>
     
                <ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
            </Cluster>
            -->        
     
     
     
            <!-- Normally, users must authenticate themselves to each web app
                 individually.  Uncomment the following entry if you would like
                 a user to be authenticated the first time they encounter a
                 resource protected by a security constraint, and then have that
                 user identity maintained across *all* web applications contained
                 in this virtual host. -->
            <!--
            <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
            -->
     
            <!-- Access log processes all requests for this virtual host.  By
                 default, log files are created in the "logs" directory relative to
                 $CATALINA_HOME.  If you wish, you can specify a different
                 directory with the "directory" attribute.  Specify either a relative
                 (to $CATALINA_HOME) or absolute path to the desired directory.
            -->
            <!--
            <Valve className="org.apache.catalina.valves.AccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
            -->
     
            <!-- Access log processes all requests for this virtual host.  By
                 default, log files are created in the "logs" directory relative to
                 $CATALINA_HOME.  If you wish, you can specify a different
                 directory with the "directory" attribute.  Specify either a relative
                 (to $CATALINA_HOME) or absolute path to the desired directory.
                 This access log implementation is optimized for maximum performance,
                 but is hardcoded to support only the "common" and "combined" patterns.
            -->
            <!--
            <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
            -->
     
          </Host>
     
        </Engine>
     
      </Service>
     
    </Server>

  3. #3
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    C'est pire que pire :
    J'avais installé avant un Apache normal donc je me suis dit peut etre que ca faisait un conflit avec la version Tomcat donc J'ai essayé de désinstaller mon Apache :
    pour celà je vais dans synaptic et je clique sur désintallation compléte.

    Puis j'ai essayé de réinstaller mon Tomcat :
    pour celà je vais dans synaptic et je clique sur désintallation compléte.
    et je recommence les étapes d'installation sur le tuto de ubuntu-fr (http://doc.ubuntu-fr.org/tomcat).

    Choses bizarres :
    1) les dossiers Apache sont tjrs présents et je peux accéder à la page localhost ( adresse qu'utiliser Apa). (malgré la désintallation compléte)

    2) Juste avant la réinstallation de Tomcat, je me rends compte que malgrè la désintallation compléte, les dossiers sont toujours là.

    Résultat apres réinstallation: page blanche lorsque j'essais d'avoir accès à mon Tomcat (localhost:8180)

    Autre remarque :
    Avant de crasher tout : le fichier server.xml existait bien ds mon répertoire
    /usr/share/tomcat5.5/conf .
    Je pense que le soucis venait de ma configuration Eclipse non ?

    S ... O ... S

  4. #4
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    Bon alors voilà ce que j'ai trouvé sur un autre forum :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
     
    QUESTION :
     
    je peux démarrer tomcat localhost:8080 donne une page blanche ainsi que admin ou manager (j'ai creer un utilisateur admin)
     
    je remarque qu'il n'y a pas de fichier /var/log/tomcat5.5/catalina.out
     
    est-ce normal ?
     
    en tout les cas comment aller sur l'interface d'admin
     
    merci
     
    REPONSE:
    pour la page blanche c est peut etre normal, verifie si dans le repertoire $tOMCAT_HOME/conf/Catalina/localhost/.. si il y a les fichiers de deploiements.
    Et effectivement , je n'ai rien dans ce repertoire : ma question est "qu'est ce que je devrais avoir ?" pour pouvoir le rajouter.
    Merci

    ps: J'ai essayé de désintaller réinstaller plusieurs fois mais j'ai toujours la page blanche.
    Ce qui est bizarre c'est que lors de la toute premiere installation, je n'ai rencontré aucuns soucis sauf le problème objet de mon premier message.

  5. #5
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    suite de l'épisode :
    J'ai tout désintallé et je suis passé par les paquets du site de Tomcat:
    j'ai installé le .zip : apache-tomcat-5.5.26.zip (même pas encore le admin et le manager)
    j'ai un problème de port: j'ai le log :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    ellipse :[début du log]
    13 mars 2008 15:12:59 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/19  config=null
    13 mars 2008 15:12:59 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    13 mars 2008 15:12:59 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1239 ms
    13 mars 2008 15:12:59 org.apache.catalina.core.StandardServer await
    GRAVE: StandardServer.await: create[8005]: 
    java.net.BindException: Address already in use
    
    [fin du log]
    donc dans le server.xml : je change :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
     
        <Connector port="8081" maxHttpHeaderSize="8192"
     
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
     
                   enableLookups="false" redirectPort="8443" acceptCount="100"
     
                   connectionTimeout="20000" disableUploadTimeout="true" />
     
        <!-- Note : To disable connection timeouts, set connectionTimeout value
     
         to 0 -->
    quand je lance localhost:8081 ==> marche toujours pas . MAIS j'ai pas de page blanche (alléluia) j'ai "erreur de chargement

  6. #6
    Membre confirmé Avatar de JoloKossovar
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    532
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 532
    Points : 576
    Points
    576
    Par défaut
    Ce n'est pas un probleme de port mais d'adresse ip.
    java.net.BindException: Address already in use

  7. #7
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    il faudrait que je change quoi alors ?? Le localhost ? ou le 8080 ?

  8. #8
    Membre confirmé Avatar de JoloKossovar
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    532
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 532
    Points : 576
    Points
    576
    Par défaut
    hummmm . essai de mettre ta vrai ip a la place de localhost. Si ça ne fonctionne pas essai de changer d'adresse ip. Et de toute facon , avant de faire tout ca changer ton port dans le server.xml, ala place de 8080 met 8180.

  9. #9
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    Bon sang , ca marche pas : je comprend vraiment pas d'où ca vient ...
    Pourtant à la première install, ca marchait presque ...
    Qd j'essais de désintaller ca s'efface pas de manière propre ...
    J'ai essayé tes conseils sauf le changement d'IP et ca marche pas.
    Bon allez je rentre chez moi, j'ai passé la journée sur ça et ça marche toujours pas.
    O désespoir !!

  10. #10
    Membre confirmé Avatar de JoloKossovar
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    532
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 532
    Points : 576
    Points
    576
    Par défaut
    Oui et bien change d ip car le message d'erreur est assez explicit quand meme :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    java.net.BindException: Address already in use
    ^^

  11. #11
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    J'aimerai bien le faire mais je ne sais pas comment le faire :s

    De plus quand je fais:
    sh startup.sh

    ds le /bin
    j'ai la réponse suivante :
    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    At least one of these environment variable is needed to run this program

    pourtant quand j'ai l'impression que lors du premier startup.sh il m'avait bien attribué les bons chemins pour ces variables.

    En gros, des messages d'erreur en veux tu en voilà !
    C'est grave si j'ai installé mon apache ds /opt ?

  12. #12
    Membre confirmé Avatar de JoloKossovar
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    532
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 532
    Points : 576
    Points
    576
    Par défaut
    Ha ca c'est rien Un exemple de comment faire : (les chemin ne sont pas bon, faudra que tu remplace par les bon chemins).

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    setenv JAVA_HOME "/usr/java/jre1.5.0_05"
    setenv PATH "$PATH:$JAVA_HOME/bin"

  13. #13
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    tu es sur que c'est setenv ??
    Parce que j'ai : setenv: command not found

    Mais quand je fais set + tab : il y a :

    set setleds setterm
    setarch setlogcons setupcon
    setfont setmetamode setvesablank
    setkeycodes setpci setxkbmap
    set-language-env setsid


    J'ai essayé set-language-env (comme c'est celui qui ressemblait le plus) et j'ai :
    set-language-env JAVA_HOME "/usr/lib/jvm/java-6-sun-1.6.0.00/jre/"
    Setting up users' native language environment
    by modifying their dot-files.
    Type "set-language-env -h" for help.

    The root user should not run set-language-env
    because this modifies your dot-files.
    If you surely want to run set-language-env,
    invoke with '-R' or '-E' option.


    3ieme edit mais déso :
    J'ai vu ca sur un autre forum:
    http://www.linuxquestions.org/questi...efined-557410/

  14. #14
    Membre confirmé Avatar de JoloKossovar
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    532
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 532
    Points : 576
    Points
    576
    Par défaut
    houla ^^ la tu viens d essayer de changer la variable de langage lol
    Documente toi plutot que de faire n importe quoi
    Pour les variable d'environnement va voir la
    http://linux-wizard.net/faq.php?section=5&key=java

  15. #15
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    Merci de ton aide ,
    Je vais essayer d'appliquer à la lettre l'install de ton lien (en changeant les chemin quand il le faut bien sur ) et je t'en donnerai des nouvelles demain.


    Déjà des erreurs lors de l'install de jre-1.5 !!! :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     
    inflating: jre-1_5_0_15-linux-i586.rpm  
    erreur: Dépendances requises:
    	glibc >= 2.1.2-11 est nécessaire pour jre-1.5.0_15-fcs.i586
    	sh-utils >= 2.0-1 est nécessaire pour jre-1.5.0_15-fcs.i586
    	fileutils >= 4.0-8 est nécessaire pour jre-1.5.0_15-fcs.i586
    	gawk >= 3.0.4-1 est nécessaire pour jre-1.5.0_15-fcs.i586
    	textutils >= 2.0-2 est nécessaire pour jre-1.5.0_15-fcs.i586
    	/bin/sh est nécessaire pour jre-1.5.0_15-fcs.i586
     
    Done.

    J'ai installé :
    fileutils >= 4.0-8 est nécessaire pour jre-1.5.0_15-fcs.i586
    gawk >= 3.0.4-1 est nécessaire pour jre-1.5.0_15-fcs.i586
    textutils >= 2.0-2 est nécessaire pour jre-1.5.0_15-fcs.i586

    grâce à synaptic mais les autres ne se trouvent pas dans les paquets.

    De plus, peux tu m'expliquer pourquoi je dois installer cette version car je l'ai déjà:
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre

    Tu penses que c'est un mauvais paramétrage ?

  16. #16
    Membre confirmé Avatar de JoloKossovar
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    532
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 532
    Points : 576
    Points
    576
    Par défaut
    Ca marche ^^ a demain je vais filer aussi moa ^^

  17. #17
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    Je me permets de refaire le même message (enfin que la fin) parce que j'ai l'impression que tu ne l'as pas vu

    J'ai installé :
    fileutils >= 4.0-8 est nécessaire pour jre-1.5.0_15-fcs.i586
    gawk >= 3.0.4-1 est nécessaire pour jre-1.5.0_15-fcs.i586
    textutils >= 2.0-2 est nécessaire pour jre-1.5.0_15-fcs.i586

    grâce à synaptic mais les autres ne se trouvent pas dans les paquets.

    De plus, peux tu m'expliquer pourquoi je dois installer cette version car je l'ai déjà fait (à partir des paquets):
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre
    et même le 6:
    /usr/lib/jvm/java-6-sun/jre

    Tu penses que c'est un mauvais paramétrage ?



    Bon suite : je me suis dit je vais refaire tout bien :
    vérifier que le JAVA_HOME est correcte:
    JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.00"
    export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.00/"

    /etc/default/tomcat5.5 qui me donne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
     
    # Run Tomcat as this user ID. Not setting this or leaving it blank will use the
    # default of tomcat55.
    #TOMCAT5_USER=tomcat55
     
    # The home directory of the Java development kit (JDK). You need at least
    # JDK version 1.4. If JAVA_HOME is not set, some common directories for 
    # the Sun JDK, various J2SE 1.4 versions, and the free runtimes
    # java-gcj-compat-dev and kaffe are tried.
    #JAVA_HOME=/usr/lib/jvm/java-6-sun
     
    # Directory for per-instance configuration files and webapps. It contain the
    # directories conf, logs, webapps, work and temp. See RUNNING.txt for details.
    # Default: /var/lib/tomcat5.5
    #CATALINA_BASE=/var/lib/tomcat5.5
     
    # Arguments to pass to the Java virtual machine (JVM).
    #JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
     
    # Java compiler to use for translating JavaServer Pages (JSPs). You can use all
    # compilers that are accepted by Ant's build.compiler property.
    #JSP_COMPILER=jikes
     
    # Use the Java security manager? (yes/no, default: yes)
    # WARNING: Do not disable the security manager unless you understand
    # the consequences!
    # NOTE: java-gcj-compat-dev currently doesn't support a security
    # manager. 
    #TOMCAT5_SECURITY=yes
    sudo /etc/init.d/tomcat5.5 restart
    me renvoie ceci:
    * invalid CATALINA_BASE specified

    euh ???

  18. #18
    Membre régulier Avatar de fripette
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 241
    Points : 71
    Points
    71
    Par défaut
    Bon c'est partiellement résolu : je dois rerentrer mes variables d'environnements à chaque fois :va savoir pourquoi !!
    Il y a un lien qui apperemment permet de faire un ti script bash (http://www.xenetis.org/installation_...ux_debian.html).
    J'ai l'admin qui marche pas non plus mais doucement mais surement.
    Conclusion : persister et bien rerentrer les variables d'environnements.

  19. #19
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    9
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 9
    Points : 11
    Points
    11
    Par défaut
    Suite à la réinstallation de ton tomcat tu avais un message assez explicite qui te précisait que l'adresse était déjà utilisée, à cela 2 causes probables:
    Il y a au minium 2 ports utilisés par Tomcat par défaut le 8080 et le 8005 (pour le shutdown), tu devais donc tout simplement avoir déjà un service sur l'un de ces ports, de plus quand tu précise ta modification du fichier server.xml d'après ce que je vois tu n'as pas modifié correctement ton fichier, c'était le shutdown 8005 qui était à modifier (à l'origine du message lol)

    Tu es sous linux a priori, tu peux donc faire un lsof depuis le terminal et voir ce que tu as sur les ports TCP en question

    Jean

Discussions similaires

  1. [EJB] erreur "java.lang.reflect.InvocationTargetException"
    Par debloc dans le forum Glassfish et Payara
    Réponses: 8
    Dernier message: 22/01/2014, 20h57
  2. Réponses: 2
    Dernier message: 28/12/2012, 15h37
  3. Réponses: 0
    Dernier message: 19/04/2010, 16h59
  4. Réponses: 0
    Dernier message: 27/05/2009, 20h32
  5. erreur avec java.lang.reflect.InvocationTargetException
    Par PeterEMF dans le forum Services Web
    Réponses: 0
    Dernier message: 24/10/2008, 12h50

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo