Search Results

Search found 2458 results on 99 pages for 'rafael spring'.

Page 63/99 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • GWT : NULL Session

    - by jidma
    I'm using spring4gwt in my project. I have the following login service implementation: @Service("loginService") public class LoginServiceImpl extends RemoteServiceServlet implements LoginService { @Override @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public UserBean checkUser(String userName, String password) throws Exception { HttpSession httpSession = getThreadLocalRequest().getSession(); } } When i call the loginService.checkUser("test","test") (In hosted mode), I get a null pointer exception, as getThreadLocalRequest() returns NULL instead of the actual session. I didn't try in web mode yet. Why would I get a null session ? Does it have something to do with spring4gwt ? Thank you

    Read the article

  • java.lang.ClassNotFoundException error using enum as a key in Map

    - by LCYSoft
    <util:map id="myMap" key-type="com.myClass.Foo.myEnum" value-type="com.myClass.Foo"> <entry> <key> <value type="com.myClass.Foo.myEnum">ONE</value> </key> <ref bean="myObj"/> </entry> </util:map> package com.myClass public class Foo { public enum myEnum {ONE, TWO;} } I am trying to create a map from Spriong 2.5. Map<myEnum, Foo> myMap; I am getting nested exception is java.lang.ClassNotFoundException:com.myClass.Foo.myEnum I definitely have com.myClass.Foo.myEnumin com.myClass.Foo I don't know why I am getting java.lang.ClassNotFoundException Thanks in advance

    Read the article

  • JSONDeserializer.use doesn't convert correctly

    - by user530846
    I'm trying to use flexjson to convert the following json string into a java object: {"inboundDataNotification": { "callbackData": "12345", "inboundData": { "message": "Hello World", "messageId": "mes1234" } }} Using the following method: import flexjson.JSONDeserializer; @RooJavaBean @RooToString @RooJson(fromJsonArrayMethod="", toJsonArrayMethod="", toJsonMethod="") public class InboundData { private String messageId; private String message; public static InboundSMSMessage fromJsonToInboundSMSMessage(String json) { return new JSONDeserializer<InboundSMSMessage>().use(null, InboundSMSMessage.class).deserialize(json); } } All fields are null after this method is invoked. Any ideas what to change here?

    Read the article

  • Dynamic Cocoon Block list

    - by Crischan
    Hi, I have a Cocoon 2.2 based application which uses blocks for different tasks and one block for shared pipeline fragments. All blocks are mounted within an Cocoon webapp. Now I would like to have an block which generates an overview of all other mounted blocks. I probably will have to use Java code - which is fine - but I am kinda lost where to start. Can anyone point me the right direction?

    Read the article

  • Why is it possible to save entity but not delete if transactional annotation is set to readonly=true

    - by jakob
    Hello experts! My class is annotated with org.springframework.transaction.annotation.Transactional like this: @Transactional(readOnly = true) public class MyClass { I then have a dao class: @Override public void delete(final E entity) { getSession().delete(entity); } @Override public void save(final E entity) { getSession().saveOrUpdate(entity); } Then I have two methods in MyClass @Transactional(readOnly = false) public void doDelete(Entity entity){ daoImpl.delete(entity) } //@Transactional(readOnly = false) public void doSave(){ daoImpl.save(entity) } Saving and deleting works like a charm. But if I remove the @Transactional(readOnly = false) on doDelete method deletion stops working, Saving works with and without the method annotation. So my question is: WHY?

    Read the article

  • google calendar api (java) authentication error in dynamic web project

    - by HazProblem
    org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/google/gdata/util/AuthenticationException org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:823) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) javax.servlet.http.HttpServlet.service(HttpServlet.java:641) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) The class i have written works fine as a normal java application, but when i try to use the code in an dynamic web project i get this authentication failure. Where´s the difference?

    Read the article

  • Simple Java web application on Tomcat

    - by EugeneP
    If we only need to graphically authorize a user, view a few tables representation (from database), ability to change data in the database visually what tools to use to write such a web application that will run on Tomcat? What framework allows to do that in the most straightforward, easy-to-manage and elegant way?

    Read the article

  • Why is my SAX handler returning an object with no values? I am setting it just fine

    - by Blankman
    I'm writing a SAX parser for an xml, and the object it returns doesn't have the values that I am setting in the events. My classes structure is like this: public class ProductSAXHandler extends DefaultHandler { private Product product; public ProductSAXHandler() { product = new Product(); } public Product ParseXmlFile(String xml) { SAXParserFactory spf = new ... XMLReader parser = .... parser.parse(xml); return product; } public void StartElement(....) { for(int ...) { // looping through attributes if(qName == "description" && name == "sku") { product.setSKU(value); } } } } When I am in debug mode, the value of product does get set, and I can see that the product's sku field has the correct value. But for some reason the product object returned is just a new Product object with no values set during the parsing. What am I doing wrong here? It must be me not understanding how these events are fired etc.

    Read the article

  • java json controller

    - by dev
    I have an Java class, like Library, that contains many fields. I want do ajax call to server and in controller's method I want to have partly initialized @RequestBody Library with only fields, which are present in json object. Please Help

    Read the article

  • In java web application, where should i store users photos?

    - by stunaz
    Hello, this questions may be stupid, but i dont really see how to resolve it : lest say that in my application, i have a user. This user edit his profile, and need to edit his avatar. Where should i store the avatar file? first of all i was saving all the files in src\main\webapp\resources , but each time i redeploy that folder empties. so i dedide to place in an other location : c:\wwwdir\resources, but i can't link local resources from remote pages, so i was not able to display any avatar . any idea? advise? link?

    Read the article

  • On the Fourth Day of the SQL Series...

    - by andyleonard
    Introduction Brent Ozar ( Blog | @BrentO ) has done it again - started something. This time it's The Twelve Days of SQL Series . I was passed the baton from David Stein ( Blog | @made2mentor ) who covered Day 3 with a tribute to his favorite post . And Now, My Selection: I liked Rafael Salas' ( Blog | @RafSalas ) post entitled Denali CTP 1: SSIS Parameters – Bring Them On! Rafael is a friend and fellow SSIS guy. In this post he does a good job pointing out the differences between SSIS Parameters...(read more)

    Read the article

  • Serveur d'application Java : Téléchargez SpringSource Tc Server 2.0, un Apache Tomcat optimisée et a

    SpringSource annonce la sortie de Tc Server 2.0, un Tomcat packagé et supporté par SpringSource. Ce produit est décliné en trois version : Standard Edition : Un tomcat préconfiguré, optimisé et amélioré par des fonctionnalités d'administration et de diagostic. Spring Edition : Un Tomcat specialement conçu pour déployer des applications Spring. Celui-ci, en utilisant une version instrumentée des JAR de Spring, permet d'avoir du monitoring très détaillé sur le fonctionnement des applications. Developer Edition : Gratuite, c'est une version de tomcat dédié au développement, permettant dans le cas d'application Spring (et en particulier Spring MVC) d'avoir des informations sur le fonctionnement de l'application

    Read the article

  • I am attempting to pull all years and terms from database except the last term

    - by Jonathan Moriarty
    I have a logic problem: We have a database that has a donations table with name, address, last donation year, and last donation term (Spring and Fall). We want to pull all donors unless they donated in the last term (Spring or Fall). I have been trying to figure out the logic of pulling all years up to the current year while omitting the last term. So for example this year is 2012 and we are in the Spring term (I defined the spring term between 1/1 and 6/30) so I only want to display donors before and including spring 2011 (we will exclude the current term which is spring 12 and the last term which is fall 2011). The problem is I want to pull sprig 2011, fall 2010, spring 2010 etc, but only omit the current term and last term donated.

    Read the article

  • How can you handle cross-cutting conerns in JAX-WS without Spring or AOP? Handlers?

    - by LES2
    I do have something more specific in mind, however: Each web service method needs to be wrapped with some boiler place code (cross cutting concern, yes, spring AOP would work great here but it either doesn't work or unapproved by gov't architecture group). A simple service call is as follows: @WebMethod... public Foo performFoo(...) { Object result = null; Object something = blah; try { soil(something); result = handlePerformFoo(...); } catch(Exception e) { throw translateException(e); } finally { wash(something); } return result; } protected abstract Foo handlePerformFoo(...); (I hope that's enough context). Basically, I would like a hook (that was in the same thread - like a method invocation interceptor) that could have a before() and after() that could could soil(something) and wash(something) around the method call for every freaking WebMethod. Can't use Spring AOP because my web services are not Spring managed beans :( HELP!!!!! Give advice! Please don't let me copy-paste that boiler plate 1 billion times (as I've been instructed to do). Regards, LES

    Read the article

  • How to configure Spring-DM OSGi service for new instance per call?

    - by Bhav
    I'm starting to delve into using Spring DM and OSGi services in an RCP application. I've created a service which is used by another bundle in the RCP application. It does a lookup of the service via calls to getBundleContext().getServiceReference() using the explicit bundle names and service class names. I'm not using DI anywhere yet. The issue I'm running into is that the service that is returned in the requesting bundle is a singleton. At times I notice a threading issue since it is a "stateful" service. How do I configure the application to get back a new service instance with each call? Here is my spring xml file contents which registers the service: <bean id="myServBean" class="com.xyz.ClassImpl"/> <osgi:service ref="myServBean" class="com.xyz.Class"/>

    Read the article

  • JPA Entity (in multiple persistence-unit) in OSGi (Spring DM) Environnement is confusing me.

    - by Vincent Demeester
    Hi, I'm a bit confused about a strange behavior of my JPA's related objects. I have three bundle : The User bundle does contain some user-related objects, but mainly the User object. The Energy bundle does contain some energy-related objects, and particularly a ConsumptionTerminal which contains a List of User. The Index bundle does contain an Index object that has no dependency at all. My OSGi environment is the following : A DataSource bundle that provide 2 services : dataSource and jpaVendorAdapter. The three bundles. They consume dataSource and jpaVendorAdapter. Their module-context.xml file look like : And they all have a persistence.xml file : User <?xml version="1.0" encoding="UTF-8"?> <persistence> <persistence-unit name="securityPU" transaction-type="JTA"> <jta-data-source>java:/securityDataSourceService</jta-data-source> <class>net.nextep.amundsen.security.domain.User</class> <!-- [...] --> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name="eclipselink.logging.level" value="INFO" /> <property name="eclipselink.ddl-generation" value="create-tables" /> <property name="eclipselink.ddl-generation.output-mode" value="database" /> <property name="eclipselink.orm.throw.exceptions" value="true" /> </properties> </persistence-unit> </persistence> Energy <?xml version="1.0" encoding="UTF-8"?> <persistence> <persistence-unit name="energyPU" transaction-type="JTA"> <jta-data-source>java:/securityDataSourceService</jta-data-source> <class>net.nextep.amundsen.security.domain.User</class> <class>net.nextep.amundsen.energy.domain.User</class> <!-- [...] --> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name="eclipselink.logging.level" value="INFO" /> <property name="eclipselink.ddl-generation" value="create-tables" /> <property name="eclipselink.ddl-generation.output-mode" value="database" /> <property name="eclipselink.orm.throw.exceptions" value="true" /> </properties> </persistence-unit> </persistence> Index : This one has the most simple persistence.xml with just the Index class (no shared Class). I'm using named @PersistenceUnit annotation like @PersitenceUnit(name = 'securityPU') (for the User bundle). And finally, I'm using EclipseLink as Jpa provider and Spring DM (+ Spring DM Server in the development process) The problem is the following : When the User bundle is deployed, I'm able to persist User objects. When the User bundle and Energy bundles are both deployed, I'm not able to persist User objects (neither the Energy object). But I don't have any exception at all ! There is no problem at all with the Index bundle. The bug is dataSource independent (I tried with PostgreSQL and MySQL so far). My first conclusion was that the <class>net.nextep.amundsen.security.domain.User</class> in both persistence unit was causing the trouble. I tried without it (and hiding the User dependent object in the Energy bundle) but it failed too. I'm a bit confused about that bug. I'm also not quite sure about the transaction management in this context. I wasn't the one who designed this architecture (but I tell my intern OK without testing it.. shame on me) but if I could understand this bug and maybe fix it without rewrite the bundle (and break my intern work), I would appreciate. Am I doing something wrong ? (it's obvious, but what..) Did I miss something while reading documentation ? By the way, I'm also looking for some best practices or advices when it comes to JPA, EclipseLink (or whatever JPA Provider) and Spring DM (and OSGi in general). I found interesting slides from Mike Keith about this topic (by browsing Stackoverflow).

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >