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

not find META-INF/extensions.idx #21

Closed
melin opened this issue Aug 24, 2014 · 11 comments
Closed

not find META-INF/extensions.idx #21

melin opened this issue Aug 24, 2014 · 11 comments

Comments

@melin
Copy link

melin commented Aug 24, 2014

Exception in thread "main" java.lang.NullPointerException
at ro.fortsoft.pf4j.DefaultExtensionFinder.readPluginsIndexFiles(DefaultExtensionFinder.java:176)
at ro.fortsoft.pf4j.DefaultExtensionFinder.readIndexFiles(DefaultExtensionFinder.java:132)
at ro.fortsoft.pf4j.DefaultExtensionFinder.find(DefaultExtensionFinder.java:54)
at ro.fortsoft.pf4j.DefaultPluginManager.getExtensions(DefaultPluginManager.java:559)

@decebals
Copy link
Member

Can you supply more information, please. When you receive this exception? You run your application from IDE or from command line?
I inspect that line and I see that probably you have a plugin without extensions.idx. Do you define a plugin without extensions (only with extension points) ?
I will improve the code (more defense) to prevent this situation.

decebals added a commit that referenced this issue Aug 24, 2014
@melin
Copy link
Author

melin commented Aug 25, 2014

In eclipse to run the demo
########################################
PF4J-DEMO
########################################
2014-08-25 12:11:17,589 INFO ro.fortsoft.pf4j.DefaultPluginManager - PF4J version 0.0.0 in 'deployment' mode
2014-08-25 12:11:17,673 INFO ro.fortsoft.pf4j.DefaultPluginManager - Enabled plugins: []
2014-08-25 12:11:17,673 INFO ro.fortsoft.pf4j.DefaultPluginManager - Disabled plugins: []
2014-08-25 12:11:17,673 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Lookup plugins in 'H:\codes\opensources\github\pf4j\demo\app\plugins'
2014-08-25 12:11:17,688 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Found 2 possible plugins: [plugins\pf4j-demo-plugin1-0.10.0-SNAPSHOT, plugins\pf4j-demo-plugin2-0.10.0-SNAPSHOT]
2014-08-25 12:11:17,688 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Find plugin descriptor '/pf4j-demo-plugin1-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,688 DEBUG ro.fortsoft.pf4j.ManifestPluginDescriptorFinder - Lookup plugin descriptor in 'plugins\pf4j-demo-plugin1-0.10.0-SNAPSHOT\classes\META-INF\MANIFEST.MF'
2014-08-25 12:11:17,692 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Descriptor PluginDescriptor [pluginId=welcome-plugin, pluginClass=ro.fortsoft.pf4j.demo.welcome.WelcomePlugin, version=0.0.1, provider=Decebal Suiu, dependencies=[]]
2014-08-25 12:11:17,692 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Class 'ro.fortsoft.pf4j.demo.welcome.WelcomePlugin' for plugin '/pf4j-demo-plugin1-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,692 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Loading plugin '/pf4j-demo-plugin1-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,698 DEBUG ro.fortsoft.pf4j.PluginLoader - Created class loader 'ro.fortsoft.pf4j.PluginClassLoader@45290155'
2014-08-25 12:11:17,699 DEBUG ro.fortsoft.pf4j.PluginLoader - Found 'H:\codes\opensources\github\pf4j\demo\app\plugins\pf4j-demo-plugin1-0.10.0-SNAPSHOT\classes' directory
2014-08-25 12:11:17,699 DEBUG ro.fortsoft.pf4j.PluginLoader - Added 'H:\codes\opensources\github\pf4j\demo\app\plugins\pf4j-demo-plugin1-0.10.0-SNAPSHOT\classes' to the class loader path
2014-08-25 12:11:17,701 DEBUG ro.fortsoft.pf4j.PluginLoader - Added 'H:\codes\opensources\github\pf4j\demo\app\plugins\pf4j-demo-plugin1-0.10.0-SNAPSHOT\lib\commons-lang-2.6.jar' to the class loader path
2014-08-25 12:11:17,701 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Loaded plugin '/pf4j-demo-plugin1-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,701 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Creating wrapper for plugin '/pf4j-demo-plugin1-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,720 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Created wrapper 'PluginWrapper [descriptor=PluginDescriptor [pluginId=welcome-plugin, pluginClass=ro.fortsoft.pf4j.demo.welcome.WelcomePlugin, version=0.0.1, provider=Decebal Suiu, dependencies=[]], pluginPath=/pf4j-demo-plugin1-0.10.0-SNAPSHOT]' for plugin '/pf4j-demo-plugin1-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,720 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Find plugin descriptor '/pf4j-demo-plugin2-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,720 DEBUG ro.fortsoft.pf4j.ManifestPluginDescriptorFinder - Lookup plugin descriptor in 'plugins\pf4j-demo-plugin2-0.10.0-SNAPSHOT\classes\META-INF\MANIFEST.MF'
2014-08-25 12:11:17,735 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Descriptor PluginDescriptor [pluginId=hello-plugin, pluginClass=ro.fortsoft.pf4j.demo.hello.HelloPlugin, version=0.0.1, provider=Decebal Suiu, dependencies=[]]
2014-08-25 12:11:17,735 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Class 'ro.fortsoft.pf4j.demo.hello.HelloPlugin' for plugin '/pf4j-demo-plugin2-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,735 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Loading plugin '/pf4j-demo-plugin2-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,735 DEBUG ro.fortsoft.pf4j.PluginLoader - Created class loader 'ro.fortsoft.pf4j.PluginClassLoader@1bddf367'
2014-08-25 12:11:17,735 DEBUG ro.fortsoft.pf4j.PluginLoader - Found 'H:\codes\opensources\github\pf4j\demo\app\plugins\pf4j-demo-plugin2-0.10.0-SNAPSHOT\classes' directory
2014-08-25 12:11:17,736 DEBUG ro.fortsoft.pf4j.PluginLoader - Added 'H:\codes\opensources\github\pf4j\demo\app\plugins\pf4j-demo-plugin2-0.10.0-SNAPSHOT\classes' to the class loader path
2014-08-25 12:11:17,736 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Loaded plugin '/pf4j-demo-plugin2-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,736 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Creating wrapper for plugin '/pf4j-demo-plugin2-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,736 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Created wrapper 'PluginWrapper [descriptor=PluginDescriptor [pluginId=hello-plugin, pluginClass=ro.fortsoft.pf4j.demo.hello.HelloPlugin, version=0.0.1, provider=Decebal Suiu, dependencies=[]], pluginPath=/pf4j-demo-plugin2-0.10.0-SNAPSHOT]' for plugin '/pf4j-demo-plugin2-0.10.0-SNAPSHOT'
2014-08-25 12:11:17,757 DEBUG ro.fortsoft.pf4j.DependencyResolver - Graph:
welcome-plugin -> []
hello-plugin -> []
2014-08-25 12:11:17,758 DEBUG ro.fortsoft.pf4j.DependencyResolver - Plugins order: [welcome-plugin, hello-plugin]
2014-08-25 12:11:17,758 INFO ro.fortsoft.pf4j.DefaultPluginManager - Plugin 'welcome-plugin' resolved
2014-08-25 12:11:17,758 INFO ro.fortsoft.pf4j.DefaultPluginManager - Plugin 'hello-plugin' resolved
2014-08-25 12:11:17,758 INFO ro.fortsoft.pf4j.DefaultPluginManager - Start plugin 'welcome-plugin:0.0.1'
2014-08-25 12:11:17,758 DEBUG ro.fortsoft.pf4j.DefaultExtensionFactory - Create instance for plugin 'ro.fortsoft.pf4j.demo.welcome.WelcomePlugin'
WelcomePlugin.start()
2014-08-25 12:11:17,805 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Fire 'PluginStateEvent [plugin=welcome-plugin, newState=STARTED, oldState=CREATED]' to 'ro.fortsoft.pf4j.DefaultExtensionFinder@3ae490fa'
2014-08-25 12:11:17,805 INFO ro.fortsoft.pf4j.DefaultPluginManager - Start plugin 'hello-plugin:0.0.1'
2014-08-25 12:11:17,805 DEBUG ro.fortsoft.pf4j.DefaultExtensionFactory - Create instance for plugin 'ro.fortsoft.pf4j.demo.hello.HelloPlugin'
HelloPlugin.start()
2014-08-25 12:11:17,830 DEBUG ro.fortsoft.pf4j.DefaultPluginManager - Fire 'PluginStateEvent [plugin=hello-plugin, newState=STARTED, oldState=CREATED]' to 'ro.fortsoft.pf4j.DefaultExtensionFinder@3ae490fa'
2014-08-25 12:11:17,845 DEBUG ro.fortsoft.pf4j.DefaultExtensionFinder - Checking extension point 'ro.fortsoft.pf4j.demo.api.Greeting'
2014-08-25 12:11:17,846 DEBUG ro.fortsoft.pf4j.DefaultExtensionFinder - Finding extensions for extension point 'ro.fortsoft.pf4j.demo.api.Greeting'
2014-08-25 12:11:17,847 DEBUG ro.fortsoft.pf4j.DefaultExtensionFinder - Reading extensions index files from classpath
2014-08-25 12:11:17,847 DEBUG ro.fortsoft.pf4j.DefaultExtensionFinder - No extensions found
2014-08-25 12:11:17,848 DEBUG ro.fortsoft.pf4j.DefaultExtensionFinder - Reading extensions index files from plugins
2014-08-25 12:11:17,848 DEBUG ro.fortsoft.pf4j.DefaultExtensionFinder - Reading extensions index file for plugin 'welcome-plugin'
Exception in thread "main" java.lang.NullPointerException
at ro.fortsoft.pf4j.DefaultExtensionFinder.readPluginsIndexFiles(DefaultExtensionFinder.java:178)
at ro.fortsoft.pf4j.DefaultExtensionFinder.readIndexFiles(DefaultExtensionFinder.java:134)
at ro.fortsoft.pf4j.DefaultExtensionFinder.find(DefaultExtensionFinder.java:54)
at ro.fortsoft.pf4j.DefaultPluginManager.getExtensions(DefaultPluginManager.java:559)
at ro.fortsoft.pf4j.demo.Boot.main(Boot.java:49)

libinsong1204@gmail.com

From: Decebal Suiu
Date: 2014-08-25 03:20
To: decebals/pf4j
CC: melin
Subject: Re: [pf4j] not find META-INF/extensions.idx (#21)
Can you supply more information, please. When you receive this exception? You run your application from IDE or from command line?
I inspect that line and I see that probably you have a plugin without extensions.idx. Do you define a plugin without extensions (only with extension points) ?
I will improve the code (more defense) to prevent this situation.

Reply to this email directly or view it on GitHub.

@decebals
Copy link
Member

If you use Eclipse than make sure annotation processing is enabled at least for any projects registering objects using annotations. In the properties for your new project go to Java Compiler -> Annotation Processing
Check the “Enable Project Specific Settings” and make sure “Enable annotation processing” is checked.

@decebals
Copy link
Member

Any news? If my last comment helped you please tell me to improve readme file.

@decebals decebals closed this as completed Sep 9, 2014
@codespelunker
Copy link

Any chance a production release will be made available soon with this fix in it?

@decebals
Copy link
Member

decebals commented Apr 9, 2015

I don't understand you. Do you have the same problem? If your response is yes, please give me more details about the context when this appears.

@decebals decebals reopened this Apr 9, 2015
@decebals
Copy link
Member

decebals commented Apr 9, 2015

Do you use the last pf4j version?

@codespelunker
Copy link

Sorry, I didn't get a notification that you had replied. Apologies for the delay.

Yes, with the latest p4fj release, release-0.9.0 (on 7/30/14), we saw this same problem. Getting the latest from master solved the issue for us. I was simply wondering if you were going to make a new release.

@decebals
Copy link
Member

Sure. Monday I will release 0.9.1

@gearlles
Copy link

gearlles commented Aug 9, 2015

I have the same problem. Are you going to release the fix soon?

@decebals
Copy link
Member

Please check the SNAPSHOT. If everything is OK I will release a new version.

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

4 participants