Hi,

Leon Wang wrote:
> Dear XWiki Developers,

First of all, have you seen my reply to your last mail? It would be much 
easier if you would stick to a thread instead of opening new threads 
each time..

> 
> When I execute start_xwiki_debug.sh, it gives me this:
> 
> Starting Jetty on port 8080 ...
> Logs are in the ./xwiki.log file
> ERROR: transport error 202: bind failed: Address already in use
> ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
> JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized
> [../../../src/share/back/debugInit.c:690]
> FATAL ERROR in native method: JDWP No transports initialized,
> jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
> Aborted
> 

"Address already in use". In this context address means port. There are 
two ports used: one for the web server (8080 by default) and one for the 
remote debugging (5005 by default).

> However when I executed "start_xwiki.sh", it works. What should I do? Can

This means that the port being already in use is 5005. Do a

ps -aux | grep 5005

to see which process is using this port. You either stop it (if it's an 
older debug session you forgot to close) or change the remote debugging 
port in start_xwiki_debug.sh .

> you give me some suggestions? Also could you please tell me more about debug
> the XWiki wysiwyg editor?

I did (see my reply to your last mail), but is applies to the latest 
versions of XWiki Enterprise which use GWT 2.0. I see you're using XE 
2.1.1. You should consider upgrading.

> 
> When I try ./start_wysiwyg_noserver.sh, the gwt hosted mode edit gives me
> "[ERROR] Unable to find 'com/xpn/xwiki/wysiwyg/Wysiwyg.gwt.xml' on your
> classpath; could be a typo, or maybe you forgot to include a classpath entry
> for source?".

"maybe you forgot to include a classpath entry for source?"

If you look inside start_wysiwyg_noserver.sh script you'll see that it 
starts the hosted mode (GWT 1.7, development mode in GWT 2.0) with some 
jars in its class path. Most of the jars are referenced from your local 
maven repository. Make sure you have them in your local maven 
repository. The easiest way to do this is by building the WYSIWYG 
modules. When you build a maven module its artifacts (a single jar 
usually) is published to your local maven repository.

Also, make sure the variables defined at the beginning of 
start_wysiwyg_noserver.sh match your setup (e.g. GWT version, XE 
version, etc.)

All this applies to start_wysiwyg_noserver_debug.sh too.

> 
> I tried "start_wysiwyg_noserver_debug.sh". It gives me:
> freele...@eas-ben200-002:~/XWiki_Enterprise_2.1.1$
> ./start_wysiwyg_noserver_debug.sh

> ERROR: transport error 202: bind failed: Address already in use

Same as with the start_xwiki_debug.sh . See which process is using the 
5006 port and either close it or edit start_wysiwyg_noserver_debug.sh 
and change the port.

Hope this helps,
Marius

> ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
> JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized
> [../../../src/share/back/debugInit.c:690]
> FATAL ERROR in native method: JDWP No transports initialized,
> jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
> ./start_wysiwyg_noserver_debug.sh: line 33: 16915 Aborted
> $JAVA32_HOME/java -Xmx1024m -Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,address=5006,suspend=y -cp
> $APP_DIR/WEB-INF/lib/xwiki-web-wysiwyg-$XE_VERSION.jar:$M2_REPO/com/xpn/xwiki/platform/xwiki-web-wysiwyg/$XE_VERSION/xwiki-web-wysiwyg-$XE_VERSION-sources.jar:$M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/$XE_VERSION/xwiki-web-gwt-dom-$XE_VERSION.jar:$M2_REPO/org/xwiki/platform/xwiki-web-gwt-user/$XE_VERSION/xwiki-web-gwt-user-$XE_VERSION.jar:$M2_REPO/org/xwiki/platform/xwiki-core-component-api/$XE_VERSION/xwiki-core-component-api-$XE_VERSION.jar:$M2_REPO/com/google/gwt/gwt-incubator/july-14-2009/gwt-incubator-july-14-2009.jar:$M2_REPO/com/smartgwt/smartgwt/1.2/smartgwt-1.2.jar:$M2_REPO/com/google/gwt/gwt-dev/$GWT_VERSION/gwt-dev-$GWT_VERSION-linux.jar:$M2_REPO/com/google/gwt/gwt-user/$GWT_VERSION/gwt-user-$GWT_VERSION.jar
> com.google.gwt.dev.HostedMode -logLevel WARN -style DETAILED -noserver -port
> 8080 -startupUrl xwiki/$WYSIWYG_PATH/Wysiwyg.html
> com.xpn.xwiki.wysiwyg.Wysiwyg
> freele...@eas-ben200-002:~/XWiki_Enterprise_2.1.1$
> 
> Thank you guys in advance!
> 
> The start_xwiki_debug.sh script is attached for your reference:
> 
> --------------------------------------------------------------------------------
> 
> #!/bin/sh
> 
> # Ensure that the commands below are always started in the directory where
> this script is
> # located. To do this we compute the location of the current script.
> 
> PRG="$0"
> while [ -h "$PRG" ]; do
>   ls=`ls -ld "$PRG"`
>   link=`expr "$ls" : '.*-> \(.*\)$'`
>   if expr "$link" : '/.*' > /dev/null; then
>     PRG="$link"
>   else
>     PRG=`dirname "$PRG"`/"$link"
>   fi
> done
> PRGDIR=`dirname "$PRG"`
> cd "$PRGDIR"
> 
> JETTY_HOME=jetty
> JAVA_OPTS=-Xmx300m
> JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
> 
> # The port on which to start Jetty can be passed to this script as the first
> argument
> if [ -n "$1" ]; then
>   JETTY_PORT=$1
> else
>   JETTY_PORT=8080
> fi
> 
> # For enabling YourKit Profiling.
> # $3 must the path where Yourkit can find the agent.
> # For example: "/Applications/YourKit Java Profiler 7.0.11.app/bin/mac"
> # Note: you must also pass the port as $1 for now till we use getopts.
> if [ "$2" = "profiler" ]; then
>   JAVA_OPTS="$JAVA_OPTS -agentlib:yjpagent"
>   export DYLD_LIBRARY_PATH="$3"
> fi
> 
> echo Starting Jetty on port $JETTY_PORT ...
> echo Logs are in the $PRGDIR/xwiki.log file
> 
> # Ensure the logs directory exists as otherwise Jetty reports an error
> mkdir -p $JETTY_HOME/logs 2>/dev/null
> 
> # Specify port and key to stop a running Jetty instance
> JAVA_OPTS="$JAVA_OPTS -DSTOP.KEY=xwiki -DSTOP.PORT=8079"
> 
> java $JAVA_OPTS -Dfile.encoding=UTF8 -Djetty.port=$JETTY_PORT
> -Djetty.home=$JETTY_HOME -jar $JETTY_HOME/start.jar
> 
> --------------------------------------------------------------------------------
> 
> 
> 
> Jue Wang
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to