i checked out the code and gave it a spin, i get the following stack:
25-apr-2007 18.50.45 net.sf.sail.core.beans.Pod assemble
AVVERTENZA: exception: java.util.NoSuchElementException: no known pod
dddddddd-0000-0001-0000-000000000000 in registry
PodRegistry:{dddddddd-0000-0000-0000-000000000000=
[EMAIL PROTECTED],
dddddddd-6005-0000-0000-000000000000=
[EMAIL PROTECTED]
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: error
assembling
at net.sf.sail.core.beans.Pod.assemble(Pod.java:158)
at net.sf.sail.core.curnit.Curnit.assemble(Curnit.java:97)
at org.telscenter.pas.authortool.context.CurnitAuthoringContext.assemble
(CurnitAuthoringContext.java:95)
at org.telscenter.pas.authortool.context.CurnitAuthoringContext.<init>(
CurnitAuthoringContext.java:88)
at org.telscenter.pas.authortool.main.AuthoringShellMain$1.run(
AuthoringShellMain.java:189)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.util.NoSuchElementException: no known pod
dddddddd-0000-0001-0000-000000000000 in registry
PodRegistry:{dddddddd-0000-0000-0000-000000000000=
[EMAIL PROTECTED],
dddddddd-6005-0000-0000-000000000000=
[EMAIL PROTECTED]
at net.sf.sail.core.beans.assembly.PodVarDelegate.getRefMap(
PodVarDelegate.java:73)
at net.sf.sail.core.beans.assembly.PodVarDelegate.isValid(
PodVarDelegate.java:80)
at net.sf.sail.core.beans.assembly.PodVarDelegate.validate(
PodVarDelegate.java:86)
at net.sf.sail.core.beans.assembly.Assignment.validate(Assignment.java
:80)
at net.sf.sail.core.beans.assembly.Assignment.execute(Assignment.java
:67)
at net.sf.sail.core.beans.Pod.assemble(Pod.java:155)
on these lines:
sessionManager.startAuthoringSession();
workingCurnit = sessionManager.getCurnit();
workingCurnit.assemble();
it doesn't like the assemble. when should we assemble the curnit?
heres how i remove the pod:
Pod rootPod = (Pod) SailBeanUtils.resolvePod(rootDao.getBean());
Pod activityPod = (Pod) SailBeanUtils.resolvePod(actDao.getBean());
System.out.println("BEFORE REMOVE:");
SailBeanUtils.printTree(System.out, 0, rootPod);
boolean result = rootPod.remove(activityPod);
System.out.println("AFTER REMOVE:");
SailBeanUtils.printTree(System.out, 0, rootPod);
do i have to remove all the child step pods of an activity?
public void removeChildPod() throws IOException {
PodRegistry registry = PodRegistry.getDefaultRegistry();
Pod childPod = registry.getPod(CHILD_ID);
Pod parentPod = registry.getPod(PARENT_ID);
// remove child pod from existance
parentPod.remove(childPod);
registry.unregister(childPod);
parentPod = MarshallUtils.marshallCycle(parentPod);
parentPod.assemble(registry);
}
Tony
On 4/25/07, Turadg Aleahmad <[EMAIL PROTECTED]> wrote:
>
> Good detective work, Tony.
>
> I added a test to ImportTest to remove a child pod that's
> podvar-referenced by a parent pod. The test is called removeChildPod().
> That isolated the bug.
>
> To make the test work, I had to change PodRegistry to be non-static, which
> is better anyway. This way each authoring context can have a different
> registry of pods, rather than one for the whole JVM. (I left the old
> getRegistry but made it deprecated with a note to use the new name.)
>
> Then I updated Pod.remove() to also find any references to the child pod
> being removed that are held in the assemblyCalls field. I tested it all and
> it appears to be working.
>
> Let me know if pods are still posing problems in the authoring tool.
>
> -t
>
>
> On 4/25/07, Anthony Perritano <[EMAIL PROTECTED]> wrote:
> >
> > i did a little poking around in the sail code. it seems this is
> > connected to the PodRegistry, creating an assignment and podvardelegate. can
> > someone explain this process? the code is undocumented. there is an example
> > in " net.sf.sail.test" called importTest.java that i am trying to
> > follow.
> >
> > -Tony
> >
> > On 4/24/07, Anthony Perritano < [EMAIL PROTECTED]> wrote:
> > >
> > > i updated my sail core project. i tried to do a remove on an activity
> > > and then load the curnit back in the Editor, it get:
> > >
> > > AVVERTENZA: exception: java.lang.RuntimeException:
> > > PodVarDelegate:dddddddd-6005-0000-0000-000000000000:step refers to absent
> > > pod export
> > > Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException:
> > > error assembling
> > > at net.sf.sail.core.beans.Pod.assemble(Pod.java:159)
> > > at net.sf.sail.core.beans.Pod.assembleChildren(Pod.java :186)
> > > at net.sf.sail.core.beans.Pod.assemble(Pod.java:151)
> > > at net.sf.sail.core.curnit.Curnit.assemble(Curnit.java:92)
> > > at
> > > org.telscenter.pas.authortool.context.CurnitAuthoringContext.assemble(
> > > CurnitAuthoringContext.java :95)
> > > at org.telscenter.pas.authortool.context.CurnitAuthoringContext
> > > .<init>(CurnitAuthoringContext.java:88)
> > > at org.telscenter.pas.authortool.main.AuthoringShellMain$1.run(
> > > AuthoringShellMain.java:189)
> > > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java
> > > :209)
> > > at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
> > > at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
> > > EventDispatchThread.java :269)
> > > at java.awt.EventDispatchThread.pumpEventsForHierarchy(
> > > EventDispatchThread.java:190)
> > > at java.awt.EventDispatchThread.pumpEvents(
> > > EventDispatchThread.java:184)
> > > at java.awt.EventDispatchThread.pumpEvents (
> > > EventDispatchThread.java:176)
> > > at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
> > > Caused by: java.lang.RuntimeException:
> > > PodVarDelegate:dddddddd-6005-0000-0000-000000000000:step refers to absent
> > > pod export
> > > at net.sf.sail.core.beans.assembly.PodVarDelegate.validate(
> > > PodVarDelegate.java:87)
> > > at net.sf.sail.core.beans.assembly.Assignment.validate(
> > > Assignment.java:71)
> > > at net.sf.sail.core.beans.assembly.Assignment.execute (
> > > Assignment.java:59)
> > > at net.sf.sail.core.beans.Pod.assemble(Pod.java:156)
> > > ... 13 more
> > >
> > > does anyone know what this means? it seem i need to do some remove of
> > > other stuff when i remove a pod? can some one explain?
> > >
> > > thx
> > > Tony
> > >
> >
> >
> >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---