2014-07-02 57 views
1

我試圖將Jetty從7.6切換到9.2。碼頭9「 - 模塊」而不是「選項」

我閱讀並理解「OPTION」將不再有效。所以我改變了我的命令從

java -jar start.jar --ini **OPTIONS**=server,jmx,resources,websocket,ext,plus,jsp,annotations /u/khandela/project/base//etc/config/cometd/cometd_jetty_config.xml 

start.jar --ini **--module**=server,jmx,resources,websocket,ext,plus,jsp,annotations /u/khandela/project/base//etc/config/cometd/cometd_jetty_config.xml 

但我得到以下警告:

警告:**無法繼續,需要依賴失蹤。警告:**根據配置,Jetty無法啓動,因爲缺少啓用的模塊依賴關係。 警告:**這可能是由於npn上類似於spdy的傳遞依賴性,其基於

如何解決?

回答

2

您看到的關於[jsp-impl/${jsp-impl}-jsp]的錯誤是因爲當您請求啓動Jetty時未定義默認的jsp實現。

Jetty 9.2.x有2 different core JSP engines available

  • apache - Apache的碧玉JSP引擎(新碼頭默認)
  • glassfish - Glassfish的碧玉JSP引擎(原始版本中使用的碼頭現在已經過時/越野車和過時。)

Jetty 9.2中的行爲是強制用戶決定他們想要使用哪個實現。 這是一個錯誤,只是混淆希望以自己的方式來啓動碼頭用戶(即:不使用start.ini${jetty.base}記錄機制)

一個feature request was filed,和Jetty的9.2.1之後的下一個版本將採用默認值爲此值。自動選擇apache。與此同時,在等待Jetty 9.2.2(或9.3.0)時,添加一個定義要使用哪個jsp-impl的屬性。

$ start.jar --module=server,jmx,resources,websocket,ext,plus,jsp,annotations 
    jsp-impl=apache 
    /u/khandela/project/base/etc/config/cometd/cometd_jetty_config.xml 

注:擺脫--ini作爲不使用start.jar

0

我有類似的問題,在Netbeans的8.0啓動碼頭9.2.1。創建後JettyServer Jetty開始,當我添加到實際的Jetty Base Locationin到start.inijsp-impl=apache子句。

有完整的清單start.ini

#=========================================================== 
# Jetty start.jar arguments 
# 
# The contents of this file, together with the *.ini 
# files found in start.d directory are used to build 
# the classpath and command line on a call to 
# java -jar start.jar [arg...] 
# 
# Use the following command to see more options 
# java -jar start.jar --help 
# 
# Each line in these files is prepended to the command line 
# as arguments and may be either: 
# + A property like: name=value 
# + A module to enable like: --module=jmx 
# + An XML configuration file like: etc/jetty-feature.xml 
# + A start.jar option like: --dry-run 
# 
# If --exec or --dry-run are used, then this file may also 
# contain lines with: 
# + A JVM option like: -Xmx2000m 
# + A System Property like: -Dcom.sun.management.jmxremote 
# 
# The --add-to-start=module option can be used to append 
# a configuration template for a module to start.ini 
# The --add-to-startd=module option can be used to create 
# a configuration template for a module in start.d/module.ini 
# For example configure and run with SPDY use 
# 
# java -jar start.jar --add-to-startd=spdy 
# $EDITOR start.d/spdy.ini 
# java -jar start.jar 
# 
#=========================================================== 


# 
# Initialize module server 
# 
#--module=server 
--module=server,websocket,jsp,ext,jmx,resources,plus,annotations,commandmanager 
# removes bug 
jsp-impl=apache 
## Server Threading Configuration 
# minimum number of threads 
threads.min=10 
# maximum number of threads 
threads.max=200 
# thread idle timeout in milliseconds 
threads.timeout=60000 
# What host to listen on (leave commented to listen on all interfaces) 
#jetty.host=myhost.com 
# Dump the state of the Jetty server, components, and webapps after startup 
jetty.dump.start=false 
# Dump the state of the Jetty server, before stop 
jetty.dump.stop=false 

# 
# Initialize module deploy 
# 
--module=deploy 

# 
# Initialize module websocket 
# 
#--module=websocket 

# 
# Initialize module jsp 
# 
#--module=jsp 
# JSP Configuration 
# To use an non-jdk compiler for JSP compilation uncomment next line 
# -Dorg.apache.jasper.compiler.disablejsr199=true 

# 
# Initialize module ext 
# 
#--module=ext 

# 
# Initialize module resources 
# 
#--module=resources 

#--module=commandmanager 

通過比較原始start.ini文件,你看到中科院的差異。