HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- JAVA 141 on OpenVMS
Operating System - OpenVMS
1828342
Members
3238
Online
109976
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2003 03:02 AM
07-24-2003 03:02 AM
JAVA 141 on OpenVMS
The following java code runs fine under W2K, but generates an exception unter VMS 7.3-1, latest Patch level, JAVA 141 ...
import java.util.Iterator;
import java.net.InetSocketAddress;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
public class select {
public static void main(String[] args) {
try {
int timeout = 1000;
Selector selector = Selector.open();
ServerSocketChannel ssc = ServerSocketChannel.open();
ssc.configureBlocking(false);
InetSocketAddress isa = new InetSocketAddress( 4711);
ssc.socket().bind( isa, 1);
ssc.register( selector, SelectionKey.OP_ACCEPT);
selector.select(timeout); // <----- Generates Exception
Iterator it = selector.selectedKeys().iterator();
while (it.hasNext()) {
it.remove();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
java.io.IOException: socket operation on non-socket
at sun.nio.ch.PollArrayWrapper.poll0(Native Method)
at sun.nio.ch.PollArrayWrapper.poll(PollArrayWrapper.java)
at sun.nio.ch.PollSelectorImpl.doSelect(PollSelectorImpl.java)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java)
at select.main(select.java)
Any ideas?
Dieter
import java.util.Iterator;
import java.net.InetSocketAddress;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
public class select {
public static void main(String[] args) {
try {
int timeout = 1000;
Selector selector = Selector.open();
ServerSocketChannel ssc = ServerSocketChannel.open();
ssc.configureBlocking(false);
InetSocketAddress isa = new InetSocketAddress( 4711);
ssc.socket().bind( isa, 1);
ssc.register( selector, SelectionKey.OP_ACCEPT);
selector.select(timeout); // <----- Generates Exception
Iterator it = selector.selectedKeys().iterator();
while (it.hasNext()) {
it.remove();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
java.io.IOException: socket operation on non-socket
at sun.nio.ch.PollArrayWrapper.poll0(Native Method)
at sun.nio.ch.PollArrayWrapper.poll(PollArrayWrapper.java)
at sun.nio.ch.PollSelectorImpl.doSelect(PollSelectorImpl.java)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java)
at select.main(select.java)
Any ideas?
Dieter
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2003 07:37 AM
07-29-2003 07:37 AM
Re: JAVA 141 on OpenVMS
Just an (educated?) guess: From the output you
quote it looks like this Java function tries to
do "native" i.e. C based, I/O using the poll
function. Since poll is not implemented in the
C RTL this might be the causing trouble.
quote it looks like this Java function tries to
do "native" i.e. C based, I/O using the poll
function. Since poll is not implemented in the
C RTL this might be the causing trouble.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2003 01:47 PM
07-29-2003 01:47 PM
Re: JAVA 141 on OpenVMS
Actually poll() is in the latest CRTL ECO, though they left it out of the header on the first go-round so it's hard to know you have it.
The problem is more likely to be related to the fact that select() only works on sockets on VMS. It's possible that the flags in the selector object are not getting set up right so that it gets recognized as a socket. If it's possible to do the equivalent of the S_ISSOCK test in C, that may at least tell you if this is what's happening. Sorry not to have more Java-specific info.
The problem is more likely to be related to the fact that select() only works on sockets on VMS. It's possible that the flags in the selector object are not getting set up right so that it gets recognized as a socket. If it's possible to do the equivalent of the S_ISSOCK test in C, that may at least tell you if this is what's happening. Sorry not to have more Java-specific info.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP