Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] CDO View throws OutOfMemoryError
[CDO] CDO View throws OutOfMemoryError [message #426107] Tue, 16 December 2008 15:00 Go to next message
Saulius Tvarijonas is currently offline Saulius TvarijonasFriend
Messages: 34
Registered: July 2009
Member
Hi,

I am using CDO 2.0.0M3. I tried to use CDO View to browse repository
content. After entering server address and pressing OK, it throws out of
memory error. Heap limit is 1024mb, before connecting it was using about
150mb. And repository database is empty.

Saulius

java.lang.OutOfMemoryError: Java heap space
at
org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
at
org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
at
org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
at
org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
at
org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
at
org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
at
org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
at
org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
at
org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
at
org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
at
org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
at
org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
at
org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
at
org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
at
org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: [CDO] CDO View throws OutOfMemoryError [message #426113 is a reply to message #426107] Tue, 16 December 2008 17:23 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Saulius,

that looks really strange. Could you please provide more information
regarding the environment where you performed this action?

- How are you running CDOServer? Which backend are you using? Derby,
MySQL, PostgreSQL, Hibernate...
- Content of cdoserver.xml?
- Input values to the "open session" dialog (server description and
repository name fields)

Have you downloaded Net4J 2.0.0M3 as well?

Cheers,
Víctor.

Saulius Tvarijonas escribió:
> Hi,
>
> I am using CDO 2.0.0M3. I tried to use CDO View to browse repository
> content. After entering server address and pressing OK, it throws out of
> memory error. Heap limit is 1024mb, before connecting it was using about
> 150mb. And repository database is empty.
>
> Saulius
>
> java.lang.OutOfMemoryError: Java heap space
> at
> org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
>
> at
> org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
>
> at
> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
>
> at
> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
>
> at
> org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
>
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
>
> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
> at
> org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
>
> at
> org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
>
> at
> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
>
> at
> org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
>
> at
> org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: [CDO] CDO View throws OutOfMemoryError [message #426137 is a reply to message #426107] Wed, 17 December 2008 08:22 Go to previous messageGo to next message
Eike Stepper is currently online Eike StepperFriend
Messages: 6481
Registered: July 2009
Senior Member
Saulius,

As Vik said, this is strange. And it will be hard to re-produce with
your exact code and setup. How much of it can you provide to us
(possibly via private email)?

Cheers
/Eike

----
http://thegordian.blogspot.com




Saulius Tvarijonas schrieb:
> Hi,
>
> I am using CDO 2.0.0M3. I tried to use CDO View to browse repository
> content. After entering server address and pressing OK, it throws out
> of memory error. Heap limit is 1024mb, before connecting it was using
> about 150mb. And repository database is empty.
>
> Saulius
>
> java.lang.OutOfMemoryError: Java heap space
> at
> org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
>
> at
> org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
>
> at
> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
>
> at
> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
>
> at
> org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
>
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
>
> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
> at
> org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
>
> at
> org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
>
> at
> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
>
> at
> org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
>
> at
> org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Re: [CDO] CDO View throws OutOfMemoryError [message #426138 is a reply to message #426137] Wed, 17 December 2008 08:31 Go to previous messageGo to next message
Eike Stepper is currently online Eike StepperFriend
Messages: 6481
Registered: July 2009
Senior Member
> [...] And it will be hard to re-produce with your exact code and
> setup. [...]

*without* ;-)


Re: [CDO] CDO View throws OutOfMemoryError [message #426139 is a reply to message #426113] Wed, 17 December 2008 08:33 Go to previous messageGo to next message
Saulius Tvarijonas is currently offline Saulius TvarijonasFriend
Messages: 34
Registered: July 2009
Member
Hi,

I am running CDOServer as plugin from my target platform. Which is
2.0.0M3. I have no problem with my application accessing server, so I
guess it should be something wrong on a client side. My cdo config is below.
I was not able to connect with negotiator enabled. Is CDO View supports
access with login/password?
I disabled negatiator and URL was tcp://localhost, Repository: repo1,
Autoregistry: false.

Build of CDO and Net4J I am running is 20081127. I believe it is M3.

Saulius

<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>
<acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
<negotiator type="challenge" description="users.txt"/>
</acceptor>
<repository name="repo1">
<property name="overrideUUID"
value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
<property name="supportingAudits" value="true"/>
<property name="verifyingRevisions" value="false"/>
<property name="currentLRUCapacity" value="10000"/>
<property name="revisedLRUCapacity" value="100"/>
<store type="db">
<mappingStrategy type="horizontal">
<property name="qualifiedNames" value="true"/>
<property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
<property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
</mappingStrategy>
<jdbcDelegate type="statement" />
<dbAdapter name="mysql"/>
<dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" .../>
</store>
</repository>
</cdoServer>

On 12/16/2008 7:23 PM, Víctor Roldán Betancort wrote:
> Saulius,
>
> that looks really strange. Could you please provide more information
> regarding the environment where you performed this action?
>
> - How are you running CDOServer? Which backend are you using? Derby,
> MySQL, PostgreSQL, Hibernate...
> - Content of cdoserver.xml?
> - Input values to the "open session" dialog (server description and
> repository name fields)
>
> Have you downloaded Net4J 2.0.0M3 as well?
>
> Cheers,
> Víctor.
>
> Saulius Tvarijonas escribió:
>> Hi,
>>
>> I am using CDO 2.0.0M3. I tried to use CDO View to browse repository
>> content. After entering server address and pressing OK, it throws out
>> of memory error. Heap limit is 1024mb, before connecting it was using
>> about 150mb. And repository database is empty.
>>
>> Saulius
>>
>> java.lang.OutOfMemoryError: Java heap space
>> at
>> org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
>>
>> at
>> org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
>>
>> at
>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
>>
>> at
>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
>>
>> at
>> org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
>>
>> at
>> org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
>>
>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
>> at
>> org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
>>
>> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
>> at
>> org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
>>
>> at
>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
>>
>> at
>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
>>
>> at
>> org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
>>
>> at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
>> at
>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>>
>> at
>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>>
>> at
>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
>>
>> at
>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
>>
>> at
>> org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
>>
>> at
>> org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: [CDO] CDO View throws OutOfMemoryError [message #426144 is a reply to message #426139] Wed, 17 December 2008 09:18 Go to previous messageGo to next message
Eike Stepper is currently online Eike StepperFriend
Messages: 6481
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040202040403060707070008
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Saulius,

Comments below..



Saulius Tvarijonas schrieb:
> Hi,
>
> I am running CDOServer as plugin from my target platform. Which is
> 2.0.0M3. I have no problem with my application accessing server, so I
> guess it should be something wrong on a client side. My cdo config is
> below.
> I was not able to connect with negotiator enabled.
If you're using any sort of negotiation you must usually ensure that the
INegotiators of both client and server side properly match together.
INegotiators are currently only supported by IConnectors. Since
server-side connectors are created by an IAcceptor you need to configure
the acceptor with the needed INegotiator so tat it can pass it down to
new connectors. If you do so you need to add a matching negotiator to
your client connector before connecting, too.

> Is CDO View supports access with login/password?
Not per view. But each view belongs to a session and this session has a
protocol and this protocol has a channel and this channel has a
connector and there we go ;-)

From a client point of view and with respect to negotiation the
protocol and channel are irrelevant (automatically created by the
session). Usually you create your session through CDOSessionConfiguration:

| // Prepare container
IManagedContainer container = ContainerUtil.createContainer();
Net4jUtil.prepareContainer(container); // Register Net4j factories
TCPUtil.prepareContainer(container); // Register TCP factories
CDOUtil.prepareContainer(container); // Register CDO factories
container.activate();

// Create connector
IConnector connector = TCPUtil.getConnector(container, "localhost:2036");

// Create configuration
CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
configuration.setConnector(connector);
configuration.setRepositoryName("repo1");

// Open session
CDOSession session = configuration.openSession();
session.getPackageRegistry().putEPackage(Model1Package.eINST ANCE);|


If you're pulling your client connector out of an IManagedContainer it
will already be connected. So you need to register a post processor with
the container to inject your negotiator into the connector *before* it
is returned. Please see also
http://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_use_ authentication.3F

Cheers
/Eike

----
http://thegordian.blogspot.com




> I disabled negatiator and URL was tcp://localhost, Repository: repo1,
> Autoregistry: false.
>
> Build of CDO and Net4J I am running is 20081127. I believe it is M3.
>
> Saulius
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> <negotiator type="challenge" description="users.txt"/>
> </acceptor>
> <repository name="repo1">
> <property name="overrideUUID"
> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
> <property name="supportingAudits" value="true"/>
> <property name="verifyingRevisions" value="false"/>
> <property name="currentLRUCapacity" value="10000"/>
> <property name="revisedLRUCapacity" value="100"/>
> <store type="db">
> <mappingStrategy type="horizontal">
> <property name="qualifiedNames" value="true"/>
> <property name="toManyReferences"
> value="ONE_TABLE_PER_REFERENCE"/>
> <property name="toOneReferences"
> value="LIKE_ATTRIBUTES"/>
> </mappingStrategy>
> <jdbcDelegate type="statement" />
> <dbAdapter name="mysql"/>
> <dataSource
> class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" .../>
> </store>
> </repository>
> </cdoServer>
>
> On 12/16/2008 7:23 PM, V


Re: [CDO] CDO View throws OutOfMemoryError [message #426145 is a reply to message #426144] Wed, 17 December 2008 09:27 Go to previous messageGo to next message
Saulius Tvarijonas is currently offline Saulius TvarijonasFriend
Messages: 34
Registered: July 2009
Member
Eike,

Sorry for confusing. When I wrote "CDO View" I mean CDO UI plugin :). I
understand CDOView interface. In my application we already have
authentication working with negotiator. So it is configured in my CDO
server and works from my client. I just wanted to know if CDO UI plugin
allows to connect to CDO server which is configured with negotiator.

Regards,
Saulius

On 12/17/2008 11:18 AM, Eike Stepper wrote:
> Saulius,
>
> Comments below..
>
>
>
> Saulius Tvarijonas schrieb:
>> Hi,
>>
>> I am running CDOServer as plugin from my target platform. Which is
>> 2.0.0M3. I have no problem with my application accessing server, so I
>> guess it should be something wrong on a client side. My cdo config is
>> below.
>> I was not able to connect with negotiator enabled.
> If you're using any sort of negotiation you must usually ensure that the
> INegotiators of both client and server side properly match together.
> INegotiators are currently only supported by IConnectors. Since
> server-side connectors are created by an IAcceptor you need to configure
> the acceptor with the needed INegotiator so tat it can pass it down to
> new connectors. If you do so you need to add a matching negotiator to
> your client connector before connecting, too.
>
>> Is CDO View supports access with login/password?
> Not per view. But each view belongs to a session and this session has a
> protocol and this protocol has a channel and this channel has a
> connector and there we go ;-)
>
> From a client point of view and with respect to negotiation the
> protocol and channel are irrelevant (automatically created by the
> session). Usually you create your session through CDOSessionConfiguration:
>
> | // Prepare container
> IManagedContainer container = ContainerUtil.createContainer();
> Net4jUtil.prepareContainer(container); // Register Net4j factories
> TCPUtil.prepareContainer(container); // Register TCP factories
> CDOUtil.prepareContainer(container); // Register CDO factories
> container.activate();
>
> // Create connector
> IConnector connector = TCPUtil.getConnector(container, "localhost:2036");
>
> // Create configuration
> CDOSessionConfiguration configuration =
> CDOUtil.createSessionConfiguration();
> configuration.setConnector(connector);
> configuration.setRepositoryName("repo1");
>
> // Open session
> CDOSession session = configuration.openSession();
> session.getPackageRegistry().putEPackage(Model1Package.eINST ANCE);|
>
>
> If you're pulling your client connector out of an IManagedContainer it
> will already be connected. So you need to register a post processor with
> the container to inject your negotiator into the connector *before* it
> is returned. Please see also
> http://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_use_ authentication.3F
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
>
>> I disabled negatiator and URL was tcp://localhost, Repository: repo1,
>> Autoregistry: false.
>>
>> Build of CDO and Net4J I am running is 20081127. I believe it is M3.
>>
>> Saulius
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <cdoServer>
>> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
>> <negotiator type="challenge" description="users.txt"/>
>> </acceptor>
>> <repository name="repo1">
>> <property name="overrideUUID"
>> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
>> <property name="supportingAudits" value="true"/>
>> <property name="verifyingRevisions" value="false"/>
>> <property name="currentLRUCapacity" value="10000"/>
>> <property name="revisedLRUCapacity" value="100"/>
>> <store type="db">
>> <mappingStrategy type="horizontal">
>> <property name="qualifiedNames" value="true"/>
>> <property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
>> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
>> </mappingStrategy>
>> <jdbcDelegate type="statement" />
>> <dbAdapter name="mysql"/>
>> <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" .../>
>> </store>
>> </repository>
>> </cdoServer>
>>
>> On 12/16/2008 7:23 PM, Víctor Roldán Betancort wrote:
>>> Saulius,
>>>
>>> that looks really strange. Could you please provide more information
>>> regarding the environment where you performed this action?
>>>
>>> - How are you running CDOServer? Which backend are you using? Derby,
>>> MySQL, PostgreSQL, Hibernate...
>>> - Content of cdoserver.xml?
>>> - Input values to the "open session" dialog (server description and
>>> repository name fields)
>>>
>>> Have you downloaded Net4J 2.0.0M3 as well?
>>>
>>> Cheers,
>>> Víctor.
>>>
>>> Saulius Tvarijonas escribió:
>>>> Hi,
>>>>
>>>> I am using CDO 2.0.0M3. I tried to use CDO View to browse repository
>>>> content. After entering server address and pressing OK, it throws out
>>>> of memory error. Heap limit is 1024mb, before connecting it was using
>>>> about 150mb. And repository database is empty.
>>>>
>>>> Saulius
>>>>
>>>> java.lang.OutOfMemoryError: Java heap space
>>>> at
>>>> org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
>>>>
>>>>
>>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
>>>> at
>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
>>>>
>>>>
>>>> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
>>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
>>>> at
>>>> org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
>>>> at
>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
>>>>
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
Re: [CDO] CDO View throws OutOfMemoryError [message #426146 is a reply to message #426138] Wed, 17 December 2008 09:52 Go to previous messageGo to next message
Saulius Tvarijonas is currently offline Saulius TvarijonasFriend
Messages: 34
Registered: July 2009
Member
Hi,

I found problem. CDO UI and client were different. I guess differences
in CDO protocol caused OutOfMemoryError.
As I understand CDO & Net4J does not have functionality to check
protocol version. I understand that it is not possible for CDO Client
1.0.0 talk to CDO Server 2.0.0. But checking protocol versions could
help to handle such situations better. Instead of OutOfMemoryError it
could throw InvalidVersionException or something similar.

Regards,
Saulius

On 12/17/2008 10:31 AM, Eike Stepper wrote:
>
>> [...] And it will be hard to re-produce with your exact code and
>> setup. [...]
>
> *without* ;-)
Re: [CDO] CDO View throws OutOfMemoryError [message #426149 is a reply to message #426145] Wed, 17 December 2008 10:52 Go to previous messageGo to next message
Eike Stepper is currently online Eike StepperFriend
Messages: 6481
Registered: July 2009
Senior Member
Saulius,

The shipped user interface (i.e. CDOSessions view) creates sessions
through the IPluginContainer. So my explanations still apply ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com



Saulius Tvarijonas schrieb:
> Eike,
>
> Sorry for confusing. When I wrote "CDO View" I mean CDO UI plugin :).
> I understand CDOView interface. In my application we already have
> authentication working with negotiator. So it is configured in my CDO
> server and works from my client. I just wanted to know if CDO UI
> plugin allows to connect to CDO server which is configured with
> negotiator.
>
> Regards,
> Saulius
>
> On 12/17/2008 11:18 AM, Eike Stepper wrote:
>> Saulius,
>>
>> Comments below..
>>
>>
>>
>> Saulius Tvarijonas schrieb:
>>> Hi,
>>>
>>> I am running CDOServer as plugin from my target platform. Which is
>>> 2.0.0M3. I have no problem with my application accessing server, so I
>>> guess it should be something wrong on a client side. My cdo config is
>>> below.
>>> I was not able to connect with negotiator enabled.
>> If you're using any sort of negotiation you must usually ensure that the
>> INegotiators of both client and server side properly match together.
>> INegotiators are currently only supported by IConnectors. Since
>> server-side connectors are created by an IAcceptor you need to configure
>> the acceptor with the needed INegotiator so tat it can pass it down to
>> new connectors. If you do so you need to add a matching negotiator to
>> your client connector before connecting, too.
>>
>>> Is CDO View supports access with login/password?
>> Not per view. But each view belongs to a session and this session has a
>> protocol and this protocol has a channel and this channel has a
>> connector and there we go ;-)
>>
>> From a client point of view and with respect to negotiation the
>> protocol and channel are irrelevant (automatically created by the
>> session). Usually you create your session through
>> CDOSessionConfiguration:
>>
>> | // Prepare container
>> IManagedContainer container = ContainerUtil.createContainer();
>> Net4jUtil.prepareContainer(container); // Register Net4j factories
>> TCPUtil.prepareContainer(container); // Register TCP factories
>> CDOUtil.prepareContainer(container); // Register CDO factories
>> container.activate();
>>
>> // Create connector
>> IConnector connector = TCPUtil.getConnector(container,
>> "localhost:2036");
>>
>> // Create configuration
>> CDOSessionConfiguration configuration =
>> CDOUtil.createSessionConfiguration();
>> configuration.setConnector(connector);
>> configuration.setRepositoryName("repo1");
>>
>> // Open session
>> CDOSession session = configuration.openSession();
>> session.getPackageRegistry().putEPackage(Model1Package.eINST ANCE);|
>>
>>
>> If you're pulling your client connector out of an IManagedContainer it
>> will already be connected. So you need to register a post processor with
>> the container to inject your negotiator into the connector *before* it
>> is returned. Please see also
>> http://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_use_ authentication.3F
>>
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
>>
>>
>>
>>> I disabled negatiator and URL was tcp://localhost, Repository: repo1,
>>> Autoregistry: false.
>>>
>>> Build of CDO and Net4J I am running is 20081127. I believe it is M3.
>>>
>>> Saulius
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <cdoServer>
>>> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
>>> <negotiator type="challenge" description="users.txt"/>
>>> </acceptor>
>>> <repository name="repo1">
>>> <property name="overrideUUID"
>>> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
>>> <property name="supportingAudits" value="true"/>
>>> <property name="verifyingRevisions" value="false"/>
>>> <property name="currentLRUCapacity" value="10000"/>
>>> <property name="revisedLRUCapacity" value="100"/>
>>> <store type="db">
>>> <mappingStrategy type="horizontal">
>>> <property name="qualifiedNames" value="true"/>
>>> <property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
>>> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
>>> </mappingStrategy>
>>> <jdbcDelegate type="statement" />
>>> <dbAdapter name="mysql"/>
>>> <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" .../>
>>> </store>
>>> </repository>
>>> </cdoServer>
>>>
>>> On 12/16/2008 7:23 PM, Víctor Roldán Betancort wrote:
>>>> Saulius,
>>>>
>>>> that looks really strange. Could you please provide more information
>>>> regarding the environment where you performed this action?
>>>>
>>>> - How are you running CDOServer? Which backend are you using? Derby,
>>>> MySQL, PostgreSQL, Hibernate...
>>>> - Content of cdoserver.xml?
>>>> - Input values to the "open session" dialog (server description and
>>>> repository name fields)
>>>>
>>>> Have you downloaded Net4J 2.0.0M3 as well?
>>>>
>>>> Cheers,
>>>> Víctor.
>>>>
>>>> Saulius Tvarijonas escribió:
>>>>> Hi,
>>>>>
>>>>> I am using CDO 2.0.0M3. I tried to use CDO View to browse repository
>>>>> content. After entering server address and pressing OK, it throws out
>>>>> of memory error. Heap limit is 1024mb, before connecting it was using
>>>>> about 150mb. And repository database is empty.
>>>>>
>>>>> Saulius
>>>>>
>>>>> java.lang.OutOfMemoryError: Java heap space
>>>>> at
>>>>> org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
>>>>>
>>>>>
>>>>>
>>>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
>>>>> at
>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
>>>>>
>>>>>
>>>>>
>>>>> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
>>>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
>>>>> at
>>>>> org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
>>>>>
>>>>>
>>>>>
>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>
>


Re: [CDO] CDO View throws OutOfMemoryError [message #426151 is a reply to message #426146] Wed, 17 December 2008 10:54 Go to previous messageGo to next message
Eike Stepper is currently online Eike StepperFriend
Messages: 6481
Registered: July 2009
Senior Member
Saulius,

I think protocol version checking is worth a bugzilla so that we don't
forget about ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com



Saulius Tvarijonas schrieb:
> Hi,
>
> I found problem. CDO UI and client were different. I guess differences
> in CDO protocol caused OutOfMemoryError.
> As I understand CDO & Net4J does not have functionality to check
> protocol version. I understand that it is not possible for CDO Client
> 1.0.0 talk to CDO Server 2.0.0. But checking protocol versions could
> help to handle such situations better. Instead of OutOfMemoryError it
> could throw InvalidVersionException or something similar.
>
> Regards,
> Saulius
>
> On 12/17/2008 10:31 AM, Eike Stepper wrote:
>>
>>> [...] And it will be hard to re-produce with your exact code and
>>> setup. [...]
>>
>> *without* ;-)
>


Re: [CDO] CDO View throws OutOfMemoryError [message #426156 is a reply to message #426149] Wed, 17 December 2008 13:45 Go to previous messageGo to next message
Saulius Tvarijonas is currently offline Saulius TvarijonasFriend
Messages: 34
Registered: July 2009
Member
Eike,

As I understand CDOSessions View out of box is not able to connect to
repository with negotiator. Unless somebody else prepares
UPluginContainer before CDOSessions View tries to connect.
It would be nice if CDOSessions View automatically could inject
ConnectorCredentialsInjector depending on URL. For example
tcp://admin:admin@localhost.

Regards,
Saulius

On 12/17/2008 12:52 PM, Eike Stepper wrote:
> Saulius,
>
> The shipped user interface (i.e. CDOSessions view) creates sessions
> through the IPluginContainer. So my explanations still apply ;-)
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> Saulius Tvarijonas schrieb:
>> Eike,
>>
>> Sorry for confusing. When I wrote "CDO View" I mean CDO UI plugin :).
>> I understand CDOView interface. In my application we already have
>> authentication working with negotiator. So it is configured in my CDO
>> server and works from my client. I just wanted to know if CDO UI
>> plugin allows to connect to CDO server which is configured with
>> negotiator.
>>
>> Regards,
>> Saulius
>>
>> On 12/17/2008 11:18 AM, Eike Stepper wrote:
>>> Saulius,
>>>
>>> Comments below..
>>>
>>>
>>>
>>> Saulius Tvarijonas schrieb:
>>>> Hi,
>>>>
>>>> I am running CDOServer as plugin from my target platform. Which is
>>>> 2.0.0M3. I have no problem with my application accessing server, so I
>>>> guess it should be something wrong on a client side. My cdo config is
>>>> below.
>>>> I was not able to connect with negotiator enabled.
>>> If you're using any sort of negotiation you must usually ensure that the
>>> INegotiators of both client and server side properly match together.
>>> INegotiators are currently only supported by IConnectors. Since
>>> server-side connectors are created by an IAcceptor you need to configure
>>> the acceptor with the needed INegotiator so tat it can pass it down to
>>> new connectors. If you do so you need to add a matching negotiator to
>>> your client connector before connecting, too.
>>>
>>>> Is CDO View supports access with login/password?
>>> Not per view. But each view belongs to a session and this session has a
>>> protocol and this protocol has a channel and this channel has a
>>> connector and there we go ;-)
>>>
>>> From a client point of view and with respect to negotiation the
>>> protocol and channel are irrelevant (automatically created by the
>>> session). Usually you create your session through
>>> CDOSessionConfiguration:
>>>
>>> | // Prepare container
>>> IManagedContainer container = ContainerUtil.createContainer();
>>> Net4jUtil.prepareContainer(container); // Register Net4j factories
>>> TCPUtil.prepareContainer(container); // Register TCP factories
>>> CDOUtil.prepareContainer(container); // Register CDO factories
>>> container.activate();
>>>
>>> // Create connector
>>> IConnector connector = TCPUtil.getConnector(container,
>>> "localhost:2036");
>>>
>>> // Create configuration
>>> CDOSessionConfiguration configuration =
>>> CDOUtil.createSessionConfiguration();
>>> configuration.setConnector(connector);
>>> configuration.setRepositoryName("repo1");
>>>
>>> // Open session
>>> CDOSession session = configuration.openSession();
>>> session.getPackageRegistry().putEPackage(Model1Package.eINST ANCE);|
>>>
>>>
>>> If you're pulling your client connector out of an IManagedContainer it
>>> will already be connected. So you need to register a post processor with
>>> the container to inject your negotiator into the connector *before* it
>>> is returned. Please see also
>>> http://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_use_ authentication.3F
>>>
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://thegordian.blogspot.com
>>>
>>>
>>>
>>>
>>>> I disabled negatiator and URL was tcp://localhost, Repository: repo1,
>>>> Autoregistry: false.
>>>>
>>>> Build of CDO and Net4J I am running is 20081127. I believe it is M3.
>>>>
>>>> Saulius
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <cdoServer>
>>>> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
>>>> <negotiator type="challenge" description="users.txt"/>
>>>> </acceptor>
>>>> <repository name="repo1">
>>>> <property name="overrideUUID"
>>>> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
>>>> <property name="supportingAudits" value="true"/>
>>>> <property name="verifyingRevisions" value="false"/>
>>>> <property name="currentLRUCapacity" value="10000"/>
>>>> <property name="revisedLRUCapacity" value="100"/>
>>>> <store type="db">
>>>> <mappingStrategy type="horizontal">
>>>> <property name="qualifiedNames" value="true"/>
>>>> <property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
>>>> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
>>>> </mappingStrategy>
>>>> <jdbcDelegate type="statement" />
>>>> <dbAdapter name="mysql"/>
>>>> <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" .../>
>>>> </store>
>>>> </repository>
>>>> </cdoServer>
>>>>
>>>> On 12/16/2008 7:23 PM, Víctor Roldán Betancort wrote:
>>>>> Saulius,
>>>>>
>>>>> that looks really strange. Could you please provide more information
>>>>> regarding the environment where you performed this action?
>>>>>
>>>>> - How are you running CDOServer? Which backend are you using? Derby,
>>>>> MySQL, PostgreSQL, Hibernate...
>>>>> - Content of cdoserver.xml?
>>>>> - Input values to the "open session" dialog (server description and
>>>>> repository name fields)
>>>>>
>>>>> Have you downloaded Net4J 2.0.0M3 as well?
>>>>>
>>>>> Cheers,
>>>>> Víctor.
>>>>>
>>>>> Saulius Tvarijonas escribió:
>>>>>> Hi,
>>>>>>
>>>>>> I am using CDO 2.0.0M3. I tried to use CDO View to browse repository
>>>>>> content. After entering server address and pressing OK, it throws out
>>>>>> of memory error. Heap limit is 1024mb, before connecting it was using
>>>>>> about 150mb. And repository database is empty.
>>>>>>
>>>>>> Saulius
>>>>>>
>>>>>> java.lang.OutOfMemoryError: Java heap space
>>>>>> at
>>>>>> org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
>>>>>> at
>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
>>>>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
>>>>>> at
>>>>>> org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>
>>
Re: [CDO] CDO View throws OutOfMemoryError [message #426160 is a reply to message #426156] Wed, 17 December 2008 14:04 Go to previous message
Eike Stepper is currently online Eike StepperFriend
Messages: 6481
Registered: July 2009
Senior Member
Saulius,

You can do so by contributing an IElementProcessor of your choice to the
extension point org.eclipse.net4j.util.elementProcessors.

Cheers
/Eike

----
http://thegordian.blogspot.com



Saulius Tvarijonas schrieb:
> Eike,
>
> As I understand CDOSessions View out of box is not able to connect to
> repository with negotiator. Unless somebody else prepares
> UPluginContainer before CDOSessions View tries to connect.
> It would be nice if CDOSessions View automatically could inject
> ConnectorCredentialsInjector depending on URL. For example
> tcp://admin:admin@localhost.
>
> Regards,
> Saulius
>
> On 12/17/2008 12:52 PM, Eike Stepper wrote:
>> Saulius,
>>
>> The shipped user interface (i.e. CDOSessions view) creates sessions
>> through the IPluginContainer. So my explanations still apply ;-)
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
>>
>>
>> Saulius Tvarijonas schrieb:
>>> Eike,
>>>
>>> Sorry for confusing. When I wrote "CDO View" I mean CDO UI plugin :).
>>> I understand CDOView interface. In my application we already have
>>> authentication working with negotiator. So it is configured in my CDO
>>> server and works from my client. I just wanted to know if CDO UI
>>> plugin allows to connect to CDO server which is configured with
>>> negotiator.
>>>
>>> Regards,
>>> Saulius
>>>
>>> On 12/17/2008 11:18 AM, Eike Stepper wrote:
>>>> Saulius,
>>>>
>>>> Comments below..
>>>>
>>>>
>>>>
>>>> Saulius Tvarijonas schrieb:
>>>>> Hi,
>>>>>
>>>>> I am running CDOServer as plugin from my target platform. Which is
>>>>> 2.0.0M3. I have no problem with my application accessing server, so I
>>>>> guess it should be something wrong on a client side. My cdo config is
>>>>> below.
>>>>> I was not able to connect with negotiator enabled.
>>>> If you're using any sort of negotiation you must usually ensure
>>>> that the
>>>> INegotiators of both client and server side properly match together.
>>>> INegotiators are currently only supported by IConnectors. Since
>>>> server-side connectors are created by an IAcceptor you need to
>>>> configure
>>>> the acceptor with the needed INegotiator so tat it can pass it down to
>>>> new connectors. If you do so you need to add a matching negotiator to
>>>> your client connector before connecting, too.
>>>>
>>>>> Is CDO View supports access with login/password?
>>>> Not per view. But each view belongs to a session and this session
>>>> has a
>>>> protocol and this protocol has a channel and this channel has a
>>>> connector and there we go ;-)
>>>>
>>>> From a client point of view and with respect to negotiation the
>>>> protocol and channel are irrelevant (automatically created by the
>>>> session). Usually you create your session through
>>>> CDOSessionConfiguration:
>>>>
>>>> | // Prepare container
>>>> IManagedContainer container = ContainerUtil.createContainer();
>>>> Net4jUtil.prepareContainer(container); // Register Net4j factories
>>>> TCPUtil.prepareContainer(container); // Register TCP factories
>>>> CDOUtil.prepareContainer(container); // Register CDO factories
>>>> container.activate();
>>>>
>>>> // Create connector
>>>> IConnector connector = TCPUtil.getConnector(container,
>>>> "localhost:2036");
>>>>
>>>> // Create configuration
>>>> CDOSessionConfiguration configuration =
>>>> CDOUtil.createSessionConfiguration();
>>>> configuration.setConnector(connector);
>>>> configuration.setRepositoryName("repo1");
>>>>
>>>> // Open session
>>>> CDOSession session = configuration.openSession();
>>>> session.getPackageRegistry().putEPackage(Model1Package.eINST ANCE);|
>>>>
>>>>
>>>> If you're pulling your client connector out of an IManagedContainer it
>>>> will already be connected. So you need to register a post processor
>>>> with
>>>> the container to inject your negotiator into the connector *before* it
>>>> is returned. Please see also
>>>> http://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_use_ authentication.3F
>>>>
>>>>
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://thegordian.blogspot.com
>>>>
>>>>
>>>>
>>>>
>>>>> I disabled negatiator and URL was tcp://localhost, Repository: repo1,
>>>>> Autoregistry: false.
>>>>>
>>>>> Build of CDO and Net4J I am running is 20081127. I believe it is M3.
>>>>>
>>>>> Saulius
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <cdoServer>
>>>>> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
>>>>> <negotiator type="challenge" description="users.txt"/>
>>>>> </acceptor>
>>>>> <repository name="repo1">
>>>>> <property name="overrideUUID"
>>>>> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
>>>>> <property name="supportingAudits" value="true"/>
>>>>> <property name="verifyingRevisions" value="false"/>
>>>>> <property name="currentLRUCapacity" value="10000"/>
>>>>> <property name="revisedLRUCapacity" value="100"/>
>>>>> <store type="db">
>>>>> <mappingStrategy type="horizontal">
>>>>> <property name="qualifiedNames" value="true"/>
>>>>> <property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
>>>>> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
>>>>> </mappingStrategy>
>>>>> <jdbcDelegate type="statement" />
>>>>> <dbAdapter name="mysql"/>
>>>>> <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
>>>>> .../>
>>>>> </store>
>>>>> </repository>
>>>>> </cdoServer>
>>>>>
>>>>> On 12/16/2008 7:23 PM, Víctor Roldán Betancort wrote:
>>>>>> Saulius,
>>>>>>
>>>>>> that looks really strange. Could you please provide more information
>>>>>> regarding the environment where you performed this action?
>>>>>>
>>>>>> - How are you running CDOServer? Which backend are you using? Derby,
>>>>>> MySQL, PostgreSQL, Hibernate...
>>>>>> - Content of cdoserver.xml?
>>>>>> - Input values to the "open session" dialog (server description and
>>>>>> repository name fields)
>>>>>>
>>>>>> Have you downloaded Net4J 2.0.0M3 as well?
>>>>>>
>>>>>> Cheers,
>>>>>> Víctor.
>>>>>>
>>>>>> Saulius Tvarijonas escribió:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am using CDO 2.0.0M3. I tried to use CDO View to browse
>>>>>>> repository
>>>>>>> content. After entering server address and pressing OK, it
>>>>>>> throws out
>>>>>>> of memory error. Heap limit is 1024mb, before connecting it was
>>>>>>> using
>>>>>>> about 150mb. And repository database is empty.
>>>>>>>
>>>>>>> Saulius
>>>>>>>
>>>>>>> java.lang.OutOfMemoryError: Java heap space
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.spi.common.CDOIDLibraryDescriptorImpl.<init >(CDOIDLibraryDescriptorImpl.java:54)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.common.id.CDOIDUtil.readLibraryDescripto r(CDOIDUtil.java:235)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:147)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest.con firming(OpenSessionRequest.java:1)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.internal.cdo.protocol.CDOClientRequest.confi rming(CDOClientRequest.java:103)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedI nput(RequestWithConfirmation.java:118)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:317)
>>>>>>> at
>>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(R equestWithConfirmation.java:98)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.signal.SignalActor.execute(SignalActor.jav a:68)
>>>>>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:237)
>>>>>>> at
>>>>>>> org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalPr otocol.java:392)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:82)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.signal.RequestWithConfirmation.send(Reques tWithConfirmation.java:73)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.internal.cdo.CDOSessionImpl.doActivate(CDOSe ssionImpl.java:808)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:274)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.container.ManagedContainer.getElement (ManagedContainer.java:255)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction.do Run(OpenSessionAction.java:76)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.net4j.util.ui.actions.LongRunningAction$1.run(Lo ngRunningAction.java:164)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>
>>>
>


Previous Topic:CDO server and client usage
Next Topic:teneo 1.0.1 and DuplicateMappingException
Goto Forum:
  


Current Time: Fri Feb 21 10:47:49 GMT 2020

Powered by FUDForum. Page generated in 0.02202 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top