Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cache.lock with a .NET extend client

696900Sep 14 2009 — edited Sep 15 2009
Hi,

I'm trying to do a simple cache.lock from within a .NET client (C#), connecting to a coherence cache via TCP-Extend.

I get this error

******************

Unhandled Exception: Unhandled Exception: System.Exception: Exception of type 'System.Exception' was thrown. ---> Portable(java.lang.SecurityException): lock operations are prohibited on NamedCache "Abhay-Cache"
--- End of inner exception stack trace ---
at Tangosol.Net.Messaging.Impl.Request.RequestStatus.get_Response() in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Messaging\Impl\Request.cs:line 365
at Tangosol.Net.Messaging.Impl.Request.RequestStatus.WaitForResponse(Int64 millis) in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Messaging\Impl\Request.cs:line 605
at Tangosol.Net.Messaging.Impl.Channel.Request(IRequest request, Int64 millis) in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Messaging\Impl\Channel.cs:line 1272
at Tangosol.Net.Messaging.Impl.Channel.Request(IRequest request) in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Messaging\Impl\Channel.cs:line 1233
at Tangosol.Net.Impl.RemoteNamedCache.BinaryNamedCache.Lock(Object key, Int64 waitTimeMillis) in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Impl\RemoteNamedCache.cs:line 3088
at Tangosol.Util.ConverterCollections.ConverterConcurrentCache.Lock(Object key, Int64 waitTimeMillis) in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Util\ConverterCollections.cs:line 2245
at Tangosol.Util.ConverterCollections.ConverterNamedCache.Lock(Object key, Int64 waitTimeMillis) in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Util\ConverterCollections.cs:line 3272
at Tangosol.Net.Impl.RemoteNamedCache.Lock(Object key, Int64 waitTimeMillis)in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Impl\RemoteNamedCache.cs:line 1191
at Tangosol.Net.Impl.SafeNamedCache.Lock(Object key, Int64 waitTimeMillis) in c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Impl\SafeNamedCache.cs:line 1017
at ExampleGridApplication.CacheClass.connectToCache() in h:\pradhan\VS2005\ExampleGridApplication\ExampleGridApplication\Example.cs:line 27
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

*********************

I'm wondering whether I'm configuring my cache incorrectly? I can lock a key from a Java node that joins the cluster .. however, from an Extend node (java or C#), I get this error..

This is a simple distributed cache

**************************************
<?xml version='1.0'?>
<!DOCTYPE cache-config SYSTEM "cache-config.dtd">

<cache-config>
<caching-scheme-mapping>
<cache-mapping>
<cache-name>*</cache-name>
<scheme-name>distributed-cache</scheme-name>
</cache-mapping>
</caching-scheme-mapping>

<caching-schemes>
<distributed-scheme>
<scheme-name>distributed-cache</scheme-name>
<service-name>DistributedCache</service-name>

<serializer>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>string</param-type>
<param-value>custom-types-pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>

<backing-map-scheme>
<local-scheme>
<!--
<class-name>com.tangosol.net.cache.ContinuousQueryCache</class-name>
-->
<high-units>500000000</high-units>
<low-units>10000</low-units>
<unit-calculator>BINARY</unit-calculator>
</local-scheme>
</backing-map-scheme>

<partition-count>5557</partition-count>
<backup-count>1</backup-count>
<thread-count>10</thread-count>
<autostart>true</autostart>
</distributed-scheme>
<proxy-scheme>
<service-name>ExtendTcpProxyService</service-name>
<thread-count>10</thread-count>
<acceptor-config>
<tcp-acceptor>
<local-address>
<address>localhost</address>
<port>9099</port>
</local-address>
</tcp-acceptor>
<serializer>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>string</param-type>
<param-value>custom-types-pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>
</acceptor-config>
<autostart>true</autostart>
</proxy-scheme>
</caching-schemes>
</cache-config>
*********************************
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2009
Added on Sep 14 2009
2 comments
1,436 views