You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/30 07:53:08 UTC

[GitHub] [dubbo-go] tonyjt opened a new issue #1420: panic: proxy factory for default is not existing

tonyjt opened a new issue #1420:
URL: https://github.com/apache/dubbo-go/issues/1420


   <!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
   -->
   `
   package main
   
   import (
   	"context"
   	"dubbo.apache.org/dubbo-go/v3/config"
   	hessian "github.com/apache/dubbo-go-hessian2"
   	gxlog "github.com/dubbogo/gost/log"
   	"time"
   )
   
   type User struct {
   	ID   string
   	Name string
   	Age  int32
   	Time time.Time
   }
   
   type UserProvider struct {
   }
   
   func (u *UserProvider) GetUser(ctx context.Context, req []interface{}) (*User, error) {
   	gxlog.CInfo("req:%#v", req)
   	rsp := User{"A001", "Alex Stocks", 18, time.Now()}
   	gxlog.CInfo("rsp:%#v", rsp)
   	return &rsp, nil
   }
   
   func (u *UserProvider) Reference() string {
   	return "UserProvider"
   }
   
   func (u User) JavaClassName() string {
   	return "org.apache.dubbo.User"
   }
   
   //
   
   // needn't to setup environment variable  before run
   func main() {
   	hessian.RegisterPOJO(&User{})
   	config.SetProviderService(new(UserProvider))
   	providerConfig := config.NewProviderConfig(
   		config.WithProviderAppConfig(config.NewDefaultApplicationConfig()),
   		config.WithProviderProtocol("dubbo", "dubbo", "20000"),
   		config.WithProviderRegistry("demoZk", config.NewDefaultRegistryConfig("zookeeper")),
   		config.WithProviderServices("UserProvider", config.NewServiceConfigByAPI(
   			config.WithServiceRegistry("demoZk"),
   			config.WithServiceProtocol("dubbo"),
   			config.WithServiceInterface("org.apache.dubbo.UserProvider"),
   			config.WithServiceLoadBalance("random"),
   			config.WithServiceWarmUpTime("100"),
   			config.WithServiceCluster("failover"),
   			config.WithServiceMethod("GetUser", "1", "random"),
   		)),
   	)
   	config.SetProviderConfig(*providerConfig)
   	config.Load()
   }
   
   `
   
   
   **What happened**:
   运行之后报错,panic: proxy factory for default is not existing, make sure you have import the package.
   
   **What you expected to happen**:
   正常启动
   
   **How to reproduce it (as minimally and precisely as possible)**:
   拷贝代码启动,go版本:1.17
   
   **Anything else we need to know?**:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] tonyjt commented on issue #1420: panic: proxy factory for default is not existing

Posted by GitBox <gi...@apache.org>.
tonyjt commented on issue #1420:
URL: https://github.com/apache/dubbo-go/issues/1420#issuecomment-908131579


   dubbo-go版本:v3.0.0-rc2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on issue #1420: panic: proxy factory for default is not existing

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #1420:
URL: https://github.com/apache/dubbo-go/issues/1420#issuecomment-908263906


   import _ "dubbo.apache.org/dubbo-go/v3/common/proxy/proxy_factory"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] tonyjt closed issue #1420: panic: proxy factory for default is not existing

Posted by GitBox <gi...@apache.org>.
tonyjt closed issue #1420:
URL: https://github.com/apache/dubbo-go/issues/1420


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org