Home > Unable To > Unable To Load Component Metadata Infinispan

Unable To Load Component Metadata Infinispan

Board index All times are UTC - 5 hours [ DST ] © Copyright 2014, Red Hat Inc. You can vote up the examples you like and your votes will be used in our system to product more good examples. + Save this class to your library Example 1 Cheers, Sanne _______________________________________________ infinispan-dev mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/infinispan-dev Mircea Markus-2 Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: You can vote up the examples you like and your votes will be used in our system to product more good examples. + Save this class to your library Example 1 Source

Close Submit Login Register FAQ Search View unanswered posts | View active topics Board index All times are UTC - 5 hours [ DST ] Information The requested at org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:131) at org.infinispan.factories.GlobalComponentRegistry.(GlobalComponentRegistry.java:103) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:381) ... 29 more Caused by: java.lang.NullPointerException at org.infinispan.factories.components.ComponentMetadataRepo.readMetadata(ComponentMetadataRepo.java:53) at org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:129) ... 31 more The exception above is caused by Infinispan using (by default) invocation context's Free forum by Nabble Edit this page Skip to content Ignore Learn more Please note that GitHub no longer supports old versions of Firefox. I thought it was enough to set it in the global configuration.On Fri, Apr 19, 2013 at 7:02 PM, Sanne Grinovero <[hidden email]> wrote: It turns out this resource loading issue

Things get a bit more tricky with extension modules, and a lot of magic is being wrapped around this defaultClassLoader which goes beyond my understanding so I would be glad to I thought it was enough to set it in the global configuration. Would that solve the issue you reported? Atlassian Infinispan Developer List Search everywhere only in this topic Advanced Search [infinispan-dev] Classloading issue with multiple modules in AS7 Classic List Threaded ♦ ♦ Locked 8 messages Sanne Grinovero-3 Reply

  1. Search Top APIs Top 16 Utility Classes Program Creek Simple Java Log in Sign up (Free now!) 6623 users Top Related
  2. Yes that would solve the issue.
  3. That's what happens with Hibernate Core, which does not start its own cache manager, but simply looks it up based on what's been configured by default in the standalone.xml (there's a
  4. Share Clone via HTTPS Clone with Git or checkout with SVN using the repository's web address.

The experts on these are really AS7 guys… > > Cheers, > > On Mar 27, 2013, at 9:22 PM, Sanne Grinovero <[hidden email]> wrote: > >> When starting an EmbeddedCacheManager at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:385) at org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider.createCustomCacheManager(InfinispanDatastoreProvider.java:151) ... 20 more Caused by: org.infinispan.CacheException: Unable to load component metadata! asyncExecutor.execute(new Runnable() { @Override public void run() { try { URL resource = FileLookupFactory.newInstance().lookupFileLocation(cacheConfigFile, getClass().getClassLoader()); if (resource == null) resource = new URL(cacheConfigFile); if (cacheManager == null) { // update config JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.

Embed Share Copy sharable URL for this gist. Feedback We value your feedback! The configuration passed in is automatically registered. * * @param configuration configuration with which this is created */ public GlobalComponentRegistry(GlobalConfiguration configuration, EmbeddedCacheManager cacheManager, Set createdCaches) { ClassLoader configuredClassLoader = configuration.classLoader(); moduleLifecycles Star 0 Fork 0 stliu/gist:2586113 Created May 3, 2012 Embed What would you like to do?

extends ReplicableCommand>>(1); for (ModuleCommandExtensions extension : moduleCmdExtLoader) { log.debugf("Loading module command extension SPI class: %s", extension); ModuleCommandFactory cmdFactory = extension.getModuleCommandFactory(); ModuleCommandInitializer cmdInitializer = extension.getModuleCommandInitializer(); for (Map.Entry > Yes that would solve the issue.

If so please update the JIRA with the requirement. https://gist.github.com/2586113 Sanne On 5 April 2013 12:52, Galder Zamarreño <[hidden email]> wrote: > I'm not an expert on this (Paul, Rado, Richard should help more…), but to do what you're trying to The Infinispan classloader could be > used first, as it's likely the correct one for most components? +1 > > It would likely be nicer for many users than to have Reload to refresh your session.

Cheers, -- Mircea Markus Infinispan lead (www.infinispan.org) _______________________________________________ infinispan-dev mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/infinispan-dev « Return to Infinispan Developer List | 1 view|%1 views Loading... this contact form Alternatively, you could let the Infinispan subsystem create the cache managers directly, by configuring them in advance in the standalone.xml or similar. Embed Embed this gist in your website. Workaround: set the class loader on the GlobalConfiguration object: GlobalConfiguration.classLoader( GlobalConfiguration.class.getClassLoder()) Gliffy Diagrams Sort Name Modify Date Ascending Descending AttachmentsActivity People Assignee: Tristan Tarrant Reporter: Mircea Markus Votes: 2 Vote for

Cheers, -- Mircea Markus Infinispan lead (www.infinispan.org) _______________________________________________ infinispan-dev mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/infinispan-dev Sanne Grinovero-3 Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content Take this with a pinch of salt (some details are blurry). The Iterable passed in should contain all [emailprotected] ModuleMetadataFileFinder} instances * for all loaded Infinispan modules. have a peek here I know there's a way to export the metadata in META-INF/services.

In order to overcome this problem we should try to use both class' ClassLoader and InvocationContxt's class loader when trying to read the metadata. at org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:131) at org.infinispan.factories.GlobalComponentRegistry.(GlobalComponentRegistry.java:103) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:381) ... 29 more Caused by: java.lang.NullPointerException at org.infinispan.factories.components.ComponentMetadataRepo.readMetadata(ComponentMetadataRepo.java:53) Now I think this is quite silly as locating this resource is trivial: it's in the same jar as all the infinispan core classes: infinispan-core-[version].jar so patching this looks like trivial:

Sanne On 5 April 2013 12:52, Galder Zamarreño <[hidden email]> wrote: > I'm not an expert on this (Paul, Rado, Richard should help more…), but to do what you're trying to

Implement both? globalConfiguration = configuration; registerComponent(this, GlobalComponentRegistry.class); registerComponent(cacheManager, EmbeddedCacheManager.class); registerComponent(configuration, GlobalConfiguration.class); registerComponent(new CacheManagerJmxRegistration(), CacheManagerJmxRegistration.class); registerComponent(new CacheManagerNotifierImpl(), CacheManagerNotifier.class); moduleProperties.loadModuleCommandHandlers(configuration.getClassLoader()); Map factories = moduleProperties.moduleCommandFactories(); if (factories != null && !factories.isEmpty()) registerNonVolatileComponent(factories, KnownComponentNames.MODULE_COMMAND_FACTORIES); else registerNonVolatileComponent(Collections.(GlobalComponentRegistry.java:103) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:381) ... 29 more Caused by: java.lang.NullPointerException at org.infinispan.factories.components.ComponentMetadataRepo.readMetadata(ComponentMetadataRepo.java:53) at org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:129) ... 31 more The ComponentMetadataRepo is unable to load "infinispan-core-component-metadata.dat", which contains the critically-important information

Maybe we should have an (optional) Parser API which takes explicit classloaders ? fileLookup.lookupFileStrict(getURI(), classLoader) : fileLookup.lookupFileStrict(getURI().toString(), classLoader); return new ParserRegistry(classLoader).parse(configurationStream); } catch (FileNotFoundException e) { // No such file, lets use default CBH return new ConfigurationBuilderHolder(classLoader); } } Example 7 Project: infinispan File: That's what happens with Hibernate Core, which does not start its own cache manager, but simply looks it up based on what's been configured by default in the standalone.xml (there's a Check This Out The configuration passed in is automatically registered. * * @param configuration configuration with which this is created */ public GlobalComponentRegistry(GlobalConfiguration configuration, EmbeddedCacheManager cacheManager, Set createdCaches) { super(configuration.getClassLoader()); // registers the default

[infinispan-dev] Classloading issue with multiple modules in AS7 Sanne Grinovero sanne at infinispan.org Wed Mar 27 16:22:30 EDT 2013 Previous message: [infinispan-dev] Fwd: [infinispan] ISPN-2962 Fix thread leaks in the core Reload to refresh your session. It would likely be nicer for many users than to have to use CLs in the API - or having to figure out why Infinispan is throwing an NPE in its Un-initialized in the sense that parameters will be set, but any components * specific to the cache in question will not be set. *

* You would typically set these

Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. at org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:131) at org.infinispan.factories.GlobalComponentRegistry.(GlobalComponentRegistry.java:104) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:380) ... 21 more Caused by: java.lang.NullPointerException at org.infinispan.factories.components.ComponentMetadataRepo.readMetadata(ComponentMetadataRepo.java:53) at org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:129) ... 23 more Sign up for free to join this conversation on GitHub. These examples are extracted from open source projects.

Un-initialized in the sense that parameters will be set, but any components * specific to the cache in question will not be set. *

* You would typically set these at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:386) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:341) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:328) at org.hibernate.search.infinispan.CacheManagerServiceProvider.start(CacheManagerServiceProvider.java:93) at org.hibernate.search.engine.impl.StandardServiceManager$ServiceProviderWrapper.startVirtual(StandardServiceManager.java:178) at org.hibernate.search.engine.impl.StandardServiceManager.requestService(StandardServiceManager.java:124) at org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.initialize(InfinispanDirectoryProvider.java:86) at org.hibernate.search.store.impl.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:84) ... 22 more Caused by: org.infinispan.CacheException: Unable to load component metadata! This is a messy approach though - a proper fix will be in ISPN-1698 getOrCreateComponent(Transport.class); } catch (Exception e) { throw new CacheException("Unable to construct a GlobalComponentRegistry!", e); } } Example extends ReplicableCommand>> command : cmdFactory.getModuleCommands().entrySet()) { byte id = command.getKey(); if (commandFactories.containsKey(id)) throw new IllegalArgumentException(String.format( "Cannot use id %d for commands, as it is already in use by %s", id, commandFactories.get(id).getClass().getName()));

We recommend upgrading to the latest Safari, Google Chrome, or Firefox. All gists GitHub Sign up for a GitHub account Sign in Create a gist now Instantly share code, notes, That would be an overloaded ConfigurationParser.parse( InputStream, *ClassLoader* )? extends ReplicableCommand>>(1); for (ModuleCommandExtensions extension : moduleCmdExtLoader) { log.debugf("Loading module command extension SPI class: %s", extension); ExtendedModuleCommandFactory cmdFactory = extension.getModuleCommandFactory(); ModuleCommandInitializer cmdInitializer = extension.getModuleCommandInitializer(); for (Map.Entry(DefaultCacheManager.java:386) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:341) at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:328) at org.hibernate.search.infinispan.CacheManagerServiceProvider.start(CacheManagerServiceProvider.java:93) at org.hibernate.search.engine.impl.StandardServiceManager$ServiceProviderWrapper.startVirtual(StandardServiceManager.java:178) at

I know there's a way to export the metadata in META-INF/services. > > Alternatively, you could let the Infinispan subsystem create the cache managers directly, by configuring them in advance in The experts on these are really AS7 guys… > > Cheers, > > On Mar 27, 2013, at 9:22 PM, Sanne Grinovero <[hidden email]> wrote: > >> When starting an EmbeddedCacheManager Note that the core module is always loaded and need not be contained in this * iterable. * @param moduleMetadataFiles file finders to iterate through and load into the repository */ Cheers, -- Mircea Markus Infinispan lead (www.infinispan.org) _______________________________________________ infinispan-dev mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/infinispan-dev Mircea Markus-2 Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content

This is a messy approach though - a proper fix will be in ISPN-1698 getOrCreateComponent(Transport.class); // These two should not be necessary, but they are here as a workaround for ISPN-2371 AFAIK. Sanne Previous message: [infinispan-dev] Fwd: [infinispan] ISPN-2962 Fix thread leaks in the core test suite (#1736) Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]