I got a good number of
org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistryException
This exception was generated
to indicate an invalid usage of reference counts. Please examine the stack
trace.
Client Access Exception of
type DANGLING_REFERENCE
If I do enough project creation and
publishing was done.
After I got the first one, most modules
related operations failed (like creating new WebModule, publish existing module,
etc.)
So, it can be a critical bug, unless I am
proved doing something wrong.
Unlike Konstantin, I do not use EARArtifactEdit
directly.
Seem like EnterpriseApplicationDeployable.getModules()
indirectly use it.
at
org.eclipse.jst.j2ee.internal.deployables.EnterpriseApplicationDeployable.getModules(EnterpriseApplicationDeployable.java:54)
at
com.bea.wlw.server.internal.core.WeblogicServer.getChildModules(WeblogicServer.java:466)
Please advise!
Thanks,
Thomas
----------- Affected code: -------------
public IModule[]
getChildModules(IModule[] modulePath) {
IModule module = modulePath[modulePath.length-1];
String moduleTypeId = module.getModuleType().getId();
// return itself for top level module
IEnterpriseApplication
ea = (IEnterpriseApplication)module.loadAdapter(IEnterpriseApplication.class,
null);
if
(ea==null)
return EMPTY_MODULES;
IModule[] nested = ea.getModules();
if (nested==null || nested.length==0)
return EMPTY_MODULES;
ArrayList list = new ArrayList();
for (IModule mod: nested) {
list.add(mod);
}
return (IModule[])list.toArray(new IModule[list.size()]);
}
From:
wtp-dev-bounces@xxxxxxxxxxx [mailto:wtp-dev-bounces@xxxxxxxxxxx] On Behalf Of Konstantin
Komissarchik
Sent: Wednesday, June 29, 2005
1:39 PM
To: General
discussion of project-wide or architectural issues.
Subject: RE: [wtp-dev] Client
Access Exception of type DANGLING_REFERENCE
Thanks! That was it. Maybe the error could
be made more descriptive? Something like…
“Attempted to open an already
open artifact edit. Make sure to call the dispose method when done
editing.”
As it stands right now, it wasn’t clear
to me what was going on despite the fact that I knew about the dispose method.
Just a thought…
- Konstantin
From:
wtp-dev-bounces@xxxxxxxxxxx [mailto:wtp-dev-bounces@xxxxxxxxxxx] On Behalf Of John Lanuti
Sent: Wednesday, June 29, 2005
11:53 AM
To: General
discussion of project-wide or architectural issues.
Subject: Re: [wtp-dev] Client
Access Exception of type DANGLING_REFERENCE
Konstantin,
When
you access an artifact edit, you must release it. So, anytime you want to
get an artifact edit, you want a try finally block
like
the following:
ArtifactEdit
edit= null
try
{
edit
= EARArtifactEdit.getEARArtifactEditForWrite( earhandle );
//do
stuff
}
finally {
if (edit !=null)
edit.dipose()
}
That
will prevent the client access exception.
Hope
that helps,
John Lanuti
Software Engineer, IBM Rational
jlanuti@xxxxxxxxxx
t/l 441-7861
"You see this wandering soul, he's never gonna stop, because he loves and
he feels this world can grow.
He's not afraid of feeling, he loves what he believes, he feels, and he
grows." - Of A Revolution
"Konstantin
Komissarchik" <kosta@xxxxxxx>
Sent
by: wtp-dev-bounces@xxxxxxxxxxx
06/29/2005
01:40 PM
Please respond
to
"General discussion of project-wide or
architectural issues."
|
|
To
|
"General discussion of
project-wide or architectural issues."
<wtp-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
|
[wtp-dev] Client Access Exception of type
DANGLING_REFERENCE
|
|
Hi,
I
keep getting this:
org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistryException
This
exception was generated to indicate an invalid usage of reference counts.
Please examine the stack trace.
Client
Access Exception of type DANGLING_REFERENCE
When
I make the following call:
EARArtifactEdit.getEARArtifactEditForWrite(
earhandle );
Am
I doing something wrong? I am using the 6/17 i-build. Is this something that
was fixed in a later i-build?
Thanks,
-
Konstantin_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev