Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Applet uses JavaComm Exception "...name can't be null"

13 views
Skip to first unread message

Michael

unread,
Dec 20, 2003, 12:50:41 AM12/20/03
to
I've written an applet which communicates with a MagTek Check Reader.
As a standalone applet it works fine. It breaks when I use it as an applet
in an html page. Standalone I'm using the same JDK as I am with the plugin.

I've signed the Applet.
I've configured the security policy for the plugin to allow all permissions.

------------------ java.policy -------------
grant codeBase "http://dev.caughey.com/-" {
permission java.security.AllPermission;
};
--------------------------------------------

Here is the out put from the Console window.

---------------- CONSOLE START ----------------------
Java(TM) Plug-in: Version 1.4.1_02
Using JRE version 1.4.1_02 Java HotSpot(TM) Client VM
User home directory = C:\WINNT\Profiles\mcaughey.001
Proxy Configuration: No proxy


----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Applet.jbInt()
CheckPanel.jbInt()
name can't be null
java.lang.NullPointerException: name can't be null
at java.io.FilePermission.init(Unknown Source)
at java.io.FilePermission.<init>(Unknown Source)
at java.lang.SecurityManager.checkWrite(Unknown Source)
at sun.plugin.security.ActivatorSecurityManager.checkDelete(Unknown Source)
at
javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:89)
at com.epaysol.comm.CommPort.open(CommPort.java:123) <---- *** Last
Line of my code ***
at
com.epaysol.magtek.micrimage.impl.MicrImageDeviceImpl.disableImage(MicrImage
DeviceImpl.java:47)
at com.epaysol.applet.CheckPanel.initScreen(CheckPanel.java:123)
at com.epaysol.applet.CheckPanel.jbInit(CheckPanel.java:108)
at com.epaysol.applet.CheckPanel.<init>(CheckPanel.java:44)
at com.epaysol.applet.ReadCheckApplet.jbInit(ReadCheckApplet.java:45)
at com.epaysol.applet.ReadCheckApplet.init(ReadCheckApplet.java:34)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
---------------- CONSOLE END ----------------------


I have configured the plugin VM parameters with
-Djava.library.path=J:/javacomm

This is where i have installed the dll and placed the javax.com.properties
file which javacomm require.

If there is a better way to do this, I'm al ears. I hat the fact that I
have to have the user manually
modify the java.policy and place the two files on their file system.

Primarily i'm looking to get this working.


Thanks in advanced,
Michael


subhodh

unread,
Feb 3, 2004, 1:49:58 PM2/3/04
to
Michael,
I also have the same kind of problem while running applet on browser. Do you got the issue resolved or you have any other solution. Please let me know if possible

0 new messages