Announcement Announcement Module
No announcement yet.
Error when using with jsf org.springframework.core.GenericTypeResolver.resol veTypeArg Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error when using with jsf org.springframework.core.GenericTypeResolver.resol veTypeArg

    javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resol veTypeArgument

    Any advise on why i am getting this exception??

    Complete trace is as below:

    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resol veTypeArgument(Ljava/lang/Class;Ljava/lang/ClassLjava/lang/Class;
    at org.apache.myfaces.trinidadinternal.taglib.util.Me thodExpressionMethodBinding.invoke(MethodExpressio
    at org.apache.myfaces.trinidad.component.UIXComponent Base.broadcastToMethodBinding(UIXComponentBase.jav a:1256)
    at org.apache.myfaces.trinidad.component.UIXCommand.b roadcast(
    at tchingComponent$ va:92)
    at tchingComponent._processPhase(ContextSwitchingComp
    at tchingComponent.broadcast(ContextSwitchingComponen
    at .broadcast(
    at tchingComponent$ va:92)
    at tchingComponent._processPhase(ContextSwitchingComp
    at tchingComponent.broadcast(ContextSwitchingComponen
    at .broadcast(
    at javax.faces.component.UIViewRoot.broadcastEvents(U
    at javax.faces.component.UIViewRoot.processApplicatio n(
    at oracle.adfinternal.view.faces.lifecycle.LifecycleI mpl._invokeApplication(
    at oracle.adfinternal.view.faces.lifecycle.LifecycleI mpl._executePhase(
    at oracle.adfinternal.view.faces.lifecycle.LifecycleI mpl.execute(
    at javax.faces.webapp.FacesServlet.service(FacesServl
    at weblogic.servlet.internal.StubSecurityHelper$Servl
    at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(
    at weblogic.servlet.internal.ServletStubImpl.execute(
    at weblogic.servlet.internal.TailFilter.doFilter(Tail
    at weblogic.servlet.internal.FilterChainImpl.doFilter (
    at oracle.adf.share.http.ServletADFFilter.doFilter(Se
    at weblogic.servlet.internal.FilterChainImpl.doFilter (
    at tionFilter.doFilter(
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl$FilterListChain.doFilter(TrinidadFilte
    at oracle.adfinternal.view.faces.activedata.AdsFilter .doFilter(
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl$FilterListChain.doFilter(TrinidadFilte
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl._doFilterImpl( 271)
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl.doFilter(
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter. doFilter(
    at weblogic.servlet.internal.FilterChainImpl.doFilter (
    at oracle.adf.library.webapp.LibraryFilter.doFilter(L
    at weblogic.servlet.internal.FilterChainImpl.doFilter (
    at Method)
    at (
    at sMode(
    at de(
    at weblogic.servlet.internal.FilterChainImpl.doFilter (
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSSe
    at weblogic.servlet.internal.FilterChainImpl.doFilter (
    at weblogic.servlet.internal.RequestEventsFilter.doFi lter(
    at weblogic.servlet.internal.FilterChainImpl.doFilter (
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.wrapRun(WebAppServletContext. java:3715)
    at weblogic.servlet.internal.WebAppServletContext$Ser :3681)
    at t.doAs(
    at weblogic.servlet.internal.WebAppServletContext.sec uredExecute(
    at weblogic.servlet.internal.WebAppServletContext.exe cute(
    at java:209)
    at :178)
    Caused by: java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resol veTypeArgument(Ljava/lang/Class;Ljava/lang/ClassLjava/lang/Class;
    at onnection.initApiProxy(
    at onnection.<init>(
    at onnectionFactory.createConnection(OAuth2Connection
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
    at java.lang.reflect.Method.invoke(
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.Me thodExpressionMethodBinding.invoke(MethodExpressio
    ... 54 more

  • #2
    It looks like you have GenericTypeResolver in your classpath, but that it doesn't have the resolveTypeArgument() method being used...likely because you have an older version of Spring in your classpath. Spring Social should work fine with Spring 3.0.5 and Spring 3.1.0.M2. If you're using a different (older) version, that might explain it.

    Please review the Spring Social reference documentation for details on Spring Social's dependencies:

    Note that the documentation assumes that you're using Maven or Gradle to build your project. Correct me if I'm wrong, but from this question and some of the others you've posted this morning, it seems that you're building up your dependencies by hand and not using some automatic dependency resolution like what is offered by Maven, Ivy, or Gradle. Those will help you move faster by resolving transitive dependencies for you and will resolve the correct version required by Spring Social. You can certainly do it by hand, but you'll continually run into errors like what you've reported this morning until you get the right mix of dependencies in place.


    • #3
      Meanwhile I am looking into classpath issue just addressing last part. I have some reasons to go the manual way. But I will be happy to blog about it once i am able to resolve the issues i face during the process.


      • #4
        lib i have


        Currently following libs are there in my classpath:

        Do you see anything fishy about this set of jars which might cause the issue?


        • #5
          Nothing fishy at all. In fact, I just tossed those same dependencies (manually, without Gradle or Maven) into a project and used the following code successfully with them:

          public class Main {
          	static String API_KEY = ...;
          	static String SECRET = ...;
          	static String ACCESS_TOKEN = ...;
          	public static void main(String[] args) {
          		FacebookConnectionFactory connectionFactory = new FacebookConnectionFactory(API_KEY, SECRET);
          		AccessGrant accessGrant = new AccessGrant(ACCESS_TOKEN);
          		Connection<Facebook> connection = connectionFactory.createConnection(accessGrant);	
          		Facebook api = connection.getApi();
          		FacebookProfile userProfile = api.userOperations().getUserProfile();		
          		System.out.println("Hello, " + userProfile.getName());
          What is different is that it looks like you are running this within a JSF app (I just have a main() method), so there's more moving parts here than just the dependencies you listed. I have to wonder if there's something else in your dependency list that you're not seeing. Is there an older version of Spring hanging out in there from which GenericTypeResolver is being found instead of the 3.1.0.M2 version?

          BTW, you shouldn't need the dependency on the spring-social-facebook-web module unless you're using the @CookieValue annotation.


          • #6
            You are kind of right as even i did not face the issue in standalone java app but hit it as soon as i invoked the code from the ADF app (that's more precise than JSF in my case).
            However, I am sure ADF does not use any of the spring stuff at all.

            Then what could be other guess assuming i am sure on what i said about ADF not using any spring stuff at all?


            • #7
              Sorry, but that's still my guess. The only way I can get that error is if I have both Spring 3.1.0 and Spring 2.5.6 in my classpath (even with the main() method). The error clearly indicates that the resolveTypeArgument(Class, Class) doesn't exist on GenericTypeResolver. But in the 3.1.0.M2 jars, I know that it does. So, it must be finding another GenericTypeResolver from some other library that doesn't have that method.

              Also refer to for a similar discussion. Perhaps the advice given there will help you track it down.


              • #8
                Thanks though I am lost as I dont see any other spring library in my app added by ide etc any other way to find the culprit conflicting lib?


                • #9
                  ok found the issues.. its not my project but the weblogic server which is using org.springframework-2.5.jar