spring,rest,smartgwt,gwt-rpcRelated issues-Collection of common programming errors


  • TheRock3t
    spring dependency-injection bean-validation customvalidator custom-validators
    I have the same problem that the guy from this thread has. More precisely I get the following error, when trying to inject a bean in my custom validator that implements CustomValidator interface (it’s a NPE when accessing the bean i wanted to inject):javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:294) at org.hibernate.validator.internal.engine.Constra

  • skaffman
    java spring
    I having the below code in static method of my main class -appContext = new ClassPathXmlApplicationContext(new String[] {“classpath*:/META-INF/spring.xml”,”classpath*:contractbatchupdate-application-context.xml”});All the dependencies are specified by Maven. I am trying to run this class in eclipse as a java application and it is throwing the below error. I can see the jar file in the repository that is specified in the path listed in the error.Caused by: org.springframework.beans.factory.BeanDe

  • Steve
    spring jpa junit4
    Our project has just decided to migrate from Spring 2.5.5 to Spring 3.0.4. In my original code, I had unit tests that looked like the following:public class RequisitionDaoTest extends AbstractJpaTests {public static String FAIL_MSG_UNEXPECTED_ERROR = “FAIL: Unexpected Error”;@PersistenceContextprivate EntityManager em;@PersistenceUnitprivate EntityManagerFactory emf;@Testpublic void testSomething (){…} }This worked just fine with Spring 2.5.5. Now with Spring 3.0.4, the AbstractJpaTests class

  • micfra
    spring spring-el
    Given a class containing an enum:public class MyClass {public enum NestedEnum { value1(1),value2(2);private int code;private NestedEnum(int code) {this.code = code;}public int getCode() {return code;}} }how do I reference NestedEnum? This:#{T(MyClass.NestedEnum).value1.getCode()}results in the exception:org.springframework.expression.spel.SpelEvaluationException: EL1005E:(pos 0): Type cannot be found ‘namespace.MyClass.NestedEnum’This:#{T(T(MyClass).NestedEnum).value1.getCode()}results i

  • Tom
    java spring
    I’m using a local override to specify a property and wanted to confirm that this just applies to properties that are specified in the applicationContext. Basically I want to make sure that this doesn’t have any unexpected consequences…<context:property-placeholderproperties-ref=”defaultProperties”location=”classpath:my.properties”ignore-resource-not-found=”true”ignoreunresolvable=”true”local-override=”true”/><util:properties id=”defaultProperties”><prop key=”some.property”>${

  • Soner Gönül
    spring
    I am getting the below error when I try to configure a spring-hibernate application:org.springframework.beans.factory.BeanDefinitionStoreException:Unexpected exception parsing XML document from ServletContext resource[/WEB-INF/spring-servlet.xml]; nested exception isjava.lang.NoSuchMethodError:org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues;I have org.springframework.beans-3.0.0.M3.jar in the build path.Ple

  • Derek Troy-West
    spring aspectj
    Is it possible to have two AfterThrows pieces of advice be applied to the same pointcut restricted by specific Exception type where one exception is a superclass of the other with, in the case of the subclass being captured, only one advice being executed?I want to translate runtime exceptions (both custom and standard java ones) being chucked out of a service layer, where I do some specific translation in certain cases and then have a catch-all type piece of advice to translate anything truly u

  • mmelear
    spring mongodb grails oauth2client
    I am working on an app that uses a mongodb, is built in grails, and is using oauth2 as an authentication service. I have the services and controller built out (I think) and am trying to run my server to manually test connectivity with google. I am running into an “Error creating bean with name transactionManagerPostProcessor…” that I can’t solve. I know I need to either install a plug-in that takes care of the “transactions” for me, or create a bean in resources.groovy. I have done a lot of re

  • zhizhu2012
    spring properties
    <context:property-placeholder location=”WEB-INF/classes/config.config”/> config.config: path=com<import resource=”../../conf/${path}/test.xml”/>error:org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [test.service.xml]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘path’at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader

  • Tony
    java spring hibernate nullpointerexception
    I want to insert some data into my DB. But I catch “ERROR: org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler – Unexpected error occurred in scheduled task. java.lang.NullPointerException”I don’t know what to do.public class HeadHunterImport {@Autowiredprivate static HeadHunterService headHunterService;@Scheduled(fixedRate = 600000)public void AsyncRemovalOldData() {headHunterService.addHeadHunter(“Moscow”, 100, 100) ; }If I’ll call it in controller it will work fine. What’s w

  • Buddy
    ruby-on-rails rest
    Wondering if I should ALWAYS use the respond_to/format.xxx block in ALL of my actions in ALL of my controllers. This came up because I realized that, for apps using only HTML response format (no respond_to block), I could send some other type of request (say XML) and get a valid response. Is this considered insecure? Feels to me like it is, and it seems that the solution would be to ALWAYS add the respond_to/format.xxx block to EVERY action on EVERY controller even if you are just using HTML

  • Matt M.
    rest dns
    We are are going to be creating some RESTful services which are essentially going to be a passthrough to some ye-olde-fashioned SOAP-based webservices. The SOAP services are more generalized and will used across our entire organization (at least that’s the plan). The RESTful services are tailored to specific clients. This decision was already made and is unfortunately out of my control to change…We’re struggling with how to structure our RESTful resources in a way that makes sense, follows

  • Ashish Patha
    windows json wcf rest curl
    when i post a raw string as an input to JSON REST Service call it is executing ex:curl -d “{\”input1\”: \”as\”, \”input2\”: \”ad\”}” -i -X POST -H “Content-Type:application/json” http://localhost/rtygies/Service1.svc/rest/receivedata1 But when i am posting as an xml as input it is giveng error as below:curl -d “{\”input1\”: \”<xml></xml>\”, \”input2\”: \”<xml></xml>\”}” -i -X POST -H “Content-Type:application/json” http://localhost/rtygies/Service1.svc/rest/receivedat

  • noircc
    rest jersey jackson enunciate
    I have a rest-project which is using jersey+enunciate and now i wanna test the endpoints with malicious strings. The output of the programm seems to me like a JacksonParseException but with no details or stacktrace:Unexpected character (‘6’ (code 54)): was expecting comma to separate ARRAY entriesat [Source: org.apache.catalina.connector.CoyoteInputStream@28fe53cf; line: 1, column: 35]I wanna catch the exception but even declaring an default error-page won’t do the work, also the ExceptionMapper

  • LU RD
    wcf asp.net-mvc-3 rest
    I have created a ReST WCF Service in .NET 4.0. It’s hosted in IIS (.svc). The .svc file is mapped correctly in IIS 7.5. When I try to consume the WCF Service in MVC 3, I get an error :”The remote server returned an unexpected response: (405) Method Not Allowed.” I created a proxy by adding a service reference to my MVC project. Let me know if you have encountered this issue and have the solution. Please help! I already spent 2 days on it.

  • conny
    web-services rest http-status-codes
    Is it to be considered good practice to reuse RFC HTTP Status codes like this, or should we be making up new ones that map exactly to our specific error reasons?We’re designing a web service API around a couple of legacy applications. In addition to JSON/XML data structures in the Response Body, we aim to return HTTP Status Codes that make sense to web caches and developers.But how do you go about mapping different classes of errors onto appropriate HTTP Status codes? Everyone on the team agrees

  • Cory Kendall
    http rest
    I’m implementing the logic for a RESTful web server which supports searching with a SolR like syntax. Here are some common valid requests:”https://www.somewhere.com/fooResource/123″ “https://www.somewhere.com/fooResource/456” “https://www.somewhere.com/fooResource?q=title:hi” “https://www.somewhere.com/fooResource?q=title:hello&sort=foo”My question is very generic; what should I do if I receive a request like this?”https://www.somewhere.com/fooResource?q=title:hi&something=foo”I receive

  • Bruce
    rest soap communication
    We are building a proprietary system involving a client and a server linked over TCP/IP. Occasionally, the server will have some new expected or unexpected information that would be of interest to the client. My understanding is that SOAP and REST are query/response systems that require the client to request something and the server responds back. We need the client to register and the server to respond back if and when the new information is available. Are these protocols capable of such be

  • mdtsandman
    java android rest restlet
    I’ve been playing around a bit with restlet, and so far I like it :)I am having some trouble getting a restlet client to work on an android emulator, though.Right now a have a very simple restlet server running under JSE. All it does is expose a root resource (which for the moment is just a line of text) via the GET method. I can get consume the resource with a browser, and also with a simple restlet client running in the console. I have modified the code for the JSE client to try to connect

  • Marek Grzenkowicz
    web-services rest soap soapui sugarcrm
    I saw somewhere in net (like SugarCRM SOAP test call fails), that some people use SoapUI to access SugarCRM SOAP or REST web services, with urls like http://ip/sugarcrm/service/v2/soap.php and http://ip/sugarcrm/service/v2/rest.php, respectively. I tried it, with ‘New SoapUI Project’ wizard, and putting that urls in ‘Initial WSDL/WADL:”. But I only get error messages:”Error loading [http://ip/sugarcrm/service/v2/soap.php] org.apache.xmlbeans.XmlException: error: Unexpected character encountered:

  • Lamar McAdory
    smartgwt selenium-ide
    I’m trying to create test cases with Selenium on a GUI built using smartGWT2.4 I have told Selenium where to find the user-extensions for both core and IDE. The problem is it keeps throwing a Unexpected Error Exception. It cannot find autWindow.isc. Then it points me to line 17 within the user-extensions.js. I’ve researched and could not find a solution to this problem. Is this a known problem, is there a solution? I can get Selenium to work if I roll back the IDE to a later version, but I wante

  • Ashika Umanga Umagiliya
    java gwt smartgwt gwt-ext
    Greetings , I have been using GWT for few weeks and wanted a rich Table widget.I came across with SmartGWT library. Can I use SmartGWT widgets same way I develop using GWT or is there any special things I need to know ?thanks

  • Emil D
    gwt smartgwt gwt-rpc
    I have a question about the Communication between a client and a server.I would like to create a GWT application that can do the following:The client A fires an event to the server and the server in his turn fire an event to the client B. Here the client B has to be able to listen to the event all the time.I wanted to send some event with few data in real time to a connected client B. is that possible? and if yes how can I do that?Thanks

  • rich
    java gwt exception-handling smartgwt
    I’ve been working on a project which uses GWT (and SmartGWT), which is (are) new to me.Whenever runtime exceptions are thrown in the client (no RPCs involved) nothing happens. By that I mean the method does not continue executing, there are no alerts, there is nothing in the Javascript error console or the SmartGWT error console.I’m assuming this isn’t normal practice in GWT applications. Where are these errors (e.g. null pointers) normally logged/handled?Thanks in advance.

  • Bozho
    java firefox smartgwt
    Does anyone know a ‘nice’ way to prevent SmartGWT from creating TextItem form items with the spellcheck=”true” set? It’s annoying to get spellcheck markers on name fields etc.The nuclear option is to hack out the problem js code from the smartGWT library, or replace the js method at runtime with: formItem.setAttribute(“getBrowserSpellCheck”, JavaScriptObject.createFunction());But this is clearly not an ideal approach.

  • a question
    java javascript exception gwt smartgwt
    I got Exception java.lang.NoSuchFieldError: reportUnusedDeclaredThrownExceptionIncludeDocCommentReference outside eclipse in command line using maven.The gwt libraries are declared at the top of list of dependencies and GWT 2.5.1 is being used. How to solve this issue? Please help

  • gnat
    java gwt smartgwt jre
    Possible Duplicate:How to find out which Java classes are missing in GWT (client side)? Help, prompt me which packages and classes from JDK (java.*) I can use in GWT web project and which I can’t use?

  • Victor Kiricheiko
    java cross-browser smartgwt treegrid
    i’m trying to add a treeGrid to my project. I added it, but after testing in different browsers i got very bad results:1)Firefoxno Formating at all, for open category i should click on screen until find this icons2)IE show where should be open category icons, but on click do not open them3)Google Chrome Work just as i want, formating subcategory, show places where icons should be=)yea, i know that i should add icons, but problem not in them. How can i fix view in firefox and open categories in I

  • Marcel Piquet
    java css gwt smartgwt
    I would like to know if and how it is possible working on SmartGWT to change the class associated to an element at runtime.Take for example the underlying code that renders contents inside a div, I would like to know if and how I can modify at runtime the css class associated to the div.HTMLFlow productInfo = new HTMLFlow(productInfoHtml);productInfo.setStyleName(“loginProductInfo”);productInfo.setHeight(13);productInfo.setMargin(5);Note: I’m using Smart GWT version 4.0

  • SpursP
    smartgwt
    I am getting below errors when I use listGrid.setData(some array)SEVERE: Unhandled Exception in com.google.gwt.core.client.JavaScriptException: (null) @com.smartgwt.client.widgets.Canvas::redraw()([]): nullcom.google.gwt.logging.server.RemoteLoggingService Util logOnServer SEVERE: Unhandled Exception in com.google.gwt.core.client.JavaScriptException: (null) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;) ([JavaScript object(2955), JavaScript

  • George Hawkins
    gwt browser asynchronous webserver gwt-rpc
    I have a GWT application where users keep the browser based side of the application open indefinitely. Every so often we upgrade the application – if the users hit reload in their browsers after this is done then everything goes fine. However what usually happens is that they carry on using the already open version of the application, i.e. a version served before the upgrade, and then experience obscure RPC related errors as the client side Javascript is no longer in sync with what is on the ser

  • zoejules
    gwt jpa-2.0 gwt-rpc
    I am using JPA 2.0. (EclipseLink 2.0.2)If an entity contains relations, for example: @OneToMany(cascade = CascadeType.ALL, mappedBy = “userId”) private Collection<Blog> blogCollection;I am getting the following error when I am sending it through RPC:com.google.gwt.user.client.rpc.SerializationException: Type ‘org.eclipse.persistence.indirection.IndirectList’ was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For

  • Emil D
    gwt smartgwt gwt-rpc
    I have a question about the Communication between a client and a server.I would like to create a GWT application that can do the following:The client A fires an event to the server and the server in his turn fire an event to the client B. Here the client B has to be able to listen to the event all the time.I wanted to send some event with few data in real time to a connected client B. is that possible? and if yes how can I do that?Thanks

  • bubbles
    gwt gwt-rpc
    I am working on a GWT application and I am using 3rd party Java-R wrapper library. This will be converted into Java Bytecode and (I guess) call some methods via the R libraries.. I was able to successfully get it to work on eclipse development mode. In order to get it to work, I had to add the .jar to the classpath, and add to the java path (Under Run-Configurations->Environment Variables) variable to add location of the folder containing several .dll which are required for the execution of the

  • Eric
    gwt gwt-rpc
    Looking at the GWT sample apps and the RPC tutorial the following package conventions are used:./client/GreetingService.java ./client/GreetingServiceAsync.java ./server/GreetingServiceImpl.javaThough the GWT docs are very sparse on best-practices what components get included where at runtime, the clear intuition is:client – Compiled into JavaScript by GWT compiler server – Compiled into bytecode by javac shared – Compiled into JavaScript by GWT compiler and compiled into bytecode by javacThis wo

  • Stefan
    gwt element gwt-rpc uibinder
    Good morning everbody,I’m trying to pass a UiBinder from a rpc-service to the client page. The problem is, that he throws an error, because the “Deferred binding failed”. Can somebody explain, why this happens and if there is a workaround for dynamicly loading new UiBinder Elements to a webpage?Regards, Stefan

  • darius
    java gwt serialization rpc gwt-rpc
    I have a RPC service with the following method: public List<Serializable> myMethod(TransactionCall call) {…}But I get a warning when this method is analyzed, and then the rpc call failsAnalyzing ‘my.project.package.myService’ for serializable types Analyzing methods: public abstract java.util.List<java.io.Serializable> myMethod(my.project.package.TransactionCall call) Return type: java.util.List<java.io.Serializable> […] java.io.Serializable Verifying instantiability (!) C

  • Caroline Alexiou
    asynchronous event-handling final gwt-rpc
    I am developing an application in GWT as my Bachelor’s Thesis and I am fairly new to this. I have researched asynchronous callbacks on the internet. What I want to do is this: I want to handle the login of a user and display different data if they are an admin or a plain user. My call looks like this:serverCall.isAdmin(new AsyncCallback<Boolean>() {public void onFailure(Throwable caught) {//display error}public void onSuccess(Boolean admin) {if (!admin){//do something }else{//do something

  • Dedyshka
    java gwt transactions rpc gwt-rpc
    I yet don’t know GWT such deep as I want. So I’d want to ask someone who know GWT well.I have problem with rollback transaction in GWT 2.3. Say, GWT makes RPC call of service, and there will be thrown NullPointerException. As far as I am seeing now, implementation of doUnexpectedFailure in the class AbstractRemoteServiceServlet doesn’t rethrow any exception – it just resets response and logging exception. Also, documentation for that method says that I should override this method to handle unexp

  • antony.trupe
    java gwt gwt-rpc
    I’m working on my first GWT-based Java project for a school assignment. It’s a chat application and the client polls the server for new events, while the server keeps an timer for each user to detect inactivity.The following problem occurs at runtime:Dec 8, 2009 7:41:17 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: /GAEChat/chat java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)at java.security.AccessControlContext.checkPermission

Web site is in building