WebLogic Portal VCR与JSR-170存储库的IllegalMonitorStateException连接(WebLogic Portal VCR IllegalMonitorStateException connection to JSR-170 Repository)
我们最近从WebLogic Portal 9.2.3升级到10.3.5。 我们有一个通过Day Software JSR-170 VCR-JCR提供商连接的JackRabbit存储库。 这在9.2.3上完全正常,但在10.3.5我们尝试检索内容时会得到IllegalMonitorStateException。 我们在JackRabbit之上有自己的外观,它实现了JCR-170。 以下是来自服务器的调试:
[com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.initializeSessionState():1215] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2b70161: (re)initializing all repo sessions for username: <WLS Kernel> [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.initializeSessionState():1215] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2bf2311: (re)initializing all repo sessions for username: <WLS Kernel> [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.initializeSessionState():1215] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: (re)initializing all repo sessions for username: <anonymous> [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.ensureConnectedToRepository():801] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: no session found for repoName=indhold; need to connect [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.ensureConnectedToRepository():821] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: connect write lock acquired for repoName=indhold [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.connectToRepository():875] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: connecting to repositoryName= indhold [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepositoryClass():1503] invoking Class.forName(repoClassName) [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepository():1403] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: Ticket authentication error for: indhold java.lang.IllegalMonitorStateException at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:363) at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1317) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:745) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepositoryClass(RepositoryManagerDelegate.java:1537) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepository(RepositoryManagerDelegate.java:1327) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.connectToRepository(RepositoryManagerDelegate.java:893) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.ensureConnectedToRepository(RepositoryManagerDelegate.java:832) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.connect(RepositoryManagerDelegate.java:1160) at com.bea.content.federated.internal.delegate.RepositoryHelper.checkCapability(RepositoryHelper.java:759) at com.bea.content.federated.internal.CapabilityManagerImpl.checkRepositoryCapability(CapabilityManagerImpl.java:57) at com.bea.content.federated.internal.ManagerImplCapabilityHelper.checkCapability(ManagerImplCapabilityHelper.java:80) at com.bea.content.federated.internal.ManagerImplCapabilityHelper.verifyCapability(ManagerImplCapabilityHelper.java:54) at com.bea.content.federated.internal.NodeManagerImpl.getNode(NodeManagerImpl.java:432) at dk.skat.portal.front.helper.ContentHelper.getNode(ContentHelper.java:1591)
似乎authenticationn失败了,但是如果我尝试在存储库中的登录方法中设置一个断点(我们的Facade,它不会执行任何身份验证挑战,只是包装JackRabbit,并且登录同一个用户 - “默认“ - 对于所有访问权限,我们永远不会被调用。 在“管理存储库”页面上设置用户名和密码似乎没有任何效果。 另一方面,如果我转到Portal管理控制台,并尝试管理或浏览存储库,一切正常,实际调用登录方法,服务器可以很好地连接到存储库。 这看起来很奇怪。 在cetain案例中(碰巧是随机发生的,我们可以让服务器突然进入存储库,但是在重新启动服务器时,它又会再次失败)。
我试图将存储库的用户名/密码设置为weblogic用户,但这似乎没有任何影响,我仍然得到错误。 此外,当我进入PAC并注销,关闭浏览器,重新打开浏览器或完全不同的浏览器时,PAC的输入似乎激活存储库以使其联机(尽管这不稳定或不需要)。
请指教,如果WebLogic中存在错误(似乎它试图解锁()ReadLock太多次,导致提到的异常 - 如果它在该异常上完全失败??,是否应该在之前检查锁定计数解锁?),或者如果你做错了什么? 我可以读到10.0.5的eclipse工具中存在一个关于这个错误的已知错误。
此外,我们在9.2.3中似乎没有任何问题,10.3.5中有什么变化?
We have recently upgraded from WebLogic Portal 9.2.3 to 10.3.5. We have a JackRabbit repository connected through the Day Software JSR-170 VCR-JCR provider. This has all worked perfectly fine on 9.2.3, but on 10.3.5 we are getting a IllegalMonitorStateException when we try to retrieve content. We have out own facade on top of JackRabbit, that implements the JCR-170. Here is the debug out from the server:
[com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.initializeSessionState():1215] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2b70161: (re)initializing all repo sessions for username: <WLS Kernel> [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.initializeSessionState():1215] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2bf2311: (re)initializing all repo sessions for username: <WLS Kernel> [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.initializeSessionState():1215] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: (re)initializing all repo sessions for username: <anonymous> [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.ensureConnectedToRepository():801] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: no session found for repoName=indhold; need to connect [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.ensureConnectedToRepository():821] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: connect write lock acquired for repoName=indhold [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.connectToRepository():875] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: connecting to repositoryName= indhold [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepositoryClass():1503] invoking Class.forName(repoClassName) [com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepository():1403] com.bea.content.federated.internal.delegate.RepositoryManagerDelegate@2fa5952: Ticket authentication error for: indhold java.lang.IllegalMonitorStateException at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:363) at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1317) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:745) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepositoryClass(RepositoryManagerDelegate.java:1537) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.getRepository(RepositoryManagerDelegate.java:1327) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.connectToRepository(RepositoryManagerDelegate.java:893) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.ensureConnectedToRepository(RepositoryManagerDelegate.java:832) at com.bea.content.federated.internal.delegate.RepositoryManagerDelegate.connect(RepositoryManagerDelegate.java:1160) at com.bea.content.federated.internal.delegate.RepositoryHelper.checkCapability(RepositoryHelper.java:759) at com.bea.content.federated.internal.CapabilityManagerImpl.checkRepositoryCapability(CapabilityManagerImpl.java:57) at com.bea.content.federated.internal.ManagerImplCapabilityHelper.checkCapability(ManagerImplCapabilityHelper.java:80) at com.bea.content.federated.internal.ManagerImplCapabilityHelper.verifyCapability(ManagerImplCapabilityHelper.java:54) at com.bea.content.federated.internal.NodeManagerImpl.getNode(NodeManagerImpl.java:432) at dk.skat.portal.front.helper.ContentHelper.getNode(ContentHelper.java:1591)
It seems that authenticationn fails, but if I try to set a break-point in the login methods in the repository (our Facade, which doesn't do any authentication challenge, but just wraps JackRabbit, and logs in the same user - "default" - for all access), we are never getting called. Setting the username and password on the Manage Repositories page, doesn't seem to have any effect. If I on the other hand go to Portal Administration Console, and try to manage or browse the repository, everything works fine, and the login methods are actually called, and the server connects fine to the repository. This seems very strange. In cetain cases (that happens to happen randomly, we can get the server to all of a sudden get to the repository, but on restart of the server, it is again back to failing).
I've tried to set username/password for the repository to the weblogic user, but that doesn't seem to have any effect, I still get the error. Furthermore when I've been into the PAC, and logs out, closes the browser, reopen the browser or a completely different browser, the entering of PAC seems to activate the repository to become online (though this is not stable or desired).
Please advice, if there is a bug in WebLogic (it seems it tries to unlock() the ReadLock too many times, resulting in the mentioned exception - should it at all fail on that exception??, Should the lock-count be checked before unlocking?), or if w are doing anything wrong? I can read that there is a known bug in the eclipse tooling for 10.3.5 about exactly this error.
Furthermore, we didn't seem to have any trouble in 9.2.3, what changed in 10.3.5?
原文:https://stackoverflow.com/questions/12847573
最满意答案
我这样做:
In [184]: ['a','b','c'] + df.apply(lambda x: pd.factorize(x)[0]).astype(str) Out[184]: col1 col2 col3 0 a0 b0 c0 1 a1 b1 c1 2 a2 b2 c2 3 a0 b0 c0 4 a2 b2 c1
更通用的方法:
import string c = list(string.ascii_lowercase)[:len(df.columns)] df1 = c + df.apply(lambda x: pd.factorize(x)[0]).astype(str) df1 col1 col2 col3 0 a0 b0 c0 1 a1 b1 c1 2 a2 b2 c2 3 a0 b0 c0 4 a2 b2 c1
I'd do it this way:
In [184]: ['a','b','c'] + df.apply(lambda x: pd.factorize(x)[0]).astype(str) Out[184]: col1 col2 col3 0 a0 b0 c0 1 a1 b1 c1 2 a2 b2 c2 3 a0 b0 c0 4 a2 b2 c1
a bit more generic approach:
import string c = list(string.ascii_lowercase)[:len(df.columns)] df1 = c + df.apply(lambda x: pd.factorize(x)[0]).astype(str) df1 col1 col2 col3 0 a0 b0 c0 1 a1 b1 c1 2 a2 b2 c2 3 a0 b0 c0 4 a2 b2 c1
相关问答
更多-
使用replace Serie : df = df.replace(df['id']) #or convert to dict (first solution) #df = df.replace(df['id'].to_dict()) print (df) id neighborl neighbor2 neighbor3 0 u1 u1 u4 u3 1 u2 u2 u3 u2 2 u3 u3 ...
-
In [1]: df = DataFrame(np.random.randint(0,10,size=100).reshape(10,10)) In [2]: df Out[2]: 0 1 2 3 4 5 6 7 8 9 0 2 2 3 2 6 1 9 9 3 3 1 1 2 5 8 5 2 5 0 6 3 2 0 7 0 7 5 5 9 1 0 3 3 5 3 2 3 7 6 8 3 8 4 4 ...
-
这种“查找和替换”的干净语法使用了一个字典,as df.Num_of_employees = df.Num_of_employees.replace({"10-Jan": "1-10", "Nov-50": "11-50"}) A clean syntax for this kind of "find and replace" uses a dict, as df.Num_of_employees = d ...
-
按value_counts创建的Series使用map : df['Label'] = df['Label'].map(df['Label'].value_counts()) print (df) Label 0 5 1 3 2 5 3 5 4 3 5 5 6 2 7 2 8 5 9 3 另一种transform + size解决方案: df['Label'] = df.groupby('Label' ...
-
计算跨多个列的pandas数据帧中唯一值的出现(Count occurance of unique values in a pandas dataframe across multiple columns)[2022-04-18]
让我们使用pd.get_dummies和groupby : (df1.assign(**pd.get_dummies(df1) .pipe(lambda x: x.groupby(x.columns.str[2:], axis=1) .sum()))) 输出: a b c great hello world 0 hello world None 0 1 1 1 w ... -
为pandas数据帧的每个id替换列中序列的缺失值(Replace missing values of a sequence in a column for each id of pandas dataframe)[2023-06-07]
使用pd.MultiIndex.from_product : idx = pd.MultiIndex.from_product([df.id.unique(), np.arange(5)], names=['id', 'day']) out = (df.set_index(['id', 'day']) .reindex(idx).reset_index() ) 然后只需用您想要的填充值替换NaN 。 out.value = [d if isinstance(d, list) else [ ... -
我认为需要: print (df) col1 col2 col3 0 Aba xxx jjj 1 Aba bhh jjj 2 ccc kkk jjj 3 Aba xxx yyy 4 ccc kkk jjj #check column for number of unique values m = df.nunique() < 3 print (m) col1 True col2 False col3 True dtype: bool import ...
-
你使用了错误的符号。 尝试 data.ix['bar','c1'] = -999 索引的第一个元素引用行,第二个元素引用列。 查看文档 。 You used the wrong notation. Try data.ix['bar','c1'] = -999 The first element of the index refers to rows, and the second to columns. See the Docs.
-
替代替换,我们可以使用value_counts.head(2) , where通过映射value_counts获取mask并使用notnull() x = df['obj_col1'].value_counts().head(2) #B 2 #A 2 #Name: obj_col1, dtype: int64 df['obj_col1'].where(df['obj_col1'].map(x).notnull(),'Oth') 输出: 0 A 1 A 2 B 3 ...
-
我这样做: In [184]: ['a','b','c'] + df.apply(lambda x: pd.factorize(x)[0]).astype(str) Out[184]: col1 col2 col3 0 a0 b0 c0 1 a1 b1 c1 2 a2 b2 c2 3 a0 b0 c0 4 a2 b2 c1 更通用的方法: import string c = list(string.ascii_lowercase)[:len ...