Jump to content


DARREN

Member Since 06 Dec 2000
Offline Last Active Nov 03 2017 02:02 PM
-----

Topics I've Started

Documentation for SPGrid (ActiveX Control)

26 October 2017 - 05:37 PM

This is a shot in the dark, but does anyone have any documentation for the SharpGrid control that was produced by data dynamics. This grid is the one used in the PROIV demo function. 

 

Thanks in advance.


Obscure Server Side Object (SSO) error - and the resolution !

17 July 2015 - 09:56 PM

We are implementing a new security package that will be referenced by all of our applications as a central repository for permissions and user account data. This package will sit along side and interface with our LDAP repository. We created a custom Java SSO that all of the applications go through to get the permissions etc. When we invoked a method from PROIV to get the permissions we received the following error.

 

PROIV Error  835 - SSO METHOD CALL {OurCustomSSO}.getFirstPermissionByUserName FAILED 

 

Error Details
-------------
SSO Exception: java.lang.ClassCastException                                                                                                                                                                                                               
com.sun.jndi.ldap.LdapCtx cannot be cast to org.springframework.ldap.core.DirContextOperations                                                                                                                                                            
Java Stack Trace:                                                                                                                                                                                                                                        
org.springframework.ldap.core.LdapTemplate$34.mapFromContext(LdapTemplate.java:1839)                                                                                                                                                                      
org.springframework.ldap.core.ContextMapperCallbackHandler.getObjectFromNameClassPair(ContextMapperCallbackHandler.java:69)                                                                                                                   
org.springframework.ldap.core.CollectingNameClassPairCallbackHandler.handleNameClassPair(CollectingNameClassPairCallbackHandler.java:50)                                                                                                 
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:367)                                                                                                                                                                                  
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:309)                                                                                                                                                                                  
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:642)                                                                                                                                                                                  
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:578)                                                                                                                                                                                  
org.springframework.ldap.core.LdapTemplate.find(LdapTemplate.java:1836)                                                                                                                                                                                   
org.springframework.ldap.core.LdapTemplate.find(LdapTemplate.java:1857)                                                                                                                                                                                   
org.springframework.ldap.core.LdapTemplate.findOne(LdapTemplate.java:1865)                                                                                                                                                                                
com.thig.{myapp}.ldap.dao.ldapDaoImpl.findPersonByUsername(ldapDaoImpl.java:63)                                                                                                                                                                         
com.thig.{myapp}.{myApplicationApi}.getAllPermissionsByUsername({myApplicationApi}.java:187)                                                                                                                                              
com.thig.{myapp}.{myApplicationSSO}.getFirstPermissionByUserName({myApplicationSSO}.java:139)                                                                                                                                                 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                                                                                               
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                                                                                                                                             
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                                                                                                     
java.lang.reflect.Method.invoke(Method.java:606)                                                                                                                                                                                                          
com.northgatearinso.proiv.sso.ssomanager.SSOManager.invokeMethod(Unknown Source)  
 
I am providing the verbiage that one of our Java developers (that solved the issue) provided me in the hopes that if you experience a similar issue then you will have a reference. We gave him a medal for resolving this one  :D  :D
 

Versions involved:

jdk1.7.0_60

spring-ldap-core 2.0.3.RELEASE

 

For posterity:

 

When PROIV loads an SSO jar, it does so in a class loader which is a child of

the application/system class loader. This causes the use of Spring LDAP to

result in a class cast exception from com.sun.jndi.ldap.LdapCtx to

org.springframework.ldap.core.DirContextOperations. This happens because the

Java JNDI classes use the Thread Context Class Loader (TCCL) to load object

factories used as part of a JNDI lookup. Since the Thread Context Class Loader

defaults to the application/system class loader, and the application/system

class loader does not contain the Spring LDAP classes (they are included in the

child class loader), the appropriate Spring object factory is not loaded. The

current solution is to, within the SSO, set the TCCL to the current class

loader (the class loader for the current class) which includes the Spring LDAP

classes.

 

---------------------------------------------------------------------------

Class Loader hierarchy when running myappsso jar directly:

---------------------------------------------------------------------------

                Classloader sun.misc.Launcher$AppClassLoader@70a6aa31:

                                file:ssotest/]

                                file:ssotest/myappapi-1.0-SNAPSHOT.jar

                Classloader sun.misc.Launcher$ExtClassLoader@4defb0be:

                                file:/opt/jdk1.7.0_60/jre/lib/ext/dnsns.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/localedata.jar]

                                file:/opt/jdk1.7.0_60/jre/lib/ext/sunec.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/sunjce_provider.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/sunpkcs11.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/zipfs.jar

 

-----------------------------------------------------------------------

Class Loader hierarchy when myappsso is run by PROIV:

-----------------------------------------------------------------------

                Classloader java.net.URLClassLoader@592fa617:

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/activation.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/avalon-framework-4.2.0.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/batik-all-1.7.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/commons-io-1.3.1.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/commons-logging-1.0.4.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/fop.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/fopwrapper.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/mail.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/northgate-lexicon-imp-exp.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/northgate-lexicon.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/serializer-2.7.0.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/servlet.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/sso/forgerockapi-1.0-SNAPSHOT.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/sso/northgatearinso-sso.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/sso/pdfextract.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/sso/proivsso-0.0.1-SNAPSHOT-11.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/ssomanager.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/xalan-2.7.0.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/xercesImpl-2.7.1.jar]

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/xml-apis-1.3.04.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/xml-apis-ext-1.3.04.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/xmlgraphics-commons-1.4.jar

                Classloader sun.misc.Launcher$AppClassLoader@781fb069:

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/fop.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/fopwrapper.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/mail.jar]

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/northgate-lexicon.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/ojdbc6.jar

                                file:/opt/pro4/v7.1.53.4/virtual_machine/javalib/ssomanager.jar

                Classloader sun.misc.Launcher$ExtClassLoader@6876fb1b:

                                file:/opt/jdk1.7.0_60/jre/lib/ext/dnsns.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/localedata.jar]

                                file:/opt/jdk1.7.0_60/jre/lib/ext/sunec.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/sunjce_provider.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/sunpkcs11.jar

                                file:/opt/jdk1.7.0_60/jre/lib/ext/zipfs.jar

 

 


core_xxxxx directory being created in working directory

24 October 2014 - 02:03 PM

Anyone seen instances where sub-directories are created in the working directory that have the name of core_xxxxx (where xxxxx) is a four or five digit number. The directories themselves are empty. We are running Linux.


Variables being rounded in Full Function SQL

24 September 2014 - 06:59 PM

This caught me out today as I was using a table variable in my bind. The rounded value was subsequently written back to the open table. Dohhhh.

 

____________________

 

When using SQL to get a count of record back using the BEGIN, END statements be warned that any numeric variable passed in will be rounded removing any precision after the decimal point after the execution of the statement.  Note the SQL will honor the full precision for a variable being passed in.

 

For example the following policy does have an INV_AMT of 318.01, so the following should return back a #COUNT of 1, however what it also does is change the value of #TEST from 318.01 to 318.00.

 

#TEST = 318.01

SQL

   BEGIN

      SELECT COUNT(*) INTO :#COUNT FROM INV_PBINV_TBL

      WHERE INV_POLICY_ID = '8000255370' AND INV_AMT = :#TEST;

   END;

ENDSQL

UMSG('#COUNT = ' + ALPHA(#COUNT) + ', #TEST = ' + ALPHA(#TEST),-1)

 

 

Also note that if you were trying to pull the value of INV_AMT into #COUNT that you would have to multiply it by 100 in SQL and divide by 100 in ProIV to get the correct value.

 

SQL

   BEGIN

      SELECT INV_AMT * 100 INTO :#COUNT FROM INV_PBINV_TBL

      WHERE INV_POLICY_ID = '8000255370';

   END;

ENDSQL

#COUNT = #COUNT / 100


Example of using dynamic SQL

20 February 2014 - 09:19 PM

We rolled out a new project today and I thought it may be enlightening to share with you one of the features we used, namely the SQL DYNAMIC feature,

 

We have a corporate diary that we are using more and more as a workflow engine. One of the requirements of the project was to allow end users to create 'filters' that allowed them to define the selection criteria they wished to employ. It was a good example of the use of the dynamic SQL feature within PROIV. We basically build a SQL statement on the fly from the parameters that are defined by the end user. Simple but effective. To get some additional performance we also introduced a view to join the various Oracle tables that were being referenced. This was purely to increase the speed of the display to the grid. I have attached some screen shots.