Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka subscriber: "Trigger factory not registered" #87

Closed
kurattila opened this issue Jun 20, 2017 · 4 comments
Closed

kafka subscriber: "Trigger factory not registered" #87

kurattila opened this issue Jun 20, 2017 · 4 comments

Comments

@kurattila
Copy link

Wiring up the kafkasub with a simple logger activity, I get the following error. The application doesn't even start up:

user@machine:~/flogoAppKafka2Log$ bin/myapp
2017-06-20 14:24:23.148 INFO   [engine] - Engine: Starting...
2017-06-20 14:24:23.148 ERROR  [engine] - Engine: Error Creating trigger instances - Trigger Factory 'github.com/TIBCOSoftware/flogo-contrib/trigger/kafkasub' not registered
panic: Engine: Error Creating trigger instances - Trigger Factory 'github.com/TIBCOSoftware/flogo-contrib/trigger/kafkasub' not registered

goroutine 1 [running]:
github.com/TIBCOSoftware/flogo-lib/engine.(*EngineConfig).Start(0xc4200e4360)
        /home/user/flogoAppKafka2Log/vendor/src/github.com/TIBCOSoftware/flogo-lib/engine/engine.go:85 +0x116c
main.main()
        /home/user/flogoAppKafka2Log/src/myapp/main.go:37 +0xaa

This file flogo.json.txt was used for the app.

@wnichols
Copy link
Contributor

I know that there is an existing issue: TIBCOSoftware/flogo-cli#49 whereby the build fails unless you specify -sp for skip prepare. Unfortunately for newly contributed triggers (like kafka) this causes the imports.go file (in the app src dir) not to get updated, and hence when the app is run the trigger is not registered.
Does that sound like your problem? Is the kafkasub entry in the imports.go file prior to your build?

@fm-tibco
Copy link

What platform are you using? the -sp is not required on Mac. We are currently testing this on linux.

@fm-tibco
Copy link

There is a bug that the proper imports do not get generated if the name of your app in flogo.json does not match the source structure that was generated on creation of the app. Make sure that name matches the directory name generated under "src".

@kurattila
Copy link
Author

Indeed, adding the kafkasub entry manually into imports.go solves the problem.
Also, changing the app name in flogo.json to match the dirname under src works => imports.go is correctly generated then, without the need to manually change it.
Thanks both of you for the great support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants