BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Turla
SAS Employee

im trying to connect to sas viya server, but get an exception 

'unable to find valid certification path to requested target'

what can i make with this
like ignoring or smth else
also i have no access for certificate

1 ACCEPTED SOLUTION

Accepted Solutions
alexal
SAS Employee

@Turla ,

 

The root CA certificate needs to be provided to CAS clients. Clients include SAS 9.4M5 clients that can directly access CAS, SWAT (Java, R, Lua), Python, and REST clients. Please see more details in SAS® Viya® 3.5 Administration -> Data in Motion -> How To.

View solution in original post

3 REPLIES 3
alexal
SAS Employee

@Turla ,

 

How are you trying to connect? Via the browser or EG?

Turla
SAS Employee

through the java code

public static void main(String[] args) throws IOException, CASException, KeyManagementException, NoSuchAlgorithmException {
            
            //-----------------------
            CASClientInterface client = new CASClient("**.**.**.**", 5570, "****", "****"); // 1

            String path = "CASUSER.HEART";
            String table = "HEART";
            String vars = "Status,sex,AgeAtDeath,Weight_Status,Smoking_Status";

            //обращаемся к таблице
            if (path != null){
                LoadTableOptions lto = new LoadTableOptions();
                lto.setPath(path);
                client.invoke(lto);
            }

            //создаем настройки выборки
            FetchOptions opt = new FetchOptions();
            Castable tble = new Castable();
            tble.setName(table);
            String[] vrs = getStringArrayProperty(vars);

            if(vrs != null){
                tble.setParameter(Castable.KEY_VARS, vrs);
            }

            opt.setTable(tble);
            opt.setSasTypes(false);

            //выбираем данные
            CASActionResults<CASValue> results = client.invoke(opt);
            //выводим результат
            if (results.getResultsCount() > 0){
                dumpByRow((CASTable) results.getResult(0).getValue());
            }
        }

 

alexal
SAS Employee

@Turla ,

 

The root CA certificate needs to be provided to CAS clients. Clients include SAS 9.4M5 clients that can directly access CAS, SWAT (Java, R, Lua), Python, and REST clients. Please see more details in SAS® Viya® 3.5 Administration -> Data in Motion -> How To.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 995 views
  • 0 likes
  • 2 in conversation