Announcement Announcement Module
Collapse
No announcement yet.
Error when using with jsf org.springframework.core.GenericTypeResolver.resol veTypeArg Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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 nMethodBinding.java:58)
    at org.apache.myfaces.trinidad.component.UIXComponent Base.broadcastToMethodBinding(UIXComponentBase.jav a:1256)
    at org.apache.myfaces.trinidad.component.UIXCommand.b roadcast(UIXCommand.java:183)
    at oracle.adf.view.rich.component.fragment.ContextSwi tchingComponent$1.run(ContextSwitchingComponent.ja va:92)
    at oracle.adf.view.rich.component.fragment.ContextSwi tchingComponent._processPhase(ContextSwitchingComp onent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwi tchingComponent.broadcast(ContextSwitchingComponen t.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude .broadcast(UIXInclude.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwi tchingComponent$1.run(ContextSwitchingComponent.ja va:92)
    at oracle.adf.view.rich.component.fragment.ContextSwi tchingComponent._processPhase(ContextSwitchingComp onent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwi tchingComponent.broadcast(ContextSwitchingComponen t.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude .broadcast(UIXInclude.java:96)
    at javax.faces.component.UIViewRoot.broadcastEvents(U IViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplicatio n(UIViewRoot.java:756)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleI mpl._invokeApplication(LifecycleImpl.java:788)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleI mpl._executePhase(LifecycleImpl.java:306)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleI mpl.execute(LifecycleImpl.java:186)
    at javax.faces.webapp.FacesServlet.service(FacesServl et.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(Se rvletADFFilter.java:62)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.Registra tionFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl$FilterListChain.doFilter(TrinidadFilte rImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter .doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl$FilterListChain.doFilter(TrinidadFilte rImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl._doFilterImpl(TrinidadFilterImpl.java: 271)
    at org.apache.myfaces.trinidadinternal.webapp.Trinida dFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter. doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(L ibraryFilter.java:175)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(Jps AbsFilter.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged (JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaa sMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMo de(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter( JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(Jps Filter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSSe rvletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFi lter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.wrapRun(WebAppServletContext. java:3715)
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :3681)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.sec uredExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.exe cute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(S ervletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread. java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java :178)
    Caused by: java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resol veTypeArgument(Ljava/lang/Class;Ljava/lang/ClassLjava/lang/Class;
    at org.springframework.social.connect.support.OAuth2C onnection.initApiProxy(OAuth2Connection.java:137)
    at org.springframework.social.connect.support.OAuth2C onnection.<init>(OAuth2Connection.java:72)
    at org.springframework.social.connect.support.OAuth2C onnectionFactory.createConnection(OAuth2Connection Factory.java:58)
    at vik.smm.tools.model.FacebookTest.start(FacebookTes t.java:22)
    at vik.smm.tools.ui.bean.PageBean.onClickButton(PageB ean.java:13)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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 nMethodBinding.java:53)
    ... 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: http://static.springsource.org/sprin.../overview.html.

    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.

    Comment


    • #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.

      Comment


      • #4
        lib i have

        Hi

        Currently following libs are there in my classpath:
        spring-social-core-1.0.0.RC2.jar
        spring-social-facebook-1.0.0.RC2.jar
        spring-social-facebook-web-1.0.0.RC2.jar
        spring-social-web-1.0.0.RC2.jar
        org.springframework.core-3.1.0.M2.jar
        org.springframework.web-3.1.0.M2.jar
        Commons-logging-1.1.1.jar
        Jackson-core-asl-1.8.4.jar
        Jackson-mapper-1.8.4.jar

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

        Comment


        • #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:

          Code:
          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.

          Comment


          • #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?

            Comment


            • #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 http://forum.springsource.org/showthread.php?41143 for a similar discussion. Perhaps the advice given there will help you track it down.

              Comment


              • #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?

                Comment


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

                  Comment

                  Working...
                  X