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

Tapestry Java Discussion :

Tapestry + Jetty


Sujet :

Tapestry Java

  1. #1
    Membre du Club
    Inscrit en
    Octobre 2008
    Messages
    108
    Détails du profil
    Informations forums :
    Inscription : Octobre 2008
    Messages : 108
    Points : 54
    Points
    54
    Par défaut Tapestry + Jetty
    Bonjour tout le monde,
    je travail sur un projet tapestry 5 + jboss 6 mais pour gagner du temps je fais un run jetty chaque fois qu'il y aura un changement dans mon code (je déploie mon projet sur jetty) mais je ne sais pas pourquoi ca ne marche pas! voila le code de l'erreur:
    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
     
    2012-07-30 09:03:49.280:WARN::Config error at <New id="db-ds" class="org.mortbay.jetty.plus.naming.Resource"><Arg/><Arg>java:db-ds</Arg><Arg>|??? <New class="com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource"><Set name="URL">jdbc:sqlserver://192.168.1.42:1433;databaseName=*****;user=****;password=*****</Set></New>|??</Arg></New> java.lang.ClassNotFoundException: org.mortbay.jetty.plus.naming.Resource
    Exception happened when loading Jetty.xml:
    java.lang.ClassNotFoundException: org.mortbay.jetty.plus.naming.Resource
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    	at org.mortbay.util.Loader.loadClass(Loader.java:91)
    	at org.mortbay.xml.XmlConfiguration.nodeClass(XmlConfiguration.java:224)
    	at org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:572)
    	at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
    	at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:190)
    	at runjettyrun.Bootstrap.main(Bootstrap.java:82)
    2012-07-30 09:03:49.281:INFO::jetty-6.1.26

  2. #2
    Membre actif
    Avatar de vahid
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    228
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 228
    Points : 276
    Points
    276
    Par défaut
    Salut
    Ce probleme est un problème indépendant de Tapestry.
    Il semble que tu utilise une classe qui n'existe pas pour la version Jetty que tu lances.
    Revois ton fichier xml de configuration.
    Cdt,
    Non, Vahid n'est pas mon prénom
    c' est gratuit , aussi

  3. #3
    Membre du Club
    Inscrit en
    Octobre 2008
    Messages
    108
    Détails du profil
    Informations forums :
    Inscription : Octobre 2008
    Messages : 108
    Points : 54
    Points
    54
    Par défaut
    voila mon jetty.xml:
    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
     
    <?xml version="1.0"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
     
    <!-- =============================================================== -->
    <!-- Configure the Jetty Server                                      -->
    <!--                                                                 -->
    <!-- Documentation of this file format can be found at:              -->
    <!-- http://docs.codehaus.org/display/JETTY/jetty.xml                -->
    <!--                                                                 -->
    <!-- =============================================================== -->
     
     
    <Configure id="Server" class="org.mortbay.jetty.Server">
     
        <!-- =========================================================== -->
        <!-- Server Thread Pool                                          -->
        <!-- =========================================================== -->
        <Set name="ThreadPool">
     
          <New class="org.mortbay.thread.QueuedThreadPool">
            <Set name="minThreads">10</Set>
            <Set name="maxThreads">200</Set>
            <Set name="lowThreads">20</Set>
          </New>
     
          <!-- Optional Java 5 bounded threadpool with job queue 
          <New class="org.mortbay.thread.concurrent.ThreadPool">
            <Set name="corePoolSize">50</Set>
            <Set name="maximumPoolSize">50</Set>
          </New>
          -->
        </Set>
     
     
     
        <!-- =========================================================== -->
        <!-- Set connectors                                              -->
        <!-- =========================================================== -->
        <!-- One of each type!                                           -->
        <!-- =========================================================== -->
     
        <!-- Use this connector for many frequently idle connections
             and for threadless continuations.
        -->    
        <Call name="addConnector">
        <Arg>
            <New class="org.mortbay.jetty.nio.SelectChannelConnector">
                <Set name="host"><SystemProperty name="jetty.host" /></Set>
                <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
                <Set name="maxIdleTime">30000</Set>
                <Set name="Acceptors">2</Set>
                <Set name="statsOn">false</Set>
                <Set name="confidentialPort">8443</Set>
                <Set name="lowResourcesConnections">5000</Set>
                <Set name="lowResourcesMaxIdleTime">5000</Set>
            </New>
        </Arg>
    </Call>
     
    	<New id="db-ds" class="org.mortbay.jetty.plus.naming.Resource">
    		<Arg></Arg>
    		<Arg>java:db-ds</Arg>
    		<Arg>
    			 <New class="com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource">
     
    				<Set name="URL">jdbc:sqlserver://192.168.1.42:1433;databaseName=dbname;user=user;password=pwd</Set>
     
    			</New>
    		</Arg>
       </New>
     
        <!-- Use this connector if NIO is not available. 
        <Call name="addConnector">
          <Arg>
              <New class="org.mortbay.jetty.bio.SocketConnector">
                <Set name="port">8081</Set>
                <Set name="maxIdleTime">50000</Set>
                <Set name="lowResourceMaxIdleTime">1500</Set>
              </New>
          </Arg>
        </Call>
        -->
     
        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <!-- To add a HTTPS SSL listener                                     -->
        <!-- see jetty-ssl.xml to add an ssl connector. use                  -->
        <!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml             -->
        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     
        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <!-- To allow Jetty to be started from xinetd                        -->
        <!-- mixin jetty-xinetd.xml:                                         -->
        <!--   java -jar start.jar etc/jetty.xml etc/jetty-xinetd.xml        -->
        <!--                                                                 -->
        <!-- See jetty-xinetd.xml for further instructions.                  -->
        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     
        <!-- =========================================================== -->
        <!-- Set up global session ID manager                            -->
        <!-- =========================================================== -->
        <!--
        <Set name="sessionIdManager">
          <New class="org.mortbay.jetty.servlet.HashSessionIdManager">
            <Set name="workerName">node1</Set>
          </New>
        </Set>
        -->
     
        <!-- =========================================================== -->
        <!-- Set handler Collection Structure                            --> 
        <!-- =========================================================== -->
        <Set name="handler">
          <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
            <Set name="handlers">
             <Array type="org.mortbay.jetty.Handler">
               <Item>
                 <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
               </Item>
               <Item>
                 <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
               </Item>
               <Item>
                 <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
               </Item>
             </Array>
            </Set>
          </New>
        </Set>
     
        <!-- =========================================================== -->
        <!-- Configure the context deployer                              -->
        <!-- A context deployer will deploy contexts described in        -->
        <!-- configuration files discovered in a directory.              -->
        <!-- The configuration directory can be scanned for hot          -->
        <!-- deployments at the configured scanInterval.                 -->
        <!--                                                             -->
        <!-- This deployer is configured to deploy contexts configured   -->
        <!-- in the $JETTY_HOME/contexts directory                       -->
        <!--                                                             -->
        <!-- =========================================================== -->
        <Call name="addLifeCycle">
          <Arg>
            <New class="org.mortbay.jetty.deployer.ContextDeployer">
              <Set name="contexts"><Ref id="Contexts"/></Set>
              <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
              <Set name="scanInterval">5</Set>
            </New>
          </Arg>
        </Call>
     
        <!-- =========================================================== -->
        <!-- Configure the webapp deployer.                              -->
        <!-- A webapp  deployer will deploy standard webapps discovered  -->
        <!-- in a directory at startup, without the need for additional  -->
        <!-- configuration files.    It does not support hot deploy or   -->
        <!-- non standard contexts (see ContextDeployer above).          -->
        <!--                                                             -->
        <!-- This deployer is configured to deploy webapps from the      -->
        <!-- $JETTY_HOME/webapps directory                               -->
        <!--                                                             -->
        <!-- Normally only one type of deployer need be used.            -->
        <!--                                                             -->
        <!-- =========================================================== -->
        <Call name="addLifeCycle">
          <Arg>
            <New class="org.mortbay.jetty.deployer.WebAppDeployer">
              <Set name="contexts"><Ref id="Contexts"/></Set>
              <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
    	  <Set name="parentLoaderPriority">false</Set>
    	  <Set name="extract">true</Set>
    	  <Set name="allowDuplicates">false</Set>
              <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
            </New>
          </Arg>
        </Call>
     
        <!-- =========================================================== -->
        <!-- Configure Authentication Realms                             -->
        <!-- Realms may be configured for the entire server here, or     -->
        <!-- they can be configured for a specific web app in a context  -->
        <!-- configuration (see $(jetty.home)/contexts/test.xml for an   -->
        <!-- example).                                                   -->
        <!-- =========================================================== -->
        <Set name="UserRealms">
          <Array type="org.mortbay.jetty.security.UserRealm">
            <Item>
              <New class="org.mortbay.jetty.security.HashUserRealm">
                <Set name="name">Test Realm</Set>
                <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
                <Set name="refreshInterval">0</Set>
              </New>
            </Item>
          </Array>
        </Set>
     
        <!-- =========================================================== -->
        <!-- Configure Request Log                                       -->
        <!-- Request logs  may be configured for the entire server here, -->
        <!-- or they can be configured for a specific web app in a       -->
        <!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
        <!-- for an example).                                            -->
        <!-- =========================================================== -->
        <Ref id="RequestLog">
          <Set name="requestLog">
            <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
              <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
              <Set name="filenameDateFormat">yyyy_MM_dd</Set>
              <Set name="retainDays">90</Set>
              <Set name="append">true</Set>
              <Set name="extended">false</Set>
              <Set name="logCookies">false</Set>
              <Set name="LogTimeZone">GMT</Set>
            </New>
          </Set>
        </Ref>
     
        <!-- =========================================================== -->
        <!-- extra options                                               -->
        <!-- =========================================================== -->
        <Set name="stopAtShutdown">true</Set>
        <Set name="sendServerVersion">true</Set>
        <Set name="sendDateHeader">true</Set>
        <Set name="gracefulShutdown">1000</Set>
     
    </Configure>
    Est ce que je dois ajouter le jar du mon data base qq part?

  4. #4
    Membre actif
    Avatar de vahid
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    228
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 228
    Points : 276
    Points
    276
    Par défaut
    Le problème est d'abord la classe Jetty utilisée :

    Voir le packaging suivant ta version sur le lien suivant http://wiki.eclipse.org/Jetty/Starti...es_and_Classes
    Non, Vahid n'est pas mon prénom
    c' est gratuit , aussi

  5. #5
    Membre du Club
    Inscrit en
    Octobre 2008
    Messages
    108
    Détails du profil
    Informations forums :
    Inscription : Octobre 2008
    Messages : 108
    Points : 54
    Points
    54
    Par défaut
    j'ai change ma classe
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <New id="db-ds" class="org.mortbay.jetty.plus.naming.Resource">
    en
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <New id="db-ds" class="org.eclipse.jetty.util.resource">
    et la meme erreur persiste

  6. #6
    Membre actif
    Avatar de vahid
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    228
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 228
    Points : 276
    Points
    276
    Par défaut
    Une classe qui commence par une minuscule ne fonctionnera pas.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <New id="db-ds" class="org.eclipse.jetty.plus.jndi.Resource">
    ca ne passe pas ?
    Non, Vahid n'est pas mon prénom
    c' est gratuit , aussi

  7. #7
    Membre du Club
    Inscrit en
    Octobre 2008
    Messages
    108
    Détails du profil
    Informations forums :
    Inscription : Octobre 2008
    Messages : 108
    Points : 54
    Points
    54
    Par défaut
    Merci beaucoup vahid pour tes reponses, il fallait que je change touts les classes dans mon jetty.xml et non seulement celui du datasource, j'ai suivit le lien et ca marche

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Jetty] [Debutant] Installation du serveur
    Par monsurf dans le forum Jetty
    Réponses: 1
    Dernier message: 26/12/2006, 18h00
  2. [jetty]pb pour utiliser l'exemple de mergere
    Par elitost dans le forum Maven
    Réponses: 6
    Dernier message: 06/09/2006, 21h42
  3. [Tapestry 4] Composant @For
    Par MasterMic dans le forum Tapestry
    Réponses: 1
    Dernier message: 16/05/2006, 15h08
  4. PHP sous Jetty ?
    Par vgaudeul dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 1
    Dernier message: 16/12/2005, 09h43
  5. [jsp][jetty]recuperer l'url dans la barre d'adresse
    Par maxvador dans le forum Servlets/JSP
    Réponses: 4
    Dernier message: 07/06/2004, 14h33

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