WildFly - Files\Java\jdk1.7.0_40"" was unexpected at this time - jboss

I'm trying to start up WildFly 8 with a custom start.bat file that calls standalone.bat and then also a custom property file. When I run my start.bat I get this error in the command line:
C:\PWServer8>propworks_start.bat
C:\PWServer8\bin>call standalone.bat -P=../propworks/conf/propworks.properties -b 10.10.100.122
Calling "C:\PWServer8\bin\standalone.conf.bat"
Files\Java\jdk1.7.0_40"" was unexpected at this time.
I've done a search for "was unexpected at this time" within all the files in my WildFly folder but nothing turned up so I couldn't pinpoint where the error is coming from. Here is my custom start.bat and afterwards is my property file. If anyone knows what's going on it would be a big help.
propworks_start.bat
C:
cd C:\PWServer8\bin
SET JAVA_HOME="C:\Program Files\Java\jdk1.7.0_40"
call standalone.bat -P=../propworks/conf/propworks.properties -b 10.10.100.122
propworks.properties
#PROPworks Configuration Properties
#Wed Jun 18 17:18:03 EDT 2014
propworks.bind.address=10.10.100.122
propworks.database.class=Oracle10g
propworks.database.connection.sql=select 1 From Dual
propworks.database.desc=support#mcosrvorcl001
propworks.database.dialect=com.airit.propworks.server.dialect.PWOracleDialect
propworks.database.driver=oracle
propworks.database.password=-5522f65bbe2cc1c6
propworks.database.schema=uc2014
propworks.database.url=jdbc\:oracle\:thin\:#10.10.201.10\:1521\:bsdev
propworks.database.user=uc2014
propworks.http.port=8080
propworks.indb.use=NONE
propworks.jdk.home=C\:\\Program Files\\Java\\jdk1.7.0_40
propworks.messaging.port=5445
propworks.remoting.port=4447
archiver.enabled=N
orafin.database.driver=oracle
orafin.database.password=
orafin.database.user=
org.quartz.dataSource.QUARTZ.jndiURL=java\:/propworksDS
org.quartz.dataSource.QUARTZ_NO_TX.jndiURL=java\:/quartzDS
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT
org.quartz.jobStore.dataSource=QUARTZ
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.nonManagedTXDataSource=QUARTZ_NO_TX
org.quartz.jobStore.selectWithLockSQL=SELECT * FROM {0}LOCKS WHERE LOCK_NAME \= ? FOR UPDATE
org.quartz.jobStore.tablePrefix=QRTZ_
org.quartz.scheduler.instanceName=DefaultQuartzScheduler
org.quartz.scheduler.rmi.export=false
org.quartz.scheduler.rmi.proxy=false
org.quartz.scheduler.xaTransacted=false
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=3
org.quartz.threadPool.threadPriority=9
psfin.database.driver=oracle
psfin.database.password=
psfin.database.user=
pwarchiver.database.driver=oracle
pwarchiver.database.password=
pwarchiver.database.user=

Two solutions:
1) move java to folder that does not have spaces in it.
2) double quote path when you set it
SET JAVA_HOME=""C:\Program Files\Java\jdk1.7.0_40""

add \ similar below :
SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_40\

this is caused by the space in front of C:\Program , so what u need to do is changing your JAVA file in c:program files \java to another file without spaces , and then in top of your file write :
SET JAVA_HOME=""NEW DIRECTORY WITHOUT SPACE\Java\jdk1.7.0_40""
this worked for me.

Related

PHP Warning: Module 'imagick' already loaded in Unknown on line 0, need some assistance

So I checked my spam folder today and had 122 messages send through the server stating:
PHP Warning: Module 'imagick' already loaded in Unknown on line 0
Non stop it keeps sending me this.
Googled it and still have no clue on how to fix it as I need a step by step answer.
Found a similar question on stack but it's too complicated for me to understand.
I'm on the latest Plesk Onyx and OS=Ubuntu 16.04.6 LTS‬.
As I'm running php 7.3 I hoped when I uninstalled php 7.0 in plesk it would go away but unfortunately it didn't.
It's send from here
Cron <root#server> [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean
And after php --ini (read about it on a forum) this was the result:
PHP Warning: Module 'imagick' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File: /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed: /etc/php/7.0/cli/conf.d/00-ioncube-loader-7.0.ini,
/etc/php/7.0/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/15-xml.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
/etc/php/7.0/cli/conf.d/20-curl.ini,
/etc/php/7.0/cli/conf.d/20-dom.ini,
/etc/php/7.0/cli/conf.d/20-exif.ini,
/etc/php/7.0/cli/conf.d/20-fileinfo.ini,
/etc/php/7.0/cli/conf.d/20-ftp.ini,
/etc/php/7.0/cli/conf.d/20-gd.ini,
/etc/php/7.0/cli/conf.d/20-gettext.ini,
/etc/php/7.0/cli/conf.d/20-iconv.ini,
/etc/php/7.0/cli/conf.d/20-imagick.ini,
/etc/php/7.0/cli/conf.d/20-imap.ini,
/etc/php/7.0/cli/conf.d/20-json.ini,
/etc/php/7.0/cli/conf.d/20-mbstring.ini,
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
/etc/php/7.0/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.0/cli/conf.d/20-pdo_sqlite.ini,
/etc/php/7.0/cli/conf.d/20-phar.ini,
/etc/php/7.0/cli/conf.d/20-posix.ini,
/etc/php/7.0/cli/conf.d/20-readline.ini,
/etc/php/7.0/cli/conf.d/20-shmop.ini,
/etc/php/7.0/cli/conf.d/20-simplexml.ini,
/etc/php/7.0/cli/conf.d/20-sockets.ini,
/etc/php/7.0/cli/conf.d/20-sqlite3.ini,
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.0/cli/conf.d/20-sysvsem.ini,
/etc/php/7.0/cli/conf.d/20-sysvshm.ini,
/etc/php/7.0/cli/conf.d/20-tokenizer.ini,
/etc/php/7.0/cli/conf.d/20-wddx.ini,
/etc/php/7.0/cli/conf.d/20-xmlreader.ini,
/etc/php/7.0/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.0/cli/conf.d/20-xsl.ini,
/etc/php/7.0/cli/conf.d/20-zip.ini,
/etc/php/7.0/cli/conf.d/zend_extensions_psa.ini
I already know it's probably easily fixed when you know linux but I'm learning on the go and posses very little knowledge yet.
Could anyone assist me with the right commands?
Cheers
Locate where is your php.ini file by:
php -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/etc/php/7.4
Loaded Configuration File => /usr/local/etc/php/7.4/php.ini
Open the php.ini file and remove the line:
extension=imagick.so
or change the line to a comment:
; extension=imagick.so

How to run .sml file by using emacs?

I'm not able to run simple .sml file in emacs. Please, help me.
Standard ML of New Jersey v110.76 [built: Sun Jul 14 09:59:19 2013]
- use "s.sml" ;
[opening s.sml]
[use failed: Io: openIn failed on "s.sml", Win32TextPrimIO:openRd: failed]
uncaught exception Error
raised at: ../compiler/TopLevel/interact/interact.sml:24.14-24.28
Thanks,
Darshan
I would suggest the following
1.Close Emacs,then open it
2.Create new file by C-x C-f
3.enter valid sml code in the file wc you created and named test.sml say
4.C-x C-s to save it
5.M-x run-sml and press return twice
6.In the sml REPL enter use "test.sml";press return
7.This is it!!!
Make sure that the directory before you run sml is the same one as the one where the file exists. Otherwise, you must use the file's absolute path. Take a look at this question which deals with the same problem (and suggests it might be an issue with file not being specified correctly).

Issue in starting Apache DS

Hi I am facing an issue in starting the Apache DS. My environment is as follows.
Windows 7
64 Bit
I have 2 JVM's running (32 and 64bit) I have given the 32 bit JVM for the Apache DS.
When I start the service it says "windows couldnt start ApacheDS - default service on Local computer Error 1067 The process Terminated Unexpectedly"
When I check the logs in the instances folder shows the following log
STATUS | wrapper | 2013/07/15 15:27:55 | --> Wrapper Started as Service
STATUS | wrapper | 2013/07/15 15:27:55 | Launching a JVM...
INFO | jvm 1 | 2013/07/15 15:27:55 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2013/07/15 15:27:55 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2013/07/15 15:27:55 |
STATUS | wrapper | 2013/07/15 15:28:01 | <-- Wrapper Stopped
Can Someone please help me to start the Apache DS Service
Go to the
Program Files\ApacheDS\instances\default\conf
and modify the log4j.properties Change all FATAL log level to the DEBUG and restart the service. You can find what is the main reason of problem in new log files that are produced in the
Program Files\ApacheDS\instances\default\log
For example I have this problem after change the log level, I found the main error is
ERR_250_ENTRY_ALREADY_EXISTS ou=system already exists!
And this is an open issue in the ApacheDS
https://issues.apache.org/jira/browse/DIRSERVER-1954
Hope this help you!
Open Installation path and go to below path or where ever you have installed your Apache DS,
open C:\Program Files (x86)\ApacheDS\conf\wrapper.conf xml file in text mode
find below path,
Path to java executable
wrapper.java.command
you need to update "wrapper.java.command=" with you the java installation path example as below,
wrapper.java.command=C:\Program Files\Java\jre1.8.0_221\bin\java.exe
follow above path or find the java directory and update,
you are fine to fire your ApacheDS service, go to services(or C:\Program Files (x86)\ApacheDS\Manage ApacheDS --> Double Click) find ApacheDS and start.
This isn't my solution - but I think this answer the temp directory problem with also explaining why it occurs - Please find the link and the answer below:
https://issues.apache.org/jira/browse/DIRSERVER-2007
I tested this change (since it made it into the lastest version of ApaceDS server) and it is still not working on Windows 2008 when running as a service, but the problem is not the length of the path but the ability to write the temp directory. On my system the TEMP & TMP environment variables are set to:
%SystemRoot%\TEMP for System and for User is it %USERPROFILE%\AppData\Local\Temp.
Since the ApacheDS service is running as "Local System account" I would assume it would be trying to write to %SystemRoot%\TEMP. For whatever reason (and I can think of a few) ApacheDS can't create a temp file in that folder.
I fixed by creating a tmp folder in the instance directory and added the following line to wrapper.conf:
wrapper.java.additional.6=-Djava.io.tmpdir="%INSTANCE_DIRECTORY%/tmp"
That fixed the problem. I think it would be better if ApacheDS explicitly set it's temp folder to someplace it controlled and knew it could write to. A sys admin that wanted the files somewhere else could make a symlink or change the wrapper.conf. Those temp files contain ldap data so it would be better from a security standpoint to keep them with the rest of the instance data. If the instance is going to have its own log folder it might as well have its own temp directory.
Might it be, that you have selected javas /bin folder during installation as Java root directory?
If so, set it one level higher, as /bin is not the root directory.
If you have the below error all you gotta do is create a 'Temp' Directory in 'C:\Windows\system32\config\systemprofile\AppData\Local' and that's it.
C:\Windows\system32\config\systemprofile\AppData\Local\Temp\tempks1231340801626329934ks
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
at java.nio.file.Files.newByteChannel(Unknown Source)
at java.nio.file.Files.createFile(Unknown Source)
at java.nio.file.TempFileHelper.create(Unknown Source)
at java.nio.file.TempFileHelper.createTempFile(Unknown Source)
at java.nio.file.Files.createTempFile(Unknown Source)
at org.apache.directory.server.core.security.CertificateUtil.createTempKeyStore(CertificateUtil.java:318)
at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:219)
at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:152)
at org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:175)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)*
I got the same issue. I managed to solve that, and I succeeded. The solution is as follow:
Open Java settings in Control panel (Control Panel>Programs>Java on,
my case, windows 7)
The setting screen shows up. Then click on Java tab. Click View...
button
At the User tab, click on Find button
After that, you choose the folder that contains the x86 JRE.
Finally, click Finish to add that x86 Run-time Environment to be used by programs that need the x86 version to run.
That's all. Try it.
delete file C:\Program Files (x86)\ApacheDS\instances\default\conf\config.ldif

Hadoop - Input path does not exist

I did set up the hadoop Ubuntu OS, followed all the necessary steps,
1.created the hdfs file system
2.Moved the text files to input directory
3.having privilege to access all the directories.
but when run the simple word count example, i got
Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/user/root/input
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:224)
but, input path is valid and even can able view the files in that path from eclipse itself, so plz assist were i am wrong.
attached the screenshot for the reference
Add the following 2 lines in your code :
config.addResource(new Path("/HADOOP_HOME/conf/core-site.xml"));
config.addResource(new Path("/HADOOP_HOME/conf/hdfs-site.xml"));
Your client is looking into the local FS.
For hadoop-2.2.0 on windows 7, I added the below lines and it solved the issue (NOTE: My Hadoop Home is: C:\MyWork\MyProjects\Hadoop\hadoop-2.2.0)
Configuration conf = new Configuration();
conf.addResource(new Path("C:\MyWork\MyProjects\Hadoop\hadoop-2.2.0\etc\hadoop\core-site.xml"));
conf.addResource(new Path("C:\MyWork\MyProjects\Hadoop\hadoop-2.2.0\etc\hadoop\hdfs-site.xml"));

Default configuration in Play 2.0 causes IOException?

Is this a bug with the default configuration of Play 2.0? I have just installed Play 2.0 and when I create an application for the first time, I get this:
Error during sbt execution: java.io.IOException: Cannot write parent directory: Path(/home/hanxue/play/myFirstApp/app) of /home/hanxue/play/myFirstApp/app/views
The app subdirectory does not have write permissions:
hanxue#ubuntu-dev:~/play$ ls -l myFirstApp/
total 16
dr-xr-xr-x 2 hanxue hanxue 4096 2012-03-13 11:22 app
It also seems that the $PLAY/framework/sbt/boot/ directory need to be world-writable or otherwise play will throw an IOException about not being able to create /opt/play-2.0/framework/sbt/boot/sbt.boot.lock . Is this by design?
I solved it by giving it world-writable permission
chmod -R o+w /opt/play-2.0/framework/sbt/boot/
This is not a bug, it is just how sbt works(and play-2.0 uses sbt). Sbt downloads all necessary parts first time when its started, and default behavior of play is that all dependency go to same directory and this is place where you extracted play-2.0, so this directory needs write permissions. You will probably need write permissions on /opt/play-2.0/repository too.