0
votes
0answers
10 views

What is <task:scheduled ref=“runScheduler” method=“run” cron=“*/5 * * * * *” />? [duplicate]

I am just reading through some tutorials on Cron jobs in Spring and this turoail http://www.mkyong.com/spring-batch/spring-batch-and-spring-taskscheduler-example/ has this: <task:scheduled ...
1
vote
0answers
3 views

Spring 4.0 Oauth 2 not working

This is the configuration I had from Spring 3.x Spring oauth 1.0 related application. It used to work and now after upgrading dependencies to Spring core 4.0 and Spring sec oauth 2.0, it doesn't work. ...
0
votes
0answers
4 views

Declaring Inter-bean dependencies works even with plain @Component classes, but as per Spring 3.2.10 Relese doc it shouldn't

As per the Spring 3.2.10-RELEASE doc, page 118 NOTE. This method of declaring inter-bean dependencies only works when the @Bean method is declared within a @Configuration class. You cannot declare ...
0
votes
0answers
13 views

Want to know when to use @Component and when to use @Configuration with AnnotationConfigApplicationContext

i know springs AnnotationConfigApplicationContext is capable of accepting not only @Configuration classes as input, but also plain @Component classes and classes annotated with JSR-330 metadata. I ...
0
votes
0answers
12 views

ClassNotFoundException: javax.ws.rs.core.Response, Using Jersey and Spring

I get this exception when I try to start the server after adding my project in it. I know I have included the jar that contains this file in the project. I am using Spring 4.0.6 and Jersey 2.13 on ...
0
votes
2answers
23 views

How to make JpaRepository return records for repository specified class only?

I have two entities: @Entity @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) class A @Entity class B extends A and a spring JpaRepository interface: @Repository ...
0
votes
1answer
11 views

Spring Security Servlet Login

I have an existing web application that is covered by spring security. I need to add a servlet (or a generic endpoint) that works this way: It receives a POST with a json It processes the data ...
0
votes
0answers
23 views

How to map HashMap keys to a select in thymeleaf?

I have a HashMap which looks pretty much like this.. class MyDTO { private Map<Long, StringListWrapper> myMap=new HashMap<>(); private List<Long> keys=new ArrayList<>(); ...
0
votes
0answers
10 views

Hibernate/JPA + HSQLDB - Failed to access the database in Server mode although the same configuration works for Standalone mode

I am working on a web service that uses Spring and Hibernate-JPA. So far I was using HSQQLDB in the Standalone (In-File) mode. Now I need to access the data base from other application at the same ...
0
votes
1answer
12 views

Spring Security: Enable/Disable CSRF by client type (browser / non-browser )

Spring doc says "When you use CSRF protection? Our recommendation is to use CSRF protection for any request that could be processed by a browser by normal users. If you are only creating a service ...
0
votes
0answers
11 views

Sping social facebook template thread safety

I am currently using Spring Social to access page meta information from Facebook. There appears to be a significant proportion of time (20%) spent initialising the FacebookTemplate object which is ...
0
votes
2answers
16 views

Could not obtain transaction-synchronized Session for current thread

I am getting the following Exception with a Spring4/Hibernate4 project I converted from xml- to Java-Config. org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for ...
0
votes
0answers
22 views

Eclipse Tomcat publish not working

I am a newbie in web applications. I created a spring web project using Tomcat as my application server, which was running fine. I made a few changes to the WEB-INF folder(added new .html files ...
1
vote
0answers
11 views

Query-Annotation in Spring-Data Mongo to search for key/value of a Map

i have an entity containing a key/value-Map which i want to use with Spring-Data Mongo. Persistence worked very easy. Now i want to implement a very dynamic Query on this map, where also the KEY of ...
1
vote
1answer
28 views

Java -Spring 4.1.0 - Webapp Beans Loading Twice

In my spring based Java project, the startup tasks for my project seem to be getting loaded twice. Would anyone have any idea based on the information at the following gist why this is happening for ...
0
votes
1answer
25 views

Java Date problems with TIMEZONE

I am struggling on this for days. I have a date field, that gives a date on 'yyyy-MM-dd' format. My Object have this field like this @Temporal(TemporalType.DATE) private Date finishdate; I am on ...
0
votes
0answers
21 views

Tomcat HTTP Status 404 after switch location in eclipse

I created a spring web application in eclipse, with Tomcat as runtime server. It worked fine,and I couls see my app working using: http://localhost:8080/MyAppName/ But once I did switch ...
0
votes
0answers
13 views

JsonMappingException: could not initialize proxy - no Session through reference chain

I'm using the below dependencies and I'm also registering the Hibernate4Module , Though I'm getting lazy initialization exception for lzaily loaded objects.it's tedious to keep on going ignoring ...
0
votes
2answers
12 views

Error while calling spring controller action through URL posting

i defined action mapping like "@RequestMapping("/loginuser.sn")" and try to call this from url = new URL("loginuser.sn"); HttpURLConnection conn = (HttpURLConnection)url .openConnection(); I got ...
1
vote
2answers
44 views

Java-Spring, strange NullPointerException

i'll explain the situation. I've an application web, java + spring + hibernate. Actually i want to integrate DWR with Spring, so i did all the configuration and i think what i did works fine, since i ...
3
votes
1answer
18 views

How to intercept an AsyncClientHttpRequest using AsyncRestTemplate?

I'm developing an asynchronous REST client using the spring AsyncRestTemplate helper class. The client needs to send a token in the header of every requests. It is possible to add an interceptor ...
1
vote
0answers
7 views

Tomcat 6 and 7: WebappClassLoader: attempted duplicate class definition for name: org/apache/openjpa/persistence/osgi/BundleUtils

I'm trying to launch a tomcat with openjpa 2.3.0 and spring 3.1.4. I might be a basic class loading problem but it's quite hard to figure out and I'm stuck now for 2 days. <bean ...
-1
votes
0answers
19 views

A detailed and well explained Spring 4 with Tomcat tutorial/sample application [on hold]

I understand that this question is probably too broad and not right for this forum, but this is the best source of information I know of. I want to learn want to learn web development using Spring ...
0
votes
1answer
21 views

Spring automatic adds model param to url

When I use return redirect in methods, spring automatically adds my Model variables like get params to url. I've found solution here Spring MVC Controller: Redirect without parameters being added to ...
-1
votes
2answers
30 views

java.lang.NullPointerException:sessionfactory is null

Hi all i am using spring with hibernate and getting null as sessionFactory when i try to save my data.I try hard but not able to find why i am getting sessionFactory as null; Below is my xml and java ...
0
votes
0answers
30 views

Not able to run standalone application with spring configuration

Case 1: When FileSystemXmlApplicationContext is used, i could run the application through netbeans IDE but if i create a deployable jar it, file not found exception is thrown Case 2: when ...
0
votes
1answer
25 views

spring-security forse “http” authentication

I can't log in using spring-security. The error is (in Mozilla) The connection was interrupted The connection to 127.0.0.1:8180 was interrupted while the page was loading. The site could be ...
0
votes
0answers
18 views

Spring Boot AutoConfig for Repository in another module

I converted my project into a spring boot application. The problem I have met is the model/repo module is not a sub package of the main method package. When I annotate @EnableAutoConfiguration in the ...
1
vote
0answers
48 views

How to fake java.version

I have a problem with Spring 2.5, the problem is addressed here: Spring/Java error: namespace element 'annotation-config' … on JDK 1.5 and higher Due to the risk in upgrading to higher Spring ...
0
votes
3answers
62 views

is my try catch block required?

I have an aspect that intercepts a lot of methods in my code. I was wondering if joinPoint's signature and declaring type can ever be null. If no, then my try...catch is not required. In other words, ...
0
votes
0answers
26 views

Spring Boot MVC Multi-Module Executeable jar

I have a multimodule project, build with spring boot 1.1.7 The structure is + parent + import + web + backend My Parent Module will include kind of microservices, what I want ...
0
votes
0answers
13 views

Make CXF services visible between multiple web applications

I have service A in web app A and service B in web app B. Both installed in the same web server. I am trying to communicate service B from service A through local transport. But when I try it it ...
0
votes
1answer
29 views

How to force redirect to HTTPS when application has no web.xml

I'm developing a web application using Servlet 3.x and I do not have web.xml instead I use the configuration annotation. I want to restrict all traffic to my application thats deployed in Openshift to ...
0
votes
0answers
9 views

How do I build a metawriter bean for Alfresco?

I'm reading the short (3 page) Metadata writer user's guide and am left confused. Clearly I need to build a Spring bean with my mappings and link it with the document type. Doesn't seem to be any ...
-1
votes
3answers
25 views

cannot create bean on spring MVC [on hold]

I create jdbc template class to querying from mySQL. i found the tutorial from here, but i cannot create the bean for the jdbc template. I use netbeans to generate spring mvc project Here is my ...
0
votes
3answers
39 views

Could not autowire - org.springframework.beans.factory.BeanCreationException

I am trying to build a restful web service with Spring Boot, Maven, and Tomcat. When I try to deploy maven jar file to Tomcat I receive this error: ...
0
votes
1answer
28 views

How to get beans defined in main-servlet.xml from controller

I understand beans in my main-servlet.xml is in child context. And based on research I know I can get root ApplicationContext within my GreetingController through WebApplicationContextUtils. Which ...
0
votes
1answer
10 views

Clear browser cache when redirected from third party login

So the user is logged out on a page that is usually cached for 60 seconds, because of heavy traffic. The user wants to do an action on that page witch requires the user to sign in. When the user ...
2
votes
2answers
25 views

Spring JdbcTemplate how to log parameters on exceptions?

Using Spring's JdbcTemplate, I've been trying to figure out a clean way to log exceptions in the DAO layer, but can't seem to figure it out. I want to log the SQL statement that was used and the ...
0
votes
1answer
12 views

Where created ApplicationContext in web project?

There is code from some example project (without using servlet): ApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml"); ExampleBean exampleBean = (ExampleBean) ...
0
votes
2answers
18 views

Spring - accessing Model values in JSP which names contain “-” (minus sign)

I have a mapper, which maps some Strings to Objects and then adds them to ModelAndView. Now in JSP I want to use this values, for example: JAVA ModelAndView model = new ...
0
votes
0answers
26 views

Could not load properties

hi i am going to develop web-services in java (NetBeans) but have problems with get conection, i get the following error: org.springframework.beans.factory.BeanInitializationException: Could not ...
0
votes
0answers
15 views

com.mongodb.MongoException$Network: IOException authenticating the connection

At high load of 1000 active web users our java app that uses mongo starts failing. I am looking from some way to diagnose and fix this. The error is : PM com.mongodb.DBPortPool gotError WARNING: ...
0
votes
1answer
18 views

JPA Criteria Query with IN operator for Set<?> with Spring DATA-JPA

In my application, I have the following mapping between two entities : @Entity public class Applicant { private Integer id; .... private Set<Document> documents; ... ...
0
votes
0answers
22 views

How to create a @RequestMapping that accepts no request parameters Spring

@RequestMapping(method = RequestMethod.GET) public HttpEntity<Object> list(WebRequest req) { I have this code in my application, I want to subclass the class that has this method and create a ...
0
votes
0answers
51 views

Best way to pass varaible from one bean to another

I wanted to ask what is the best way to pass parameters from one bean to another ViewScoped bean. Until now I made all beans @SessionScoped and when I wanted to open a new view I had something like ...
0
votes
0answers
11 views

Issue retrieving generated keys with SimpleJdbcInsert and Sybase

I'm having an odd problem with SimpleJdbcInsert.executeAndReturnKey with Sybase (jTDS driver) and certain data. Take the following example: SimpleJdbcInsert insert = new ...
0
votes
0answers
24 views

Customize Spring Data REST to expose only selected methods from Repository

Spring Data Rest exposes all finder methods in Repository layer and also Schema for Entity after RestRepository annotation is applied to Repository and RepositoryRestMvcConfiguration is enabled. How ...
0
votes
0answers
17 views

Deploying a Spring-JMX MBean in a JAR on Wildfly

I have created a Spring-JMX MBean following the online guide (http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#jmx). I'm using the Java annotations to create my MBean. ...
0
votes
1answer
18 views

Android Annotations : Using a String resource to provide annotation value

Maybe I'm not seeing the forest for the trees but is there a way to use a String resource to provide a value to a annotation field. What I would like is something like so ...