WSADMIN: Invalid command "print" - websphere

I'm trying to run a print commant using websphere wsadmin and it gives me the error " error while eval'ing Jacl expression:
invalid command name "print"", although the command is totally correct. As in the screenshot.
How to solve this problem?

This error can be fixed by changing the default scripting language on the properties file
..\IBM\WebSphere\AppServer\profiles\AppSrv01\properties\wsadmin.properties
to be jython instead of jacl
com.ibm.ws.scripting.defaultLang=jython

Related

Creating VM with Azure CLI

I'm posting to see if someone can point me in the right direction. I've been trying to get this working for a few days now and I'm at a dead end.
I have tried to remove " around the variables and remove variables completely. I have tried to run this in Azure Cloud Shell, WSL, and PowerShell as a .ps1 script. However, I continue to get the same type of errors.
Here is the script.
Here is the error I am getting.
validation error: Parameter 'resource_group_name' must conform to the
following pattern: '^[-\w\._\(\)]+$'. ' not recognized. ' not found. Check the spelling and casing and
try again.
If I run a one liner with out variables I get this error.
az vm create: error: local variable 'images' referenced before
assignment
Any help would be greatly appreciated. Thank you!
So for the first error, looks like the create VM is initiating to fast to recognize the new resource group.
For the image you need to use the full URN MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest
First, it's a bash script and the variable definition is different between Windows and Linux. So I suggest you run the script in the Azure Cloud Shell with bash mode or the WSL when it's a bash script.
Second, the error shows the resource group name does not meet the Naming rules and restrictions for Azure resources, you need to read the document to check if the group name is right.
So I have found out that the issue was. It was how VS Code formats bash scripts. I'm not exactly sure how VS Code is formatting but I think it might have something to do with ASCII. I recreated the script in Azure CLI with nano and it runs fine as a bash shell script. Thanks everyone for your help.

How to handle errors in beeline shell

I had created a shell script to invoke beeline shell.
But, how can I handle errors in the beeline shell with the below two scenarios.
1) If suppose there are any connection errors in the beeline shell, it should print the error message in the log file.
2) If suppose, there is an error in the beeline shell command then it should print the corresponding error message in the log file.
Can anyone please help me out regarding the same ...
I think what you want is a redirection of stderr in a file, refer this.
In case you want to handle errors in the script itself refer this.
Let me know if this helps, Cheers.

StringToBytes Issue in Expect Script

I am using the below command in my Expect script file.
set name [StringToBytes "Tamin"];
puts "name = $name"
When i run this script, i get the below error.
invalid command name "StringToBytes"
while executing
"StringToBytes "Tamin""
invoked from within
"set name [StringToBytes "Tamin"]"
Can anyone please help me to fix this?
As far as I know, this means that the command StringToBytes could not be found. StringToBytes is not listed in the documentation, so presumably you intended to define this command yourself?

Error code 800A0401 while running VB script

I am trying to run X86 application in x64. For that Microsoft provided with the below code at http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/405f5bb5-87a3-43d2-8138-54b75db73aa1.mspx?mfr=true
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true”
While running this script I am getting error
at char 25
Description: Expected end statement
Code: 800A0401
I don't know VBscript syntax to check. Please help me.
I guess the problem is fancy quotes in “true”. Try using "true" or true instead.
I think it's the
set
in the code. I suggest having it like this:
cscript.exe adsutil.vbs
set W3SVC/AppPools/Enable32BitAppOnWin64 “true”

Why can't I write to an environment variable?

I am trying to figure out why I get an error when trying to set an environment variable.
I write the following command in a cmd.exe shell.
set logFile=%time:~0,2%
but I keep on getting the following error message
Environment variable 13 not defined
Can someone assist?
GorovDude
That is really strange. Your code should work. It seems that the batch is ignoring the logFile= in your code.
To verify this try:
set logFile
to see if logFile is indeed not set.
Have you tried typing the code directly into the command prompt?

Resources