10 Replies Latest reply on Aug 20, 2007 6:54 AM by tony.herstell1

    Hypersonic Database Explorer no longer runs up.

    tony.herstell1

      Hypersonic Database Explorer no longer works....

      Go into the JMX console and start the database manager...

      Wihtout my seam app deployed into the server it runs up (either through a cmd window or by starting the server in MyEclipse)..
      However with my Seam app deployed into the server I get:

      22:21:47,375 ERROR [HypersonicDatabase] Failed to start database manager
      java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.jdbc.HypersonicDatabase$1.run(HypersonicDatabase.java:517)
      Caused by: java.awt.HeadlessException
       at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
       at java.awt.Window.<init>(Window.java:317)
       at java.awt.Frame.<init>(Frame.java:419)
       at javax.swing.JFrame.<init>(JFrame.java:194)
       at org.hsqldb.util.DatabaseManagerSwing.main(Unknown Source)
       ... 5 more
      



      Is this a Seam issue or an IceFaces issue?

        • 1. Re: Hypersonic Database Explorer no longer runs up.
          tony.herstell1

          Can someone else confirm this please.
          If it is the case I will raise a JIRA issue.
          Thx.

          • 2. Re: Hypersonic Database Explorer no longer runs up.

            I can't see any way that Seam would impact your ability to start the database manager. I'm able to use it just fine. There is something else going on here.

            • 3. Re: Hypersonic Database Explorer no longer runs up.
              tony.herstell1

              Thats what I thought..

              Works fine if my Seam app is not in the deploy area.

              I am using IceFaces... would that intercept anything?

              humm...

              I am causing havok with some graphix engine in Java actually using some code that does some image re-scaling... (getting quite a few exceptions after my image is rescaled but ignored them as seemed to have no bad effects)

              I will run up, but not execute, my .ear and if confirmed will find a Java 2D expert to check my image rescaling code out.

              So... Probably my code...

               @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
               private byte[] getRescaledImageAsBytes(String contentType , int width, ImageIcon icon) {
               double ratio = (double) width / icon.getIconWidth();
               int height = (int) (icon.getIconHeight() * ratio);
              
               int imageType = "image/png".equals(contentType) ? BufferedImage.TYPE_INT_ARGB
               : BufferedImage.TYPE_INT_RGB;
               BufferedImage bImg = new BufferedImage(width, height, imageType);
               Graphics2D g2d = bImg.createGraphics();
               g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
               RenderingHints.VALUE_INTERPOLATION_BICUBIC);
               g2d.drawImage(icon.getImage(), 0, 0, width, height, null);
               g2d.dispose();
              
               String formatName = "";
               if ("image/png".equalsIgnoreCase(contentType))
               formatName = "png";
               else if ("image/jpeg".equalsIgnoreCase(contentType))
               formatName = "jpeg";
               else if ("image/jpg".equalsIgnoreCase(contentType))
               formatName = "jpg";
               else if ("image/gif".equalsIgnoreCase(contentType))
               formatName = "gif";
              
               ByteArrayOutputStream baos = null;
               OutputStream out = null;
               try {
               baos = new ByteArrayOutputStream();
               out = new BufferedOutputStream(baos);
               try {
               ImageIO.write(bImg, formatName, out);
               } catch (IOException e) {
               e.printStackTrace();
               }
               } finally { // Try to release any resources.
               try {
               if (baos != null) {
               baos.close();
               }
               } catch (IOException ignored) {}
               try {
               if (out != null) {
               out.close();
               }
               } catch (IOException ignored) {}
               }
               return baos.toByteArray();
               }
              



              • 4. Re: Hypersonic Database Explorer no longer runs up.
                thejavafreak

                I don't think this is Seam issue

                • 5. Re: Hypersonic Database Explorer no longer runs up.
                  tony.herstell1

                  This was just running up the server and going to the database manager
                  might be IceFaces or Seam...
                  :)

                  14:38:17,394 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 56s:764ms
                  14:50:28,139 ERROR [HypersonicDatabase] Failed to start database manager
                  java.lang.reflect.InvocationTargetException
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   at org.jboss.jdbc.HypersonicDatabase$1.run(HypersonicDatabase.java:517)
                  Caused by: java.awt.HeadlessException
                   at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
                   at java.awt.Window.<init>(Window.java:406)
                   at java.awt.Frame.<init>(Frame.java:402)
                   at javax.swing.JFrame.<init>(JFrame.java:207)
                   at org.hsqldb.util.DatabaseManagerSwing.main(Unknown Source)
                   ... 5 more
                  




                  • 6. Re: Hypersonic Database Explorer no longer runs up.
                    tony.herstell1

                     

                    "tony.herstell@gmail.com" wrote:
                    This was just running up the server and going to the database manager
                    might be IceFaces or Seam...
                    :)

                    14:38:17,394 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 56s:764ms
                    14:50:28,139 ERROR [HypersonicDatabase] Failed to start database manager
                    java.lang.reflect.InvocationTargetException
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.jboss.jdbc.HypersonicDatabase$1.run(HypersonicDatabase.java:517)
                    Caused by: java.awt.HeadlessException
                     at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
                     at java.awt.Window.<init>(Window.java:406)
                     at java.awt.Frame.<init>(Frame.java:402)
                     at javax.swing.JFrame.<init>(JFrame.java:207)
                     at org.hsqldb.util.DatabaseManagerSwing.main(Unknown Source)
                     ... 5 more
                    




                    that was WITH the .ear in the deploy area.

                    • 7. Re: Hypersonic Database Explorer no longer runs up.

                      That database manager has no relationship to Seam whatsoever. If you are using DefaultDS, the hsql JARs and the MBean that controls the datasource are completely outside of your EAR. Even if you are using a private hypersonic instance like the dvd store does, it is also external to your EAR.

                      I don't know what could cause a HeadlessException where one didn't exist previously, but I don't see how anything Seam is doing could be the cause.

                      • 8. Re: Hypersonic Database Explorer no longer runs up.
                        tony.herstell1

                         

                        "norman.richards@jboss.com" wrote:
                        That database manager has no relationship to Seam whatsoever. If you are using DefaultDS, the hsql JARs and the MBean that controls the datasource are completely outside of your EAR. Even if you are using a private hypersonic instance like the dvd store does, it is also external to your EAR.

                        I don't know what could cause a HeadlessException where one didn't exist previously, but I don't see how anything Seam is doing could be the cause.


                        Thats definitive.
                        I will have a chat with the icefaces croud.


                        • 9. Re: Hypersonic Database Explorer no longer runs up.

                          Did this ever get resolved? I can confirm it was working for me with seam, now I have some apps deployed with icefaces and it stopped working with the above exception and then undeploying the icefaces apps it now works again.

                          I am running the lastest icefaces (1.6) and jboss 4.2GA

                          • 10. Re: Hypersonic Database Explorer no longer runs up.
                            tony.herstell1

                            I will raise this with the ICEfaces guys.
                            I have a pure Seam 2 project and its working fine.
                            I will be adding in ICEfaces to that project in a while and will be looking for it stopping working then (awaiting ICEfaces catching up with Seam 2 B1 as they changed a lot).