Uploaded image for project: 'Seam Social'
  1. Seam Social
  2. SEAMSOCIAL-18

OAuthServiceSettingsImpl is mandatory for all providers

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Workaround Description:
      Hide

      Provide configuration from example (seam-social-example-web-client) beans.xml file.

      Show
      Provide configuration from example (seam-social-example-web-client) beans.xml file.

      Description

      When you don't need all of services (ex. Twitter), you still have to provide configuration for them all. It shouldn't be mandatory.

      19:57:58,853 INFO [org.jboss.seam.social.oauth.SeamSocialExtension] *** Extension is in Process Bean ***
      19:57:58,853 INFO [org.jboss.seam.social.oauth.SeamSocialExtension] === Found service LinkedIn ===
      19:57:58,898 INFO [org.jboss.seam.international.status.TypedStatusMessageBundleExtension] Add @MessageBundle to org.jboss.seam.solder.reflection.annotated.AnnotatedTypeBuilder.messages injection point for the type: org.jboss.seam.solder.support.SolderMessages
      19:57:58,913 INFO [org.jboss.seam.international.status.TypedStatusMessageBundleExtension] Add @MessageBundle to org.jboss.seam.solder.reflection.annotated.AnnotationBuilder.messages injection point for the type: org.jboss.seam.solder.support.SolderMessages
      19:57:58,919 INFO [org.jboss.seam.social.oauth.SeamSocialExtension] *** Extension is in Process Bean ***
      19:57:59,051 INFO [org.jboss.seam.social.oauth.SeamSocialExtension] *** Extension is in Process Bean ***
      19:57:59,051 INFO [org.jboss.seam.social.oauth.SeamSocialExtension] === Found service Twitter ===
      19:57:59,058 INFO [org.jboss.seam.config.xml.bootstrap.XmlConfigExtension] Wrapping InjectionTarget to set field values: org.jboss.seam.social.oauth.OAuthServiceSettingsImpl
      19:57:59,097 INFO [org.jboss.seam.social.oauth.SeamSocialExtension] *** Extension is in Process Bean ***
      19:57:59,122 INFO [org.jboss.seam.social.oauth.SeamSocialExtension] *** Extension is in Process Bean ***
      19:57:59,533 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///Users/marek/Tools/jboss-6.0.0.Final/server/default/deploy/checkout.war_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [OAuthServiceSettings] with qualifiers [@RelatedTo] at injection point [[parameter 1] of [method] @Inject public org.jboss.seam.social.twitter.TwitterScribe.setSettings(OAuthServiceSettings)]
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:305) [:6.0.0.Final]
      at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:139) [:6.0.0.Final]
      at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:162) [:6.0.0.Final]
      at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:377) [:6.0.0.Final]
      at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:363) [:6.0.0.Final]
      at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:388) [:6.0.0.Final]
      at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:92) [:6.0.0.Final]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]

        Gliffy Diagrams

          Activity

          Hide
          antoinesabot-durand Antoine Sabot-Durand added a comment -

          Yes I know this bug. I should add an extension which check the existence of the rightly qualified OAuthSettings. And in case it doesn't avoid resgistering the corresponding OAuthService bean.

          Show
          antoinesabot-durand Antoine Sabot-Durand added a comment - Yes I know this bug. I should add an extension which check the existence of the rightly qualified OAuthSettings. And in case it doesn't avoid resgistering the corresponding OAuthService bean.
          Hide
          antoinesabot-durand Antoine Sabot-Durand added a comment -

          The problem is now solve. OAuthServiceSettings injection is now lazily resolved in @Postconstruct of OAuthService bean. It'll allow to look for service configuration elsewhere (properties, DB, etc...)

          Show
          antoinesabot-durand Antoine Sabot-Durand added a comment - The problem is now solve. OAuthServiceSettings injection is now lazily resolved in @Postconstruct of OAuthService bean. It'll allow to look for service configuration elsewhere (properties, DB, etc...)

            People

            • Assignee:
              antoinesabot-durand Antoine Sabot-Durand
              Reporter:
              smigielski Marek Smigielski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development