петак, 22. септембар 2017.

oracle apex 5.1.1 jasper reports integration linux

Jasper reports integration

folder structures on linux centos
utl http grant to compiere
install sys and localy user compiere
immport test applications from opal consulting and close jasper reports ports from tomcat/ glassfish and use export from blob

run this query from sys as sysdba

begin
dbms_network_acl_admin.create_acl (
acl => 'utl_http.xml',
description => 'HTTP Access',
principal => 'COMPIERE',
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null
);
commit;
dbms_network_acl_admin.add_privilege (
acl => 'utl_http.xml',
principal => 'COMPIERE',
is_grant => TRUE,
privilege => 'resolve',
start_date => null,
end_date => null);
commit;
dbms_network_acl_admin.assign_acl (
acl => 'utl_http.xml',
host => '192.168.8.102',
lower_port => null,
upper_port => null
);
commit;
end;

grant execute on utp_http to COMPIERE;


SQL> l
1* select * from user_network_acl_privileges;


DECLARE
  ACL_PATH  VARCHAR2(4000);
  ACL_ID    RAW(16);
BEGIN
  -- Look for the ACL currently assigned to '*' and give APEX_040000
  -- the "connect" privilege if APEX_040000 does not have the privilege yet.

  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
   WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

  -- Before checking the privilege, make sure that the ACL is valid
  -- (for example, does not contain stale references to dropped users).
  -- If it does, the following exception will be raised:
  --
  -- ORA-44416: Invalid ACL: Unresolved principal 'APEX_040000'
  -- ORA-06512: at "XDB.DBMS_XDBZ", line ...
  --
  SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
    FROM XDB.XDB$ACL A, PATH_VIEW P
   WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
         EQUALS_PATH(P.RES, ACL_PATH) = 1;

  DBMS_XDBZ.ValidateACL(ACL_ID);
   IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040000',
     'connect') IS NULL THEN
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
     'APEX_040000', TRUE, 'connect');
  END IF;

EXCEPTION
  -- When no ACL has been assigned to '*'.
  WHEN NO_DATA_FOUND THEN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_040000', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;




DECLARE
  ACL_PATH  VARCHAR2(4000);
  ACL_ID    RAW(16);
BEGIN
  -- Look for the ACL currently assigned to 'localhost' and give APEX_040000
  -- the "connect" privilege if APEX_040000 does not have the privilege yet.
  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
   WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

  -- Before checking the privilege, make sure that the ACL is valid
  -- (for example, does not contain stale references to dropped users).
  -- If it does, the following exception will be raised:
  --
  -- ORA-44416: Invalid ACL: Unresolved principal 'APEX_040000'
  -- ORA-06512: at "XDB.DBMS_XDBZ", line ...
  --

  SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
    FROM XDB.XDB$ACL A, PATH_VIEW P
   WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
         EQUALS_PATH(P.RES, ACL_PATH) = 1;

  DBMS_XDBZ.ValidateACL(ACL_ID);
   IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040000',
     'connect') IS NULL THEN
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
     'APEX_040000', TRUE, 'connect');
  END IF;

EXCEPTION
  -- When no ACL has been assigned to 'localhost'.
  WHEN NO_DATA_FOUND THEN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_040000', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;










REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.

SELECT ACL, PRINCIPAL
  FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE
 WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND
       NACL.ACLID = ACE.ACLID AND
       NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

Next, run the following code to fix the ACL:

DECLARE
  ACL_ID   RAW(16);
  CNT      NUMBER;
BEGIN
  -- Look for the object ID of the ACL currently assigned to '*'
  SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
   WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

  -- If just some users referenced in the ACL are invalid, remove just those
  -- users in the ACL. Otherwise, drop the ACL completely.
  SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
   WHERE ACLID = ACL_ID AND
         EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

  IF (CNT > 0) THEN

    FOR R IN (SELECT PRINCIPAL FROM XDS_ACE
               WHERE ACLID = ACL_ID AND
                     NOT EXISTS (SELECT NULL FROM ALL_USERS
                                  WHERE USERNAME = PRINCIPAL)) LOOP
      UPDATE XDB.XDB$ACL
         SET OBJECT_VALUE =
               DELETEXML(OBJECT_VALUE,
                         '/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]')
       WHERE OBJECT_ID = ACL_ID;
    END LOOP;

  ELSE
    DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
  END IF;

END;
/

REM commit the changes.

COMMIT;



adempiere 390

Adempiere 390 is ready for production, and could be build with netbeans

Assets

среда, 19. децембар 2012.

ADempeire 361 maintenance asset meter error - need simple step to modify

Hi all
I was trying to set maintenance on ADempiere 361 with FAM and maintenance
set by https://groups.google.com/forum/?fromgroups#!topic/idempiere/j4nBYQ-2f4c
(http://erpinfosystems.blogspot.com/2012/12/adempiere-361-final-with-maintenance.html
and :
1) asset_meter its error by datetrx on mp_assetmeter table which could be set as
DEFAULT CURRENT_TIMESTAMP
2) a_asset_disposed -  column isapproved should be set as default 'Y'
then it should be save Asset meter, disposed and meter log as addition
for assets regards preventive and corective maintenance.

If its posible, should be fine that this simple correction post on
official code repository, or if it's not posible, future users can simple change
this from database.
 table 1: asset_meter its error by datetrx on mp_assetmeter table which could be set as
DEFAULT CURRENT_TIMESTAMP
table 2:a_asset_disposed -  column isapproved should be set as default 'Y'
need restart application, (re login) and all should wrk fine.
log in as 
super user (Administrator)  and Application Dictionary-Window tab & field
and on WORK ORDER  found  field : Document Status when un set Read only could be writable. After that all maintenance module working perfect.

среда, 05. децембар 2012.

ADempiere 361 final with Maintenance for 10min manual add

Its 10 minutes need to add missing windows on menu for maintenance part. On Enabled package user need add 2 special form VMPGenerateOT and VMPRequestOT

Next need add tasks before update Package User role to System roles.
Then start update role from Package User to system
Thats look like

Then need add folder Maintenance Management with one proces Prognosis, Windows RequestOT, WorkOrder and two forms VMPGenerateOT and VMPRequestOT and one sub folder Maintenance Management with 4 windows Meter, Standard Job, Maintenance (Preventive Maintenance) and Meter log
After that need log out and log in and maintenance should exist

PAckage need install with:

From SVN Adempiere as branch/Maintenance - this working
With home/Adempiere/packages/Maintenance folder
When its complete, need create sub folder .. lib/maintenance.jar(..Adempiere/packages/Maintenance/lib/maintenance.jar) and run silentsetup (..Adempiere/bash RUN_silentsetup.sh)
with this - last  step classes process prognosis work order will be added -org.compiere.process.MPProcessOT should exist on Adempiere/lib/Adempiere.jar as represent classes)







субота, 12. новембар 2011.

Adempiere 3.1.6 Add Serbian in Login select list

Version ADempiere 3.1.6 (and older and some higher version of ADempiere ) dont have Serbian Language into Login form in select language. This is very simple to add new Language or change existing, or set default one of the prefer language. Theres path where is located java files which should be changed or added -- ../looks/src/org/compiere /plaf/PlafRes_sr.java ../looks/src/org/compiere/util/IniRes_sr.java ../looks/src/org/compiere/util/Language.java.
And for full transformation, should be add translation from : http://sourceforge.net/projects/lsr/ -- with adding Serbia_RS and set as main language.




New java file should be add :PlafRes_sr.java




private static final String AD_Language_sr_RS = "sr_RS" -- should be add into Language.java




AD_Language should be add into Language.java




compile all java files