AnsweredAssumed Answered

Alfresco Debugger startet nicht -> *Lösung*

Question asked by martinn on Aug 25, 2011
Mein System: Windows 7 64bit (Ent.), Alfresco 3.4d, Java JDK 6 update 27

Problem: Alfresco Debugger startet nicht und man erhält einen Status 500 internal Error

den Lösungsansatz fand ich im englischen Forum. Daher ist gleich die Detailbeschreibung in englischer Sprache verfasst.

1. Debugger will not start if Alfresco runs as a Service.
So stop the alfresco service and also the alfresco mysql service and set the startup property to "manual".
If you have configured a SSO it may be necessary to disable that.
On my machine there was an error
"java.lang.UnsatisfiedLinkError: org.alfresco.jlan.netbios.win32.Win32NetBIOS.GetLocalNetBIOSName()Ljava/lang/String;"
if I startet Alfresco as described below. After disabling SSO Alfresco started without error and also now I was able to start
the debugger.

2.change in c:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\ under "Repository" near line 241:

3.create alf_start.bat in c:\Alfresco  [adjust the path to your requirements] with content:
@echo off
rem —————————————————————————
rem Start script for the Alfresco Server
rem —————————————————————————

call "%~dp0alfresco.bat" start %1

4.create alf_stop.bat in c:\Alfresco with content:
@echo off
rem —————————————————————————
rem Stop script for the Alfresco Server
rem —————————————————————————

call "%~dp0alfresco.bat" stop %1

5. create alfresco.bat in c:\Alfresco with content
@echo off
rem —————————————————————————
rem Start script for the Alfresco Server
rem —————————————————————————

rem set Alfresco home (includes trailing \ e.g. c:\alfresco\)
set ALF_HOME=%~dps0

rem Set any default JVM options
set JAVA_OPTS=-Xms512m -Xmx512m -Xss512k -XX:MaxPermSize=256m -XX:NewSize=256m -server -Dalfresco.home=%ALF_HOME%

rem — If SetPaths.bat already exists - assume set by hand and use as is
if not exist "SetPaths.bat" goto getpaths
call SetPaths.bat
goto start

call RegPaths.exe
call SetPaths.bat
del SetPaths.bat

rem — Test for Java settings
rem — Reset errorlevel hack
verify >nul
call "%CATALINA_HOME%\bin\setclasspath.bat"
if errorlevel 1 goto error
rem —————————————
rem Start Components
rem —————————————

if not ""%1"" == ""start"" goto stop

if not exist "%ALF_HOME%mysql\my.ini" goto tomcat
rem —————————————
rem Start MySQL
rem —————————————
echo Starting MySQL…
start "MySQL" "%ALF_HOME%mysql\bin\mysqld" –defaults-file="%ALF_HOME%mysql\my.ini" –basedir="%ALF_HOME%mysql" –datadir="%ALF_HOME%mysql\data" –console

rem Uncomment below to pause for some seconds before starting Tomcat
rem Change 5 to the number of seconds delay required
rem ping -n 5 -w 1000 >NUL

rem —————————————
rem Start Tomcat
rem —————————————

echo Starting Tomcat…
call "%CATALINA_HOME%\bin\startup.bat"

rem ———————————
rem Start Virtualization if available
rem ———————————
rem if exist "~dp0virtual_start.bat" call "~dp0virtual_start.bat"

goto end


rem —————————————
rem Stop Components
rem —————————————

if not ""%1"" == ""stop"" goto nostop

echo Shutting down Tomcat…
call "%CATALINA_HOME%\bin\shutdown.bat"

if not exist "%ALF_HOME%mysql\my.ini" goto nextstop
if ""%2"" == ""nouser"" goto tomcatwait
set /P pause="Please wait until Tomcat has shut down, then press ENTER to continue…"
goto stopmysql
rem Change 10 to the number of seconds delay required
ping -n 10 -w 1000 >NUL

echo Stopping MySQL…
call "%ALF_HOME%mysql\bin\mysqladmin" -u root shutdown

rem if exist "virtual_start.bat" call virtual_stop.bat

goto end

echo Error encountered.
if ""%2"" == ""nouser"" goto end
set /P pause="Press ENTER to continue…"


6. create setPath.bat in c:\Alfresco with content and modify the last line so that it is pointing to
the dir on your machine where the JDK (!!!) is installed. Do not point to a JRE path!
REM Set Paths Utility - created by installer
SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_27

To start alfresco now doubleclick alf_start.bat in the explorer.
Wait a little time until alfresco is started completely.
And the debugger should start if you call the page http://localhost:8080/alfresco/s/ and there click on "Javascript debugger" and "enable" in the following page.