I have created Json response file in Company Home > Data Dictionary >
Web Scripts > org > alfresco > sample with the Name:
folder.get.json.ftl for one of the Alfresco Web
Script(http:// localhost:8080/alfresco/service/sample/folder/Company%20Home)according
to the guidelines mentioned in
http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Fws-json-add.html.
After successful addition of the webscript , i have refresh the
Webscripts.
Now when im tring to call this websrcipt using the URL
http:// localhost:8080/alfresco/service/sample/folder/Company%20Home?format=json
i am getting Internal Error(500).
Please help me out regarding this.
Thanks in Advance!!!!
Below is the stack trace
{
"status" :
{
"code" : 500,
"name" : "Internal Error",
"description" : "An error inside the HTTP server which prevented it from fulfilling the request."
},
"message" : "01270141 Wrapped Exception (with status template): 01270216 Error during processing of the template 'Expression verbose is undefined on line 12, column 14 in org\/alfresco\/sample\/folder.get.json.ftl.'. Please contact your system administrator.",
"exception" : "org.springframework.extensions.webscripts.WebScriptException - 01270141 Wrapped Exception (with status template): 01270216 Error during processing of the template 'Expression verbose is undefined on line 12, column 14 in org\/alfresco\/sample\/folder.get.json.ftl.'. Please contact your system administrator.",
"callstack" :
[
"" ,"freemarker.core.InvalidReferenceException: Expression verbose is undefined on line 12, column 14 in org\/alfresco\/sample\/folder.get.json.ftl."
,"freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)"
,"freemarker.core.Expression.isTrue(Expression.java:145)"
,"freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)"
,"freemarker.core.Environment.visit(Environment.java:221)"
,"freemarker.core.MixedContent.accept(MixedContent.java:92)"
,"freemarker.core.Environment.visit(Environment.java:221)"
,"freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)"
,"freemarker.core.Environment.visit(Environment.java:428)"
,"freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)"
,"freemarker.core.Environment.visit(Environment.java:221)"
,"freemarker.core.MixedContent.accept(MixedContent.java:92)"
,"freemarker.core.Environment.visit(Environment.java:221)"
,"freemarker.core.Environment.process(Environment.java:199)"
,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:202)"
,"org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:714)"
,"org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)"
,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)"
,"org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:400)"
,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:453)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:491)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:352)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)"
,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)"
,"javax.servlet.http.HttpServlet.service(HttpServlet.java:717)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)"
,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)"
,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)"
,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)"
,"org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)"
,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)"
,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)"
,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)"
,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)"
,"org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)"
,"org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)"
,"org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)"
,"java.lang.Thread.run(Thread.java:619)"
,"org.alfresco.service.cmr.repository.TemplateException: 01270216 Error during processing of the template 'Expression verbose is undefined on line 12, column 14 in org\/alfresco\/sample\/folder.get.json.ftl.'. Please contact your system administrator."
,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:206)"
,"org.springframework.extensions.webscripts.WebScriptException: 01270141 Wrapped Exception (with status template): 01270216 Error during processing of the template 'Expression verbose is undefined on line 12, column 14 in org\/alfresco\/sample\/folder.get.json.ftl.'. Please contact your system administrator."
,"org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:884)"
],
"server" : "Community v4.0.0 (a r30055) schema 5,016",
"time" : "Feb 27, 2012 9:53:23 AM"
}
The key line is:
freemarker.core.InvalidReferenceException: Expression verbose is undefined on line 12, column 14 in org/alfresco/sample/folder.get.json.ftl.
Your template, on line 12, character 14, you've referenced a variable "verbose" which doesn't exist. You should either set that variable in the model, or check if it's defined or not before using it.
Related
I'm using dada 2 version ‘1.22.0’ on windows 10, i have list of compressed (.gz ) fastq files, when i use the function filterAndTrim i get this error message :
Error in add(bin) : record does not start with '#'
But when i want to see if i can read th .gz file with library(ShortRead) :
library(ShortRead)
fn <- "path/to/example.fastq.gz"
reads <- readFastq(fn)
it doesn't give any error message message
I don't understand why the function filterAndTrim give the error message
Error in add(bin) : record does not start with '#'
Do you have any solution?
Objective
Refresh a partition using a query (override). Using these as a guide:
https://www.sqlbi.com/articles/using-process-add-in-tabular-models/
https://gist.github.com/dgosbell/a7bc9fe9ff5a99fdb4df5819b8760217#file-refresh-with-override-example-txt
Apparently the MS example is not correct: https://learn.microsoft.com/en-us/bi-reference/tmsl/refresh-command-tmsl#examples
TMSL Script
{
"refresh" : {
"type" : "add",
"objects" : [{
"database" : "dbname",
"table" : "tblname"
}
],
"overrides" : [{
"partitions" : [
{
"originalObject" : {
"database" : "dbname",
"table" : "tblname",
"partition" : "partname"
},
"source" : {
"query" :
"SELECT * FROM source.view WHERE date_field = '2014-12-06'"
}
}
]
}
]
}
}
Error Message
The JSON DDL request failed with the following error: Failed to execute XMLA. Error returned: 'The Process command for partition 'partname' in table 'tblname' cannot be executed because the pipeline rowset is missing.
'..
Technical Details:
RootActivityId: 89a6f9ac-e5d4-4eaa-b049-455190039b4b
Date (UTC): 6/28/2019 3:20:36 PM
0: PFError::SetLastError() line 2158 + 0x0 (sql\picasso\engine\src\pf\eh\pferror.cpp)
1: PFSetLastError() line 2906 + 0x0 (sql\picasso\engine\src\pf\eh\pferror.cpp)
2: ConvertExceptionsToPFResult<<lambda_764f81a97ea803a6bb1663c7971ce151> >() line 424 + 0x34 (sql\picasso\engine\src\pf\kernel\shared\pfshmacros.inl)
3: PFSetLastErrorExTag() line 3461 + 0x2e (sql\picasso\engine\src\pf\eh\pferror.cpp)
4: 0x00007FFAB599CC7E (symbolic name unavailable)
Other Info
Executed on SSMS directly and in Powershell (via Runbook) with same error message.
Question
What does this error message mean exactly? (It is very hard to find
helpful documentation.) Or, is there an alternative solution to refreshing
a partition using a query override?
You can only use either a Query or M partition sources
If you are using an M partition source the syntax is:
"source":{
"type":"m",
"expression":"…"
}
And if you are using a Query partition source the syntax is:
"source":{
"type":"query",
"query":"…",
"dataSource":"…"
}
I want to call a simple DOM file
I tested with another links and it works, but with this url it's not working.
My code is:
$bnadatos = file_get_html("http://www.rofex.com.ar/cem/FyO.aspx");
foreach($bnadatos->find('[#id="ctl00_ContentPlaceHolder1_gvFyO"]') as $i){
echo "datos:";
echo $i->innertext;
}
Response is a blank page.
What's wrong?
i solved with
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$response = file_get_html("https://www.rofex.com.ar/cem/FyO.aspx", false, stream_context_create($arrContextOptions));
foreach($response->find('[#id="ctl00_gvwDDF"]/tbody/tr[2]/td[2]') as $i){
echo $i->innertext;
}
thank you #maio290 for light my road
This is just a guess, but do you have your error reporting on?
Out of the box, this is not working with the simple-html-dom library:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/html/dom.php on line 83
Warning: file_get_contents(): Failed to enable crypto in /var/www/html/dom.php on line 83
Warning: file_get_contents(http://www.rofex.com.ar/cem/FyO.aspx): failed to open stream: operation failed in /var/www/html/dom.php on line 83
Fatal error: Call to a member function find() on boolean in /var/www/html/test.php on line 11
A fix for this can be found here - with that in place, I still get a blank page, which is due to a wrong answer (301 Moved Permanently) - for this to fix, you need to modify
'follow_location' => false
to
'follow_location' => true
so, now we get the proper site content - you can modify the selector to $html->find('#ctl00_ContentPlaceHolder1_gvFyO'); this will find all element which id=ctl00_ContentPlaceHolder1_gvFyO - see the documentation as reference.
I am using following code (MongoDB C# driver) to projects fields ,
where queryDocument = '{{ "FullName" : /myname/i }}'
BsonDocument projectionDefination = Builders.Projection.ToBsonDocument();
projectionDefination.Add(new BsonElement("FullName", "myname"));
collection.Find(queryDocument).Project(projectionDefination);
getting following error:
{"Command failed."}
{{ "_t" : "OKMongoResponse", "ok" : 0, "code" : 9, "errmsg" : "Syntax error, incorrect syntax near '9'.", "$err" : "Syntax error, incorrect syntax near '9'." }}
Can anyone update on this?
I also tried above with RoboMongo
Command: db.getCollection('Employee').find({ "FullName": /User/i}).projection({ "FullName" : "$FullName" })
Received following error:
Error: error: {
"_t" : "OKMongoResponse",
"ok" : 0,
"code" : 9,
"errmsg" : "Syntax error, incorrect syntax near '15'.",
"$err" : "Syntax error, incorrect syntax near '15'."
}
According to your description, I checked this issue and I could encounter the same issue:
As mongoDB document states about Projection in db.collection.find():
The projection parameter determines which fields are returned in the matching documents. The projection parameter takes a document of the following form:
{ field1: <value>, field2: <value> ... }
The <value> can be any of the following:
1 or true to include the field in the return documents.
0 or false to exclude the field.
Im trying to run freebase using python on Ubuntu 12.10 the first time. here's what i did
import freebase
query = {
"id" : "/en/the_beatles",
"type" : "/music/artist",
"album" : [{
"name" : None,
"release_date" : None,
"track": {
"return" : "count"
},
"sort" : "release_date"
}]
}
freebase.mqlread(query)
Here's that error i got
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/freebase-1.0.8-py2.7.egg/freebase/api/session.py", line 597, in mqlread
r = self._httpreq_json(service, 'POST', form=dict(query=qstr))
File "/usr/local/lib/python2.7/dist-packages/freebase-1.0.8-py2.7.egg/freebase/api/session.py", line 420, in _httpreq_json
resp, body = self._httpreq(*args, **kws)
File "/usr/local/lib/python2.7/dist-packages/freebase-1.0.8-py2.7.egg/freebase/api/session.py", line 406, in _httpreq
return self._http_request(url, method, body, headers)
File "/usr/local/lib/python2.7/dist-packages/freebase-1.0.8-py2.7.egg/freebase/api/httpclients.py", line 66, in call
self.log.error('SOCKET FAILURE: %s', e.fp.read())
AttributeError: 'error' object has no attribute 'fp'
Could anyone help me resolve this?
Thansk in advance
If you're using the old Python client library it won't work because Google never migrated it to work with the new APIs. You'll need to use the standard Google APIs Python library and the discovery interface.
https://developers.google.com/api-client-library/python/start/get_started