我有一个使用Modeshape(版本4.2.0.Final)和Infinispan(版本6.0.2.Final)的应用程序。 在最近的停电期间,似乎我的infinispan存储器出现故障,因为我现在无法从此存储中获取任何数据,例如
private void gridView_KeyUp(object sender, KeyEventArgs e)
{
try
{
//if (e.RowIndex >= 0)
if(e.KeyCode == Keys.Up)
{
DataGridViewRow row = this.gridView.Rows[e.KeyCode];
txtboxStudentNum.Text = row.Cells["ID_Number"].Value.ToString();
txtboxName.Text = row.Cells["Name"].Value.ToString();
comboCourse.SelectedItem = row.Cells["Course"].Value.ToString();
EPCdisplay.Text = row.Cells["EPCNumber"].Value.ToString();
txtboxSerialNum.Text = row.Cells["SerialNumber"].Value.ToString();
txtboxModelNum.Text = row.Cells["ModelNumber"].Value.ToString();
comboCategory.SelectedItem = row.Cells["Category"].Value.ToString();
comboYrLevel.SelectedItem = row.Cells["Level"].Value.ToString();
txtboxEquipDesc.Text = row.Cells["EquipDesc"].Value.ToString();
comboSem.Text = row.Cells["Semester"].Value.ToString();
AddDatabase get_image = new AddDatabase();
get_image.ID = txtboxStudentNum.Text;
get_image.getimage();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
我的infinispan集群使用此XML配置
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to org.infinispan.metadata.InternalMetadata
at org.infinispan.marshall.core.MarshalledEntryImpl.getMetadata(MarshalledEntryImpl.java:72) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:266) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeededAndUpdateStats(CacheLoaderInterceptor.java:335) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:105) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.EntryWrappingInterceptor.visitGetKeyValueCommand(EntryWrappingInterceptor.java:116) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.visitGetKeyValueCommand(AbstractTxLockingInterceptor.java:60) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitGetKeyValueCommand(OptimisticLockingInterceptor.java:108) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:226) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:221) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:92) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:73) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.CacheImpl.get(CacheImpl.java:377) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.CacheImpl.get(CacheImpl.java:369) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
at org.infinispan.schematic.internal.CacheSchematicDb.get(CacheSchematicDb.java:72) ~[modeshape-schematic-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.document.LocalDocumentStore.get(LocalDocumentStore.java:71) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:180) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:199) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.document.WorkspaceCache.getNode(WorkspaceCache.java:231) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.document.AbstractSessionCache.getNode(AbstractSessionCache.java:240) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.document.WritableSessionCache.getNode(WritableSessionCache.java:161) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.RepositoryCache$RepositoryFeaturesDetector.<init>(RepositoryCache.java:684) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.cache.RepositoryCache.<init>(RepositoryCache.java:314) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1139) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:978) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:387) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:651) ~[modeshape-jcr-4.2.0.Final.jar:4.2.0.Final]
如前所述,在停电期间都崩溃了,但是如何恢复此数据存储呢?
答案 0 :(得分:1)
对于不一致的存储,没有类似fsck的工具。虽然,单个文件存储的格式非常简单(checkout https://github.com/infinispan/infinispan/blob/6.0.x/core/src/main/java/org/infinispan/persistence/file/SingleFileStore.java),因此您可以编写自己的阅读器并分析错误。