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 …

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 …

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 …

Package dependent Java JAR files into the project JAR file

When you execute your Java JAR file, you need to include all dependent JAR files in the “fat jar” file, so the Java virtual machine can find them at runtime. Set up NetBeans to include the JAR files from the library In NetBeans you need to add the list of dependent libraries to the build.xml file. On the …