I run Servoy 3.5.2 on Linux (Ubuntu 7.10) with java 1.6.0_03 and I’ve got a problem with printing.
I’ve got this message :
java.lang.NullPointerException: null attribute
It appears before the print dialog
It appears even if I select “Use system print dialog” in prefs.
I also have this message if i run my solution on another computer with smart client. But in this case I can see the print dialog and I can see that in the state of the printer I’ve got : “Refuse tasks”.
I am not able to test on Mac or windows for the moment but will try tomorrow.
Any idea ?
Config :
Servoy Developer
Version 3.5.2-build 515
Java version 1.6.0_03-b05 (Linux)
2007-10-29 15:25:14,474 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.lang.NullPointerException: null attribute
at sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1147)
at sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2121)
at sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1263)
at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:437)
at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:195)
at sun.print.ServiceDialog.<init>(ServiceDialog.java:124)
at javax.print.ServiceUI.printDialog(ServiceUI.java:188)
at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:855)
at sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:421)
at com.servoy.j2db.b.c.a(Unknown Source)
at com.servoy.j2db.b.c.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Conversion from 2.2.7 to 3.5.2 (using java 1.6_03) on Windows (Server 2003 for the Server and XP for workstation). I’m getting the null pointer exception and “Cannot print preview document” on pre-existing printing forms from my 2.2.7 version.
I’m trying to recreate the same forms from working print forms, and having all kinds of difficulties as well – like when i set the default page format to na-legal, the red line for the end of the printable page does not move or show proper boundaries. The new form doesn’t seem to work either. Things are sliding off the page as well that really shouldn’t be – didn’t in 2.2.7 and aren’t set to.
We managed to reproduce the exception on Ubuntu Linux with 3.5.2 and Java 1.5 & 1.6 (on Windows XP worked for me though). Please add a case to our support system for this exception.
When you are changing the page format are you in print preview? If yes, are you using the File menu item or the tool bar button? The file menu item will affect forms that do not have their own page format (set previously using the tool bar button) only when they enter print preview mode.
As for the problems you have with print sliding - I would like to see them as well - but I need a sample solution for that. Can you provide a sample solution?
The report is built by a very large MS SQL Server 2000/2005 backend stored procedure, so I don’t think an exported solution, even with sample data, would help you.
The report works in 11x17 (tabloid) format. It’s legal that’s doing the sliding and other errors.
I am using the default page setup property and then lead into the report from a method. Not using the toolbars or menus.
I think I misunderstood your first statement about page boundaries. You were talking about the design mode boudaries, right?
You have a red vertical line to the right of the form - showing the form’s width (useful for header/footer design) and then you have white dashed lines (horizontal / vertical) showing the print page boundaries. Unfortunately I see that these white dashed lines (more often the horizontal ones) do not always appear (it depends on the scroll position and default page setup). So there is a paint problem there for the white lines. Please add this to the support system as well.
What did you mean by:
It’s legal that’s doing the sliding and other errors.
?
Do you mean that sliding works ok (legal) or that it does not?