Hi Marcel, Are you keeping any of the ULC widgets in a static variable?
You cannot share ULC objects across sessions. If you want to share ULC objects within a session, use ApplicationContext.get()/setAttribute() API. Also please see: http://ulc-community.canoo.com/snipsnap/space/Contributions/Good+Practices I hope this helps. Thanks and regards, Janak >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of Niederer Marcel >Sent: Wednesday, May 03, 2006 11:50 AM >To: '[email protected]' >Subject: [ULC-developer] Sessionprobleme > > >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(ULCConta >iner.java >:72) > at >com.ulcjava.base.application.ULCContainer.addImpl(ULCContainer.java:46) > at >com.ulcjava.base.application.ULCSplitPane.setRightComponent(ULCSpli >tPane.jav >a:4) > at >ch.braunvieh.zeiterfassung.Zeiterfassung.valueChanged(Zeiterfassung >.java:210 >) > at >com.ulcjava.base.application.event.TreeSelectionEvent.dispatch(Tree >Selection >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 _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
