Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / February 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Michael - 20 Dec 2003 05:50 GMT
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 - 03 Feb 2004 18:49 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.