Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    NoSuchMethodError once new SmartClient version is applied

    (I also posted this under SmartClient -> Technical Q&A but my guess is it should have been posted here)

    We've just applied the following nightly build:
    SmartClient Version: SC_SNAPSHOT-2011-11-16/PowerEdition Deployment (built 2011-11-16)

    Our previous version was this:
    SC_SNAPSHOT-2011-08-02/PowerEdition Deployment 2011-08-02

    Now all of a sudden, a simple call to DSRequest.setCriteria() fails with a NoSuchMethodError. This happens only when running on our tomcat server. It does not have a problem when run under the eclipse IDE. The new jars in place where they old always have been.

    Here's the code:

    Code:
    DSRequest request = new DSRequest(IslandPacificDSConstants.DATASOURCE_Application, "fetch");
    HashMap criteria = new HashMap();
    criteria.put("id",id);
    request.setCriteria(criteria);
    DSResponse response = null;
    try {
    	response = request.execute();
    } catch (Exception e) {
    	e.printStackTrace();
    	return null;
    }
    Any thoughts?

    The error follows (from the tomcat localhost log).

    Thanks.

    java.lang.NoSuchMethodError: com.isomorphic.datasource.DSRequest.setCriteria(Ljava/lang/Object;)V
    at com.islandpacific.gui.security.domain.IpApplicationManager.findById(IpApplicationManager.java:59)
    at com.islandpacific.gui.security.domain.IpEnvironmentManager.getEnvironmentFromRecord(IpEnvironmentManager.java:111)
    at com.islandpacific.gui.security.domain.IpEnvironmentManager.findAll(IpEnvironmentManager.java:80)
    at com.islandpacific.gui.security.IpAuthenticationServiceImpl.getAllEnvironments(IpAuthenticationServiceImpl.java:90)
    at com.islandpacific.gui.security.IpAuthenticationServiceImpl.getUserDetails(IpAuthenticationServiceImpl.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)

    #2
    This one really has us stumped. I've tried deploying to both Tomcat 6 & 7 and in a clean install. The correct version of the isomorphic_core_rpc.jar file is deployed in WEB-INF/lib. I can examine that jar and see that it has a setCriteria(Object) method. Any help you can give would be much appreciated.

    Comment


      #3
      What happened here is setCriteria() was modified to return the dsRequest instance of void, to enable the "builder pattern":

      Code:
      dsRequest.setCriteria(something, something).setSortBy(something);
      So there's no incompatibility, but because Java records the entire signature of a method including the return value, it believes there is. So all you need to do is recompile.

      Comment


        #4
        We have recompiled our app. The compile completed normally, but we get the error when we deploy the resulting war.

        Comment


          #5
          Then you are compiling against one version and deploying against the other (there's really just no other possibility).

          Comment


            #6
            There must be something wrong with our central build server running Bamboo, which has worked fine for a year without change. But somehow, a build done in Eclipse works and the one done by Bamboo doesn't. We'll figure it out ... eventually. Thanks for the sanity check.

            Comment

            Working...
            X