Tag: Java
-
java.lang.NoSuchMethodError: javax/persistence/OneToMany.orphanRemoval()Z
PROBLEM You configure Hibernate using annotations and set orphanRemoval property in @OneToMany. When you run the application, the application server throws the following exception:- In my case, I’m getting this exception when I run on Websphere Application Server (WAS) 7.5. SOLUTION The orphanRemoval property in @OneToMany requires JPA 2.x to work. If you already have Read More…
-
The message with Action ” cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher
PROBLEM You get this error message when invoking a web service:- org.springframework.ws.soap.client.SoapFaultClientException: The message with Action ” cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the Read More…
-
Cannot process the message because the content type ‘application/soap+xml; charset=utf-8’ was not the expected type ‘text/xml; charset=utf-8’
PROBLEM You are getting this exception when invoking a web service:- org.springframework.ws.client.WebServiceTransportException: Cannot process the message because the content type ‘application/soap+xml; charset=utf-8’ was not the expected type ‘text/xml; charset=utf-8’. [415] SOLUTION You are using the wrong SOAP version. SOAP v1.1 uses text/xml while SOAP v1.2 uses application/soap+xml. If you are using Spring Web Services, add Read More…
-
Using Spring Web Services and JAXB to Invoke Web Service Based on WSDL
There are several ways to consume a web service based on a WSDL from Java. After trying a couple of approaches, I’m currently leaning towards Spring Web Services and JAXB. The biggest advantage of using both Spring Web Services and JAXB to consume a web service is the flexibility to change the web service URL Read More…
-
Configuring Quartz Scheduler to Run in Clustered Environment
The goal of running a Quartz job in the clustered environment is NOT to have duplicate running jobs. The triggered job should run just one time regardless of the number of nodes in the clustered environment. Download Quartz and extract the file. Navigate to quartz-x.x.x -> docs -> dbTables and run the database SQL script Read More…
-
Reading Directory/File’s ACL Directly from Java
Prior to Java 7, there’s no way to read a directory/file’s ACL directly from Java. With Java 7, you can write something like this:- When you execute the code above, you will get something like this:- Read More…