Accessing PI System from Java on Linux: Why You Should Move Beyond PI API
With PI API on its way to deprecation and limitations on its use with Java on Linux, it's time to explore modern, supported options for accessing OSIsoft PI data.
Roshan Soni
title: "Accessing PI System from Java on Linux: Why You Should Move Beyond PI API" excerpt: "With PI API on its way to deprecation and limitations on its use with Java on Linux, it's time to explore modern, supported options for accessing OSIsoft PI data." categories: ["PI System", "OSIsoft", "Java", "Linux", "Data Access"] tags: ["PI API", "PI Web API", "PI JDBC", "libpiapi.so", "PI Developer License", "PI AFSDK", "Migration"]
Accessing OSIsoft PI System data from Java applications on Linux has been a common challenge for many developers, especially as legacy technologies age and licensing requirements evolve. A recent user question highlights a typical scenario: attempting to use the PI API with Java on Linux by looking for the libpiapi.so shared object. However, with the PI API reaching maturity and new development discouraged, it's crucial to understand the landscape and choose the best approach for your project.
The PI API: Legacy, Limited, and Deprecated
The PI API has been around for decades as a low-level means to interface with PI System data. Historically, this has meant using platform-specific libraries such as piapi.dll on Windows or libpiapi.so on Linux. Developers working in Java often bridged to these libraries using tools like JNA (Java Native Access).
However, there are critical limitations now:
- PI API is a mature (near-deprecated) technology. OSIsoft/AVEVA explicitly discourages new development using this API.
- Access to installation kits is restricted. Only customers with existing PI API-based solutions and the appropriate licensing can download the PI API kits (including
libpiapi.so). New users or projects generally cannot obtain these files via the PI Developer license. - Support is limited. PI API no longer receives major updates, and new features are exclusively developed on newer access technologies.
Supported and Recommended Alternatives
If you are aiming to develop Java applications to access PI data from Linux, consider these supported, modern alternatives:
1. PI Web API
PI Web API is a RESTful web service that allows platform-independent access to PI data. It is designed for modern application stacks, including Java, and supports HTTP(S) requests for reading and writing data. While it is free to use for non-production/developer purposes, a PI System Access license may be required when moving to production.
Benefits:
- Platform-agnostic access from any language or OS that supports HTTP.
- Rich support for PI Asset Framework (AF) data models.
- Modern authentication and security principles.
- Actively supported and enhanced by OSIsoft/AVEVA.
2. PI JDBC Driver
For Java-native applications that prefer to use JDBC, the PI JDBC Driver provides SQL-based access to PI data. This can be an especially natural fit for Java developers with database experience.
Benefits:
- Java-native experience via standard JDBC interfaces.
- Good integration with data analysis and reporting tools.
- No need to bridge to native code or use JNI/JNA.
Legacy PI Server Compatibility
Some users are unable to use these modern access methods if their PI Servers are older than version 3.4.380 (approximately from 2008). In such cases, upgrading the PI Server is highly recommended — not just for developer compatibility, but also for security, support, and feature updates.
If you cannot upgrade and must access data from an old PI System, consult with your account manager. Sometimes, exceptions or special accommodations can be made for mission-critical legacy maintenance — but new projects should prioritize migration.
Summary and Next Steps
- Do not start new projects using PI API. Its use is discouraged, and access to resources is highly restricted.
- Prefer PI Web API or PI JDBC for Java and cross-platform development.
- Contact your PI System administrator or account manager if you believe your use case requires exceptions or if your licensing doesn't provide the modern access kits.
- Plan for migration if your PI Server is outdated. This ensures continued support, security, and access to modern developer tools.
For further reading, see How to Pick the Right PI Developer Technology for Your Project and consult the PI Developer Technologies Roadmap.
Stay ahead of change — modernize your PI data access for better maintainability and future-proofing.
Tags
About Roshan Soni
Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.
No comments yet
Be the first to share your thoughts on this article.
Related Articles
Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead
A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.
Roshan Soni
Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB
Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.
Roshan Soni
Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?
Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.
Roshan Soni