Generate SQL script from Entity Framework migration script

It is not recommended to execute Entity Framework migration scripts in production, It is important that you execute all SQL steps manually on the production database section-by-section to immediately see the result and be able to recover in case a destructive action goes wrong. The Visual Studio .NET application templates contain Entity Framework migration scripts to …

DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded.

The .NET Core Entity framework makes database access easy. When you auto-generate a Razor page in a .NET web application to edit a data row, the scaffolding places controls on the page for every column. There are columns in most of the tables that we don’t want to display or edit, like keys, checksums, password …

java.lang.NoClassDefFoundError, java.lang.ClassNotFoundException

When you add a dependency reference to a Java project, it may compile without any errors, but runtime you may get an error message similar to this: HTTP Status 500 – Internal Server Error Type Exception Report Message An exception occurred processing JSP page [/index.jsp] at line [1] Description The server encountered an unexpected condition …

Java Spring MVC web application configuration in NetBeans 8

When you create a Java Spring MVC web application or make changes to an existing one, it is important to know the location of configuration values. Java package name The Java package name is stored in Every .java file package MY_PACKAGE_NAME pom.xml file <configuration> <mainClass>com.objectdb.Enhancer</mainClass> <arguments> <argument>MY_PACKAGE_NAME.MY_MAIN_CLASS_NAME</argument> </arguments> </configuration> .jsp file <%@page import=”MY_PACKAGE_NAME.*”%> <jsp:useBean id=”MY_BEAN_ID” type=”MY_PACKAGE_NAME.MY_DAO_CLASS_NAME” …

org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder

This error can happen on Linux and Windows, and the cause could be the same. On Windows Server 2012R2 I opened a command prompt. To be able to delete a directory from the Tomcat webapps folder, I have issued the shutdown command. When I started the server with the startup command, and navigated to my local …

Only persistence units with transaction type JTA can be used as a container managed entity manager

NetBeans can use multiple deployment servers. When your web application uses the Entity Framework and you select the Glassfish server as the deployment server, you can get the error message when you try to run your application in the IDEÉ Severe: Exception while preparing the app : The persistence-context-ref-name […] in module […] resolves to a …

Install Git on Windows

If you use two-factor authentication see Create a Personal Access Token to use it as password in the command line tools at Switching to 2-factor authentication in GitHub Navigate to https://git-scm.com/download/win to download Git for Windows. The page automatically downloads the installer for the operating system you use. Install the application Accept the default values, including these: Make …

Deploy a WAR file of a Java web application on the Apache Tomcat web server

There are two ways to deploy a WAR file of a Java web application on the Apache Tomcat web server Using the command line Copy the WAR file into the webapps folder of the Tomcat installation directory, Make sure the CATALINA_HOME environment variable points to the Tomcat directory (not the bin subdirectry) Open a Terminal window or …

Create a WAR file for a Java web application in NetBeans

Configure the web application Add the web.xml file The wb.xml file contains the web application configuration values for the webserver. I has to be in the WEB-INF directory of the web applicaion. To add the web.xml file to your NetBeans Java web application Right-click the Netbeans project, and select New -> Other… In the New File window select …

The specified Security Group and Parameter Group are not set in the RDS instance

If the Terraform apply execution times out during the RDS instance creation, the specified Security Group and Parameter Group is not set in the RDS instance. The solution is to set the timeout in the aws_db_instance resource. When a multi-az RDS instance is launched from a snapshot, the process can take more than 55 minutes. The default …