• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Caught java.lang.UnsatisfiedLinkError

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
getting exception :
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String;)I while loading driver com.sun.comm.SolarisDriver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String;)I while loading driver com.sun.comm.SolarisDriver
Port List : javax.comm.CommPortEnumerator@1a758cb



the code is
help me


import java.io.*;
import java.util.*;
import javax.comm.*;

public class SimpleWrite
{

static Enumeration portList;
static CommPortIdentifier portId;
static String dest = "+91942120071";
static String messageString = "Hello";

static String commandString = "AT+CMGF=1\r\n AT+CMGS=\"" + dest + "\"\r\n " + messageString + "\r\n\u001A";

static SerialPort serialPort;
static OutputStream outputStream;

public static void main(String[] args)
{
System.out.println("get Bytes data : " + commandString.getBytes().toString());
portList = CommPortIdentifier.getPortIdentifiers();
System.out.println("Port List : " + portList);
while (portList.hasMoreElements())
{
portId = (CommPortIdentifier) portList.nextElement();
System.out.println("Port ID : " + portId + " ----- " + CommPortIdentifier.PORT_SERIAL);
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
{
if (portId.getName().equals("COM3"))
{
try
{
serialPort = (SerialPort) portId.open("SimpleWriteApp", 2000);
}
catch (PortInUseException e)
{
System.out.println("Port In Use " +e);
}
try
{
outputStream = serialPort.getOutputStream();
}
catch (IOException e)
{
System.out.println("Error writing to output stream " + e);
}
try
{
serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);
}
catch (UnsupportedCommOperationException e) { }
try
{
outputStream.write(commandString.getBytes());
outputStream.flush();
// System.out.println(Byte.toString(commandString.getBytes()));
}
catch (IOException e)
{
System.out.println("Error writing message " + e);
}
}
}
}
}
}
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are some *.so files that come with the javax.comm distribution; they need to be installed properly. Check the documentation that came with your javax.comm product.
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks
but i an not getting exactly

i will go through the documentation
if possible give exactly file name

 
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please Use Code Tags the next time.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java is looking for a native library, which should have the name SolarisSerialParallel.so (you're running this on Solaris, right?).
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no
i am using Microsoft platforms
Windows Xp SP2
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... ummm, OK. Then the problem is that you're trying to use a Solaris javax.comm implementation on Windows!
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks

but what should i do now

help me out
it's very urgent,
i had to submit my project work
 
Rob Spoor
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dhananjay Padalkar wrote:it's very urgent,


EaseUp.
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The download page for javax.comm at Sun's web site very clearly says:


Note: Sun no longer offer's the Windows platform binaries of javax.comm, however javax.comm 2.0.3 can be used for the Windows platform, by using it in conjunction with the Win32 implementation layer provided by the RxTx project. To use that, download javax.comm for the 'generic' platform (which provides the front-end javax.comm API only, without platform specific back-end implementations bundled). Then acquire the Windows binary implementation rxtx-2.0.7pre1 from http://www.rxtx.org.



So did you follow these instructions?
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear sir
i had allready followed the setting of java home like this


comm.jar --- be placed in:
%JAVA_HOME%/lib
%JAVA_HOME%/jre/lib/ext

win32com.dll should be placed in:
%JAVA_HOME%/bin
%JAVA_HOME%/jre/bin
%windir%System32


RXTXcomm.jar --- placed in:
%JAVA_HOME%/jre/lib/ext
%JAVA_HOME%/bin

javax.comm.properties ---- placed in:
%JAVA_HOME%/lib
%JAVA_HOME%/jre/lib


rxtxSerial.dll ---- placed in:
%JAVA_HOME%/jdk/jre/bin
%JAVA_HOME%/jre/bin


even though the exception remains same



 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dhananjay Padalkar wrote:even though the exception remains same


Is the error message exactly the same, i.e. is it still complaining about the Solaris native library? If yes, then you are still using the wrong version of the library. Make sure you use the right version, remove the wrong one from your system.
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i had completely uninstalled java & relative path setting
& copied the files attached with in ZIP to the paths

comm.jar --- be placed in:
%JAVA_HOME%/lib
%JAVA_HOME%/jdk/jre/lib
%JAVA_HOME%/jre/lib/ext

win32com.dll should be placed in:
%JAVA_HOME%/jdk/bin
%JAVA_HOME%/jdk/jre/bin
%JAVA_HOME%/jre/bin
%windir%System32


RXTXcomm.jar --- placed in:
%JAVA_HOME%/jre/lib/ext
%JAVA_HOME%/bin

javax.comm.properties ---- placed in:
%JAVA_HOME%/jdk/lib
%JAVA_HOME%/jdk/jre/lib
%JAVA_HOME%/jre/lib


rxtxSerial.dll ---- placed in:
%JAVA_HOME%/jdk/jre/bin
%JAVA_HOME%/jre/bin
%JAVA_HOME%/jdk/bin


even though the same exception is there

"Caught java.lang.ClassNotFoundException: com.sun.comm.Win32Driver while loading driver com.sun.comm.Win32Driver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String;)I while loading driver com.sun.comm.SolarisDriver"

what should i do now





 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i had jsut now again downloaded
RXTXcomm.jar from
http://www.rxtx.org/

& trying

for solution
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dhananjay Padalkar wrote:even though the same exception is there

"Caught java.lang.ClassNotFoundException: com.sun.comm.Win32Driver while loading driver com.sun.comm.Win32Driver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String;)I while loading driver com.sun.comm.SolarisDriver"


It looks like you are still mixing parts of the Windows and the Solaris drivers. It looks like you don't have the Windows driver in your classpath, and you do have the Solaris driver in your classpath, which tries to load a native library for Solaris, which is obviously not what you want when you're running on Windows.

Are you sure you are not still using any of the JAR files from the Solaris version of the javax.comm package? What does the javax.comm.properties file contain?

Don't completely re-install Java, that won't help. Instead, concentrate on the problem that you're trying to solve.
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

the javax.comm.properties file contains -

#
# Drivers loaded by the Java Communications API standard extension
# at initialization time
#
# Format:
# Each line must contain ONE driver definition only
# Each line must be of the form:
# driver=<ClassName>
# No spaces or tabs in the line.
# ClassName must implement the interface javax.comm.CommDriver
# example: driver=Win32Serial
#
#
# The hash(#) character indicates comment till end of line.
#
# Windows Serial Driver
Driver=com.sun.comm.Win32Driver

 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is the property file can be used under Windows enviroment
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is any answer to the exception
what should i d now
it's very URGENT
 
Rob Spoor
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dhananjay Padalkar wrote:it's very URGENT


Please EaseUp.
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Friend
my intension is not heart any one
but due to sumbmission work i am in hurry
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friend
still i am getting the exception

Caught java.lang.ClassNotFoundException: com.sun.comm.Win32Driver while loading driver com.sun.comm.Win32Driver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String;)I while loading driver com.sun.comm.SolarisDriver
Port : javax.comm.CommPortEnumerator@1a758cb
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String;)I while loading driver com.sun.comm.SolarisDriver

What should i do
can Uyou help me to get new versions of Comm.jar, win32com.dll, & javax.comm.properties

 
Rob Spoor
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dhananjay Padalkar wrote:com.sun.comm.Win32Driver ... win32com.dll


Why are you using the Windows driver for a Solaris environment? That will 100% guaranteed not work.
 
Dhananjay Padalkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am working in Windows Enviroment
OS : Windows Xp SP 2
JSDK 1.2.6

or if any new version of win32com.dll is available juts tell me i will download from the site

any think do you want to know so that i can clear them for easier to understand
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic