Solaris native calls to packing libraries
Hello,
I do not know if this is the correct forum, and if not please redirect me. I'm researching the use of Solaris *,9,10 packaging via Java 1.4.2 by way of C/C++ and came across pkginfo.c from this url:
http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libadm/common/pkginfo.c
and it suggests that libadm is where the functions are that I can use in my code.
Maybe I'm not looking in the right space/area. I wanted access to all the native library calls for all aspects of packing including the pkginfo, pkgadd, pkgrm, etc.
I didn't see one for pkgrm but found the pkginfo.c code, so I figured it's somewhere.
Any url that might help me figure this out would be appreciated. A book would be good, but not as fast.
A code snippet or idea would be great...
looking for a reference or a...
comon! it's aint going to work that way, you can only do it this way...
would help!
regards,
robert
Hello all who've viewed this page!
So in my copius spare time I found that libprodreg.so.1 contains the code that is available to do packaging and interfaces directly with the Sun's product database and now need to locate the specs on interfacing to it.
So if someone could give me a heads up that would be great.
Thanks in advance!
Robert
Similar Messages
-
Forms 2.1 calling shared object libraries
Can Forms 2.1 on Solaris 2.6 make calls to shared object
libraries? What are the limitations / issues?
I have a large legacy COBOL program which I would like to
restructure and capture the business rule implementations into
shared object libraries. I would then like to implement a new UI
(character or GUI) for part of the system in Forms. I would
consider using forms built in features for getting data from the
database but all inserts updates and deletes will go through the
business rule layer implemented in COBOL and deployed as shared
object libraries on unix.
Any and all help is appreciated.
Regards
Terry Bakker
nullTerry Bakker (guest) wrote:
: Can Forms 2.1 on Solaris 2.6 make calls to shared object
: libraries? What are the limitations / issues?
: I have a large legacy COBOL program which I would like to
: restructure and capture the business rule implementations into
: shared object libraries. I would then like to implement a new
UI
: (character or GUI) for part of the system in Forms. I would
: consider using forms built in features for getting data from
the
: database but all inserts updates and deletes will go through
the
: business rule layer implemented in COBOL and deployed as shared
: object libraries on unix.
: Any and all help is appreciated.
: Regards
: Terry Bakker
I have used Foreign Function Interface call (FFI) in Forms 5.0
to call function in Dynamic Linking Library (DLL) on Windows/NT.
You may be able to do the same thing (use FFI) to call shared
object libraries on Solaris.
Peter Ng
null -
Native Call (Java Call C program)
Hi all,
I am facing problem on compile the .so file for native call.
In step by step tutorial, after I compile as :
cc -G -I/opt/java1.3/include -I/opt/java1.3/include/hp-ux \HelloWorldImp.c -o libhello.so
Fllowing error occur :
/usr/ccs/bin/ld: Unsatisfied symbols:
main (code)
I am using HP-UX, any hints ?I solved the problem.
Compile method in HP is not equal to Solaris.
and thus throw that error if I follow the step by step tutorial in Sun's page.
Details refer to :
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/JNI_java2.html -
I know there are topics related to timeout, stop or kill native call but it seems there is no good answer for me.
I have a java class as the caller to call a native C function with double arrays as input. The C function perform some kind of computation using 3rd party FORTRAN functions. If we terminate the java, how to terminate/stop/or exit the C function?
Here is the partial of java class
public class PolyFit {
public native double[] polyFit(int[]iParams, double[] dParams,
double[] xx, double[] yy, int col);
static {
try {
System.loadLibrary("polylib");
} catch (UnsatisfiedLinkError e) {
System.out.println ("Failed to load polylib");
e.printStackTrace();
public PolyFit() {
}The parent java class is a sub class of Thread that calls the PolyFit when running as a thread:
int col2 = 2;
for() { //more than 1000 pairs of inputX and inputY
//iParams, dParams, inputX, inputY are assigned before
PolyFit polyFit = new PolyFit();
double[]output = polyFit .polyFit(iParams, dParams, inputX, inputY, col2);
}Here is native C function (partial)
#include "PolyFit.h"
JNIEXPORT jdoubleArray JNICALL Java_org_ciit_stat_PolyFit_polyFit
(JNIEnv *env, jobject obj, jintArray ja, jdoubleArray jda,
jdoubleArray jdinX, jdoubleArray jdinY, jint col) {
jdouble *output;
jdoubleArray dbArray = (*env)->NewDoubleArray(env, MAX);
(*env)->SetDoubleArrayRegion(env, dbArray, MIN, MAX, output);
free(output);
return dbArray;
}Every call of polyFit .polyFit() may take less than 1 millisecond to several second. In case the time exceeds a threadhold, i.e. 10 second, we want to stop the thread. However, I can't find the way to stop or exit the C function.
Any ideas are highly appreciated.This is C code, and since there is no portable way to interrupt C code, there's nothing that can be done. In Unix a SIGINT can do the trick, but only by killing the whole address space. There are some thread APIs that attempt to do this, but they are either very unsafe or require cooperation from the code which is being interrupted.
Your best bet is to code your CPU-intensive code to check a global (or thread-specific) flag for a requested interrupt, and cleanly exit back to the JNI wrapper, returning a flag value to acknowledge the interruption. A wrapper routine around the native method can then throw a Java exception, or block and retry, or whatever you want it to do.
Note that Thread.stop is deprecated. There is no earthly way to cleanly interrupt either Java or C code, unless it cooperates with the interrupter. -
I can write native calls in C and use them in my J2ME applications. But if the application shall be integrated to a J2ME device, like a mobilephone, can the native calls then work on this device? This means the DLL (the native function) must be placed on the mobilephone.
Thx /DenkerEven more interesting, how whould you deploy your native bits (e.g. some sort of library) when you cannot even be sure whether your target does support a file system? Apart from that, I doubt you will get a programming API for your mobile phone (well, Symbian OS (e.g. Nokia 7650) provides one I think).
-
BE6000 Native Call Queuing Design Constraints?
We see the doc wiki has not been updated with any UCM 9.0 native call queuing design constraints. We would assume that the call queuing at a min would need to meet the MoH design constraint of 50 sessions, since you figure there is a high probability that one call will be queued in each of 50 queues with MoH playing with each.
http://docwiki.cisco.com/wiki/Supported_System_Capacities
Is there any other performance impact we should consider or can we ask the doc wiki be updated with design constraints around call queuing?
Can the BU clarify is that is 50 simultanous MoH streams per cluster, or 50 per server? We can eliminate the load by going to multicast and IOS distributed MoH for remote sites, but something tells me there probably is a max queued call ceiling we need to consider for this platform.At the risk of getting caught up in the pass-by-reference/pass-by-value debate :), simple values (ints chars etc). are passed as values, and modifying them on the C++ side of the procedure call will not modify the values on th java side.
Possible solutions are:
1)pass an array of (say) ints. Then, modifying individual values should modify the java-side values (much in the way that the Stream.read(byte[]) functions do.
2)format up a strin g with your return values, return the string and parse it on the java side.
3)have fields in the java side that are accessed and modified by your native call.
4)pass an object with some fields in it. Have the C++ access and modify the object's fields.
Hope this helps. -
How to maintain reference across native calls?
I'm using JNI to interface with an underlying C++ communications library. I am having trouble keeping my connection valid across native calls.
For example, in one method I connect and save the connection in a global variable, then return. After I connect I would like to call a "send message" method, but when I do I doesn't recognize the saved connection.
My question is do saved references persist across JNI calls when using the same object, or will all global vars be new ones? If not, does anyone know a way to get around this?
Thanks for your helpAll JNI references that you create (through calls to NewObject, GetObjectArrayElement, GetObjectField, ...) or that are passed to your native code as parameters are local. That means that they are only valid for the duration of that native call and only on the thread from which that native call was invoked.
You can create global references from local references using NewGlobalRef. A global reference is valid across all threads and does not have a limited lifetime. You must make sure to release your global references once you are done using them by calling DeleteGlobalRef.
God bless,
-Toby Reyelts
Check out Jace, http://jace.reyelts.com/jace -
Web services server side uses C dll (native calls)
Hi,
I developed a web service using JAX-RPC. My implementation class uses native c function calls. Dose anybody know where I should put my C dlls and their dependentcy files on Web service server side (tomcat)? If they should be in the .war file, what kind of path in the war would be?
I have an exception ocurred, like this
[java] java.rmi.ServerException: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault (StreamingSender.java:357)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
I think probably it is because of native call problem, since I could get something back if not using native call.
Anybody has similar experience when developing web service using JAX-RPC and calling native c api functions on server side?
Thanx in advance!Yes, I just tried it again (comment all native call out and just call the method that doesn't use native call, it works).
So your web service application using jax-rpc and c native dlls works already?
Can you tell me where you put all the native C DLLs and where I can set java.library.path in tomcat?
Thank you! -
CUCM 9.1 native call queuing - calls stuck in queue
Hello everyone
We are using the CUCM 9.1 native call queuing feature for attendants hunt group an have the following problem - if all the attendants are busy, the next arriving call gets into queue, receiving MOH treatment, as described in documentation. But if one or more attendants gets free and ready to receive calls, queued call doesn't get transfered to his/her phone. Logging in additional attendants, logging them in and out again doesn't change anything, once the call got in queue it stays in queue.
Exact cucm release version is 9.1.1.20000-5.
Has anyone seen this? Any ideas on what traces/logs to check?Hi,
it seems you hitting this bug CSCuc16486
http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCuc16486&from=summary
HTH
Anas
please don't forget to rate the helpful posts -
Client (Solaris) remote call hangs 225sec if Server (Window7) is down.
We are noticing the RMI Client remote call from Solaris machine hang of exactly 225 seconds if RMI Server on Windows7 machine is shutdown. RMI Server is shutdown for valid reasons. The expectation is, Client would throw a RemoteException immediately for futher processing. The Client hang for 225 minutes is causing performance issues. This has been consistently reproduced across multiple machines with Client on Solaris and Server on Windows 7. There are no 225 sec wait issues if server is on Windows XP or Solaris.
Usecase (java version "1.6.0_14")
1. Start RMI Server on Windows 7 machine
2. Start RMI Client on Solaris machine
3. Wait till client connects to the server and makes some remote call every 1sec.
4. Shutdown RMI Server.
5. Client waits 225 seconds before a time out error is thrown.
Has anyone seen this problem? Any solutions to get around this?
Code used to test this
RmiTestServer.java
public class RmiTestServer
public static void main(String args[])
try
java.rmi.registry.Registry zRegistry = null;
try
zRegistry = java.rmi.registry.LocateRegistry.createRegistry ( 1099 );
catch ( Exception zEx )
zRegistry = java.rmi.registry.LocateRegistry.getRegistry ( 1099 );
if ( zRegistry != null )
System.out.println( "Binding RmiTestService..." );
RmiTest c = new RmiTestImpl();
zRegistry.rebind ( "RmiTestService", c );
System.out.println( "Done Binding RmiTestService..." );
else
System.out.println( "Registry is null." );
catch (Exception e)
e.printStackTrace();
RmiTest.java
public interface RmiTest extends java.rmi.Remote
public void callHello() throws java.rmi.RemoteException;
RmiTestImpl.java
public class RmiTestImpl extends java.rmi.server.UnicastRemoteObject
implements RmiTest
public RmiTestImpl() throws java.rmi.RemoteException
super();
public void callHello() throws java.rmi.RemoteException
System.out.println ("Hello World!!!");
RmiTestClient
public class RmiTestClient
public static void main(String[] args)
System.out.println ("Connecting to: " + args[0] + " Port 1099" );
long lTime = System.currentTimeMillis();
try
RmiTest c = null;
java.rmi.registry.Registry registry = java.rmi.registry.LocateRegistry.getRegistry ( args[0], 1099 );
if ( registry!=null )
System.out.println ("Start lookup... " );
c = (RmiTest)registry.lookup ( "RmiTestService" );
System.out.println( "Lookup Done - " + (System.currentTimeMillis() - lTime)/1000 + "sec\n" );
while( true )
lTime = System.currentTimeMillis();
System.out.println( "Calling Server..." );
c.callHello();
System.out.println( "Done Calling Server - " + (System.currentTimeMillis() - lTime)/1000 + "sec\n" );
lTime = System.currentTimeMillis();
Thread.sleep(1000);
catch (Exception e)
System.out.println( "Time for Exception - " + (System.currentTimeMillis() - lTime)/1000 + "sec\n" );
e.printStackTrace();
Output
Calling Server...
Jun 9, 2011 10:59:19 PM sun.rmi.transport.tcp.TCPChannel newConnection
FINE: main: reuse connection
Jun 9, 2011 10:59:19 PM sun.rmi.transport.tcp.TCPChannel free
FINE: main: reuse connection
Done Calling Server - 0sec
Calling Server...
Jun 9, 2011 10:59:20 PM sun.rmi.transport.tcp.TCPChannel newConnection
FINE: main: reuse connection
Jun 9, 2011 10:59:20 PM sun.rmi.transport.tcp.TCPChannel free
FINE: main: reuse connection
Done Calling Server - 0sec
Calling Server...
Jun 9, 2011 10:59:21 PM sun.rmi.transport.tcp.TCPConnection isDead --------------->RMI Server Shutdown
FINER: main: exception:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at sun.rmi.transport.tcp.TCPConnection.isDead(TCPConnection.java:174)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:173)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
at RmiTestImpl_Stub.callHello(Unknown Source)
at RmiTestClient.main(RmiTestClient.java:23)
Jun 9, 2011 10:59:21 PM sun.rmi.transport.tcp.TCPConnection isDead
FINE: main: server ping failed
Jun 9, 2011 10:59:21 PM sun.rmi.transport.tcp.TCPChannel free
FINE: main: close connection
Jun 9, 2011 10:59:21 PM sun.rmi.transport.tcp.TCPConnection close
FINE: main: close connection
Jun 9, 2011 10:59:21 PM sun.rmi.transport.tcp.TCPChannel createConnection
FINE: main: create connection
Jun 9, 2011 10:59:21 PM sun.rmi.transport.tcp.TCPEndpoint newSocket
FINER: main: opening socket to [<IP Address>:65427]
Jun 9, 2011 10:59:21 PM sun.rmi.transport.proxy.RMIMasterSocketFactory createSocket
FINE: main: host: <IP Address>, port: 65427
Jun 9, 2011 10:59:24 PM sun.rmi.transport.tcp.TCPChannel$1 run
FINER: RMI Scheduler(0): wake up
Jun 9, 2011 10:59:24 PM sun.rmi.transport.tcp.TCPChannel$1 run
FINER: RMI Scheduler(0): wake up
Jun 9, 2011 10:59:39 PM sun.rmi.transport.tcp.TCPChannel$1 run
FINER: RMI Scheduler(0): wake up
Jun 9, 2011 10:59:39 PM sun.rmi.transport.tcp.TCPChannel freeCachedConnections
FINER: RMI Scheduler(0): connection timeout expired
Jun 9, 2011 10:59:39 PM sun.rmi.transport.tcp.TCPConnection close
FINE: RMI Scheduler(0): close connection
Time for Exception - 224sec
java.rmi.ConnectException: Connection refused to host: <IP Address>; nested exception is:
java.net.ConnectException: Connection timed out
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
at RmiTestImpl_Stub.callHello(Unknown Source)
at RmiTestClient.main(RmiTestClient.java:23)
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 5 moreCould you check to see if the remote database is up and running before calling the remote database procedure?
-
Native call crashes inside event call.
When I use this interface without a JFrame, simply calling "goToFilter(5)", it works perfectly. When I call it within the ActionListener, it crashes.
* @author Jason Thomas
* @version 1.0
* Test program for the Java interface to my C++ FilterWheel object.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class FilterWheel
static
System.loadLibrary("filterwheel");
FilterWheel()
FilterInterface.initialize();
final JTextField myField = new JTextField();
JFrame myFrame = new JFrame("Filter Wheel.");
myFrame.setSize(500,500);
myField.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent evt)
String myText = myField.getText();
try
FilterInterface.goToFilter(Integer.parseInt(myText));
catch(NumberFormatException myExtp)
System.err.println("Invalid Numerical value!");
myFrame.getContentPane().add(myField, BorderLayout.SOUTH);
myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myFrame.setVisible(true);
FilterInterface.goToFilter(1);
public static void main(String args[])
new FilterWheel();
Exception:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4C85A87F
Function=(null)+0x4C85A87F
Library=/home/jason/FWheel/Bakup/libfilterwheel.so
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at FilterInterface.goToFilter(Native Method)
at FilterWheel$1.actionPerformed(FilterWheel.java:32)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:489)
at javax.swing.JTextField.postActionEvent(JTextField.java:670)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:784)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1502)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2422)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2457)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
at java.awt.Component.processEvent(Component.java:4830)
at java.awt.Container.processEvent(Container.java:1525)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1582)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1700)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:568)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:740)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:673)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:534)
at java.awt.Component.dispatchEventImpl(Component.java:3396)
at java.awt.Container.dispatchEventImpl(Container.java:1582)
at java.awt.Window.dispatchEventImpl(Window.java:1581)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130) at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Dynamic libraries:
08048000-0804d000 r-xp 00000000 03:05 659493 /usr/java/j2sdk1.4.0_01/bin/java
0804d000-0804e000 rw-p 00004000 03:05 659493 /usr/java/j2sdk1.4.0_01/bin/java
40000000-40012000 r-xp 00000000 03:05 426018 /lib/ld-2.2.93.so
40012000-40013000 rw-p 00012000 03:05 426018 /lib/ld-2.2.93.so
40013000-4001c000 r-xp 00000000 03:05 53552 /usr/java/j2sdk1.4.0_01/jre/lib/i386/native_threads/libhpi.so
4001c000-4001d000 rw-p 00008000 03:05 53552 /usr/java/j2sdk1.4.0_01/jre/lib/i386/native_threads/libhpi.so
4001d000-4001e000 r--p 00281000 03:05 659901 /usr/lib/locale/locale-archive
4001e000-40027000 r-xp 00000000 03:05 426054 /lib/libnss_files-2.2.93.so
40027000-40028000 rw-p 00008000 03:05 426054 /lib/libnss_files-2.2.93.so
40028000-4002a000 r--s 00000000 03:05 675301 /usr/java/j2sdk1.4.0_01/jre/lib/ext/dnsns.jar
4002c000-40039000 r-xp 00000000 03:05 245766 /lib/i686/libpthread-0.10.so
40039000-4003c000 rw-p 0000d000 03:05 245766 /lib/i686/libpthread-0.10.so
4005d000-4005f000 r-xp 00000000 03:05 429411 /lib/libdl-2.2.93.so
4005f000-40060000 rw-p 00001000 03:05 429411 /lib/libdl-2.2.93.so
40060000-40326000 r-xp 00000000 03:05 545074 /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
40326000-4048f000 rw-p 002c5000 03:05 545074 /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
404a3000-404b5000 r-xp 00000000 03:05 429413 /lib/libnsl-2.2.93.so
404b5000-404b6000 rw-p 00012000 03:05 429413 /lib/libnsl-2.2.93.so
404b8000-404ec000 r-xp 00000000 03:05 639250 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
404ec000-404f8000 rw-p 00033000 03:05 639250 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
404fa000-4051b000 r-xp 00000000 03:05 245764 /lib/i686/libm-2.2.93.so
4051b000-4051c000 rw-p 00021000 03:05 245764 /lib/i686/libm-2.2.93.so
4051c000-4052d000 r-xp 00000000 03:05 348487 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libverify.so
4052d000-4052f000 rw-p 00010000 03:05 348487 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libverify.so
4052f000-40551000 r-xp 00000000 03:05 348475 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libjava.so
40551000-40553000 rw-p 00021000 03:05 348475 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libjava.so
40555000-40569000 r-xp 00000000 03:05 348488 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libzip.so
40569000-4056c000 rw-p 00013000 03:05 348488 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libzip.so
4056c000-41be9000 r--s 00000000 03:05 675348 /usr/java/j2sdk1.4.0_01/jre/lib/rt.jar
41c2b000-41c42000 r--s 00000000 03:05 675355 /usr/java/j2sdk1.4.0_01/jre/lib/sunrsasign.jar
41c42000-41cb0000 r--s 00000000 03:05 675315 /usr/java/j2sdk1.4.0_01/jre/lib/jsse.jar
41cb0000-41cc3000 r--s 00000000 03:05 675314 /usr/java/j2sdk1.4.0_01/jre/lib/jce.jar
41cc3000-41f44000 r--s 00000000 03:05 675292 /usr/java/j2sdk1.4.0_01/jre/lib/charsets.jar
41fec000-41ffa000 r--s 00000000 03:05 675302 /usr/java/j2sdk1.4.0_01/jre/lib/ext/ldapsec.jar
41ffa000-42000000 r--s 00000000 03:05 983258 /usr/lib/gconv/gconv-modules.cache
42000000-42126000 r-xp 00000000 03:05 245762 /lib/i686/libc-2.2.93.so
42126000-4212b000 rw-p 00126000 03:05 245762 /lib/i686/libc-2.2.93.so
4c333000-4c533000 r--p 00000000 03:05 659901 /usr/lib/locale/locale-archive
4c533000-4c560000 r--p 0024b000 03:05 659901 /usr/lib/locale/locale-archive
4c764000-4c807000 r--s 00000000 03:05 675303 /usr/java/j2sdk1.4.0_01/jre/lib/ext/localedata.jar
4c832000-4c83a000 r--s 00000000 03:05 674028 /usr/java/j2sdk1.4.0_01/jre/lib/ext/comm.jar
4c83a000-4c857000 r--s 00000000 03:05 675304 /usr/java/j2sdk1.4.0_01/jre/lib/ext/sunjce_provider.jar
4c857000-4c85e000 r-xp 00000000 03:05 905031 /home/jason/FWheel/Bakup/libfilterwheel.so
4c85e000-4c860000 rw-p 00006000 03:05 905031 /home/jason/FWheel/Bakup/libfilterwheel.so
4c860000-4c862000 r-xp 00000000 03:05 510719 /usr/X11R6/lib/X11/locale/common/xlcDef.so.2
4c862000-4c863000 rw-p 00001000 03:05 510719 /usr/X11R6/lib/X11/locale/common/xlcDef.so.2
4c879000-4c8f6000 r-xp 00000000 03:05 641516 /usr/lib/libstdc++.so.3
4c8f6000-4c90f000 rw-p 0007c000 03:05 641516 /usr/lib/libstdc++.so.3
4c910000-4c917000 r-xp 00000000 03:05 426049 /lib/libgcc_s-3.2-20020903.so.14c917000-4c918000 rw-p 00007000 03:05 426049 /lib/libgcc_s-3.2-20020903.so.14c918000-4c91a000 r-xp 00000000 03:05 983203 /usr/lib/gconv/ISO8859-1.so
4c91a000-4c91b000 rw-p 00001000 03:05 983203 /usr/lib/gconv/ISO8859-1.so
4c91b000-4cbdc000 r-xp 00000000 03:05 348467 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libawt.so
4cbdc000-4cbf0000 rw-p 002c0000 03:05 348467 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libawt.so
4cc15000-4cc66000 r-xp 00000000 03:05 348483 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libmlib_image.so
4cc66000-4cc67000 rw-p 00050000 03:05 348483 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libmlib_image.so
4cc67000-4cc6e000 r-xp 00000000 03:05 329064 /usr/X11R6/lib/libXp.so.6.2
4cc6e000-4cc6f000 rw-p 00006000 03:05 329064 /usr/X11R6/lib/libXp.so.6.2
4cc6f000-4ccbd000 r-xp 00000000 03:05 328621 /usr/X11R6/lib/libXt.so.6.0
4ccbd000-4ccc1000 rw-p 0004d000 03:05 328621 /usr/X11R6/lib/libXt.so.6.0
4ccc1000-4ccce000 r-xp 00000000 03:05 328605 /usr/X11R6/lib/libXext.so.6.4
4ccce000-4cccf000 rw-p 0000c000 03:05 328605 /usr/X11R6/lib/libXext.so.6.4
4cccf000-4ccd3000 r-xp 00000000 03:05 328623 /usr/X11R6/lib/libXtst.so.6.1
4ccd3000-4ccd4000 rw-p 00004000 03:05 328623 /usr/X11R6/lib/libXtst.so.6.1
4ccd4000-4cdaf000 r-xp 00000000 03:05 328596 /usr/X11R6/lib/libX11.so.6.2
4cdaf000-4cdb2000 rw-p 000da000 03:05 328596 /usr/X11R6/lib/libX11.so.6.2
4cdb2000-4cdba000 r-xp 00000000 03:05 328592 /usr/X11R6/lib/libSM.so.6.0
4cdba000-4cdbb000 rw-p 00007000 03:05 328592 /usr/X11R6/lib/libSM.so.6.0
4cdbb000-4cdcf000 r-xp 00000000 03:05 328550 /usr/X11R6/lib/libICE.so.6.3
4cdcf000-4cdd0000 rw-p 00013000 03:05 328550 /usr/X11R6/lib/libICE.so.6.3
4cdd2000-4ce97000 r-xp 00000000 03:05 348471 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libfontmanager.so
4ce97000-4ceb1000 rw-p 000c4000 03:05 348471 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libfontmanager.so
4cf54000-4cf70000 r-xp 00000000 03:05 510718 /usr/X11R6/lib/X11/locale/common/ximcp.so.2
4cf70000-4cf72000 rw-p 0001b000 03:05 510718 /usr/X11R6/lib/X11/locale/common/ximcp.so.2
Local Time = Thu Feb 13 15:49:51 2003
Elapsed Time = 8
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
# An error report file has been saved as hs_err_pid2843.log.
# Please refer to the file for further information.
Any help would be greatly appreciated.
-Jason Thomas.Gdb's trace of the cause of all of my problems:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 90124 (LWP 11810)]
0x4c85a89f in outb () from /home/jason/FWheel/libfilterwheel.so
This is what I get from the debugger. I'm using the function outb to write to the parallel port address 0x378, which I've used the function ioperm to permit read/write access to. The program works just fine if I call the "stepFilter" function (that calls outb) outside of the ActionListener's actionPerfomed method. Like if I'm probing for keboard input inside the constructor:
* @author Jason Thomas
* @version 1.0
* Test program for the Java interface to my C++ FilterWheel object.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class FilterWheelTest
static
System.loadLibrary("filterwheel");
FilterWheelTest()
BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));
String inString;
try
while((inString = myReader.readLine()) != null)
myWheel.goToFilter(Integer.parseInt(inString));
myWheel._delete();
catch(IOException e)
e.printStackTrace();
System.exit(-1);
public static void main(String args[])
new FilterWheelTest();
The program above works fine, the one I posted previously does not. The only difference is that the one I first posted is inside of an ActionListener, and this one is not.
-Jason Thomas. -
WLS 5.1 & Solaris 8 (Intel) Performance Pack Issue
OS: Solaris 8 Intel
WLS: Weblogic 5.1
Issue: Unable to load performance pack
Description: LD_LIBRARY_PATH is set for /apps/weblogic/lib/solaris -
Confirmed by output of startWebLogic.sh {see below}
Contents of /apps/weblogic/lib/solaris contains
libmuxer.so
# ./startWebLogic.sh
LD_LIBRARY_PATH=/apps/weblogic/lib/solaris
Tue Jul 10 21:04:42 EDT 2001:<I> <WebLogicServer> Read global properties
/apps/weblogic/weblogic.properties
Tue Jul 10 21:04:51 EDT 2001:<I> <ListenThread> Listening on port: 7001
Tue Jul 10 21:04:51 EDT 2001:<A> <Posix Performance Pack> Could not
initialize POSIX Performance Pack.
Tue Jul 10 21:04:51 EDT 2001:<E> <Posix Performance Pack> Stack:
java.lang.UnsatisfiedLinkError: no muxer in java.library.path
Tue Jul 10 21:04:51 EDT 2001:<E> <Performance Pack> Unable to load
performance pack, using Java I/O.
Tue Jul 10 21:04:51 EDT 2001:<I> <SSLListenThread> Listening on port:
7002
Tue Jul 10 21:04:51 EDT 2001:<I> <WebLogicServer> WebLogic Server
started
# ls -l /apps/weblogic/lib/solaris
total 3460
-rwxr-xr-x 1 weblogic weblogic 409436 Jul 4 12:05 libjsafe.so
-rwxr-xr-x 1 weblogic weblogic 22332 Jul 4 12:05 libmuxer.so
-rwxr-xr-x 1 weblogic weblogic 146932 Jul 4 12:05 libproxy.so
-rwxr-xr-x 1 weblogic weblogic 8632 Jul 4 12:05 libstackdump.so
-rwxr-xr-x 1 weblogic weblogic 6820 Jul 4 12:05
libstackdump_jdk12.so
-rwxr-xr-x 1 weblogic weblogic 7472 Jul 4 12:05
libweblogicunix1.so
-rwxr-xr-x 1 weblogic weblogic 6364 Jul 4 12:05 libwlenv.so
-rwxr-xr-x 1 weblogic weblogic 277712 Jul 4 12:05 mod_wl.so
-rwxr-xr-x 1 weblogic weblogic 275692 Jul 4 12:05 mod_wl_ssl.so
-rwxr-xr-x 1 weblogic weblogic 275780 Jul 4 12:05
mod_wl_ssl_raven.so
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci734_7
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci805_7
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci805_8
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci806_8
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci815_8
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci816_8
-rw-r--r-- 1 weblogic weblogic 47868 Jul 4 12:05 wlauth
-rw-r--r-- 1 weblogic weblogic 218276 Jul 4 12:05 zac_solaris
[startWebLogic.sh]
# Set user-defined variables
JAVA_HOME=/usr/java
PRE_CLASSPATH=Michael Girdley wrote:
The perf pack is native code. It must be ported to each platform. Since
WLS only supports Solaris/SPARC, this port hasn't been done and that's why
the lib doesn't work.
Michael Girdley
http://learnweblogic.com
"Super-User" <[email protected]> wrote in message
news:[email protected]...
It's [email protected]
Super-User wrote:
OS: Solaris 8 Intel
WLS: Weblogic 5.1
Issue: Unable to load performance pack
Description: LD_LIBRARY_PATH is set for /apps/weblogic/lib/solaris -
Confirmed by output of startWebLogic.sh {see below}
Contents of /apps/weblogic/lib/solaris contains
libmuxer.so
# ./startWebLogic.sh
LD_LIBRARY_PATH=/apps/weblogic/lib/solaris
Tue Jul 10 21:04:42 EDT 2001:<I> <WebLogicServer> Read global properties
/apps/weblogic/weblogic.properties
Tue Jul 10 21:04:51 EDT 2001:<I> <ListenThread> Listening on port: 7001
Tue Jul 10 21:04:51 EDT 2001:<A> <Posix Performance Pack> Could not
initialize POSIX Performance Pack.
Tue Jul 10 21:04:51 EDT 2001:<E> <Posix Performance Pack> Stack:
java.lang.UnsatisfiedLinkError: no muxer in java.library.path
Tue Jul 10 21:04:51 EDT 2001:<E> <Performance Pack> Unable to load
performance pack, using Java I/O.
Tue Jul 10 21:04:51 EDT 2001:<I> <SSLListenThread> Listening on port:
7002
Tue Jul 10 21:04:51 EDT 2001:<I> <WebLogicServer> WebLogic Server
started
# ls -l /apps/weblogic/lib/solaris
total 3460
-rwxr-xr-x 1 weblogic weblogic 409436 Jul 4 12:05 libjsafe.so
-rwxr-xr-x 1 weblogic weblogic 22332 Jul 4 12:05 libmuxer.so
-rwxr-xr-x 1 weblogic weblogic 146932 Jul 4 12:05 libproxy.so
-rwxr-xr-x 1 weblogic weblogic 8632 Jul 4 12:05 libstackdump.so
-rwxr-xr-x 1 weblogic weblogic 6820 Jul 4 12:05
libstackdump_jdk12.so
-rwxr-xr-x 1 weblogic weblogic 7472 Jul 4 12:05
libweblogicunix1.so
-rwxr-xr-x 1 weblogic weblogic 6364 Jul 4 12:05 libwlenv.so
-rwxr-xr-x 1 weblogic weblogic 277712 Jul 4 12:05 mod_wl.so
-rwxr-xr-x 1 weblogic weblogic 275692 Jul 4 12:05 mod_wl_ssl.so
-rwxr-xr-x 1 weblogic weblogic 275780 Jul 4 12:05
mod_wl_ssl_raven.so
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci734_7
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci805_7
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci805_8
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci806_8
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci815_8
drwxr-xr-x 2 weblogic weblogic 512 Jul 4 12:05 oci816_8
-rw-r--r-- 1 weblogic weblogic 47868 Jul 4 12:05 wlauth
-rw-r--r-- 1 weblogic weblogic 218276 Jul 4 12:05 zac_solaris
[startWebLogic.sh]
# Set user-defined variables
JAVA_HOME=/usr/java
PRE_CLASSPATH=
Thanks, I set the NativeIO to false..... And hope that it gets ported....... -
Associating native calls with the calling object
I have a problem where calls into a native library need to retain data for subsequent method calls. Imagine the following two native methods (just imagine that the signature is write for JNI methods):
void initialise(int value)
// Stores the value somehow
void dosomething()
// Does something with the previously stored value
}If I was to store the value in a global variable, then it would be shared across all instance of the java class wouldnt it? So if object 1 called initialise, then object 2 called initialise, whichever of the objects then called dosomething, it would be based on the latest call to initialise.
How do I get around this sort of thing?
I currently work in C, though I would be quite happy to switch to C++ if necessary.
MossopI haven't used JNI_OnUnload, but may see why it isn't called. The doc says it runs in the finalizer for the classloader that loaded the library. Assuming this is the system (not custom) classloader, then its finalizer will never run because it gets gc'd only at shutdown, and finalizers don't run at shutdown by default. You could try calling Runtime.runFinalizersOnExit, but it's deprecated and sounds unsafe.
So my next idea would be to add a shutdown hook (Runtime.addShutdownHook) the first time one of your objects is constructed. The hook would call a native method to do the cleanup. Or since a shutdown hook is a Thread subclass, just make your overridden run() be the native cleanup function.
Of course this now requires keeping a native-side data structure to track the native objects, though I'd still vote for storing each native peer's pointer in a Java long field for fast dereference, and make this native data structure be a simple array or list (not map) for usage only by the cleanup logic.
Another idea is to clean up in a function called by the OS or C++ runtime when your library is unloaded, independent of Java. This could be DllMain (for Windows) or a C++ global object destructor.
-slj- -
Hi everybody,
Following is my problem --
i am working in linux environment with CLDC 1.0.4 and MIDP 2.0, downloaded from the sun site.
earlier i was using only cldc(kvm). For adding native code, i used to rebuild kvm adding .c files containing native functions in the given makefiles. And that was working fine. but i need to use midp classes, which i am not able to use by giving
KVM_HOME> kvm -classpath ../../api/classes:. testClass
i am not able to use midp classes from testClass, even if i specify it in classpath...
So, in order to use midp classes, i decided to rebuilt midp.. in midp makefiles i added .java files and corresponding .c files in SRC.. it is built without errors, but the entry of the new native function is not done in ROMjavaUnix.c or in nativeFunctionTable.c So, when i call the native function from the midlet, it obviously gives native function not found error..
I will be higly thankful to u, if u can help me in the same. There might be a point which i am missing.
Thanks and Regards,
ReteshHi,
I think following shd help u...
Following changes have been done in the MIDP RI 2.0 -
The classes containing the native function declarations are added to the MIDP_HOME/src/share/classes/
The corresponding C source files containing the native function definitions are added to MIDP_HOME/src/share/native/
In MIDP_HOME/build/share/makefiles/Defs.gmk the name of the C source file is added to variable MIDP_DEF_SRC
In MIDP_HOME/build/share/makefiles/Defs.gmk while defining variable MIDP_DEF_SOURCE, the name of the package (in our case urPackage) containing the class which contains the native function declaration is added as
MIDP_DEF_SOURCE:=$(shell find \
$(MIDP_DIR)/src/share/classes/java \
$(MIDP_DIR)/src/share/classes/javax \
$(MIDP_DIR)/src/share/classes/urpackage \
$(MIDP_DIR)/src/share/classes/com/sun/mmedia \
$(MIDP_DIR)/src/share/classes/com/sun/midp \
-name '*.java' | egrep -v 'midp/ssl|$(MIDP_EXCLUDE_CLASSES)')
In Defs.gmk (i don't remember the exact path)
when creating classes.zip the urPackage is given as
$(ZIP) -qr ../$@ java javax com urPackage);
Regards,
Retesh -
Need guidance on using ddi_regs_map_setup solaris system call
Hi all,
Am a beginner in using Sun Solaris.
I am working on porting our source code from linux to solaris.
In Linux we are using inb/outb to read/write to keyboard data port(0x60) .
I know that there is an equivalent system call for inb/outb in solaris. But in man page(of sun os) it is mentioned that inb/ outb are obsolete. It was mentioned that we can use ddi_get8/ddi_put8 functions respectively.
ddi_get8 call requires ddi_acc_handle_t as a parameter which we can get it from ddi_regs_map_setup system call.
Syntax for this call is:
int ddi_regs_map_setup(dev_info_t *dip, uint_t rnumber,
caddr_t *addrp, offset_t offset, offset_t len,
ddi_device_acc_attr_t accattrp, ddi_acc_handle_t handlep);
Please let me know where does the 0x60 port number fits in the above system call and what does these parameters rnumber, offset, len corresponds to ?Hi,
The Fault_PC 0x13575e8 tells you exactly where you
die. I assume you have used this in mdb on
the core file to find you are dying in the ddi_get8 call?
Are you checking return value of ddi_regs_map_setup?
Are you sure the register you are accessing is in register set 1?
Are there other places prior to the panic where
the ddi_get/ddi_put routines work correctly? A bus error
here generally means the location you are trying to access
does not exist on the device. (It could also be alignment,
but not with ddi_get8). The address
looks like 1fe.02001400, which looks like a possibly
valid address in I/O space.
I would print the value of wc->ioaddr to make sure
it is a valid virtual address.
Hi,
I'm in the middle of porting a device driver for a
PCI card from linux to solaris (it's wcfxo from
zaptel - part of asterisk).
>
WARNING: [AFT1] Bus Error on System Bus in privileged
mode from CPU0 Data access at TL=0, errID
0x0000000b.985ccf88
AFSR 0x00000000.84000000<PRIV,BERR> AFAR
AFAR 0x000001fe.02001400
AFSR.PSYND 0x0000(Score 05) AFSR.ETS 0x00
0x00 Fault_PC 0x13575e8
UDBH 0x0000 UDBH.ESYND 0x00 UDBL 0x0000
0000 UDBL.ESYND 0x00
panic[cpu0]/thread=2a10007dd40: [AFT1] errID
0x0000000b.985ccf88 BERR Error(s)
See previous message(s) for detailsThe actual code which seems to cause the panic is:
#define inb(a) ddi_get8(wc->devhandle, a)
ints = inb(wc->ioaddr + WC_INTSTAT);where there initialisation includes:
static struct ddi_device_acc_attr dev_attr = {
DDI_DEVICE_ATTR_V0,
DDI_STRUCTURE_LE_ACC,
DDI_STRICTORDER_ACC
ddi_regs_map_setup(wc->dip, 1, &wc->ioaddr, 0, 255,
&dev_attr,
&dev_attr, &wc->devhandle);I've tested the same card in a linux x86 box, and it
works fine, so I'm happy it's not a hardware
problem.
Any suggestions on what might be causing this?
Thanks,
Simon
Maybe you are looking for
-
Sony internet connection and aorport express
I have an airport express and am buying a Sony 40Z5100 which gets internet by connecting it to a wireless router. My airport express is obviously hooked up to my cable now. Will I be able to have an ethernet connection to my T.V, or is there only eth
-
Why does my app keep closing every time an adversities ment pops up??
Ever time an add pops up it cuts me out of a game what can I do to solve it it's an iPad
-
when i compile the home and remote interfaces java file i get an error cannot resolve symbol.it is not able to find the ejb.jar files.i ve included the j2eesdk1.3.1/lib/j2ee.jar in classspath but still it is not working.please help me.thanks in advan
-
CMC Services won't run - CR XI
Post Author: peachpx CA Forum: Authentication Hi - I just installed CR Server XI and none of the CMC services (CR Page Server , Destination Job Server, Event Server etc) are running and I can not make them to start. Please help.
-
ITunes crashes when I choose an artist
About 2 days ago, I started having a problem with iTunes on my Macbook Pro (mid 2010). Whenever I open iTunes, go into "Artists" and choose one, iTunes freezes and crashes a few seconds after I have no idea why this started to happen since I haven't