Guten Tag
Ich habe eine Testapplikation geschrieben, um ULC zu evaluieren. Momentan
verursacht das Sessionhandling Probleme.
Im Grossen und Ganzen besteht die Testapplikation aus einer ULCSplitPane,
welche im linken Teil einen ULCTree beherbergt, wogegen im rechten Teil eine
Ansicht angezeigt wird, je nachdem, was im ULCTree ausgewählt wurde. Habe
ich nun dieses Programm auf Applikationsserver neu geladen, kann ich das
Programm ohne Probleme ausführen. Wenn ich aber nach dem Schliessen der
Anwendung diese wieder starte und auf eine Ansicht wechsle, erscheint
folgende Fehlermeldung:
1 03.05.2006 08:22:21.218 1'000 SEVERE
Thread[http-8080-Processor19,5,main] com.ulcjava.base.server.ULCSession
processRequests got exception while processing
[java.lang.IllegalStateException: com.ulcjava.base.application.ULCSplitPane
(oid=1008) used from wrong session. ULCProxy objects must not be shared
among sessions.
at com.ulcjava.base.application.ULCProxy.a(ULCProxy.java:192)
at com.ulcjava.base.application.ULCProxy.sendUI(ULCProxy.java:186)
at
com.ulcjava.base.application.ULCContainer.remove(ULCContainer.java:43)
at
com.ulcjava.base.application.ULCContainer.removeFromParent(ULCContainer.java
:72)
at
com.ulcjava.base.application.ULCContainer.addImpl(ULCContainer.java:46)
at
com.ulcjava.base.application.ULCSplitPane.setRightComponent(ULCSplitPane.jav
a:4)
at
ch.braunvieh.zeiterfassung.Zeiterfassung.valueChanged(Zeiterfassung.java:210
)
at
com.ulcjava.base.application.event.TreeSelectionEvent.dispatch(TreeSelection
Event.java:8)
at com.ulcjava.base.application.ULCProxy.a(ULCProxy.java:250)
...
Der Code der valueChanged()-Methode:
public void valueChanged(TreeSelectionEvent e) {
Object o = e.getPath().getLastPathComponent();
ULCComponent clickedView = null;
if(o instanceof View){
try{
clickedView =
(ULCComponent)(Class.forName(((View)o).getView())).newInstance();
}
catch(InstantiationException e1){
e1.printStackTrace();
}
catch(IllegalAccessException e1){
e1.printStackTrace();
}
catch(ClassNotFoundException e1){
e1.printStackTrace();
}
}
if(clickedView != null && actualView != null){
getUlcSplitPane().setRightComponent(actualView =
clickedView); // actualView ist eine globale ULCComponent-Variable
}
...
Diese Exception tritt jedes 2. Mal auf. Die anderen Male tritt eine
NullPointerException auf.
Was verstehe ich da mit der Session nicht?
Freundliche Grüsse
Marcel Niederer
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer