Forum Stats

  • 3,874,303 Users
  • 2,266,718 Discussions
  • 7,911,811 Comments

Discussions

javax.comm.CommPortIdentifier.getPortIdentifier throws NullPointerException

843851
843851 Member Posts: 19,484
Hi Java Experts,

I have coded one java program to talk with the serial port. It enables to send the sms. It works finely when executed with the help of JDK. I am trying to call the method from oracle database. It prints following errorstack.

Exception in thread "Root Thread" java.lang.NullPointerException: name can't be null

at java.io.FilePermission.init(FilePermission.java)

at java.io.FilePermission.<init>(FilePermission.java)

at java.lang.SecurityManager.checkDelete(SecurityManager.java:992)

at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:89)

at OwnPort.send_sms(OwnPort:39)

I followed following steps to upload this java class into the database.

1. Loadjava
loadjava -user demo_java/[email protected]:1521:orcl -thin -debug -resolve c:/javax.comm.properties,c:/comm.jar,c:/OwnPort.java

2. Copied win32com.dll to oracle_home/jlib folder.

3. Created a java procedure in database to call class method send_sms.

Can you please help me in finding out the solution for this problem?
This discussion has been closed.