wso2 / jaggery Goto Github PK
View Code? Open in Web Editor NEWThe delicious Javascript framework
License: Apache License 2.0
The delicious Javascript framework
License: Apache License 2.0
I faced a integration test failure building the server from github source. Below is the trace[2]. Afterwards I built the server skipping tests.You can find the whole stacktrace at this link[1]. Thanks.
[1] - http://pastebin.com/5xtgnUk0
[2] -
java.io.FileNotFoundException: http://localhost:9763/testapp/application.jag
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1613)
at org.wso2.jaggery.integration.tests.hostObjects.ApplicationObjectTestCase.testApplication(ApplicationObjectTestCase.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
at org.testng.TestRunner.privateRun(TestRunner.java:757)
at org.testng.TestRunner.run(TestRunner.java:608)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
at org.testng.TestNG.run(TestNG.java:999)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:76)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:161)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:101)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
registry.addProperty(path, propName, value); method doesn't work in carbon module.
I try in jaggery:
var ws = require('ws');
var preadviceWS = new ws.WSRequest();
var options = new Array();
options.useSOAP = 1.2;
options.useWSA = 1.0;
options["rampart"] = {
user : 'usuario',
userPassword : 'clave',
};
options.action = "urn:getEstadoByTipo";
var payload = null;
preadviceWS.open(options, endpoint,false);
preadviceWS.send(payload);
return preadviceWS.responseXML;
to consume this "wso2 data service" and does not work, curious thing is that when I use a "mashup service" consuming the same service, with the same code it works
Mashup service (not requiere)
var preadviceWS = new ws.WSRequest();
var options = new Array();
options.useSOAP = 1.2;
options.useWSA = 1.0;
options["rampart"] = {
user : 'usuario',
userPassword : 'clave',
};
options.action = "urn:getEstadoByTipo";
var payload = null;
preadviceWS.open(options, endpoint,false);
preadviceWS.send(payload);
return preadviceWS.responseXML;
Hello,
Jaggery I tried first time. I have a problem with UTF-8 characters.
Characters e.g. á, ú, č, š incorrectly displays.
Thanks.
Consider following configuration in jaggery.conf
"listener":
{
"listener-class":"org.wso2.carbon.MySessionListener"
}
when selecting Clob fields from a Oracle db an empty {} json element is generated instead of the content of the clob field. The issue is seen on wso2 bam 2.0.2 building a custom dashboard.
post() with a type parameter of "json" or "application/json" seems to result in a form-url-encoded type in the message. It's not clear what legal values of the type parameter are, but I suspect once this is documented it will still be found to be broken as I've tried all the logical candidates without success. I had to use the XMLHTTPRequest object to correctly set the ContentType header.
The Headers parameter is also undocumented: how does one set multiple headers using this facility? I failed to even get one header parameter to work, but that may be because the content type failed.
other HTTP access functions are similarly underdocumented.
make URL mappings like following work properly
{
"url": "/",
"path": "/controllers/index.jag"
},
{
"url": "/*",
"path": "/controllers/*"
}
this works fine when there is only the latter mapping. But when both mappings are there, the first mapping overrides the second mapping even when first mapping is not matched.
If you don't have an index.jag, then the callback function doesn't get executed.
If you register a 404 error page as a jaggery page it wont get rendered. It just print the source of the file. This came up after we moved jaggery servlet to a servlet filter. Please dig into this issue
ability register a script which will get invoked when a attribute is added/removed to the sessions.
If the headers were specified as E4X etc., it throws an exception.
When request for an image using the get method it returns, The image "..." cannot be displayed because it contains errors.
RD SELECT LAST_INSERT_ID(); reading json contains "()" and reading elements in there give Cannot find function name in object [object Object]. at line
example
<%
var jsonString = '{"name()":"nuwan","company":"WSO2"}';
print(parse(jsonString).name());
%>
Following issue occurred when using var asso = registry.associations(path, type);
error log:
[2013-09-25 10:48:21,872] ERROR {org.jaggeryjs.scriptengine.engine.RhinoEngine} - org.mozilla.javascript.EvaluatorException: Java class "[Lorg.wso2.carbon.registry.core.Association;" has no public instance field or method named "noSuchMethod". (registry-osgi#313)
[2013-09-25 10:48:21,873] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} - org.mozilla.javascript.EvaluatorException: Java class "[Lorg.wso2.carbon.registry.core.Association;" has no public instance field or method named "noSuchMethod". (registry-osgi#313)
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Java class "[Lorg.wso2.carbon.registry.core.Association;" has no public instance field or method named "noSuchMethod". (registry-osgi#313)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:437)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:177)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:161)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.mozilla.javascript.EvaluatorException: Java class "[Lorg.wso2.carbon.registry.core.Association;" has no public instance field or method named "noSuchMethod". (registry-osgi#313)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:913)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:969)
at org.mozilla.javascript.Context.reportRuntimeError2(Context.java:939)
at org.mozilla.javascript.NativeJavaArray.get(NativeJavaArray.java:67)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2184)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2263)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2251)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:83)
at org.mozilla.javascript.gen.registry_osgi_13._c_anonymous_31(registry-osgi:313)
at org.mozilla.javascript.gen.registry_osgi_13.call(registry-osgi)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.mysample.c0._c_script_0(/mysample//sample.jag:71)
at org.jaggeryjs.rhino.mysample.c0.call(/mysample//sample.jag)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.jaggeryjs.rhino.mysample.c0.call(/mysample//sample.jag)
at org.jaggeryjs.rhino.mysample.c0.exec(/mysample//sample.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
... 31 more
I'm running this code inside a WSO2 Application Server version 5.0.0
function insertTextContent(obj) {
var operation = "_insertTextContent";
var log = new Log();
var ws = require("ws");
var version = new ws.WSRequest();
var options = new Array();
options.useSOAP = 1.2;
options.action = "urn:" + operation;
var payload = null;
var result;
var url = application.get('dataServiceUrl') + operation;
var value = decodeURIComponent(escape(obj.value));
var description = decodeURIComponent(escape(obj.description));
log.debug("value: " + value);
var currentDate = xsdDateTime(new Date());
try {
version.open(options, url, false);
version.send(
<shop:_insertTextContent xmlns:shop='http://shop.acme.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<modification_date>{currentDate}</modification_date>
<creation_date>{currentDate}</creation_date>
<created_by>admin</created_by>
<category>{obj.category}</category>
<mime_type>{obj.mime_type}</mime_type>
<modified_by>admin</modified_by>
<description>{description}</description>
<locale>de</locale>
<value>{value}</value>
<key>{obj.key}</key>
</shop:_insertTextContent>
);
result = version.responseE4X;
} catch (e) {
log.error(e.toString());
return e.toString();
}
return result;
}
although the web service call is obviously performed (successfully), I see the following error upon each request:
Error occured while invoking the service {org.jaggeryjs.host
objects.ws.WSRequestHostObject}
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
You can find the full stack trace below.
The service which I'm invoking is a WSO2 data service whose definition I also paste below.
I know that the service returns successfully from logging the result
object which contains the new value of _oid
.
Is there something I can do to avoid the AxisFault?
Thank you
Kambiz
Data Service:
<query id="my_insert_text_content_query" useConfig="default" returnGeneratedKeys="true" keyColumns="_oid">
<sql>INSERT INTO text_content(_oid,created_by,modified_by,creation_date,modification_date,key,category,mime_type,locale,description,value) VALUES(nextval('_instance_id'),?,?,?,?,?,?,?,?,?,?)</sql>
<result element="GeneratedKeys" rowName="Entry" useColumnNumbers="true">
<element name="_oid" column="1" xsdType="xs:long" />
</result>
<param name="created_by" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="2" />
<param name="modified_by" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="3" />
<param name="creation_date" paramType="SCALAR" sqlType="TIMESTAMP" type="IN" ordinal="4" />
<param name="modification_date" paramType="SCALAR" sqlType="TIMESTAMP" type="IN" ordinal="5" />
<param name="key" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="6" />
<param name="category" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="7" />
<param name="mime_type" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="8" />
<param name="locale" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="9" />
<param name="description" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="10" />
<param name="value" paramType="SCALAR" sqlType="STRING" type="IN" ordinal="11" />
</query>
<operation name="_insertTextContent">
<call-query href="my_insert_text_content_query">
<with-param name="modification_date" query-param="modification_date" />
<with-param name="creation_date" query-param="creation_date" />
<with-param name="created_by" query-param="created_by" />
<with-param name="category" query-param="category" />
<with-param name="mime_type" query-param="mime_type" />
<with-param name="modified_by" query-param="modified_by" />
<with-param name="description" query-param="description" />
<with-param name="locale" query-param="locale" />
<with-param name="value" query-param="value" />
<with-param name="key" query-param="key" />
</call-query>
</operation>
Full stack trace:
[Application Server] [2012-10-26 11:30:00,466] ERROR {org.jaggeryjs.hostobjects.ws.WSRequestHostObject} - Error occured while invoking the service {org.jaggeryjs.host
objects.ws.WSRequestHostObject}
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:92)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
at org.jaggeryjs.hostobjects.ws.WSRequestHostObject.jsFunction_send(WSRequestHostObject.java:371)
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:160)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:411)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
at org.jaggeryjs.rhino.rest.text_content.c0._c4(/rest/text-content/index.jag:148)
at org.jaggeryjs.rhino.rest.text_content.c0.call(/rest/text-content/index.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.jaggeryjs.rhino.rest.text_content.c0._c0(/rest/text-content/index.jag:230)
at org.jaggeryjs.rhino.rest.text_content.c0.call(/rest/text-content/index.jag)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.jaggeryjs.rhino.rest.text_content.c0.call(/rest/text-content/index.jag)
at org.jaggeryjs.rhino.rest.text_content.c0.exec(/rest/text-content/index.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:441)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:191)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:269)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:179)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:49)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
Hello,
I'm trying to debug my jaggery app following:
http://jaggeryjs.org/debugger.jag
sh ./server.sh -DjsDebug=9005
But I get this error:
jul 21, 2014 12:08:50 PM org.apache.catalina.core.ContainerBase addChildInternal
GRAVE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sample]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
...
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "org/eclipse/wst/jsdt/debug/transport/TransportService"
Could you tell me what the right process that I need to follow to debug my jaggery app?
Thanks.
I had an issue when including js min file, I tried
include_once("extend.min.js"); and
var extend=require("extend.min.js");
above both output the content in extend.min.js file
then I used the extend.js it worked like a charm.
I don't know that this is a legitimate issue just came across this
Following exception occurred while opening jaggery project with IntelliJ IDEA 13.1.2 multiple times.
Assertion failed: TEMPLATE_HTML_TEXT
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:141)
at com.intellij.psi.impl.source.PsiFileImpl.setContentElementType(PsiFileImpl.java:96)
at org.wso2.fileType.JaggeryFileViewProvider.createFile(JaggeryFileViewProvider.java:251)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getPsiInner(MultiplePsiFilesPerDocumentFileViewProvider.java:85)
at com.intellij.psi.SingleRootFileViewProvider.getPsi(SingleRootFileViewProvider.java:147)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getAllFiles(MultiplePsiFilesPerDocumentFileViewProvider.java:58)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:128)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:102)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.access$000(ImageOrColorPreviewManager.java:52)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager$1.editorCreated(ImageOrColorPreviewManager.java:71)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:90)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:67)
at com.sun.proxy.$Proxy30.editorCreated(Unknown Source)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.a(EditorFactoryImpl.java:193)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:166)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.b(TextEditorComponent.java:162)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.<init>(TextEditorComponent.java:111)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:67)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:60)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:44)
at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.<init>(TextEditorImpl.java:46)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.<init>(PsiAwareTextEditorImpl.java:38)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:53)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:797)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.a(EditorsSplitters.java:292)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.openFiles(EditorsSplitters.java:235)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity$1.run(OpenFilesActivity.java:40)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity.runActivity(OpenFilesActivity.java:45)
at com.intellij.ide.startup.impl.StartupManagerImpl$2.run(StartupManagerImpl.java:146)
at com.intellij.ide.startup.impl.StartupManagerImpl.a(StartupManagerImpl.java:259)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivitiesFromExtensions(StartupManagerImpl.java:158)
at com.intellij.openapi.project.impl.ProjectManagerImpl$5.run(ProjectManagerImpl.java:441)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:269)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:281)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:645)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:141)
at com.intellij.psi.impl.source.PsiFileImpl.setContentElementType(PsiFileImpl.java:96)
at org.wso2.fileType.JaggeryFileViewProvider.createFile(JaggeryFileViewProvider.java:251)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getPsiInner(MultiplePsiFilesPerDocumentFileViewProvider.java:85)
at com.intellij.psi.SingleRootFileViewProvider.getPsi(SingleRootFileViewProvider.java:147)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getAllFiles(MultiplePsiFilesPerDocumentFileViewProvider.java:58)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:128)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:102)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.access$000(ImageOrColorPreviewManager.java:52)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager$1.editorCreated(ImageOrColorPreviewManager.java:71)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:90)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:67)
at com.sun.proxy.$Proxy30.editorCreated(Unknown Source)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.a(EditorFactoryImpl.java:193)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:166)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.b(TextEditorComponent.java:162)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.<init>(TextEditorComponent.java:111)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:67)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:60)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:44)
at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.<init>(TextEditorImpl.java:46)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.<init>(PsiAwareTextEditorImpl.java:38)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:53)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:797)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.a(EditorsSplitters.java:292)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.openFiles(EditorsSplitters.java:235)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity$1.run(OpenFilesActivity.java:40)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity.runActivity(OpenFilesActivity.java:45)
at com.intellij.ide.startup.impl.StartupManagerImpl$2.run(StartupManagerImpl.java:146)
at com.intellij.ide.startup.impl.StartupManagerImpl.a(StartupManagerImpl.java:259)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivitiesFromExtensions(StartupManagerImpl.java:158)
at com.intellij.openapi.project.impl.ProjectManagerImpl$5.run(ProjectManagerImpl.java:441)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:269)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:281)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:645)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
When we catch an exception in jaggery -.jag file it works as usual javascript. But if we have a try catch in a javascript the exception caught is thrown as Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.JavaScriptException:
Example
try{
throw “checking";
}catch(e){
log.info(e);
}
.jag - prints checking
.js - prints
{JAGGERY.index:jag} org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.JavaScriptException: checking (/mdm/controller/app.js#25) (/mdm/modules/absolute.js#200)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.jaggeryjs.rhino.mdm.modules.c7._c_anonymous_14(/mdm/modules/absolute.js:200)
at org.jaggeryjs.rhino.mdm.modules.c7.call(/mdm/modules/absolute.js)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.jaggeryjs.rhino.mdm.c0._c_script_0(/mdm//index.jag:292)
at org.jaggeryjs.rhino.mdm.c0.call(/mdm//index.jag)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.jaggeryjs.rhino.mdm.c0.call(/mdm//index.jag)
at org.jaggeryjs.rhino.mdm.c0.exec(/mdm//index.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:435)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.JavaScriptException: checking (/mdm/controller/app.js#25)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.executeScript(WebAppManager.java:271)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.require(WebAppManager.java:321)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
... 47 more
Caused by: org.mozilla.javascript.JavaScriptException: checking (/mdm/controller/app.js#25)
at org.jaggeryjs.rhino.mdm.controller.c0._c_script_0(/mdm/controller/app.js:25)
at org.jaggeryjs.rhino.mdm.controller.c0.call(/mdm/controller/app.js)
at org.jaggeryjs.rhino.mdm.controller.c0.exec(/mdm/controller/app.js)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
... 54 more
There are grammar mistakes and minor typos on [1]
[1] http://jaggeryjs.org/samples.jag
The following are the corrected paragraphs:
Freshometer
The Fresh-o-meter app allows you to search for any movie title, and retrieve its information (Cast, Movie Poster, Release year, Plot and rating) as well as related videos from YouTube. It acts as a central movie information search engine.
Sample requires you to be online.
Jaggery Documentation
The Documentation section of the jaggery site runs on Jaggery. It is the centralized and in-depth area to view descriptions, demos and samples and try out jaggery code. The documentation site also includes downloads and sample apps.
Coffee Shop REST sample
The coffee shop sample will explain RESTful application features with Jaggery. It is a nice client end user interface where the user can make an order for coffee. There are seven main REST calls happen in this application with PUT, POST, GET and DELETE. This sample contains a database connection, URL mapping and web request in jaggery
Steps:
Issue:
getting following error
[2013-08-27 18:18:21,277] ERROR {org.jaggeryjs.scriptengine.engine.RhinoEngine} - org.mozilla.javascript.EcmaError: TypeError: Cannot find function getPathInfo in object [object Request]. (/coffeeshop/controller/order.jag#14)
[2013-08-27 18:18:21,278] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} - org.mozilla.javascript.EcmaError: TypeError: Cannot find function getPathInfo in object [object Request]. (/coffeeshop/controller/order.jag#14)
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EcmaError: TypeError: Cannot find function getPathInfo in object [object Request]. (/coffeeshop/controller/order.jag#14)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.statistics.webapp.RequestIntercepterValve.invoke(RequestIntercepterValve.java:43)
at org.wso2.carbon.bam.webapp.stat.publisher.WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.java:104)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot find function getPathInfo in object [object Request]. (/coffeeshop/controller/order.jag#14)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3665)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3693)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3712)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3783)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2269)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2251)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:83)
at org.jaggeryjs.rhino.coffeeshop.controller.c0._c_script_0(/coffeeshop/controller/order.jag:14)
at org.jaggeryjs.rhino.coffeeshop.controller.c0.call(/coffeeshop/controller/order.jag)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.jaggeryjs.rhino.coffeeshop.controller.c0.call(/coffeeshop/controller/order.jag)
at org.jaggeryjs.rhino.coffeeshop.controller.c0.exec(/coffeeshop/controller/order.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
... 37 more
Is it possible to find the fragment id of the url from the request object? I'm trying to do a redirect from http to https and reconstructing the url isn't as easy as you would think. I have to check for a query string and append it, and the fragment id doesn't seem reachable.
A way to get the entire raw url, from protocol to fragment id, would be helpful in this scenario.
There is a mismatch between the documentation at http://jaggeryjs.org/apidocs/jagconf.jag and the working sample such as at http://jaggeryjs.org/sample/notfound.jag. The syntax of the latter seems to work, the documented version doesn't.
i try to remote debug the jaggery project on windows 7.
i already put the jsdt jar in the "carbon\repository\components\dropins" file path.
the console command is " server --debug 9003 "
but failed,the eclipse said "Error occured whild launching failed to parse content length"
the jaggery console print :
{"argument< - expected >JDWP-Handshake<
Debugger failed to attach: handshake failed - received >63
{"argument< - expected >JDWP-Handshake<
Debugger failed to attach: handshake failed - received >63
{"argument< - expected >JDWP-Handshake<
Debugger failed to attach: handshake failed - received >63
{"argument< - expected >JDWP-Handshake<
did i do something wrong?
Can't include javascript file inside javascript file.
var test="Lorem Ipsum";
include_once(app_path+'views/'+view_name+'.jag');
how to access the test variable from the jag file I included. it it possible ?
XHR callback need to be called even when an I/O error occurred when connecting to the server. Need to check with http://www.w3.org/TR/XMLHttpRequest/ and properly handle it.
Following exception noticed while opening jaggery project in InteliJ IDEA 13.1.2
Assertion failed: TEMPLATE_HTML_TEXT
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:141)
at com.intellij.psi.impl.source.PsiFileImpl.setContentElementType(PsiFileImpl.java:96)
at org.wso2.fileType.JaggeryFileViewProvider.createFile(JaggeryFileViewProvider.java:251)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getPsiInner(MultiplePsiFilesPerDocumentFileViewProvider.java:85)
at com.intellij.psi.SingleRootFileViewProvider.getPsi(SingleRootFileViewProvider.java:147)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getAllFiles(MultiplePsiFilesPerDocumentFileViewProvider.java:58)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:128)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:102)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.access$000(ImageOrColorPreviewManager.java:52)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager$1.editorCreated(ImageOrColorPreviewManager.java:71)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:90)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:67)
at com.sun.proxy.$Proxy30.editorCreated(Unknown Source)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.a(EditorFactoryImpl.java:193)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:166)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.b(TextEditorComponent.java:162)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.(TextEditorComponent.java:111)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.(PsiAwareTextEditorImpl.java:67)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.(PsiAwareTextEditorImpl.java:60)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:44)
at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.(TextEditorImpl.java:46)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.(PsiAwareTextEditorImpl.java:38)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:53)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:797)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.a(EditorsSplitters.java:292)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.openFiles(EditorsSplitters.java:235)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity$1.run(OpenFilesActivity.java:40)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity.runActivity(OpenFilesActivity.java:45)
at com.intellij.ide.startup.impl.StartupManagerImpl$2.run(StartupManagerImpl.java:146)
at com.intellij.ide.startup.impl.StartupManagerImpl.a(StartupManagerImpl.java:259)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivitiesFromExtensions(StartupManagerImpl.java:158)
at com.intellij.openapi.project.impl.ProjectManagerImpl$5.run(ProjectManagerImpl.java:441)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:269)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:281)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:645)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:141)
at com.intellij.psi.impl.source.PsiFileImpl.setContentElementType(PsiFileImpl.java:96)
at org.wso2.fileType.JaggeryFileViewProvider.createFile(JaggeryFileViewProvider.java:251)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getPsiInner(MultiplePsiFilesPerDocumentFileViewProvider.java:85)
at com.intellij.psi.SingleRootFileViewProvider.getPsi(SingleRootFileViewProvider.java:147)
at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getAllFiles(MultiplePsiFilesPerDocumentFileViewProvider.java:58)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:128)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.a(ImageOrColorPreviewManager.java:102)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager.access$000(ImageOrColorPreviewManager.java:52)
at com.intellij.codeInsight.preview.ImageOrColorPreviewManager$1.editorCreated(ImageOrColorPreviewManager.java:71)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:90)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:67)
at com.sun.proxy.$Proxy30.editorCreated(Unknown Source)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.a(EditorFactoryImpl.java:193)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:166)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.b(TextEditorComponent.java:162)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.(TextEditorComponent.java:111)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.(PsiAwareTextEditorImpl.java:67)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.(PsiAwareTextEditorImpl.java:60)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:44)
at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.(TextEditorImpl.java:46)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.(PsiAwareTextEditorImpl.java:38)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:53)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:797)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.a(EditorsSplitters.java:292)
at com.intellij.openapi.fileEditor.impl.EditorsSplitters.openFiles(EditorsSplitters.java:235)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity$1.run(OpenFilesActivity.java:40)
at com.intellij.openapi.fileEditor.impl.OpenFilesActivity.runActivity(OpenFilesActivity.java:45)
at com.intellij.ide.startup.impl.StartupManagerImpl$2.run(StartupManagerImpl.java:146)
at com.intellij.ide.startup.impl.StartupManagerImpl.a(StartupManagerImpl.java:259)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivitiesFromExtensions(StartupManagerImpl.java:158)
at com.intellij.openapi.project.impl.ProjectManagerImpl$5.run(ProjectManagerImpl.java:441)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:269)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:281)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:645)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Any documentation about jaggery.conf ?
It's not clear what the "/" prefixing an error page location in the jaggery.conf means. It is not a full path (e.g. /sample/error.jag). It appears that without the slash error page redirection doesn't work either. Why isn't this simply a relative URL? At the very least the semantics needs to be explained.
Also, it's not clear how one might redirect all error codes, or families or error codes, or just codes not explicitly specified, to a default error page.
client doesn't use the event variable in onmessage method
For this, you need to add distributable property into the jaggery.conf
{
"displayName":"My App",
"welcomeFiles":["index.jag"],
"distributable":true
}
If one runs:
<%
var url = 'http://jaggeryjs.org/apidocs/resources/data.jag';
var result = post(url,
{"key": {
"primary":"foo",
"secondary":"bar"}
},
{
"User-Agent" : "Jaggery-XHR",
"Country" : "LK"
},
'json');
print(result.data);
%>
at http://jaggeryjs.org/apidocs/post.jag "try it" feature, gets as result:
{"method" : "POST", "url" : "http://jaggeryjs.org/apidocs/resources/data.jag", "content" : "key=%5Bobject%20Object%5D", "headers" : {"host" : "jaggeryjs.org", "user-agent" : "Jaggery-XHR", "country" : "LK", "x-forwarded-for" : "204.13.82.231", "x-forwarded-host" : "jaggeryjs.org", "x-forwarded-server" : "jaggeryjs.org", "connection" : "Keep-Alive", "content-length" : "25"}}
The content posted is key=%5Bobject%20Object%5D instead of
{"key": { "primary":"foo", "secondary":"bar"} }
When I try to compile jaggery I get the following error,
[ERROR] Failed to execute goal org.wso2.maven:carbon-p2-plugin:1.5:p2-profile-gen (3-p2-profile-generation) on project p2-profile-gen: P2 publisher return code was 13 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :p2-profile-gen
Running maven with -e gives following output,
[ERROR] Failed to execute goal org.wso2.maven:carbon-p2-plugin:1.5:p2-profile-gen (3-p2-profile-generation) on project p2-profile-gen: P2 publisher return code was 13 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wso2.maven:carbon-p2-plugin:1.5:p2-profile-gen (3-p2-profile-generation) on project p2-profile-gen: P2 publisher return code was 13
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: P2 publisher return code was 13
at org.wso2.maven.p2.ProfileGenMojo.execute(ProfileGenMojo.java:171)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.MojoFailureException: P2 publisher return code was 13
at org.wso2.maven.p2.ProfileGenMojo.installFeatures(ProfileGenMojo.java:213)
at org.wso2.maven.p2.ProfileGenMojo.execute(ProfileGenMojo.java:164)
... 21 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :p2-profile-gen
mvn -v returns following,
C:\src\wso2\jaggery>mvn3 -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: C:\bin\apache-maven-3.0.4
Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_30\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Any idea what I might be doing wrong?
example is unclear.
propriety name should be SOAPHeaders not HTTPHeaders.
Hi, a simple db.query with a simple "select a,b,c,d,e,f,g, h,i from xxxtable" returns me the resultset with the column in a different order : [{e-name,a-name,b-name,c-name,d-name,f-name,g-name,h-name,i-name},{e-1,a-1,b-1,c-1,d-1,f-1,g-1,h-1,i-1},,...,{e-i,a-i,b-i,c-i,d-i,f-i,g-i,h-i,i-i},,...]
how can I keep my original column order ?
I use a h2 database, when I query directly this database (usign jdbc via squirrelDb) the resultset is always well ordered with my column order.
What am I missing here ?
regards
Cyril
Hi, when you try to excite advance query such
"SELECT subject.name, student.name, marks
FROM marks
JOIN student ON ( student_id = student.id )
JOIN subject ON ( subject_id = subject.id ) "
will over ride the field name, it wan't check tables
OutPut:
"[{"marks" : 90, "sub_name" : "Maths"}, {"marks" : 95, "sub_name" : "English"}, {"marks" : 94, "sub_name" : "English"}, {"marks" : 97, "sub_name" : "Maths"}]"
Here jaggery replace filed in table contains same name at JOIN queries
Expected Out :
[{"name" : "Madhuka", "marks" : 90, "sub_name" : "Maths"}, {"name" : "Madhuka", "marks" : 95, "sub_name" : "English"}, {"name" : "Nuwan", "marks" : 94, "sub_name" : "English"}, {"name" : "Nuwan", "marks" : 97, "sub_name" : "Maths"}]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.