NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: printing from java app



I am running NetBSD 4.01 with pkgsrc-2008Q4.  I would like to be running
-current but since this is going to be a production system I need a
completely stable release.

I built pkgsrc/lang/jdk but when I run it I get a segmentation fault
every time.  

I've also tried to build native jdk's from pkgsrc-wip but didn't have
enough room to finish the build on the 4 GB CF Card I'm using.

Jeremy


On Wed, 2009-03-25 at 16:51, Christos Zoulas wrote:
> In article <1237988541.25919.28.camel@v250>,
> Jeremy Smallman  <jeremy.smallman%doxsystems.com@localhost> wrote:
> >Doing ktrace -i, then "kdump | grep lpt" produces nothing.
> >
> >Jeremy
> 
> I don't think it opens the serial port directly. I think that it looks
> at the system printer services. Can you write a small program that uses
> the java print services as described here:
> 
> http://www.javaworld.com/javaworld/jw-07-2005/jw-0725-print.html
> 
> and see if that simple example works? In anycase java should not SEGV
> as your ktrace shows and this is a different problem. If you are running
> current, you could try running one of the native jdks I have put on
> ftp.netbsd.org.
> 
> christos
> 
> >
> >On Tue, 2009-03-24 at 18:25, Christos Zoulas wrote:
> >> In article <1237910883.14859.24.camel@v250>,
> >> Jeremy Smallman  <jeremy.smallman%doxsystems.com@localhost> wrote:
> >> >Thanks for the tip.  Here's what I found in one of the processes when
> >> >trying to open the /dev/lpt0 port in the java app:
> >> >                  .
> >> >                  .
> >> >                  .               
> >> > 16935      1 java     CALL  gettimeofday(0xb65fee18,0)
> >> > 16935      1 java     RET   gettimeofday 0
> >> > 16935      1 java     PSIG  SIGSEGV caught handler=0xbbb9ef20
> >> >mask=(3,33): code=SEGV_MAPERR, addr=0x4, trap=14)
> >> > 16935      1 java     CALL  rt_sigreturn(0xb65fef40)
> >> > 16935      1 java     RET   rt_sigreturn -1 errno -2 No such file or
> >> >directory
> >> > 16935      1 java     CALL  write(2,0xb65fcd9c,0x39)
> >> > 16935      1 java     GIO   fd 2 wrote 57 bytes
> >> >       "jpos.JposException: Can not open the communications port."
> >> > 16935      1 java     RET   write 57/0x39
> >> > 16935      1 java     CALL  write(2,0xb65fcdcc,1)
> >> > 16935      1 java     GIO   fd 2 wrote 1 bytes
> >> >                  .
> >> >                  .
> >> >                  .
> >> >
> >> >I'm running the java app as root so permissions shouldn't be an issue. 
> >> >It seems the app thinks the port doesn't exist or it thinks the printer
> >> >is not attached to the port . . .?  This java application works fine
> >> >with the printer on an OpenSUSE box, so I know it's not a problem with
> >> >the java app.
> >> >
> >> 
> >> So what's the sequence from opening /dev/lpt0 on?
> >> 
> >> christos
> >
> >
> >
> 
-- 
Jeremy Smallman, ITSS
DoX Systems, LLC
3454 Oak Alley Ct.
Suite 100
Toledo, OH 43606-1354
419-654-1607
http://www.doxsystems.com



Home | Main Index | Thread Index | Old Index