To re-sync the templates you should do the following:

1)copy asadmin.bat.template and asadmin.template from tools/src/java/com/sun/enterprise/tools/cli. The script copy-templates.bat will perform this on a Windows system.

2)The following changes need to be made to all scripts:

    a) add appserv-se.jar to the classpath
    b) add -Dcom.sun.appserv.admin.pluggable.features=com.sun.enterprise.ee.admin.pluggable.EEClientPluggableFeatureImpl
    c) remove ;%PATH% from the set Path= on WINDOWS only ... The PE folks will realize one day that this causes problems if you have a space in your path. Unfortunately, this had to be done for stopserv.tomcat.bat.template as well.

I typically add to the end so that the diff will be easier to read.

5)Now we need to sync the startserv script used to start the server instance. Currently, stopserv is identical to the DAS startup, but startserv must perform instance re-sync.

    a) copy startserv.tomcat.bat.template and startserv.tomcat.template from admin/templates/pe80 and rename to startinstance.tomcat.bat.template and startinstance.tomcat.template. Again the copy-templates.bat script will perform this.

    b) perform any necessary customizations. The following should be added:

To startinsstance.tomcat.bat.template...

rem Synchronizes with Central Repository
"%JAVA_HOME%\bin\java" -classpath "%AS_INSTALL%\lib";"%AS_INSTALL%\lib\commons-launcher.jar";"%AS_INSTALL%\lib\appserv-admin.jar";"%AS_INSTALL%\lib\appserv-rt.jar";"%AS_ANT_LIB%\ant.jar";"%AS_ANT_LIB%\optional.jar";"%AS_INSTALL%\lib\endorsed\xercesImpl.jar";"%AS_INSTALL%\lib\endorsed\xalan.jar";"%AS_INSTALL%\lib\appserv-ext.jar";"%AS_INSTALL%\lib\javaee.jar";"%AS_INSTALL%\lib\appserv-se.jar";"%AS_INSTALL%\lib\appserv-ee.jar" -Dcom.sun.aas.installRoot="%AS_INSTALL%" -Dcom.sun.aas.instanceRoot="%INSTANCE_ROOT%" -Dcom.sun.aas.configRoot="%ASENV_CONF_LOCATION%" -DJAVA_HOME="%JAVA_HOME%" -Dcom.sun.aas.instanceName="%SERVER_NAME%" -Ddomain.name="%DOMAIN_NAME%" -DCATALINA_OPTS="%CATALINA_OPTS%" com.sun.enterprise.ee.synchronization.SynchronizationMain

And for startinstance.tomcat.template....

# Synchronizes with Central Repository
"$JAVA_HOME"/bin/java -classpath "$AS_INSTALL/lib":"$AS_INSTALL/lib/commons-launcher.jar":"$AS_INSTALL/lib/appserv-admin.jar":"$AS_INSTALL/lib/appserv-rt.jar":"$AS_ANT_LIB/ant.jar":"$AS_ANT_LIB/optional.jar":"$AS_INSTALL/lib/endorsed/xercesImpl.jar":"$AS_INSTALL/lib/endorsed/xalan.jar":"$AS_INSTALL/lib/appserv-ext.jar":"$AS_INSTALL/lib/javaee.jar":"$AS_INSTALL/lib/appserv-se.jar":"$AS_INSTALL/lib/appserv-ee.jar" -Dcom.sun.aas.installRoot="$AS_INSTALL" -Dcom.sun.aas.instanceRoot="$INSTANCE_ROOT" -Dcom.sun.aas.configRoot="$ASENV_CONF_LOCATION" -DJAVA_HOME="$JAVA_HOME" -Dcom.sun.aas.instanceName="$SERVER_NAME" -Ddomain.name="$DOMAIN_NAME" -DCATALINA_OPTS="$CATALINA_OPTS" com.sun.enterprise.ee.synchronization.SynchronizationMain

