Posts

Showing posts from July, 2015

Play - Caused by: java.lang.RuntimeException: There is no started application

Problem:Caused by: java.lang.RuntimeException: There is no started application
Solution:Tests under under Playframework need to be run inside fakeApplication()
source: https://www.playframework.com/documentation/2.0/JavaTest


PersistenceException: ERROR executing DML bindLog[] error[Column 'XXX' specified twice]

Problem: javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Column 'graphId' specified twice]
(...)
@Required
public String city;
@Required
public String birthdate;
@Required
public String username;
@Required
public String password;
public Long role_id;
@ManyToOne
@JoinColumn(name = "role_id")
public Role role;

Solution:  Tell Hibernatee not to process the join column a "second time":
@ManyToOne
@JoinColumn(name = "role_id", insertable = false, updatable = false)
public Role role;

Play - com.mysql.jdbc.Driver driver not found

Problem: Configuration error

Driver not found: [com.mysql.jdbc.Driver]
In /Users/guybrushtreepwood/git/Play/assessment-joel/conf/application.conf:33
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost:3306/play_assessment_db"
db.default.user=play_user
db.default.password="Pl@y"
db.default.logStatements=true

Solution:Add libraryDependencies += "mysql" % "mysql-connector-java" % "5.1.21" to build.sb located in the root of your projectRun "sh activator clean" (MACOS)Run "sh activator dependencies (MACOS)

Wordpress, Hostmonster - 403 permission denied wp-admin install.php

Problem: 403 Permission Denied
You do not have permission for this request /wp-admin/install.php

Solution 1: Are you using an FTP application to manage your new Wordpress files? If so, try to use CPanel instead.

Solution 2:Backup your .htaccess (rename it to .htaccess.old Replace its contents with the default configuration:
Options +FollowSymLinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Heroku - Java HTTP 500 connection refused

Problem:    HTTP ERROR 500
   Problem accessing /header.jsp. Reason: Connection refused

   Caused by:java.net.ConnectException: Connection refused at   java.net.PlainSocketImpl.socketConnect
Solution:    Check that there are no calls hardcoded connections to localhost (JSP imports, etc)