moraskiod / socialauth

Automatically exported from code.google.com/p/socialauth
0 stars 0 forks source link

Cannot find symbol, method getUserProfile() #245

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Include all dependencies in a seam generated project and create the method:

public void redirect() 
        {

            try 
            {
                HttpServletRequest request=(HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();

                SocialAuthManager manager = (SocialAuthManager)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("authManager");           
                Map map = SocialAuthUtil.getRequestParametersMap(request);
               System.out.println(map.size());
               System.out.println(manager);
                org.brickred.socialauth.AuthProvider provider = manager.connect(map);
                Profile profile = provider.getUserProfile();                                   

            }
            catch(Exception e)
            {
                e.printStackTrace();
            }

            try 
            {
                FacesContext.getCurrentInstance().getExternalContext().redirect("/index.seam");
            }
            catch (IOException e) { 
                e.printStackTrace();
            }
        }
What is the expected output? What do you see instead?
When I compile, I get the error cannot find method getUserProfile() in  
interface org.brickred.socialauth.AuthProvider

What version of the product are you using? On what operating system?
socialauth-4.0, windows 7, eclipse indigo

Please provide any additional information below.
org.brickred.socialauth.AuthProvider provider = manager.connect(map);             
  Profile profile = provider.getUserProfile();
When i type  provider. , i get the options getUserProfile; but when i compile, 
i get the error that the method cannot be found

Original issue reported on code.google.com by vishal.k...@gmail.com on 11 Feb 2013 at 9:32

GoogleCodeExporter commented 8 years ago
From where you are compiling. I am assuming you are compiling your project 
outside eclipse. Can you please send me complete stack trace for that.

Original comment by tarun.na...@3pillarglobal.com on 18 Feb 2013 at 11:11

GoogleCodeExporter commented 8 years ago
Nopes. I am using Eclipse Helios to compile. Here's what is displayed on my 
console:

compile:
    [javac] Compiling 149 source files to E:\Projects\TestnTrust\workspace\tutor\tutor\exploded-archives\tutor.ear\tutor_jar
    [javac] E:\Projects\TestnTrust\workspace\tutor\tutor\src\hot\com\tutor\actions\authentication\Authenticator.java:135: cannot find symbol
    [javac] symbol  : method getUserProfile()
    [javac] location: interface org.brickred.socialauth.AuthProvider
    [javac]                 System.out.println(provider.getUserProfile());
    [javac]                                            ^
    [javac] E:\Projects\TestnTrust\workspace\tutor\tutor\src\hot\com\tutor\actions\authentication\Authenticator.java:136: cannot find symbol
    [javac] symbol  : method getUserProfile()
    [javac] location: interface org.brickred.socialauth.AuthProvider
    [javac]                 System.out.println(provider.getUserProfile().getEmail());
    [javac]                                            ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors

The strange thing is that, when i debug, i inspect the provider object, an i 
can see the userProfile is populated correctly.

Original comment by vishal.k...@gmail.com on 25 Feb 2013 at 6:22

GoogleCodeExporter commented 8 years ago

Original comment by vishal.k...@gmail.com on 25 Feb 2013 at 7:13

Attachments: