cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create site

mattsmith
Champ in-the-making
Champ in-the-making
Hi All,

I am unable to create a site from within share; I am prompted with the error below.

Could not create site
05150012 Wrapped Exception (with status template): 05150064 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js': null

Any Ideas?

Regards
Matt
5 REPLIES 5

mikeh
Star Contributor
Star Contributor
Not really enough detail to diagnose I'm afraid: what are the Site parameters? Which version are you using? Has this worked previously? Is there anything in the alfresco.log file?

Thanks,
Mike

mattsmith
Champ in-the-making
Champ in-the-making
Hi Mike,

I am currently using the latest version available on the download site today (3.3g)

I hadn't previously tried creating a site instaed i had just jumped in and users http://xx.xx.xx.xx:8080/alfresco

Below are the steps that i was performing

http://xx.xx.xx.xx:8080/share

sites – create site
- Name: test
- URL Name: test
Collaboration Site
Public

I then click 'OK' (That's when i get the error message from the previous post)

Below is an extract from the alfresco.log as I click OK.

15:59:26,632 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 05150015 Wrapped Exception (with status template): 05150111 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js': null
org.springframework.extensions.webscripts.WebScriptException: 05150015 Wrapped Exception (with status template): 05150111 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js': null
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:740)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:167)
   at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:367)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:417)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:434)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:298)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:319)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:177)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.scripts.ScriptException: 05150111 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js': null
   at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:183)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:268)
   at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
   at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:971)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
   … 21 more
Caused by: java.lang.NullPointerException
   at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:881)
   at org.alfresco.repo.site.SiteServiceImpl.getSiteRoot(SiteServiceImpl.java:569)
   at org.alfresco.repo.site.SiteServiceImpl.getSiteParent(SiteServiceImpl.java:525)
   at org.alfresco.repo.site.SiteServiceImpl.getSiteNodeRef(SiteServiceImpl.java:945)
   at org.alfresco.repo.site.SiteServiceImpl.getSiteImpl(SiteServiceImpl.java:872)
   at org.alfresco.repo.site.SiteServiceImpl.getSite(SiteServiceImpl.java:857)
   at org.alfresco.repo.site.script.ScriptSiteService.getSite(ScriptSiteService.java:173)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
   at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
   at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
   at org.mozilla.javascript.gen.c7._c1(file:/opt/Alfresco2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js:12)
   at org.mozilla.javascript.gen.c7.call(file:/opt/Alfresco2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js)
   at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
   at org.mozilla.javascript.gen.c7._c0(file:/opt/Alfresco2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js:64)
   at org.mozilla.javascript.gen.c7.call(file:/opt/Alfresco2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   at org.mozilla.javascript.gen.c7.call(file:/opt/Alfresco2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js)
   at org.mozilla.javascript.gen.c7.exec(file:/opt/Alfresco2/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:453)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:179)
   … 25 more


Thanks for such a quick response and i look forward to your reply.

Cheers
Matt

cujjjo
Champ in-the-making
Champ in-the-making
I'm getting a similar error, but only from within a tenant when creating a private site. Creating a public site works fine, as does creating a private site from within the normal share instance.

07260002 Failed to load script 'classpath*:alfresco/site-webscripts/org/alfresco/modules/create-site.post.json.js': 07260001 SyntaxError: missing ] after element list (file:/opt/alfresco-3.3/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/modules/create-site.post.json.js#17(eval)#29)


Then on trying to access in browser:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception
javax.servlet.ServletException: Could not resolve view with name 'site/privatesite2/dashboard' in servlet with name 'Spring Surf Dispatcher Servlet'
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1042)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

abhashree
Champ in-the-making
Champ in-the-making
hi mattsmith
sorry to responded ur post after long time..
i go through ur log files what i realised there  may be some problem in the create-site.post.json.js present in the path Alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/modules.pls check the file .
i am posting the file check ur file with that so if there will be any problem u can easily find out..
hope that will help to solve ur  problem..
create -site.post.json.js
function main()

{

   // Get clients json request as a "normal" js object literal

   var clientRequest = json.toString();

   var clientJSON = eval('(' + clientRequest + ')');



   // Call the repo to create the site

   var scriptRemoteConnector = remote.connect("alfresco");

   var repoResponse = scriptRemoteConnector.post("/api/sites", clientRequest, "application/json");

   if (repoResponse.status == 401)

   {

      status.setCode(repoResponse.status, "error.loggedOut");

      return;

   }

   else

   {

      var repoJSON = eval('(' + repoResponse + ')');



      // Check if we got a positive result

      if (repoJSON.shortName)

      {

         // Yes we did, now create the site in the webtier

         var tokens = new Array();

         tokens["siteid"] = repoJSON.shortName;

         sitedata.newPreset(clientJSON.sitePreset, tokens);



         model.success = true;

      }

      else if (repoJSON.status.code)

      {

         status.setCode(repoJSON.status.code, repoJSON.message);

         return;

      }

   }

}



main();

jrwilson
Champ in-the-making
Champ in-the-making
I experienced this same error. In working with Alfresco support, it was determined that the "Sites" space had been deleted from Company Home. If you don't see a "Sites" space in Company Home, you have the same problem I had.

The solution is to do a clean Alfresco install on some other computer (the community edition worked fine for this), and export the "Sites" space from Company Home. Then, import this file into Company Home on the computer with the problem.

Instructions on importing & exporting spaces can be found at http://wiki.alfresco.com/wiki/Export_and_Import.