IntelliJ, Unable to edit JSP files - intellij-idea

I'm using IntelliJ 12.0.4 Community Edition.
My problem is that I can only Open the JSP Files and just type something in them. Backspace, DELETE and other editing Keys don't work and the whole IDE hangs somehow and I must restart the IntelliJ.
the Logfiles contain dosen of such entry:
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - IntelliJ IDEA 12.0.4 Build #IC-123.169
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - JDK: 1.7.0_09
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - VM: Java HotSpot(TM) Client VM
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - Vendor: Oracle Corporation
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - OS: Windows 7
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - Last Action: EditorEnter
2013-05-07 10:50:25,028 [ 36991] ERROR - .psi.impl.DocumentCommitThread - View provider com.intellij.psi.SingleRootFileViewProvider#1558433 refused to parse text with Language: TEXT; base: Language: ANY; copy: Language: ANY; fileType: com.intellij.openapi.fileTypes.impl.AbstractFileType#1573ede
java.lang.RuntimeException: View provider com.intellij.psi.SingleRootFileViewProvider#1558433 refused to parse text with Language: TEXT; base: Language: ANY; copy: Language: ANY; fileType: com.intellij.openapi.fileTypes.impl.AbstractFileType#1573ede
at com.intellij.psi.impl.source.text.BlockSupportImpl.makeFullParse(BlockSupportImpl.java:193)
at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRangeInternal(BlockSupportImpl.java:143)
at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRange(BlockSupportImpl.java:82)
at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:578)
at com.intellij.psi.impl.DocumentCommitThread.access$600(DocumentCommitThread.java:67)
at com.intellij.psi.impl.DocumentCommitThread$3.run(DocumentCommitThread.java:460)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1155)
at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:473)
at com.intellij.psi.impl.DocumentCommitThread.access$500(DocumentCommitThread.java:67)
at com.intellij.psi.impl.DocumentCommitThread$2.run(DocumentCommitThread.java:352)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:232)
at com.intellij.psi.impl.DocumentCommitThread.pollQueue(DocumentCommitThread.java:349)
at com.intellij.psi.impl.DocumentCommitThread.run(DocumentCommitThread.java:293)
at java.lang.Thread.run(Thread.java:722)
has somebody the same Problem?

I sometimes have the same problem. Minimizing and reopening easily done by pressing ALT + TAB ALT + TAB (you have to lift the ALT key too) solves this problem.

Related

'serverless invoke -f hello' gives KeyError

I am following a tutorial in order to learn how to work with the serverless framework. The goal is to deploy a Django application. This tutorial suggests putting the necessary environment variables in a separate yml-file. Unfortunately, following the tutorial gets me a KeyError.
I have a serverless.yml, variables.yml and a handler.py. I will incert all code underneath, together with the given error.
serverless.yml:
service: serverless-django
custom: ${file(./variables.yml)}
provider:
name: aws
runtime: python3.8
functions:
hello:
environment:
- THE_ANSWER: ${self:custom.THE_ANSWER}
handler: handler.hello
variables.yml:
THE_ANSWER: 42
handler.py:
import os
def hello(event, context):
return {
"statusCode": 200,
"body": "The answer is: " + os.environ["THE_ANSWER"]
}
The error in my terminal:
{
"errorMessage": "'THE_ANSWER'",
"errorType": "KeyError",
"stackTrace": [
" File \"/var/task/handler.py\", line 7, in hello\n \"body\": \"The answer is: \" + os.environ[\"THE_ANSWER\"]\n",
" File \"/var/lang/lib/python3.8/os.py\", line 675, in __getitem__\n raise KeyError(key) from None\n"
]
}
Error --------------------------------------------------
Error: Invoked function failed
at AwsInvoke.log (/snapshot/serverless/lib/plugins/aws/invoke/index.js:105:31)
at AwsInvoke.tryCatcher (/snapshot/serverless/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/snapshot/serverless/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/snapshot/serverless/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/snapshot/serverless/node_modules/bluebird/js/release/async.js:102:5)
at Immediate._onImmediate (/snapshot/serverless/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:456:21)
at process.topLevelDomainCallback (domain.js:137:15)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.18.1
Framework Version: 2.0.0 (standalone)
Plugin Version: 4.0.2
SDK Version: 2.3.1
Components Version: 3.1.2
The command i'm trying is 'sls invoke -f hello'. The command 'sls deploy' has been already executed succesfully.
I am new to serverless, so please let me know how to fix this, or if any more information is needed.
First of all, there is an error in yml script:
Serverless Error ---------------------------------------
Invalid characters in environment variable 0
The error is defining environment variables as an array instead of key-value pairs
And then after deployment, everything works smoothly (sls deploy -v)
sls invoke --f hello
{
"statusCode": 200,
"body": "The answer is: 42"
}
serverless.yml
service: sls-example
custom: ${file(./variables.yml)}
provider:
name: aws
runtime: python3.8
functions:
hello:
environment:
THE_ANSWER: ${self:custom.THE_ANSWER}
handler: handler.hello
variables.yml
THE_ANSWER: 42

Vuepress multiple sidebar don't show all items

I'm learning about vuepress and i'm trouble to config the sidbar.
Description
Following the docs I replicated the multiple-sidebar configuration without success.
Only the first path it is showed. What am i doing worg?
My config js:
module.exports = {
title: "Jhonatan Morais",
description: "Welcome to my documentation site",
editLinks: true,
smoothScroll: true,
themeConfig: {
sidebar: {
"/foo/": ["", "one"],
"/bar/": ["", "three"],
// fallback
"/": ["" /* / */],
},
},
postcss: {
plugins: [require("autoprefixer"), require("tailwindcss")("./tailwind.js")],
},
};
My project organization
My render results from yarn docs:dev
Some others details
If i browse the pages by url they are there
Here is my system info:
Environment Info:
System:
OS: Windows
CPU: (8) x64 Intel(R) Core(TM) i7-4770 CPU # 3.40GHz
Binaries:
Node: 10.16.2 - C:\Users\JHONAT~1.MOR\AppData\Local\Temp\yarn--1593443655966-0.6783257365479927\node.CMD
Yarn: 1.22.4 - C:\Users\JHONAT~1.MOR\AppData\Local\Temp\yarn--1593443655966-0.6783257365479927\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
#vuepress/core: 1.5.2
#vuepress/theme-default: 1.5.2
vuepress: ^1.5.2 => 1.5.2
npmGlobalPackages:
vuepress: Not Found
I believe this is working as designed. You will only see the /foo/ sidebar when the route starts with /foo/. So, you won't see the /bar/ sidebar until you go to a route/page that starts with /bar/. You may want to use Sidebar Groups if you want to group links together in a single sidebar that is displayed for every route.

IntelliJ idea cannot open “File->open url ”

my idea cannot open menu bar ; how can I fix it?
The log is :
2018-11-29 17:26:31,193 [ 37873] ERROR - Templates.impl.DefaultTemplate - IntelliJ IDEA 14.1.7 Build #IU-141.3058.30
2018-11-29 17:26:31,193 [ 37873] ERROR - Templates.impl.DefaultTemplate - JDK: 1.8.0_181
2018-11-29 17:26:31,193 [ 37873] ERROR - Templates.impl.DefaultTemplate - VM: Java HotSpot(TM) 64-Bit Server VM
2018-11-29 17:26:31,193 [ 37873] ERROR - Templates.impl.DefaultTemplate - Vendor: Oracle Corporation
2018-11-29 17:26:31,193 [ 37873] ERROR - Templates.impl.DefaultTemplate - OS: Mac OS X
2018-11-29 17:26:31,193 [ 37873] ERROR - Templates.impl.DefaultTemplate - Last Action:
2018-11-29 17:26:31,193 [ 37873] ERROR - Templates.impl.DefaultTemplate - Entry fileTemplates//j2ee/valueResourceFile.xml.html not found in /Applications/IntelliJ%20IDEA%2014.app/Contents/plugins/android/lib/resources_en.jar
java.io.FileNotFoundException: Entry fileTemplates//j2ee/valueResourceFile.xml.html not found in /Applications/IntelliJ%20IDEA%2014.app/Contents/plugins/android/lib/resources_en.jar
at com.intellij.util.io.URLUtil.openJarStream(URLUtil.java:98)
at com.intellij.util.io.URLUtil.openStream(URLUtil.java:59)
at com.intellij.ide.fileTemplates.impl.UrlUtil.loadText(UrlUtil.java:45)

vscode Fail to Debug Express Webapp

I'm trying to debug express (node) app on my machine, but debug does not start with no indication what so ever.
This happens on code I'm able to debug on another machine as well as "new" apps created in order to test this issue.
I followed the instructions on vscode site (https://code.visualstudio.com/docs/nodejs/nodejs-debugging) with no success.
Runtime works great - just fail to debug.
Behavior consist on all machine's users (admin/non-admin)
Does anyone have a clue?
My environment setup is:
operating System: Windows 10 Pro version 1803
node version: v10.13.0
vscode version: 1.28.2
This is vscode's trace (note the target not opened warning):
OS: win32 x64
Adapter node: v8.9.3 x64
vscode-chrome-debug-core: 6.7.19
11:20:18 AM, 11/7/2018
node-debug2: 1.28.3
From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"node2","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":false}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsRestartFrame":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsValueFormattingOptions":true,"supportsEvaluateForHovers":true,"supportsLoadedSourcesRequest":true,"supportsLogPoints":true,"supportsTerminateRequest":false}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/initialize","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","successful":"true","timeTakenInMilliseconds":"3.774888","requestType":"request"}}}
From client: attach({"type":"node2","request":"attach","name":"Attach by Process ID","trace":true,"cwd":"c:\\Users\\roi\\dev\\janus\\src\\tools\\magento2-importer","port":9229,"protocol":"inspector","logFilePath":"c:\\Users\\roi\\AppData\\Roaming\\Code\\logs\\20181107T103352\\exthost1\\ms-vscode.node-debug\\debugadapter.txt","__sessionId":"910bc34a-3629-46b7-8c57-e89c06f5bda0"})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStarted","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","request":"attach","args":["type","request","name","trace","cwd","port","protocol","logFilePath","__sessionId","enableSourceMapCaching","sourceMapPathOverrides","showAsyncStacks","sourceMaps"]}}}
Getting browser and debug protocol version via http://127.0.0.1:9229/json/version
Discovering targets via http://127.0.0.1:9229/json/list
Got browser version: node.js/v10.13.0
Got debug protocol version: 1.1
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"targetDebugProtocolVersion","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3"}}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"targetCount","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","numTargets":1}}}
Attaching to target: {"description":"node.js instance","devtoolsFrontendUrl":"chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=localhost/a575db9e-d5a5-46a5-a49c-a553228c7493","devtoolsFrontendUrlCompat":"chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost/a575db9e-d5a5-46a5-a49c-a553228c7493","faviconUrl":"https://nodejs.org/static/favicon.ico","id":"a575db9e-d5a5-46a5-a49c-a553228c7493","title":"dist/server.js","type":"node","url":"file://C:_Users_roi_dev_janus_src_tools_magento2-importer_dist_server.js","webSocketDebuggerUrl":"ws://127.0.0.1:9229/a575db9e-d5a5-46a5-a49c-a553228c7493","version":{}}
WebSocket Url: ws://127.0.0.1:9229/a575db9e-d5a5-46a5-a49c-a553228c7493
→ To target: "{\"id\":1,\"method\":\"Console.enable\"}"
→ To target: "{\"id\":2,\"method\":\"Debugger.enable\"}"
→ To target: "{\"id\":3,\"method\":\"Runtime.enable\"}"
→ To target: "{\"id\":4,\"method\":\"Log.enable\"}"
→ To target: "{\"id\":5,\"method\":\"Runtime.runIfWaitingForDebugger\"}"
→ Warning: Target not open! Message: "{\"id\":6,\"method\":\"Runtime.run\"}"
Websocket closed
Terminated: websocket closed
Waiting for any pending steps or log messages.
Current step and log messages complete
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStopped","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","reason":"websocket closed"}}}
To client: {"seq":0,"type":"event","event":"terminated"}
From client: disconnect({"restart":false})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"FullSessionStatistics/SourceMaps/Overrides","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","aspNetClientAppFallbackCount":0}}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"report-start-up-timings","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","RequestedContentWasDetected":"false","Steps":"[\"BeforeFirstStep\",\"ClientRequest/initialize\",\"ClientRequest/attach\",\"Attach\",\"Attach.RequestDebuggerTargetsInformation\",\"Attach.ProcessDebuggerTargetsInformation\",\"Attach.AttachToTargetDebuggerWebsocket\",\"Attach.ConfigureDebuggingSession.Internal\",\"Attach.ConfigureDebuggingSession.Target\"]","All":"380.614371","BeforeFirstStep":"[18.487202]","WaitingAfter.ClientRequest/initialize":"[22.151169]","ClientRequest/initialize":"[4.841868]","ClientRequest/attach":"[4.11239]","Attach":"[8.248859]","Attach.RequestDebuggerTargetsInformation":"[12.433092]","Attach.ProcessDebuggerTargetsInformation":"[0.720004]","Attach.AttachToTargetDebuggerWebsocket":"[317.133643]","Attach.ConfigureDebuggingSession.Internal":"[0.81632]","Attach.ConfigureDebuggingSession.Target":"[13.309018]","RequestedContentWasNotDetectedReason":"shutdown"}}}
Terminated: Got disconnect request
To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/disconnect","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","successful":"true","timeTakenInMilliseconds":"2.443434","requestType":"request"}}}
This is snippet of vscode screen after debuger was attached. as you can see debugger was attached, but no debug tool bar is present (and no breaks on breakpoints):
You can try to add launch.json by go to Debug->Add Configuration
And then choose Node.js Attach To Process
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}"
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": Your Port,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
}
]
}
Then run you server as usual, for example
> nodemon app.js
Set breakpoints
And hit Start Debugging
The debugger should kick in and you should smile :)

WebDriverError - missing 'type' parameter

I am getting the following error:
[23:31:47] I/launcher - Running 1 instances of WebDriver
[23:31:47] I/hosted - Using the selenium server at http://seleniumbox.cisco.com:80/wd/hub
[23:31:51] E/runner - Unable to start a WebDriver session.
[23:31:51] E/launcher - Error: WebDriverError: Missing 'type' parameter
I have the following Protractor config:
multiCapabilities: [
{
browserName: 'firefox',
auth: 'qn4gn6i63h3bo25i',
firefoxOptions: {
auth: 'qn4gn6i63h3bo25i',
args: ['--headless']
},
'moz:firefoxOptions': {
auth: 'qn4gn6i63h3bo25i',
args: ['--headless']
}
}
]
I think the "type parameter" might relate the auth method, because before I add the auth information (I had to auth in multiple places because I don't know the right place...), I was getting this error:
[23:35:38] I/launcher - Running 1 instances of WebDriver
[23:35:38] I/hosted - Using the selenium server at http://seleniumbox.cisco.com:80/wd/hub
[23:35:38] E/launcher - Mandatory capability missing[auth]
[23:35:38] E/launcher - SessionNotCreatedError: Mandatory capability missing[auth]
Does anyone know if this type parameter relates to auth? How do I fix this error?