I have written a program with the play framework 2.3.8 named quizSystem.
It is using a memory database, some controller, viewclasses etc.
Now I want to run my program on another machine (windows 7 with JDK 8u45 installed and the PATH set to the JDK), therefore I ran activator dist on machine 1 and got a .zip-File with a snapshot of my program. I copied this zip file to machine 2, extracted it and used the console to go to the /bin folder. In there are 2 files quizSystem and quizSystem.bat.
So I typed quizSystem
Error: Oops, cannot start the server ... Database 'default' needs evolution
So I tried this: quizSystem -DapplyEvolutions=true
Error: Bad application path: -DapplyEvolutions=true
So then I added the line applyEvolutions=true into the application.conf file.
But still, no matter which command I use I can start the program.
I have searched and tried many solutions like here: Play Framework 2.1.1 Deployment Issues
Why is the evolution / my program not working?
Found the solution:
There seems to be an (open?) bug in the play framework at the moment:
https://github.com/playframework/playframework/issues/3081
If I understand correctly the order of the input parameters for java is the wrong way around in the play framework. Thats the reason that manual input in the console produces an error...
So here is the complete list of steps in order to produce a working program for deployment:
1) In your directory type activator dist into console
2) You get a zip file in the /target/universal directory (something that contains the word SNAPSHOT or similar
3) On your target machine you need an installed JDK, goto here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
4) Extract your zip-file, in the /bin-folder edit the .bat file
5) search for set "APP_MAIN_CLASS=play.core.server.NettyServer" and change to
set "APP_MAIN_CLASS= -DapplyEvolutions.default=true play.core.server.NettyServer"
6) Then simply use the console to navigate to the folder and type the name of your program
I hope this spares somebody else several hours of frustration, despair
and lots of shouting and cursing :D
Related
I'm trying to install JDK 7 on a Windows 7 machine and constantly getting the error "A semi-colon found in selected path" no matter what path I select for the installation.
Tried with different updates of JDK and it didn't help either.
EDIT: Installation log shows the following error:
Thu May 05 06:34:19 2016
:: JDK installation failed. Return Code: 1603, ErrorCode: 0
This error message is displayed by the Microsoft Windows Installer engine and is a general error code that indicates a problem occurred during the installation.
Read on to learn how to sidestep this speed bump.
The following is a non-exhaustive list of known causes for this error:
Short file name creation is disabled on the target machine.
An Install Script custom action is prototyped incorrectly.
A file is locked and cannot be overwritten.
The Microsoft Windows Installer Service is not installed correctly.
The Windows Temp folders are full.
The setup was corrupted after installation and, therefore, fails with this error during un-installation.
An older version of Install Shield Developer is being used.
A general error occurred during the installation.
Print and File sharing is not installed or enabled when installing MSDE 2000.
How to Avoid this Error
The following solutions have resolved this error in the majority of cases:
Make sure short file name creation is enabled on the target machine. You can check to ensure that the target machine does not have short file name creation disabled by navigating to the following registry entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Make sure the value "NtfsDisable8dot3NameCreation" is equal to 0. This indicates that short file name creation is enabled. A value of 1 indicates that this functionality is disabled. You should change the value to 0.
After modifying this value, the target machine should be rebooted before attempting to launch the setup again.
Note: If the target machine should normally have short file name creation disabled, it can be disabled after the install completes by resetting "NtfsDisable8dot3NameCreation" to 1 and rebooting.
To ensure that the Windows Installer Service is properly installed and configured, it is recommended that users install the file InstmsiA.exe on Windows 95/98/Me or InstmsiW.exe on Win NT systems. These files are shipped with your InstallShield product and are located in the following location:
<Product Path>\Redist\Language Independent\i386
Empty all temporary folders. The specific temporary folders for a machine can be determined by accessing the DOS prompt and typing set. Note the values listed for TEMP and TMP, and delete all files in those locations.
Make sure no other applications, including utilities such as virus scanners, are running in the background. Close all running applications and utilities, and launch the installation again.
If this error occurs during un-installation, use the Microsoft Windows Installer CleanUp utility to uninstall the installation.
Once the installation has been successfully un-installed, you can then debug the project to determine what caused the original error.
Put your installer executable to C:\ and run it from there.
More info here: http://wills-tech-notes.blogspot.com/2015/12/cannot-install-java-semicolon-found-in.html
The Error which you are getting is normally it throws during java update installation, Not, the first time installation.
Please kindly follow the below steps to resolve your issues. Let's give a try.
Step 1:
Just want to ensure if you have already java installed on your machine partially.
Follow the below entries in command prompt:
java -version - If it throws error we are good.
echo %JAVA_HOME% and echo %JRE_HOME%
echo %PATH% - If you see the Java entries you may need to clear all this.
echo %CLASSPATH% - Here as well as said in above.
If no results from the Step 1, Please follow Step 2.
Step 2:
Check your C: drive for to verify there should not any Java installation folders. If yes, Please delete those.
Clear all your logs from your machine(If it contains any existing java related logs)
https://www.java.com/en/download/help/plugin_cache.xml
Step 3:
Actually, we do not require to install the Java, instead we can download the Zipped java file and locate into dedicated drive.
And then, make all your environment variables entries into this location. In, this case you are good i believe.
If you still face issues, do let me know?
Try this and maybe you'll get your job done
1 Close the installer when you see Java error 1603. (It has installed a
bunch of files, but exits prematurely.)
2 Open javacpl.exe from C:\Program Files (x86)\Java\jre1.8.0_XX\bin (or
for x64, C:\Program Files\Java\jre1.8.0_XX\bin) where XX is the update
number.
3 Uncheck "Enable Java content in the browser" on security tab and click
OK to close Java control panel
4 Retry installing Java. It usually succeeds for this time.
5 Open javacpl.exe again (see step #2)
6 Check Enable Java content in browser on security tab and click OK to
close Java control panel
7 If it still fails, try uninstalling windows update KB2918614, then
reboot and try these steps again.
Try following steps:
Run installer from c:/
Run jdk*...*.exe /log msi.log to see installation logs, please attach
them if it won't help you understand a cause of the problem
In the related JDK bug an issue with an environment was a cause of the problem.
uninstall KB3139923 helped in my case
I had the same problem with version 8 and the solution was to run the installer as Administrator (right click, then "Run as Administrator").
I created a Play app for students to use in an assignment for my user interface course. They don't need to modify it, just access it via AJAX. I used "activator dist" to package it up in a JAR file; they download it to their computers, unzip it, and run it locally.
It has worked well for everyone except one student. I'm at my wit's end for debugging and am appealing to the community for ideas.
The exception is:
Exception in thread "main" java.lang.NoSuchMethodError: ch.qos.logback.classic.LoggerContext.getFrameworkPackages()Ljava/util/List;
at play.api.Logger$.configure(Logger.scala:268)
at play.api.Logger$.configure(Logger.scala:232)
at play.api.inject.guice.GuiceApplicationBuilder.applicationModule(GuiceApplicationBuilder.scala:73)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:52)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
at play.core.server.ProdServerStart.main(ProdServerStart.scala)
Things we've checked:
He's running Java 1.8.0_45. It was compiled with Java 1.8.0_66. He has reinstalled Java (which I'm assuming is 1.8.0_66 or greater). No change.
The md5 checksum of the download jar file matches the original.
lib/ch.qos.logback.logback-classic-1.1.3.jar exists and has the same size on his machine as on mine.
We've installed scala/Play/Activator on his machine, copied over the sources and tried compiling from scratch on his machine. Same error.
I've looked in the script prepared by "activator dist". I believe it's calling the same version of java as what we see from the command line. That is, I don't think we're being confused by two copies of the java runtime.
This is on a MacBook Pro (pre-Retina) with El Capitan.
Ideas?
I have been trying to install Apache Ofbiz on my 32-bit processor computer, with Windows 7 as the operating system. I have downloaded Java\jdk1.8.0_25: and apache-ant-1.9.4: and :apache-ofbiz-13.07.01. I made two environmental variables, JAVA_HOME and ANT_HOME; in addition, I included both Java and Ant Apache Bin addresses respectively into the environmental the PATH variable. Then I ran the CMD and entered the Ofbiz directory' cd [apache ofbiz address], thenceforward, I resumed into entering the the 'ant run-install' command, followed by 'ant run-install-seed', I received a 'build successful' message for both of the commands I entered. After the foregone commands were executed I proceeded into clicking the startofbiz located inside the apache ofbiz folder. A cmd screen opened listing all sorts of commands. Once all these were carried out I typed the following address into my internet search bar:
https://localhost:8443/webtools
Notwithstanding, I constantly received the following error message that says THE TEMPLATE LOCATION IS EMPTY even after a numberless amount of permutations, deleting java, re-installing Ant Apache, etc:
:ERROR MESSAGE:
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)
I have not been able to come to grasps with this issue. I don't believe things should be this difficult to install. I stand ready for any guidance, thank you.
As per my best knowledge " ant load-seed (Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant for use after an ualong with the code and needs to be in sync for operation)"
You need to fire ant load-demo start (if you're using OFbiz version 13.07.01).Please make your're at the root of the OFbiz project location. Fyi - At very first time it takes more than 20 mins to load all your demo data and seed data, so please be patient. Hope this will help you.
Note: Please rate this if find useful. Thanks
This issue is not related to your Application setup. it seems your Application setup is fine. This is related to Seed data. The data which requires to initialize the default theme. To load the theme data, execute the following ant command then strat the application. The error should be disappeared now.
ant load-seed
Since OFBiz switched from ant to gradle recently, the correct command to load the seed data is as follows (run in root ofbiz folder e.g. /opt/ofbiz and don't forget the quotes):
./gradlew "ofbiz --load-data readers=seed"
To get the available options for the ofbiz build, run:
./gradlew "ofbiz --help"
Other ant-to-gradle hints can be found here.
You will then need to create an initial user (admin/ofbiz does only exist in demo data).
./gradlew loadAdminUserLogin -PuserLoginId=MyUserName
I am trying to run the JAR "buildtools.jar" but a message keeps popping up:
The Java JAR file "BuildTools.jar" could not be launched.
in smaller writing underneath:
Check the Console for possible error messages.
The console says
12/31/14 10:19:44.021 AM WindowServer[113]: _CGXGetWindowMovementGroup: Operation on a window 0x14 requiring rights 0x5 by caller Dashboard or 12/31/14 10:19:44.021 AM DashboardClient[2747]: _NXMoveWindow: error moving window (1000)
every time I try to open the jar thing up. I know that my Java is updated because I updated before trying anything with this.
I am trying to create a minecraft server with spigot and if you have a step by step process or any hinters about please tell me but my main focus is opening up the jar.
Unfortunately this isn't the very right place to ask this question. You can ask this question at the Spigot Forums.
Are you using the very latest version of BuildTools? You seem like running on MacOS. You may need to run it with this flag, -Dmac.supported=true(refer to this post). Also, The Java JAR file "BuildTools.jar" could not be launched. most likely, you have a broken Jar file. Try to re-download it from {1}(I need 10 population to post more than 2 links). You will also need JDK(Java Development Kits) but I think it is came by default in MacOS and Git {2}.
After you've installed all required things, you can run the BuildTools from Terminal by java -Dmac.supported=true -jar BuildTools.jar You need to wait few minutes for it to be finished.
By running the same command from the Eclipse and from the command line I get 2 different results:
With Eclipse everything works fine, however with the command line I get the following error message:
PosixThing.java:17: error: error while writing PosixThing: PosixThing.class (Permission denied)
This error message does not appear if I run "sudo javac PosixThing.java".
As it if was not strange enough, the same code with a different file located in the same directory (Desktop) does not give me any problem. (I am talking about mere txt files just to test the PosixFilePermissions function).
I checked the file permissions and everything is -rw -rw -rw As well as the others'. Do not know why it happens only with that specific file.
Running on Ubuntu 11.10 jdk 1.7.
Any suggestion to what it might be?
It sounds like a file / filesystem permissions problem of some kind:
Check the owner, group and permissions for the file, and all directories on the file pathname.
Check that you are running Eclipse and your command shell as the same effective user.
Check that you are not attempting to write to some kind of "funky" file system; e.g. a Windows file system mounted on Linux, or a FUSE file system of some kind.
If you've got SELinux enabled, check that's not causing the problem. (That's unlikely.)
It is also possible that you are running different releases / versions of Java in the two contexts, or even that Eclipse's file system cache is out of sync. (It is not clear to me what contexts the code is actually running in.)