Cannot create JDBC driver of class ‘ ‘ for connect URL ‘null’ : I do not understand this exception

I can’t see anything obviously wrong, but perhaps a different approach might help you debug it? You could try specify your datasource in the per-application-context instead of the global tomcat one. You can do this by creating a src/main/webapp/META-INF/context.xml (I’m assuming you’re using the standard maven directory structure – if not, then the META-INF folder … Read more

Difference between a “jta-datasource” and a ” resource-local ” datasource?

The terms “jta-datasource” and “resouce-local datasource” are a little vague to me. I guess you actually refer to the jta-datasource and non-jta-datasource elements. In short: if the transaction type of the persistence unit is JTA, the jta-datasource element is used to declare the JNDI name of the JTA data source that will be used to … Read more

Does Tomcat require JDK or JRE?

Tomcat’s RUNNING.txt which you can find in the root of the bundle states that Apache Tomcat requires Java Standard Edition Runtime Environment (JRE) to run. Minimum version of JRE depends on the version of Tomcat: for Tomcat 6.0 it is Java 5, for Tomcat 7.0 – Java 6. However you can also use JDK because, … Read more

What is the best place to store a configuration file in a Java web application (WAR)?

What we do is to put it in a separate directory on the server (you could use something like /config, /opt/config, /root/config, /home/username/config, or anything you want). When our servlets start up, they read the XML file, get a few things out of it (most importantly DB connection information), and that’s it. I asked about … Read more

What’s the difference between the IN and MEMBER OF JPQL operators?

IN tests is value of single valued path expression (persistent attribute of your entity) in values you provided to query (or fetched via subquery). MEMBER OF tests is value you provided to query (or defined with expression) member of values in some collection in your entity. Lets’s use following example entity: @Entity public class EntityA … Read more

What are Interceptors in Java EE?

Interceptors are used to implement cross-cutting concerns, such as logging, auditing, and security, from the business logic. In Java EE 5, Interceptors were allowed only on EJBs. In Java EE 6, Interceptors became a new specification of its own, abstracted at a higher level so that it can be more generically applied to a broader … Read more

WELD-001408: Unsatisfied dependencies for type Customer with qualifiers @Default

Your Customer class has to be discovered by CDI as a bean. For that you have two options: Put a bean defining annotation on it. As @Model is a stereotype it’s why it does the trick. A qualifier like @Named is not a bean defining annotation, reason why it doesn’t work Change the bean discovery … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)