I'm trying to build a WS with CXF. I'm following this article http://www.ibm.com/developerworks/library/ws-pojo-springcxf/
But I have 2 questions:
1) http://stackoverflow.com/questions/3969268/which-maven2-artifacts-are-necessary-to-build-a-ws-with-cxf-and-spring
2) I'm getting this error: FileNotFound: META-INF/cxf/cxf.xml. I don't ...
Hi,
I'm trying to instantiate a generic class in Spring, but I get following exception:
Initialization of bean failed; nested exception is
org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class football.dao.jpa.GenericJpaDAO]: Common causes of this problem include using a final cla...
My application of OEIV Filter doesn't seem to be getting applied to my Struts actions. I am using Spring 3, Spring Security 3, Struts2, Tiles2 and JPA backed by Hibernate 3. When I try to access a collection for an entity in a struts action, unless the Entity has a fetch type of eager, I am getting a JPA LazyInitializationException. I s...
I am working with several Spring MVC web applications and I use the getter/setter dependency injection and configure all my beans in my app-servlet.xml file.
I believe that I am following convention with most of the properties and beans that I am injecting into my controller beans such as my DAO's and other beans that I have specified i...
ANY advice would be apprecated. I'm stumped...
Problem
On my laptop, anytime our application tries to load the application-config.xml, I get a java.lang.reflect.MalformedParameterizedTypeException.
The EXACT same code works on my desktop and my coworker's desktop/laptop. But on my laptop it throws this error. Since my laptop and des...
I am having some kind of classpath problem:
I've put my context.xml files in META-INF/spring/conf/
They can be perfectly found by Spring using classpath:WEB-META/spring/conf/root-context.xml
(root-context.xml references other xml's).
My Hibernate.cfg.xml is on src/main/resources, so it 'should' be on the classpath, however Spring does...
How can I access HTTP headers in Spring-ws endpoint?
My code looks like this:
public class MyEndpoint extends AbstractMarshallingPayloadEndpoint {
protected Object invokeInternal(Object arg) throws Exception {
MyReq request = (MyReq) arg;
// need to access some HTTP headers here
return createMyResp();
}
}
invoke...
Hi,
I have read about Spring ACL but it does not seem to be very competent. For example:
1) No way to list all objects of type X with permission Y
2) No way to automatically create the schemas for new deployments
What are you using for ACL? Is it clever to have the ACL so decoupled from the domain model?
Thanks,
Piotr
...
Hello!
I am migrating from Spring 2.5 to Spring 3.
They have introduced <mvc:annotation-driven /> which does some black magic. This is expected to be declared in servlet configuration file only.
In spring 2.5 I have just used <context:annotation-config /> and <context:component-scan base='...'/> tags declared both in application-cont...
I have two XML Schemas. First (A.xsd) is located in a library jar file (mylib.jar) and the second one (B.xsd) is in my project.
I want to import A.xsd into the B.xsd and validate incoming XML via Jaxb2Marshaller embedded validator.
However I'm unable to make it work properly: it seems that inner XML validator of Jaxb2Marshaller does no...
Hi,
I have a package containing annotated entity classes that I import into my web project.
When tomcat deploys the project the entity class that are in the jar are not scanned for annotations. is there a way to tell spring to search for annotated classes inside a jar file? i.e. :
<context:component-scan base-package="{path to jar or...
I am using spring security and have an admin jsp page for editing user details. I want to be able to grant or revoke authorities on this page. The following checkboxes tag works to display a given user's existing authorities:
<form:checkboxes path="authorities" items="${roles}" delimiter="<br />" />
where authorites is an attribute ...
I am working on a Spring MVC application in which I have recently been convinced to revamp my database code. Before I was using very traditional JDBC code that I have been told was very "old school" because of the boilerplate code. I have been making the transition to using JdbcTemplate with Spring.
I have configured a bean like shown b...
I am using CXF generated code to connect to a remote web service over SSL and through a corporate proxy. The code works fine when the connection is established through the Java API and all SSL settings are set as system properties as follows.
System.setProperties("https.proxyHost", "myproxy.com");
System.setProperties("https.proxyPort"...
Hi there,
I am currently working on Spring MVC web app and trying to hook up validation using the @Valid annotation. When I fire up the application I'm getting the following exception:
javax.validation.ValidationException: Unable to find a default provider
I have Hibernate Validator 3.1.0.GA on the classpath as well as javax validat...
Hi,
I'm just trying to explore one use case of using object as a value in a spring map. Here's my example
<util:map id="someSourceMap" map-class="java.util.HashMap">
<entry key="source1" value="testLine"/>
<entry key="source2" value="testLine2"/>
</util:map>
<bean id="testLine1" class="com.test.ProductLineMetadata" scope="prototype">
...
Hi,
I would like to have a Bean and a SubBean like this:
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
@Component
public class SubBean implements ApplicationContextAware{
private Object parent;
public void setApplicationContext(ApplicationContext ctx){
this.parent = doSomeMagicToGetMyParent(ctx);
}
public Object getParent(){
...
I'm trying to POST a JSON object to a controller in Spring 3.
I'm getting the following error:
2010-10-20 17:59:14,391 DEBUG [org.springframework.web.servlet.DispatcherServlet] Could not complete request
org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unrecognized token 'tilI': was expecting 'nu...
I am using JQuery ajax in Spring MVC 3. When making the following call, I am running into a dilemma with myurl. On the local development machine, myurl would be localhost:8080/myapp/my_json_controller. On the production, my url would be domain/my_json_controller. I tried using relative url, /my_json_controller, and it would not work ...
I'm currently just exploring JSF 2 in the JEE 6 stack.
I find quite a bit of limitations with JSF and the way ManagedBeans are used is very counter-intuitive / odd:
It seems that, in order to execute an action event, you have to use <h:commandLink> tag. Thats all well if I was for example, posting form data. However in this case, all I...