Just wondering - could SWT (Eclipse) cause that problem? Maybe it is
interfering with the AWT classpath.



On Tue, 2011-12-20 at 13:44 +0100, Reiche, Andreas wrote:
> Yep, this was the first i tried, but didn't help.
> 
> Andreas
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
> Gesendet: Dienstag, 20. Dezember 2011 13:35
> An: users@wicket.apache.org
> Betreff: Re: Problem with embedded jetty using AWT
> 
> did you define -Djava.awt.headless=true as a jvm parameter?
> 
> Martijn
> 
> On Tue, Dec 20, 2011 at 12:52 PM, Reiche, Andreas
> <andreas.rei...@lgln.niedersachsen.de> wrote:
> > Hi,
> > has anyone already recognized this behaviour.
> > I have a Wicket (1.4.18) project build from the Wicket archetype. I'm 
> > developing in Eclipse on a Win XP machine.
> > Up to now everything worked fine, but now i have the following problem:
> > I need to inherit a dynamic Image in a wicket page. I use the AWT toolkit 
> > for that purpose.
> > As Wicket Model i use a RenderedDynamicImageResource which gives me a 
> > Graphics2D object to draw on.
> > If i try to debug or run the code in the embedded jetty which i use in my 
> > IDE then the JVM 'hangs' and the image is not rendered.
> >
> > If i deploy the app to a standalone jetty or a standalone tomcat everything 
> > goes fine.
> > This is exactly the problem which is described here:
> > http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=&thread=1290008946#N1290102636
> >
> > First i thought of a security issue, like mentioned in above thread, but 
> > even after i gave the embedded jetty a java.security.AllPermission
> > the prob still exits.
> >
> > Here is the code which creates and starts the jetty server.
> >
> > ...
> >        public static void main(String[] args) throws Exception {
> >                try {
> >                        Server server = startJettyServer(8080);
> >                        System.in.read();
> >                        System.out.println(">>> STOPPING EMBEDDED JETTY 
> > SERVER");
> >                        // while (System.in.available() == 0) {
> >                        // Thread.sleep(5000);
> >                        // }
> >                        server.stop();
> >                        server.join();
> >                } catch (Exception e) {
> >                        e.printStackTrace();
> >                        System.exit(100);
> >                }
> >        }
> >
> >        public static Server startJettyServer(int port) throws Exception {
> >                Server server = new Server();
> >                SocketConnector connector = new SocketConnector();
> >                // Set some timeout options to make debugging easier.
> >                connector.setMaxIdleTime(1000 * 60 * 60);
> >                connector.setSoLingerTime(-1);
> >                connector.setPort(port);
> >                server.setConnectors(new Connector[] { connector });
> >
> >                WebAppContext bb = new WebAppContext();
> >                bb.setServer(server);
> >                bb.setContextPath("/");
> >                bb.setWar("src/main/webapp");
> >                bb.setAttribute("serveIcon", false);
> >
> >                Permission perm = new AllPermission();
> >                PermissionCollection permissions = 
> > perm.newPermissionCollection();
> >                permissions.add(perm);
> >
> >                bb.setPermissions(permissions);
> >                // START JMX SERVER
> >                // MBeanServer mBeanServer =
> >                // ManagementFactory.getPlatformMBeanServer();
> >                // MBeanContainer mBeanContainer = new 
> > MBeanContainer(mBeanServer);
> >                // server.getContainer().addEventListener(mBeanContainer);
> >                // mBeanContainer.start();
> >
> >                server.addHandler(bb);
> >
> >                System.out.println(">>> STARTING EMBEDDED JETTY SERVER, 
> > PRESS ANY KEY TO STOP");
> >                server.start();
> >                return server;
> >        }
> > ...
> >
> >
> > I alreasy searched the jetty doc, but could not found any hints.
> > Appreciate any input on that.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to