AccessControlException when using jnlp allpermissions on Solaris 10
Hi all,
A user of our free webstartable product yEd:
http://www.yworks.com/products/yed
running Solaris 10 x86:
$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
reports the following problem when launching our program:
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission com.sun.media.imageio.disableCodecLib read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
at java.lang.System.getProperty(System.java:627)
at java.lang.Boolean.getBoolean(Boolean.java:221)
at com.sun.media.imageioimpl.common.PackageUtil.isCodecLibAvailable(PackageUtil.java:70)
at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReaderSpi.onRegistration(CLibJPEGImageReaderSpi.java:70)
at javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:698)
at javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:285)
at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:183)
at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:117)
at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:138)
at javax.imageio.ImageIO.<clinit>(ImageIO.java:46)
It seems like ImageIO cannot be loaded on Solaris 10 because the SecurityManager prohibiting access to the System property "com.sun.media.imageio.disableCodecLib" although we have "allpermissions" declared in our jnl file:
http://www.yworks.com/products/yed/demo/yed.jnlp
Can anyone running Solaris 10 reproduce this behavior or does someone have a clue as to what is going wrong here. I don't want to believe it is a bug in Java Webstart on Solaris. After all using ImageIO shouldn't be that special.
regards - Sebastian
Sounds very much like http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6421652
Similar Messages
-
Revision: 20505
Revision: 20505
Author: [email protected]
Date: 2011-03-01 07:31:55 -0800 (Tue, 01 Mar 2011)
Log Message:
Bug: Watson #2818669 - AbstractAmfInput uses System.getProperty in Constructor leading to AccessControlException when using in Applet
QA: Yes
Doc: No
Checkintests: Didn't run - the change was to wrap the System.getProperty in a try/catch that would have caused the SecurityException, so no real functionality change that could affect the check-in tests.
Modified Paths:
blazeds/trunk/modules/core/src/flex/messaging/io/amf/AbstractAmfInput.java -
Accessing External Url using Http Utility | Error when using from Weblogic on Solaris
We are using Http Utility (http://jakarta.apache.org/commons/httpclient/) from
Apache for accessing external URL. A XML string is sent as POST parameter to the
URL and the response is also an XML string. The URL is accessed over HTTPS protocol.
I am setting the following parameters in the java class:
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
// set the property
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
The java class written to access the external URL using Http Utility works perfectly
fine when it is run from either the command line (of Windows or Solaris using
main() ) or from weblogic on windows. The same java class throws an exception
when run from Solaris instance of Weblogic
2003-09-30 11:02:12,411 FATAL [com.bp.beyondbp.presentation.userregistration.action.LloydsValidator]
EXCEPTION: com.bp.beyondbp.presentation.userregistration.exception.LlyodsValidationFailedException,
MESSAGE: Write Channel Closed, possible SSL handshaking or trust failure;
CAUSE: (java.io.IOException: Write Channel Closed, possible SSL handshaking or
trust failure)
at com.bp.beyondbp.presentation.userregistration.action.LloydsValidator.postXMLtoLloyd(LloydsValidator.java:243)
at com.bp.beyondbp.presentation.userregistration.action.LloydsValidator.validateLlyodsForNewUser(LloydsValidator.java:95)
at com.bp.beyondbp.presentation.userregistration.action.PreferencesActionForm.validate(PreferencesActionForm.java:326)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
java.io.IOException: Write Channel Closed, possible SSL handshaking or trust failure
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown
Source)
at com.certicom.tls.record.ReadHandler.interpretContent(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown
Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown
Source)
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1344)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:67)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:125)
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:779)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2179)
at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2534)
I tried to debug the problem by looking at system properties on windows and solaris,
the difference that I found was
On Windows
[exec] tModelInstanceInfo_description : com.sun.net.ssl.internal.www.protocol
On Solaris
[exec] tModelInstanceInfo_description : weblogic.utils|weblogic.tils|weblogic.net|weblogic.management
After this I changed the startWLS.sh on Solaris and set
-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol in java options.
On looking the system properties again, the output was
[exec] tModelInstanceInfo_description : com.sun.net.ssl.internal.www.protocol|weblogic.utils|weblogic.utils|weblogic.net|weblogic.management
But still the error is same. Can somebody help me out here as to what is going
wrong? Please find the java class attached for reference, please have a look at
postXMLtoLloyd() method in the class file..
[LloydsValidator.java]We are using Http Utility (http://jakarta.apache.org/commons/httpclient/) from
Apache for accessing external URL. A XML string is sent as POST parameter to the
URL and the response is also an XML string. The URL is accessed over HTTPS protocol.
I am setting the following parameters in the java class:
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
// set the property
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
The java class written to access the external URL using Http Utility works perfectly
fine when it is run from either the command line (of Windows or Solaris using
main() ) or from weblogic on windows. The same java class throws an exception
when run from Solaris instance of Weblogic
2003-09-30 11:02:12,411 FATAL [com.bp.beyondbp.presentation.userregistration.action.LloydsValidator]
EXCEPTION: com.bp.beyondbp.presentation.userregistration.exception.LlyodsValidationFailedException,
MESSAGE: Write Channel Closed, possible SSL handshaking or trust failure;
CAUSE: (java.io.IOException: Write Channel Closed, possible SSL handshaking or
trust failure)
at com.bp.beyondbp.presentation.userregistration.action.LloydsValidator.postXMLtoLloyd(LloydsValidator.java:243)
at com.bp.beyondbp.presentation.userregistration.action.LloydsValidator.validateLlyodsForNewUser(LloydsValidator.java:95)
at com.bp.beyondbp.presentation.userregistration.action.PreferencesActionForm.validate(PreferencesActionForm.java:326)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
java.io.IOException: Write Channel Closed, possible SSL handshaking or trust failure
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown
Source)
at com.certicom.tls.record.ReadHandler.interpretContent(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown
Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown
Source)
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1344)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:67)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:125)
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:779)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2179)
at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2534)
I tried to debug the problem by looking at system properties on windows and solaris,
the difference that I found was
On Windows
[exec] tModelInstanceInfo_description : com.sun.net.ssl.internal.www.protocol
On Solaris
[exec] tModelInstanceInfo_description : weblogic.utils|weblogic.tils|weblogic.net|weblogic.management
After this I changed the startWLS.sh on Solaris and set
-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol in java options.
On looking the system properties again, the output was
[exec] tModelInstanceInfo_description : com.sun.net.ssl.internal.www.protocol|weblogic.utils|weblogic.utils|weblogic.net|weblogic.management
But still the error is same. Can somebody help me out here as to what is going
wrong? Please find the java class attached for reference, please have a look at
postXMLtoLloyd() method in the class file..
[LloydsValidator.java] -
Problems with cursor and shortcuts when using JNLP services on MAC OS X
After invoking the JNLP services on a MAC I loose the ability to set the cursor and invoke keyboard shortcuts. On Windows this is not a problem, so I believe it is a bug and I have reported it to Apple. Meanwhile, I would appreciate if someone could help me with finding a work-around. To identify the problem run the following code with Java Web Start (i.e., you need to add the program to a jar and launch it using a JNLP script). You also need to include the javax.jnlp package.
Observe that the cursor changes to cross-hairs when entering the circle. After invoking the Open file menu item, the cursor does not change any longer. Shortcut key do not work either, but if you open the menu and close it again without selecting any of the menu items, the shortcuts are OK again.
package bugreport;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import javax.swing.*;
import javax.jnlp.*;
public class Demo2 extends JPanel implements Runnable, MouseMotionListener {
private int centerX = 100;
private int centerY = 100;
private int radius = 50;
public static void main(String[] args) {
SwingUtilities.invokeLater(new Demo2());
public void run() {
int menuMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
final JFrame frame = new JFrame("Bug Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setPreferredSize(new Dimension(200, 200));
addMouseMotionListener(this);
JMenuBar menuBar = new JMenuBar();
frame.setJMenuBar(menuBar);
//File menu
JMenu fileMenu = new JMenu("File");
fileMenu.setMnemonic('F');
menuBar.add(fileMenu);
//openMenuItem
JMenuItem openMenuItem = new JMenuItem("Open...");
openMenuItem.setMnemonic('O');
openMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, menuMask));
openMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
openFile();
fileMenu.add(openMenuItem);
frame.add(this);
frame.pack();
frame.setResizable(false);
frame.setVisible(true);
@Override
public void paintComponent(Graphics g) {
g.clearRect(0, 0, getWidth(), getHeight());
g.setColor(Color.BLUE);
g.fillOval(centerX - radius, centerY - radius, 2 * radius, 2 * radius);
public void mouseDragged(MouseEvent e) {
public void mouseMoved(MouseEvent e) {
int dx = e.getX() - centerX;
int dy = e.getY() - centerY;
if (dx * dx + dy * dy < radius * radius) {
setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
} else {
setCursor(Cursor.getDefaultCursor());
private void openFile() {
FileOpenService fos = null;
try {
fos = (FileOpenService) ServiceManager.lookup("javax.jnlp.FileOpenService");
} catch (UnavailableServiceException ex) {
JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
if (fos != null) {
try {
FileContents fc = fos.openFileDialog(null, null);
} catch (IOException ex) {
JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
}Edited by: James_Vagabond on Oct 29, 2009 9:35 AMBarbara, Thanks very much taking the time to respond to my posting. Your input and directions were just what I needed.I accessed the print settings in the pull down menu, setup the print options including the color profile for Elements and the Printer to sRGB, and printed my picture. This resolved all the invalid color problems I was having, but I did notice that there was a hint of magenta overall in the picture. I had read an article that said to use Canon Color Matching instead of Color Sync to prevent that but I couldn't make that change in the pull down menu. I tried in the Presets dialog box but that didn't appear to be possible. Should I make that change as well?
Also, in my travels through Elements 13 I notice under Edit->Color Settings that there were options for No Color Mgmt, Optimize for Screen, for Printing, or ability to chose one or the other (real time I assume). How do those options fit into this scenario?
Thanks again -
Client does not connect with the webservice no more when using jnlp
Hello
I am experiencing an issue, apparently only when i am trying to use my application from java web start
I have a server/client application that works well when run.
When trying to start the client using a .jnlp file (server allready being turned on) i stumbled upon an exception:
org.apache.axis2.AxisFault: Error during encryption
any help will be greately appreciated
thank youAppears to be an Apache product fault , not a Java problem. Try Apache w/s.
-
Linkage error when using XDK 9i on Solaris
I have XDK 9i installed on my host and I'm trying to use xml parser class.
================
SunOS btXXXXXX 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-Enterprise-10000
I use Forte6 Sun workshop
I add $ORACLE_HOME$/xdk/include directory path
I add user lib :core9 xml9 xmlg9 xsd9 unls9 nls9
I select standard libraries : socket nsl
the source code is quite basic:
// main.cc
#include "oraxml.hpp"
int main()
XMLParser parser;
parser.xmlterm();
return 0;
BUT when linking I get this kind of errors:
ild: (undefined symbol) SltsPrUnlock -- referenced in the text segment of
/u01/app/oracle/product/9201/lib/libnls9.a(lmsagb.o)
undefined symbols are this :
- sltsini
- sltsmxd
- lxujmd
- sltsmnr
- slmaacb
- SltsPrUnLock
and all are referenced in libnls9.a
Can anybody help us.
Thanks,
CMI have XDK 9i installed on my host and I'm trying to use xml parser class.
================
SunOS btXXXXXX 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-Enterprise-10000
I use Forte6 Sun workshop
I add $ORACLE_HOME$/xdk/include directory path
I add user lib :core9 xml9 xmlg9 xsd9 unls9 nls9
I select standard libraries : socket nsl
the source code is quite basic:
// main.cc
#include "oraxml.hpp"
int main()
XMLParser parser;
parser.xmlterm();
return 0;
BUT when linking I get this kind of errors:
ild: (undefined symbol) SltsPrUnlock -- referenced in the text segment of
/u01/app/oracle/product/9201/lib/libnls9.a(lmsagb.o)
undefined symbols are this :
- sltsini
- sltsmxd
- lxujmd
- sltsmnr
- slmaacb
- SltsPrUnLock
and all are referenced in libnls9.a
Can anybody help us.
Thanks,
CM -
AccessControlException when using nanoXML :-(
I am now doing some xml parsing in MHP box with nanoXML. There is exception below:
java.security.AccessControlException: access denied (java.util.PropertyPermission net.n3.nanoxml.XMLParser read)
at java.security.AccessControlContext.checkPermission(Ljava/security/Permission;)V(Unknown Source)
at java.security.AccessController.checkPermission(Ljava/security/Permission;)V(Unknown Source)
at java.lang.SecurityManager.checkPermission(Ljava/security/Permission;)V(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Ljava/lang/String;)V(Unknown Source)
at java.lang.System.getProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;(Unknown Source)
at net.n3.nanoxml.XMLParserFactory.createDefaultXMLParser()Lnet/n3/nanoxml/IXMLParser;(XMLParserFactory.java:76)
and it comes from the source of nanoXML in System.getProperty method:
* Creates a default parser.
* @see #DEFAULT_CLASS
* @see #CLASS_KEY
* @return the non-null parser.
* @throws java.lang.ClassNotFoundException
* if the class of the parser or validator could not be found.
* @throws java.lang.InstantiationException
* if the parser could not be created
* @throws java.lang.IllegalAccessException
* if the parser could not be created
public static IXMLParser createDefaultXMLParser()
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
String className = System.getProperty(XMLParserFactory.CLASS_KEY,
XMLParserFactory.DEFAULT_CLASS);
return XMLParserFactory.createXMLParser(className,
new StdXMLBuilder());
has anyone ever seen this? I have no idea why this.
Thanks in advance!Yes I'm using Vidiom Systems Tools "VIsion Workbench" Software. It is a Eclipse Enviroment modified.
URL url =null;
try{
url = new URL("http://localhost:8080/movies_xml2.xml");
URLConnection connection = url.openConnection();
IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
IXMLReader reader = new StdXMLReader(connection.getInputStream());
parser.setReader(reader);
// Read file and parse it!
IXMLElement xmlDoc = (IXMLElement) parser.parse();
// Get the tag called
IXMLElement node = xmlDoc.getFirstChildNamed("datalist");
System.out.println("");
Enumeration books = node.enumerateChildren();
while (books.hasMoreElements())
book = (IXMLElement) books.nextElement();
System.out.println("GeneroID : " + book.getAttribute("GENREID", ""));
System.out.println("MovieID : " + book.getAttribute("MOVIEID", "unknown"));
catch (Exception e)
e.printStackTrace();
}Regards and Thanks -
App crash when using JAVA callbacks from native threads in solaris
Hi all,
Sorry for putting the thread here. I did use the native methods forum, I wasnt lucky. I Hope more people would look into this forum, which brings me here.
I have a solaris application which crashes when I try to callback the JAVA methods and variables from the native code. The description of the problem is below
Written a native library, the library is multithreaded (i.e) I create a thread using pthread_create() in the native code which performs the operation of calling a JAVA method from the native code. The routine of calling the JAVA method works perfectly elsewhere outside the new thread.
There are two scenarios I've tested it in
1. I created a thread (say X) from the main thread (say Y) and made the y to wait until the X is complete using the pthread_join(). The JAVA callbacks works fine when called from Y but the app crashes if done from X.
2. Did not make the Y to wait until the X is complete, hoping that both will run paralelly and even the the App crashes.
And to be precise the Y is the thread where the native method is called from JAVA.
I have tested for any memory leaks or stack corruption by removing the JAVA callbacks and bulding a executable and using purify, the report doesnot hint any such occurances.
The linker options used for building the shared library is as follows
${GPP} ${INC} -G ${LIB} -mt -g -lCstd -lCrun -lpthread ${OBJS} -o <lib-name>
I wonder if we can create threads in the native code when using JAVA callbacks and even if we can whether it would be appropiate to use the callbacks with in the threads
Looking forward for any help.
Regards,
VamsiGuys... can't any one help me with this problem :(
-
How to get the displayID when using X-window to access solaris server?
I want to get the displayID in my programme when use X-window to access solaris on the server,but i don't know which the API in java?Somebody can tell me?
Thanks.Try deleting the Server.app and download it again from the App Store, restart.
My Server is also using self signed certificates and is working with iOS device (Trust Profile needed first). -
Application crashes when using JNI with Jdk 1,2, 1.3 and 1.4
Hi!
I have this application that has a GUI written in Java and a file parser written in C. JNI is used to connect these parts together. The problem is that the application only works when I am using jdk 1.1.8 but not when using jdk1.2, jdk1.3 or jdk1.4. I am running the application on a Solaris 8 machine.
I have not written the application myself but I am going to be working with it from now on. But I have today little knowledge with JNI and I have tried different approaches to solve the problem. For example I have tried to used DDD together with GDB to find out what the problem is but with no luck. When I run the application using jdk1.4 I get the following error when the JVM crashes:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 10 occurred at PC=0xFA023164
Function=Java_Bitmap_setDebug+0x1C
Library=/usr/u/lal/micview/micview2_1_0_beta1/libBitmapImpl.so
Current Java thread:
at Bitmap.setDebug(Native Method)
at DisplayPanel.loadFile(DisplayPanel.java:396)
at MicPlot.loadFile(MicPlot.java:1452)
at MicPlot.loadFile(MicPlot.java:1441)
at MicPlot.miOpen_Action(MicPlot.java:1267)
at MicPlot$SymAction.actionPerformed(MicPlot.java:1184)
at java.awt.MenuItem.processActionEvent(MenuItem.java:588)
at java.awt.MenuItem.processEvent(MenuItem.java:548)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:285)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:273)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:452)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Dynamic libraries:
0x10000 /opt/java/jdk1.4/bin/java
0xff360000 /usr/lib/libthread.so.1
0xff3a0000 /usr/lib/libdl.so.1
0xff280000 /usr/lib/libc.so.1
0xff270000 /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
0xfe000000 /opt/java/j2sdk1.4.1/jre/lib/sparc/client/libjvm.so
0xff220000 /usr/lib/libCrun.so.1
0xff200000 /usr/lib/libsocket.so.1
0xff100000 /usr/lib/libnsl.so.1
0xff1d0000 /usr/lib/libm.so.1
0xff250000 /usr/lib/libw.so.1
0xff0e0000 /usr/lib/libmp.so.2
0xff0b0000 /opt/java/j2sdk1.4.1/jre/lib/sparc/native_threads/libhpi.so
0xff080000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libverify.so
0xff030000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libjava.so
0xfe7e0000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libzip.so
0xfe4e0000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
0xedd00000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libawt.so
0xfc480000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libmlib_image.so
0xfc410000 /opt/java/j2sdk1.4.1/jre/lib/sparc/motif21/libmawt.so
0xeda80000 /usr/dt/lib/libXm.so.4
0xfa090000 /usr/openwin/lib/libXt.so.4
0xfa3d0000 /usr/openwin/lib/libXext.so.0
0xfc7e0000 /usr/openwin/lib/libXtst.so.1
0xed980000 /usr/openwin/lib/libX11.so.4
0xfa2a0000 /usr/openwin/lib/libdps.so.5
0xfa3b0000 /usr/openwin/lib/libSM.so.6
0xfa1d0000 /usr/openwin/lib/libICE.so.6
0xed880000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libfontmanager.so
0xfa390000 /usr/openwin/lib/locale/common/xlibi18n.so.2
0xfa1b0000 /usr/openwin/lib/locale/iso8859-1/xomEuro.so.2
0xfa190000 /usr/lib//liblayout.so
0xfa050000 /usr/openwin/lib/locale/common/ximlocal.so.2
0xfa010000 /usr/u/lal/micview/micview2_1_0_beta1/libBitmapImpl.so
Local Time = Thu Oct 3 13:32:47 2002
Elapsed Time = 35
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.4.1-beta-b14 mixed mode)
# An error report file has been saved as hs_err_pid27692.log.
# Please refer to the file for further information.
Abort
From this information I think that the problem should be in the native method setDebug. But I have tried to set a breakpoint at the beginning of that function in the C part but with no luck. The application crashes before it reaches that position in the C file.
What could possibly go wrong between the setDebug function in the C part and the function call in the Java part?
When using GDB, GDB cannot figure out what is wrong it just returns a hex address, no function name.
I would really appreciate some help. I have tried everything that I can come up with!
Best regards
LarsI have figured out that the application fails on its first call to the native methods.
So I have this Bitmap class that contains all the native calls and it is defined shortly as follow:
public class Bitmap {
static {
System.loadLibrary("BitmapImpl");
native void setDebug(int debuglevel, int statistics);
There are many more native methods defined in Bitmap, but I only show the setDebug method because that is the first one that is executed and also the one that immediately fails.
My setDebug C function is defined as follow in BitmapImpl.c
#include <time.h>
#include <stdio.h>
#include <limits.h>
#include <fcntl.h>
#include <jni.h>
#include <math.h>
#include <errno.h>
#include "Bitmap.h"
#include "data.h"
jint debug = 0;
jint statistics = 1;
JNIEXPORT void JNICALL Java_Bitmap_setDebug
(JNIEnv *jenv, jobject jo, jint d, jint s)
debug = d;
statistics = s;
My libBitmapImpl.so file is compiled using the following Makefile and using GNU gcc:
JAVAPATH=$(JAVAINCLUDEPATH)
LMACRO=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSOLARIS
CSOURCE=BitmapImpl.c
all:
gcc -O3 -G $(LMACRO) -I$(JAVAPATH) -I$(JAVAPATH)/solaris \
$(CSOURCE) -o libBitmapImpl.so
It is still a total mystory why the application fails. I have tried it on a RedHat Linux machine and there it works fine. But not on Solaris. Only if I use the jdk1.1.8 but not a later one.
Would really appreiciate some help!
Best regards
Lars -
How to blank laptop screen when using external monitor/
Hi there
I need some help with figuring out how to configure my xorg.conf for my Arch Linux 64 bit installation on a HP Pavilion dv 5000 laptop so that I can automatically blank my laptop screen when using an external monitor. I have Arch Linux installed along with Ubuntu Feisty. In Ubuntu my external monitor (Viewsonic 1912WB) was not detected at the time of installation but with the native 1280X800 resolution that is good for the laptop takes effect for the external monitor automatically when the external monitor is plugged in. The laptop monitor goes blank when the external monitor is plugged in.
In my Arch Linux installation I have not been able to configure a dual head configuration using the ATI Radeon drivers (fglrx). I have the native 1280X800 resolution set up for the laptop monitor and this resolution takes effect for the external monitor also. However the laptop monitor also continues to function when the external monitor is plugged in. I would like to blank the laptop monitor when using the external monitor.
I am attaching my Arch Linux xorg.conf and the Ubuntu xorg.conf below. Thanks for anyone who can help, I am having a lot of difficulty in figuring out how to set up xorg.conf among all the things that I have had to learn so far in Linux and I am a relative newcomer to the whole thing. I have tried to compare the two xorg.conf files and edit my Arch xorg.conf in accordance with the Ubuntu one but it did not work and I keep getting errors!
I am using XFCE as my Desktop environment.
Arch Linux xorg.conf
# File generated by xorgconfig.
# Copyright 2004 The X.Org Foundation
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# The X.Org Foundation BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Except as contained in this notice, the name of The X.Org Foundation shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from
# The X.Org Foundation.
# Refer to the xorg.conf(5) man page for details about the format of
# this file.
# Module section -- this section is used to specify
# which dynamically loadable modules to load.
# Files section. This allows default font and rgb paths to be set
# Server flags section.
# Input devices
# Core keyboard's InputDevice section
# Core Pointer's InputDevice section
# Other input device sections
# this is optional and is required only if you
# are using extended input devices. This is for example only. Refer
# to the xorg.conf man page for a description of the options.
# Section "InputDevice"
# Identifier "Mouse2"
# Driver "mouse"
# Option "Protocol" "MouseMan"
# Option "Device" "/dev/mouse2"
# EndSection
# Section "InputDevice"
# Identifier "spaceball"
# Driver "magellan"
# Option "Device" "/dev/cua0"
# EndSection
# Section "InputDevice"
# Identifier "spaceball2"
# Driver "spaceorb"
# Option "Device" "/dev/cua0"
# EndSection
# Section "InputDevice"
# Identifier "touchscreen0"
# Driver "microtouch"
# Option "Device" "/dev/ttyS0"
# Option "MinX" "1412"
# Option "MaxX" "15184"
# Option "MinY" "15372"
# Option "MaxY" "1230"
# Option "ScreenNumber" "0"
# Option "ReportingMode" "Scaled"
# Option "ButtonNumber" "1"
# Option "SendCoreEvents"
# EndSection
# Section "InputDevice"
# Identifier "touchscreen1"
# Driver "elo2300"
# Option "Device" "/dev/ttyS0"
# Option "MinX" "231"
# Option "MaxX" "3868"
# Option "MinY" "3858"
# Option "MaxY" "272"
# Option "ScreenNumber" "0"
# Option "ReportingMode" "Scaled"
# Option "ButtonThreshold" "17"
# Option "ButtonNumber" "1"
# Option "SendCoreEvents"
# EndSection
# Monitor section
# Any number of monitor sections may be present
# Graphics device section
# Any number of graphics device sections may be present
# Standard VGA Device:
# Device configured by xorgconfig:
# Screen sections
# Any number of screen sections may be present. Each describes
# the configuration of a single screen. A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
# ServerLayout sections.
# Any number of ServerLayout sections may be present. Each describes
# the way multiple screens are organised. A specific ServerLayout
# section may be specified from the X server command line with the
# "-layout" option. In the absence of this, the first section is used.
# When now ServerLayout section is present, the first Screen section
# is used alone.
# Section "DRI"
# Mode 0666
# EndSection
Section "ServerLayout"
# The Identifier line must be present
# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens. The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen. In this example, screen 2 is located to the
# right of screen 1.
# Each InputDevice line specifies an InputDevice section name and
# optionally some options to specify the way the device is to be
# used. Those options include "CorePointer", "CoreKeyboard" and
# "SendCoreEvents".
Identifier "Simple Layout"
Screen 0 "aticonfig-Screen[0]" 0 0
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "Files"
# The location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# RgbPath "/usr/share/X11/rgb"
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
# FontPath "/usr/share/fonts/TTF"
# FontPath "/usr/share/fonts/Type1"
# FontPath "/usr/lib/X11/fonts/local/"
# FontPath "/usr/lib/X11/fonts/misc/"
# FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
# FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
# FontPath "/usr/lib/X11/fonts/Speedo/"
# FontPath "/usr/lib/X11/fonts/Type1/"
# FontPath "/usr/lib/X11/fonts/TrueType/"
# FontPath "/usr/lib/X11/fonts/freefont/"
# FontPath "/usr/lib/X11/fonts/75dpi/"
# FontPath "/usr/lib/X11/fonts/100dpi/"
# The module search path. The default path is shown here.
# ModulePath "/usr/lib/modules"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/75dpi:unscaled"
EndSection
Section "Module"
# This loads the DBE extension module.
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
# This loads the font modules
# Load "type1"
# This loads the GLX module
# Load "glx"
# This loads the DRI module
# Load "dri"
Load "dbe" # Double buffer extension
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection
Load "freetype"
# Load "xtt"
EndSection
Section "InputDevice"
# For most OSs the protocol can be omitted (it defaults to "Standard").
# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),
# uncomment the following line.
# Option "Protocol" "Xqueue"
# Option "Xleds" "1 2 3"
# Option "LeftAlt" "Meta"
# Option "RightAlt" "ModeShift"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc105"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# These are the default XKB settings for Xorg
# Option "XkbRules" "xorg"
# Option "XkbModel" "pc105"
# Option "XkbLayout" "us"
# Option "XkbVariant" ""
# Option "XkbOptions" ""
# Option "XkbDisable"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "500 30"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
# Identifier and driver
# the following line.
# Option "Protocol" "Xqueue"
# Mouse-speed setting for PS/2 mouse.
# Option "Resolution" "256"
# Baudrate and SampleRate are only for some Logitech mice. In
# almost every case these lines should be omitted.
# Option "BaudRate" "9600"
# Option "SampleRate" "150"
# Mouse wheel mapping. Default is to map vertical wheel to buttons 4 & 5,
# horizontal wheel to buttons 6 & 7. Change if your mouse has more than
# 3 buttons and you need to map the wheel to different button ids to avoid
# conflicts.
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)
# Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"
# ChordMiddle is an option for some 3-button Logitech mice
# Option "ChordMiddle"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "Auto" # Auto detect
Option "Device" "/dev/input/mice"
# When using XQUEUE, comment out the above two lines, and uncomment
Option "ZAxisMapping" "4 5 6 7"
# Emulate3Buttons is an option for 2-button mice
EndSection
Section "Monitor"
# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
# HorizSync 30-64 # multisync
# HorizSync 31.5, 35.2 # multiple fixed sync frequencies
# HorizSync 15-25, 30-50 # multiple ranges of sync frequencies
# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
Identifier "My Monitor"
HorizSync 30.0 - 62.0
VertRefresh 50.0 - 70.0
EndSection
Section "Monitor"
Identifier "aticonfig-Monitor[0]"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection
Section "Device"
# The chipset line is optional in most cases. It can be used to override
# the driver's chipset detection, and should not normally be specified.
# Chipset "generic"
# The Driver line must be present. When using run-time loadable driver
# modules, this line instructs the server to load the specified driver
# module. Even when not using loadable driver modules, this line
# indicates which driver should interpret the information in this section.
# The BusID line is used to specify which of possibly multiple devices
# this section is intended for. When this line isn't present, a device
# section can only match up with the primary video device. For PCI
# devices a line like the following could be used. This line should not
# normally be included unless there is more than one video device
# intalled.
# BusID "PCI:0:10:0"
# VideoRam 256
# Clocks 25.2 28.3
Identifier "Standard VGA"
Driver "vga"
VendorName "Unknown"
BoardName "Unknown"
EndSection
Section "Device"
#VideoRam 131072
# Insert Clocks lines here if appropriate
Identifier "* Generic VESA compatible"
Driver "vesa"
EndSection
Section "Device"
Identifier "aticonfig-Device[0]"
Driver "fglrx"
EndSection
Section "Screen"
Identifier "Screen 1"
Device "* Generic VESA compatible"
Monitor "My Monitor"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 8
Modes "1280x800" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1280x800" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" "800x600" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "aticonfig-Screen[0]"
Device "aticonfig-Device[0]"
Monitor "aticonfig-Monitor[0]"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Ubuntu xorg.conf
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Files"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "Device"
Identifier "ATI Technologies Inc ATI Radeon XPRESS 200M 5955 (PCIE)"
Driver "ati"
BusID "PCI:1:5:0"
EndSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies Inc ATI Radeon XPRESS 200M 5955 (PCIE)"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x800"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x800"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection
Section "DRI"
Mode 0666
EndSectionXrandr 1.2 provides means for this. But today the only supported configuration is xorg-server-1.3 + xf86-video-intel-2.0. So for Radeon you'll have to wait for drivers that support Randr 1.2.
On my laptop (Thinkpad x60s) that would be:
xrandr --output VGA --auto
xrandr --output LVDS --off -
App crash when using JNI callbacks
Hi all,
I have a solaris application which crashes when I try to callback the JNI methods from the native code. The description of the problem is below
Written a native library, the library is multithreaded (i.e) I create a thread using pthread_create() in the native code which performs the operation of calling a JAVA method from the native code. The routine of calling the JAVA method works perfectly from elsewhere.
There are two scenarios I've tested it in
1. I created a thread (say X) from the main thread (say Y) and made the y to wait until the X is complete using the pthread_join(). The JAVA callbacks work fine when called from Y but the app crashes if done from X.
2. Did not make the Y to wait until the X is complete, hoping that both will run paralelly and even the the App crashes.
And to be precise the Y is the thread where the native method is called from JAVA.
I have tested for any memory leaks or stack corruption by removing the JAVA callbacks and bulding a executable and using purify, the report doesnot hint any such occurances.
The linker options used for building the shared library is as follows
${GPP} ${INC} -G ${LIB} -mt -g -lCstd -lCrun -lpthread ${OBJS} -o <lib-name>
I wonder if we can create threads in the native code when using JAVA callbacks and even if we can whether it would be appropiate to use the callbacks with in the threads
Looking forward for any help.
Regards,
VamsiGuys... can't any one help me with this problem :(
-
How do can I use Jumpstart to boot Solaris from Slave Drive
Hi all,
I have XP on Master Drive and I used Jumpstart to install Solaris on Slave Drive.
This is the profile:
install_type initial_install
system_type standalone
usedisk c0d1
boot_device c0d1 update
root_device c0d1s0
fdisk c0d1 solaris all
partitioning explicit
filesys c0d1s0 10000 /
filesys c0d1s1 1111 swap
filesys c0d1s7 free /export/home
cluster SUNWCreq
Now, I specified that the boot_device is c0d1 but after the installation the boot device is c0d0 which is my Master Drive...
...when I use Windows Boot Manager to boot Solaris... it cannot find the boot files on the master drive so it runs the DCA...
... so under the DCA I have to tell Solaris that the boot files are in my Slave Drive then I save it.
...I don't want to make this change everytime
any ideas that would make this install hands free?...don't know the answer to that but here is an alternative:
... use this as your finish script
... it changes the bootpath in bootenv.rc to point to the slave drive
#!/usr/bin/perl
open(INFILE,"/a/boot/solaris/bootenv.rc");
open(OUTFILE,">/a/boot/solaris/bootenv.rc_out");
while(<INFILE>) {
chomp;
#--cmdk@0,0 is the master drive
#--cmdk@1,0 is the slave drive
s/cmdk\@0\,0/cmdk\@1\,0/g;
print OUTFILE "$_\n";
#...replace bootenv.rc_out with bootenv.rc
...happy programming -
Errors found when using tar and ACL's
Having difficulties with TAR and ACLs, and wondering if anyone had seen this before.
Here's the scenario: create a few directories and a few files. Tar it up and extract the files. Now assign some ACL's to them (some default for directories), tar it up, and extract the files. Permissions should remain the same. Under most circumstances they are.
Now repeat the procedure, but put a default directory ACL on the parent directory where the TAR is created. What happens is that the group permissions for anything un-tared gets trashed.
Here's a script to test it out.
Create a dummy user (I called mine foobar) -- required for setting ACL's. Run the script with the "-d" option at first. Things appear good. You can compare the permissions on the bottom for each file/directory.
Run the script with the "-s" option setting default ACL's on the parent.
#!/usr/bin/sh
ROOTDIR=/export/home/christian/config
TESTDIR=/export/home/christian
USER_X="oam"
# Run the script once with normal permissions (no ACL's) in the test directory (where tar is located)
# --> ./test.sh -d
# look at the result (ls -l) of .../sub1dir, .../sub1dir_acl, and /sub1dir_orig
# They should be relatively the same:
# --> rwxrwxrwx permissions on directories
# --> rw-rw-rw- on files
# Now run the script but set the parent directory of the script (where the TAR's are located) to have default ACL's
# --> /opt/MMSsyscnf/sub2dir/test/test.sh -s
# Now look at the result (ls -l) of .../sub1dir, .../sub1dir_acl, and /sub1dir_orig
# They are COMPLETELY skewed. Both times we tried to untar the files, ACL's wound up
# all over the place and permissions were not set correctly.
# --> rwxrwxrwx permissions ONLY on original directory (not the product of an UNTAR)
# --> rwxr--rwx permissions on directories created by untar
# --> rw-rw-rw- on files ONLY on original directory (not the product of an UNTAR)
# --> rw-r--rw- on files created by untar
# ****** Why is group affected by this, but "other" is not?! It's gotta be a bug!
# MAIN
ACTION="NOPREP"
while [ -n "$1" ]
do
if [ "ABC$1" = "ABC-d" ]; then
#flag set to try and remove default directory ACL's
setfacl -d u:$USER_X $TESTDIR
setfacl -d d:u:$USER_X $TESTDIR
setfacl -d d:u::,d:g::,d:m:,d:o: $TESTDIR
elif [ "ABC$1" = "ABC-s" ]; then
setfacl -r -m d:u::rw-,d:g::r--,d:o:---,d:m:rwx $TESTDIR
setfacl -r -m d:u:$USER_X:rw- $TESTDIR
setfacl -r -m u:$USER_X:r-x $TESTDIR
fi
shift;
done
# clean up previous run of the test
rm -r $ROOTDIR
# create files/directories
mkdir $ROOTDIR
mkdir $ROOTDIR/sub1dir
mkdir $ROOTDIR/sub1dir/sub2dir
mkdir $ROOTDIR/sub1dir/sub2dir/sub3dir
#set permissions
chmod 777 $ROOTDIR
chmod 777 $ROOTDIR/sub1dir
chmod 777 $ROOTDIR/sub1dir/sub2dir
chmod 777 $ROOTDIR/sub1dir/sub2dir/sub3dir
# create files
echo "" > $ROOTDIR/sub1dir/sub2dir/file1.txt
echo "" > $ROOTDIR/sub1dir/sub2dir/sub3dir/file2.txt
chmod 666 $ROOTDIR/sub1dir/sub2dir/file1.txt
chmod 666 $ROOTDIR/sub1dir/sub2dir/sub3dir/file2.txt
# tar/zip the files:
/usr/bin/tar -cvf $ROOTDIR/tarBeforeACLs.tar $ROOTDIR/sub1dir
/usr/bin/gzip $ROOTDIR/tarBeforeACLs.tar
# move the directory (so we keep the original as a template of what things should look like)
mv $ROOTDIR/sub1dir $ROOTDIR/sub1dir_orig
# untar/zip the files:
/usr/bin/gunzip $ROOTDIR/tarBeforeACLs.tar
/usr/bin/tar -xvf $ROOTDIR/tarBeforeACLs.tar
ls -lR $ROOTDIR
# Ok. These have been tested to be the exact same.
echo "********************************************************************************"
echo "********************************************************************************"
echo "********************************************************************************"
# Let's try using ACL's now
# --> directories (owned by root) must be acessible to OAM user.
# --> files (owned by root) must be read/writable by user OAM when created in the directories
setfacl -r -m u:$USER_X:r-x $ROOTDIR/sub1dir
setfacl -r -m u:$USER_X:r-x $ROOTDIR/sub1dir/sub2dir
setfacl -r -m u:$USER_X:r-x $ROOTDIR/sub1dir/sub2dir/sub3dir
setfacl -r -m u:$USER_X:rw- $ROOTDIR/sub1dir/sub2dir/file1.txt
setfacl -r -m u:$USER_X:rw- $ROOTDIR/sub1dir/sub2dir/sub3dir/file2.txt
setfacl -r -m d:u::rw-,d:g::r--,d:o:---,d:m:rwx $ROOTDIR/sub1dir
setfacl -r -m d:u:$USER_X:rw- $ROOTDIR/sub1dir
setfacl -r -m d:u::rw-,d:g::r--,d:o:---,d:m:rwx $ROOTDIR/sub1dir/sub2dir
setfacl -r -m d:u:$USER_X:rw- $ROOTDIR/sub1dir/sub2dir
setfacl -r -m d:u::rw-,d:g::r--,d:o:---,d:m:rwx $ROOTDIR/sub1dir/sub2dir/sub3dir
setfacl -r -m d:u:$USER_X:rw- $ROOTDIR/sub1dir/sub2dir/sub3dir
# here are things as they stand
ls -lR $ROOTDIR
echo "********************************************************************************"
echo "********************************************************************************"
echo "********************************************************************************"
# tar/zip the files:
/usr/bin/tar -cvfp $ROOTDIR/tarAfterACLs.tar $ROOTDIR/sub1dir
/usr/bin/gzip $ROOTDIR/tarAfterACLs.tar
# move the directory (so we keep the directory that was applied ACL's)
mv $ROOTDIR/sub1dir $ROOTDIR/sub1dir_acl
# untar/zip the files:
/usr/bin/gunzip $ROOTDIR/tarAfterACLs.tar
/usr/bin/tar -xvfp $ROOTDIR/tarAfterACLs.tar
# here are things after we've untared them
ls -lR $ROOTDIR
echo "********************************************************************************"
echo "********************************************************************************"
echo "********************************************************************************"
getfacl $ROOTDIR/sub1dir_orig $ROOTDIR/sub1dir_acl $ROOTDIR/sub1dir
echo "********************************************************************************"
getfacl $ROOTDIR/sub1dir_orig/sub2dir $ROOTDIR/sub1dir_acl/sub2dir $ROOTDIR/sub1dir/sub2dir
echo "********************************************************************************"
getfacl $ROOTDIR/sub1dir_orig/sub2dir/sub3dir $ROOTDIR/sub1dir_acl/sub2dir/sub3dir $ROOTDIR/sub1dir/sub2dir/sub3dir
echo "********************************************************************************"
getfacl $ROOTDIR/sub1dir_orig/sub2dir/file1.txt $ROOTDIR/sub1dir_acl/sub2dir/file1.txt $ROOTDIR/sub1dir/sub2dir/file1.txt
echo "********************************************************************************"
getfacl $ROOTDIR/sub1dir_orig/sub2dir/sub3dir/file2.txt $ROOTDIR/sub1dir_acl/sub2dir/sub3dir/file2.txt $ROOTDIR/sub1dir/sub2dir/sub3dir/file2.txt
echo "********************************************************************************"
Any ideas?UFSDUMP has some limitations, including being on a file system that is read-only. Yes, I could force it on a read-write FS, but I normally stay away from big sticker labels found in man pages when I encounter them. :-(
What I was originally after was a script that makes a backup of application configuration files before I modify them. Thus, I tar/zip the directory.
These config files/directores have ACL's attached to them to allow various roles to access them (group permissions are not fine-grain enough). However, when I ran through a couple of tests, I came across a scenario that overwrote the original permissions. Tested it on Solaris 10 and Solaris 9, and both fail.
So now (very late into the feature design) I'm VERY concerned about using ACL's on Solaris, and wonder what other side-effects there are that I'm not aware of. Can't seem to find a bug report on it, so I thought I'd ask around to see if it was just the behaviour of the TAR/ACL that I'm not quite getting, or if it really is a bug.
/chris -
Use of strstr() in solaris 2.8
Hi,
I have tried to use the strstr() when developing driver driver in solaris 8 environment and compile using Forte C compiler but it can't work. My system will crash whenever I run my program. Anybody have any idea how to solve this problem.
Thanks.Hi There,
All components for Solaris 8 were built using the WS 5.0 compiler and compiling a driver with a different compiler is not supported and not good software practice...
A Common Build Environment document which spells
out what compiler is used to build each component of the Solaris release. This is to make sure that the Release Team can, at any time, reproduce the exact
code for the entire release...
You are using Forte 6 compiler to biuld the kernel module.
I suggest you refer to the Solaris 8 Developer Collection and refer Writing Device Driver's
Compiling, Loading, Packaging, and Testing Drivers Module.
.....jagruti
Developers Technical Support
Sun Microsystems, http://www.sun.com/developers/support
Maybe you are looking for
-
Tiger / Compressor 1.2.1 and MPEG-2 output - How to avoid jumpy video.
This post is to summarise my experience with compressor and mpeg2 transcoding in the hope that it will save someone else time and help them avoid similar problems. I recently transcoded a series of mpeg2 files to a lower compression setting using com
-
While installing Addons there is error An error was made to load a program
An error was made to load a program with an incorrect format in window server2008 R2 (64 bit) Edited by: Rakeshbos on Feb 9, 2010 11:25 AM
-
Skype does NOT start up with Windows
When I boot up Windows, Skype refuses to load with it even though it is enabled to do so in the Skype settings. Windows 7 Skype 6.21.0.104 Solutions tried: removing and reinstalling Skype and checking/unchecking the Start Skype with Windows checkbox.
-
Installing CS 5.5 applications on 2 pc laptops
I use Indesign and Photoshop CS 5.5 all the time, but not the other apps in the suite. My daughter is into animation and I would like to install Adobe Flash and Illustrator on her laptop, even if it means deinstalling it from mine. How would I do thi
-
I am using a case statement in the following script, so that I can return two seperate columns in my item master query, one for Frozen Cost and one for Actual Cost. I am having trouble with the else close. If the records for frozen are other then fro