BAPI_SALESORDER_CREATEFROMDAT2 and ORDER_CONDITIONS_IN with sapnwrfc (perl)
Hi,
with sapnwrfc packet from Piers Harding (v0.31) I try to create a salesorder within a perl script.
Without using table ORDER_CONDITIONS_IN my salesorder is created successfull in SAP.
Now I want to commit pricing information. Therefor I used ORDER_CONDITIONS_IN with syntax:
$rc->ORDER_CONDITIONS_IN([{'COND_P_UNT'=>'1', 'CURRENCY'=>'EUR', 'COND_TYPE'=>'PR00', 'ITM_NUMBER'=>'000010', 'COND_VALUE'=>'22'}]);
SAP returned an error: BCD_BADDATA
So I thought something wrong with COND_P_UNT or COND_VALUE because these have to be BCD packed values.
Now I tried something like
pack("H*", "22")
for COND_VALUE and so on. But without success.
Some values I commited in table ORDER_ITEMS_IN are marked as BCD but I have to send them in "plain" text, no pack function to call...
So, did you have any idea for solving my problem?
Is it possible that another (incomplete) table is responsible for my problem?
Or do you think the reason is dedicated to table ORDER_CONDITIONS_IN?
Any help or suggestion appreciated!
Regards,
Patrick
Hi David,
yes, I tried it in your given syntax.
Here my actual code but with seperatly build arrays.
I had to restructure beacause of many loops.... But finally thats what I did.
Lines marked with '#!' are specific and have to be adapted to your system.
Uncommenting the line where populating ORDER_CONDITIONS_IN produces the error.
use Data::Dumper;
use sapnwrfc;
my @orderHeaderIn;
my @orderPartners;
my @orderItemsIn;
my @orderSchedulesIn;
my @orderCfgsInst;
my @orderConditionsIn;
$orderHeaderIn->{DOC_TYPE} = 'ZRAS'; #!
$orderHeaderIn->{SALES_ORG} = '055'; #!
$orderHeaderIn->{DISTR_CHAN} = '01'; #!
$orderHeaderIn->{DIVISION} = 'IE'; #!
$orderHeaderIn->{REQ_DATE_H} = '20101231';
$orderPartners->[0]{PARTN_NUMB} = '0000008759'; #!
$orderPartners->[0]{PARTN_ROLE} = 'AG'; #!
$orderItemsIn->[0]{ITM_NUMBER} = '000010';
$orderItemsIn->[0]{PLANT} = '0551'; #!
$orderItemsIn->[0]{MATERIAL} = '000000000000368388'; #!
$orderItemsIn->[0]{ORDERID} = '000552551003'; #!
$orderItemsIn->[0]{PURCH_DATE} = '20101030';
$orderItemsIn->[0]{TARGET_VAL} = '22';
$orderItemsIn->[0]{BILL_DATE} = '20101030';
$orderItemsIn->[0]{TARGET_QTY} = '22';
$orderSchedulesIn->[0]{ITM_NUMBER} = '000010';
$orderSchedulesIn->[0]{REQ_QTY} = '22';
$orderCfgsInst->[0]{QUANTITY_UNIT} = 'STZ'; #!
$orderConditionsIn->[0]{ITM_NUMBER} = '000010';
$orderConditionsIn->[0]{COND_VALUE} = '22';
$orderConditionsIn->[0]{CURRENCY} = 'EUR';
$orderConditionsIn->[0]{COND_P_UNT} = '1';
$orderConditionsIn->[0]{COND_TYPE} = 'PR00'; #!
SAPNW::Rfc->load_config('path_to_sap.yml'); #!
my $con = SAPNW::Rfc->rfc_connect;
my $rd = $con->function_lookup("BAPI_SALESORDER_CREATEFROMDAT2");
my $rc = $rd->create_function_call;
$rc->ORDER_HEADER_IN($orderHeaderIn);
$rc->ORDER_PARTNERS($orderPartners);
$rc->ORDER_ITEMS_IN($orderItemsIn);
$rc->ORDER_SCHEDULES_IN($orderSchedulesIn);
$rc->ORDER_CFGS_INST($orderCfgsInst);
#$rc->ORDER_CONDITIONS_IN($orderConditionsIn);
$rc->invoke;
print "salesdocument: ".$rc->SALESDOCUMENT."\n";
print "RetVal: ".Dumper(@{$rc->RETURN})."\n";
$rd = $con->function_lookup("BAPI_TRANSACTION_COMMIT");
$rc = $rd->create_function_call;
$rc->WAIT("x");
$rc->invoke;
$con->disconnect;
I already set trace to 1 in sap.yml. Now I will try with a higher value.
Thanks for that hint.
Similar Messages
-
Install instructions for Search Modeler and integrating with Apps 11i
Below are all the steps I took for creating integrating Search Modeler with an Oracle E-Business Suite 11.5.10.2 ATG RUP 7 instance called ERNIE.
Much thanks to Oracle Support ( Rajesh Ghosh, Vikas Soolapani and Roger Ford), as this simply wouldn't have been possible without them.
There are a few things in this document that may not be pertinent to your environment if you're doing this. I've made attempts to clarify those possibly optional sections in the documentation.
I've broken the document down into the following multiple parts
o Setting up a new RedHat 4.8 x86 server called ausSEARCHdev (The server is in AUStin, TX, is dedicated to SEARCH, and is for our DEV environment)
o SES (Secure Enterprise Search 10.1.8.2 install
o SES 10.1.8.4 patchset install
o SES CPU patch apply
o Standalone OC4J and ADF installation
o Search Modeler installation and configuration
o Configure ERNIE Apps instance to be on valid self-signed SSL certificate
o Import ERNIE SSL certificate into SES and Search Modeler
using aussearchdev initially
rh4 x86, default oracle build
** htop and collectl are open source free performance monitoring packages we utilize**
--start
install htop and collectl
wget http://dag.wieers.com/rpm/packages/htop/htop-0.7-1.el4.rf.i386.rpm
rpm -ivh htop-0.7-1.el4.rf.i386.rpm
wget http://downloads.sourceforge.net/project/collectl/collectl/collectl-3.4.0-4/collectl-3.4.0-4.noarch.rpm?use_mirror=voxel
rpm -ivh collectl-3.4.0-4.noarch.rpm
chkconfig collectl on
service collectl start
**We still need to install the necessary rpms so that collectl logs are compressed
--end
useradd -u 501 oracle
groupadd -g 504 dba
usermod -G 504 oracle
verification:
[root@aussearchdev ~]# su - oracle
[oracle@aussearchdev ~]$ id
uid=501(oracle) gid=501(oracle) groups=501(oracle),504(dba)
passwd oracle
** /mnt/oraclebackup is a network dumpspot we use to hold Software installs, RPMs, etc
** /mnt/rpms is a network dumpspot we use to hold ISOs for OS software such as Redhat Linux
mkdir /mnt/oraclebackup
mkdir /mnt/rpms
add the following to /etc/fstab
XXXXXXX:/patches/oraclebackup /mnt/oraclebackup nfs defaults,hard,nolock 0 0
XXXXXXX:/esxpress/nfs /mnt/rpms nfs rw,addr=XXX.XXX.XXX.XXX 0 0
mount /mnt/rpms
Next need to install various oracle needed RPMs.
cd /mnt/rpms/rh40_upd8/RedHat/RPMS/
rpm -ivh perl-Compress-Zlib-1.42-1.el4.i386.rpm
rpm -ivh libaio-devel-0.3.105-2.i386.rpm
rpm -ivh sysstat-5.0.5-25.el4.i386.rpm
rpm -ivh unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
service collectl restart
cd /tmp
wget http://oss.oracle.com/el4/oracle-validated/oracle-validated-1.0.0-18.el4.i386.rpm
rpm -ivh oracle-validated-1.0.0-18.el4.i386.rpm
Now we should have all the RPMs we need.
cd /etc/sysconfig/oracle-validated
./oracle-validated-verify
cd /var/log/oracle-validated/results
more orakernel.log
uname -a
should return 2.6.9 or higher
rpm -qa|grep gcc-
should return 3.4.3 or higher
rpm -qa|grep glibc
should return 2.3.4-2.9 or higher
rpm -qa|grep make
should return 3.80 or higher
rpm -qa|grep binutils
should return 2.15.92.0.2 or higher
rpm -qa|grep openmotif
should return 2.2.3-9.RHEL4.1 or higher
rpm -qa|grep compat-db
should return 4.1.25-9 or higher
rpm -qa|grep setarch
should return 1.6-1 or higher
cat /proc/sys/kernel/sem
should return 250 32000 100 128 or higher (250 32000 100 142 in our case)
cat /proc/sys/kernel/shmall (1073741824 in our case)
should return 2097152 or higher
cat /proc/sys/kernel/shmmax
should return half the size of physical memory (4294967295 in our case - NO LARGER on 32-bit OS)
cat /proc/sys/kernel/shmmni
should return 4096
cat /proc/sys/fs/file-max
should return 65536 (327679 in our case)
cat /proc/sys/net/ipv4/ip_local_port_range
should return 1024 65000
values in /etc/security/limits.conf set by oracle-validated rpm, no changes necessary
add the following line to /etc/pam.d/login
session required /lib/security/pam_limits.so
add the following to /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
mkdir -p /d01/oracle
chmod 777 /d01/oracle
init 6 the box (aka reboot)
Time to start the SES 10.1.8.2 installer
running SES 10.1.8.2 installer
as oracle
cd /mnt/oraclebackup/deathstar_patches/SES/SES10182
./runInstaller
search server name sesprod
administrative password XXXXXXXX for dev,
http port 7777
destination path /d01/oracle/10.1.8/sesdev (dev)
data storage path /d01/oracle/sesdevdata (dev)
next
inventory /d01/oracle/oraInventory
dba group
run orainstroot.sh as requested
continue
all tests should pass, continue
finished clean
tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
Now we need to get to 10.1.8.4 of SES
(yes, you need to keep the system up)
cd /mnt/oraclebackup/deathstar_patches/SES/SES10184/ses_10184pst_linux/
./runInstaller
Destination, choose sesdev
Next
Patchset successful
tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
Apply CPU Patch to SES
CPU JAN 10 says patch 9119261 is required - but patch requires extended support contract
CPU OCT 09 says patch 8836540 is required - but patch requires extended support contract
CPU JUL 09 says patch 8534394 is required - but patch requires extended support contract
CPU APR 09 says patch 8290534 is required - and you can actually download it
Need opatch from 6880880
cp -r /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/OPatch $ORACLE_HOME
export PATH=$ORACLE_HOME/OPatch:$PATH
shut down everything
cd $ORACLE_HOME/bin
./searchctl stopall
cd /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/8290534
opatch apply
cd $ORACLE_HOME/cpu/CPUApr2009
**Note: your sys password is what you set for your administrative password above
sqlplus "sys/XXXXXX" as sysdba;
startup
@catcpu
@?/rdbms/admin/utlrp
shutdown immediate
exit
cd /d01/oracle/10.1.8/sesdev/cpu/view_recompile/
sqlplus "sys/XXXXXXX" as sysdba;
startup upgrade;
@view_recompile_jan2008cpu.sql
@?/rdbms/admin/utlrp
shutdown immediate
cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/ext
mv mail.jar $HOME/mail.jar.backup02222010
mv mailapi.jar $HOME/mailapi.jar.back02222010
cp /d01/oracle/10.1.8/sesdev/search/lib/mail.jar .
SES 10.1.8.4 is now installed and updated with latest available CPU
tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
we're going to go with the standalone OC4j 10.1.3.3 and Oracle ADF 10.1.3.3 method
The URLs for these products are
http://blogs.oracle.com/ebssearch/2009/10/available_now_oracle_search_modeler_11_for_oracle_e-business_suite_11i.html
and specifically
OC4J - http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
ADF - http://www.oracle.com/technology/software/products/jdev/htdocs/adfinstaller10133.html
OC4J install
First you need to have Java 1.5 on the machine. Latest is 1.5.0_22. Package is in /mnt/oraclebackup/deathstar_patches/SES
as root on aussearchdev
cd /usr/local
cp /mnt/oraclebackup/deathstar_patches/SES/jdk-1_5_0_22-linux-i586.bin .
chmod 700 jdk-1_5_0_22-linux-i586.bin
./jdk-1_5_0_22-linux-i586.bin
yes
install OC4J just by copying over the directory
as oracle on aussearchdev
mkdir -p /d01/oracle/oc4j
cd /d01/oracle/oc4j
cp -r /mnt/oraclebackup/deathstar_patches/SES/oc4j/* .
ADF install
vi /mnt/oraclebackup/deathstar_patches/SES/adf/adfinstaller.properties
change the following
OracleHome = /mnt/oraclebackup/deathstar_patches/SES/adf
DesHome = /d01/oracle/oc4j/
type = OC4J
as root
cd /usr/bin
rm java
(yes)
ln -s /usr/local/jdk1.5.0_22/bin/java
su - oracle
java -version should now return 1.5.0_22
export JAVA_HOME=/usr/local/jdk1.5.0_22
cd /mnt/oraclebackup/deathstar_patches/SES/adf
java -jar runinstaller.jar -version
returns The version for the ADF libraries being installed is 10.1.3.41.57 - yes, that is apparently 10.1.3.3.
java -jar runinstaller.jar adfinstaller.properties
output looks good, do not be concerned by
WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/bc4j' whilst deleting bc4j application
WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/datatags' whilst deleting datatags application
as it was trying to delete the old version that didn't exist
Start OC4J
as oracle on aussearchdev
export JAVA_HOME=/usr/local/jdk1.5.0_22
export ORACLE_HOME=/d01/oracle/oc4j
cd $ORACLE_HOME/bin
./oc4j -start
you will be prompted for password - we're setting it. use XXXXXXXXXX
after it's up, kill it (ctrl-c) and restart it with
nohup ./oc4j -start &
last lines in nohup.out is
Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
10/02/23 03:22:38 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
So now on to search modeler installation, going by Installation steps in Note 781366.1
8326128 - This is not a patch to be applied to the Apps, keep reading
as oracle on aussearchdev
cd /mnt/oraclebackup/deathstar_patches/SES/8326128
mkdir -p /d01/oracle/oc4j/uploaded
vi build.properties, changing
installation.type=OC4J
oracle.home=/d01/oracle/oc4j
deploy.server=aussearchdev.domainname.com
deploy.port=23791
web.port=7777
password=XXXXXXXXX
extra.classpath=/d01/oracle/oc4j/uploaded
now set the following environment values in your ssh session
export ORACLE_HOME=/d01/oracle/oc4j
export JAVA_HOME=/usr/local/jdk1.5.0_22
export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
ant main
whole bunch of stuff to screen, errors due to undeploy something that doesn't exist. Finished after a minute with
BUILD SUCCESSFUL
Total time: 58 seconds
Now on to post install steps
restart OC4j
cd $ORACLE_HOME/bin
./modeler.sh -shutdown -port 23791 -password r*l*r*0*
export ORACLE_HOME=/d01/oracle/oc4j
export JAVA_HOME=/usr/local/jdk1.5.0_22
export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
nohup ./modeler.sh -start &
end of nohup.out should show
Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
Try going to http://aussearchdev:8888/modeler/faces/ModelerHome.jsp
Should get login screen, but wait, we haven't installed Oracle Apps interface yet...
Next let's do the Apps side of things
Going by note 953378.1
Using ERNIE (a development instance of E-Business Suite running 11.5.10.2 ATG RUP 7)
as applmgr on ausernieapp (ausernieapp is our app tier)
shut down apps services
apps patch 8225631
verify all the pre-req patches are in ERNIE
select * from ad_bugs where bug_number = '5903765';
select * from ad_bugs where bug_number = '6372396';
select * from ad_bugs where bug_number = '3219567';
select * from ad_bugs where bug_number = '3264822';
select * from ad_bugs where bug_number = '3261254';
select * from ad_bugs where bug_number = '5161676';
select * from ad_bugs where bug_number = '3036401';
select * from ad_bugs where bug_number = '3263588';
select * from ad_bugs where bug_number = '3264818';
select * from ad_bugs where bug_number = '3218526';
select * from ad_bugs where bug_number = '3263645';
select * from ad_bugs where bug_number = '4206794';
select * from ad_bugs where bug_number = '3262486';
select * from ad_bugs where bug_number = '3261243';
select * from ad_bugs where bug_number = '2614213';
select * from ad_bugs where bug_number = '3262159';
select * from ad_bugs where bug_number = '2819091';
select * from ad_bugs where bug_number = '3412795';
patch went in smooth
Log in to ERNIE Apps GUI as sysadmin user responsibility
Give users such as sysadmin FND Search Crawler responsibility
Go to system profile options, set
set FND: Search Enabling Flag to Y at site level
as applmgr on ausernieapp
cd /d01/oracle/ernieappl/fnd/11.5.0/patch/115/sql
sqlplus apps/$APPS_PWD @AFSRCHCF
Enter SES endpoint URL [e.g. http://ap637atg.us.oracle.com:7780]: http://aussearchdev.domainname.com:7777
Enter Apps Admin username [e.g. sysadmin]: sysadmin
Enter Apps Admin password: sysadmin_password
Enter SES Admin username [e.g. eqsys]: eqsys
Enter SES Admin password: eqsyspassword <-- This is the same as sys's password
on aussearchdev as oracle
had to kill modeler and start all the processes, so
kill -9 the modeler oc4j process, then
cd $ORACLE_HOME/bin
./searchctl startall
enter the password when prompted
in IE browser go to
http://aussearchdev.domainname.com:7777/search/admin
log in with eqsys password
global settings tab
identity management setup
click circle next to oracle.search.plugin.security.identity.ebs.EBS12IdentityPliginMgr
(yes, we're going with 12 even though we use Oracle Apps 11i)
http end point https://ausernieapp.domainname.com:8443/webservices/AppSearch/SecurityService
username sysadmin
password XXXXXXX
finish
Global Settings
Federation Trusted Entitites
####entity name sysadmin
####Entity Password XXXXXXXX
According to web conference with Oracle, this should NOT be eqsys but instead be sysadmin from above.
Select the Use Entity Plug-in for authentication check box
add
Trying to go to http://aussearchdev.domainname.com:7777/search/query/search and login (sysadmin / password)
stop midtier on both SES and Apps
cd $ORACLE_HOME/bin
./searchctl stopall
./adstpall.sh apps/$APPS_PWD on EBS app tier
start midtier on both SES and Apps
cd $ORACLE_HOME/bin
./searchctl startall
./adstrtal.sh apps/$APPS_PWD on EBS app tier
Now try and log in to Oracle SES user interface to verify the configuration
http://aussearchdev.domainname.com:7777/search/query
Now start up modeler again
export JAVA_HOME=/usr/local/jdk1.5.0_22
export ORACLE_HOME=/d01/oracle/oc4j
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME/bin
nohup ./modeler.sh -start &
Works now.
Now go to http://aussearchdev.domainname.com:8888/modeleradmin/AdminHome.jsp log in as oc4jadmin/XXXXXXX
Configure new target
Target Type 11i
Description ERNIE
Name ERNIE
EBS Database Host Name auserniedb
EBS Database Port 1521
EBS Database SID ERNIE
username apps
password XXXXXXXXx
oc4jadmin XXXXXXXx
export JAVA_HOME=/usr/local/jdk1.5.0_22
export ORACLE_HOME=/d01/oracle/oc4j
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME/j2ee/home
java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXXXX -addDataSourceConnectionPool -name "ERNIE2-pool" -factoryClass "oracle.jdbc.pool.OracleDataSource" -dbUser "apps" -dbPassword "XXXXXXX" -url "jdbc:oracle:thin:@auserniedb.domainname.com:1521:ERNIE" -applicationName appsearch
java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXX -addManagedDataSource -name "ERNIEDS" -jndiLocation "jdbc/ERNIEDS" -connectionPoolName "ERNIE2-pool" -applicationName appsearch
http://aussearchdev.domainname.com:8888/modeler/faces/ModelerHome.jsp
So, creating a self signed SSL certificate for ERNIE EBS instance (this will not work if you use an SSL certificate for another server like say, PROD)
doing this on ausernieapp
openssl genrsa -des3 -out ausernieapp.key 1024
PEM key is ausernieapp
openssl req -new -key ausernieapp.key -out ausernieapp.csr
PEM key is ausernieapp
Country US
State Texas
Locality Austin
Organization Name Corporation
Organizational Unit Name Information Technology
Common Name ausernieapp.domainname.com
Email address [email protected]
No challenge password
No optional company name
Now let's remove the passphrase from the key
cp ausernieapp.key ausernieapp.key.orig
openssl rsa -in ausernieapp.key.orig -out ausernieapp.key
Now let's generate a self-signed certificate
openssl x509 -req -days 1000 -in ausernieapp.csr -signkey ausernieapp.key -out ausernieapp.crt
Install the private key and certificate
cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.crt
cp server.crt server.crt.backup.03102010
chown applmgr:applmgr server.crt.backup.03102010
cp $HOME/ausernieapp.crt /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.crt/server.crt
cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.key/
cp server.key server.key.backup.03102010
cp $HOME/ausernieapp.key /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.key/server.key
chown applmgr:applmgr server.key.backup.03102010
bounce apache as applmgr
cd /d01/oracle/erniecomn/admin/scripts/ERNIE_ausernieapp
./adapcctl.sh stop
./adapcctl.sh start
In IE
https://ausernieapp.domainname.com:8443
Continue
Click on Certificate Error next to URL bar
Install Certificate -> Next-> Place all certificates in the following store -> trusted root certificate authorities ->finish
close browser, back to https://ausernieapp.domainname.com:8443
no errors,
Next step will be to import key into the SES and Search modelers
as oracle on aussearchdev
cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/security/
cp cacerts cacerts.backup.03102010
scp root@ausernieapp:/root/ausernieapp.crt .
export LANG=c
export PATH=$ORACLE_HOME/jdk/bin:$PATH
keytool -keystore ./cacerts -storepass changeit -alias rootausernieapp -import -trustcacerts -file ausernieapp.crt
--output
Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Serial number: b4e92089cf73076f
Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
Certificate fingerprints:
MD5: 2C:6B:EE:1A:63:6D:XX:A6:05:90:F6:XX:DD:88:F7:80
SHA1: F8:DC:E5:2A:3E:68:XX:E1:EA:E4:75:AE:CC:4F:4A:10:2F:8A:FE:9B
Trust this certificate? [no]: yes
Certificate was added to keystore
Now load our cert
keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
keytool -list -v -keystore ./cacerts now shows
Alias name: rootausernieapp
Creation date: Mar 10, 2010
Entry type: trustedCertEntry
Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Serial number: b4e92089cf73076f
Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
Certificate fingerprints:
MD5: 2C:6B:EE:1A:63:6D:CB:XX:05:90:F6:78:DD:88:F7:80
SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:FA:9E:10:2F:8A:FE:9B
Now we need to load it into the search modeler keystore
as root on aussearchdev
export JAVA_HOME=/usr/local/jdk1.5.0_22/
export PATH=$JAVA_HOME/bin:$PATH
cd /usr/local/jdk1.5.0_22/jre/lib/security/
scp root@ausernieapp:/root/ausernieapp.crt .
output
keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
Enter keystore password: changeit
Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Serial number: b4e92089cf73076f
Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
Certificate fingerprints:
MD5: 2C:6B:EE:1A:63:6D:CB:A1:05:90:F6:78:DD:88:F7:80
SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:4F:9E:10:2F:8A:FE:9B
Trust this certificate? [no]: yes
Certificate was added to keystore
[root@aussearchdev security]#
output
For troubleshooting, if you go to end of /d01/oracle/10.1.8/sesdev/search/data/config/crawler.dat
you can modify the logLevel from the default of 4 to 2 to get better debug data. No services need to be restarted, it will become active with the next crawl.
While talking with Oracle, they mentioned the following patches
The patches identified 8321527 and 7586924 are SES patches to help with indexing
They also identified patch 9103851 which is an apps patch dealing with responsibilities <-- This is not yet available
Applying patch 7586924
as oracle on aussearchdev
cd $ORACLE_HOME/bin
./searchctl stopall
cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/7586924
opatch apply
cd $ORACLE_HOME/bin
./searchctl startall
sqlplus eqsys/XXXXXX@SESDEV
define SCH_NAME=EQSYS
define PROXY_USER=EQPROXY
define INST_USER=EQ_TEST
@$ORACLE_HOME/search/admin/eq0pkh.sql
@$ORACLE_HOME/search/admin/eq0plb.sql
@$ORACLE_HOME/search/admin/eq0bug_7586924.sql
cd $ORACLE_HOME/search/data/config/
cp crawler.dat crawler.dat.backup.03102010
vi crawler.dat
We're using the Oracle E-Business Suite R12 crawler, so we will add the line
USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
as the line immediately preceding IMPORT -
so the end of the file looks like this:
# system properies: separated by space for multiple system properties or define multiple SYSTEM_PROPERTIES
# logLevel values: DEBUG(2), INFO(4), WARN(6), ERROR(8), FATAL(10)
SYSTEM_PROPERTIES -Doracle.search.logLevel=4 -Doracle.search.log=oracle.search.util.Log4jImpl
USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
IMPORT -
Now on to patch 8321527
cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/8321527
cd $ORACLE_HOME/bin
./searchctl stopall
cd -
opatch apply
cd $ORACLE_HOME/bin
./searchctl startall
sqlplus eqsys/XXXXXXX@SESDEV
define SCH_NAME=EQSYS
define PROXY_USER=EQPROXY
select object_name from user_objects where status = 'INVALID';
--should be no rows selected
@$ORACLE_HOME/search/admin/eq0pkh.sql
@$ORACLE_HOME/search/admin/eq0plb.sql
--should be no rows selected
restart SES
cd -
./searchctl stopall
./searchctl startallBelow are all the steps I took for creating integrating Search Modeler with an Oracle E-Business Suite 11.5.10.2 ATG RUP 7 instance called ERNIE.
Much thanks to Oracle Support ( Rajesh Ghosh, Vikas Soolapani and Roger Ford), as this simply wouldn't have been possible without them.
There are a few things in this document that may not be pertinent to your environment if you're doing this. I've made attempts to clarify those possibly optional sections in the documentation.
I've broken the document down into the following multiple parts
o Setting up a new RedHat 4.8 x86 server called ausSEARCHdev (The server is in AUStin, TX, is dedicated to SEARCH, and is for our DEV environment)
o SES (Secure Enterprise Search 10.1.8.2 install
o SES 10.1.8.4 patchset install
o SES CPU patch apply
o Standalone OC4J and ADF installation
o Search Modeler installation and configuration
o Configure ERNIE Apps instance to be on valid self-signed SSL certificate
o Import ERNIE SSL certificate into SES and Search Modeler
using aussearchdev initially
rh4 x86, default oracle build
** htop and collectl are open source free performance monitoring packages we utilize**
--start
install htop and collectl
wget http://dag.wieers.com/rpm/packages/htop/htop-0.7-1.el4.rf.i386.rpm
rpm -ivh htop-0.7-1.el4.rf.i386.rpm
wget http://downloads.sourceforge.net/project/collectl/collectl/collectl-3.4.0-4/collectl-3.4.0-4.noarch.rpm?use_mirror=voxel
rpm -ivh collectl-3.4.0-4.noarch.rpm
chkconfig collectl on
service collectl start
**We still need to install the necessary rpms so that collectl logs are compressed
--end
useradd -u 501 oracle
groupadd -g 504 dba
usermod -G 504 oracle
verification:
[root@aussearchdev ~]# su - oracle
[oracle@aussearchdev ~]$ id
uid=501(oracle) gid=501(oracle) groups=501(oracle),504(dba)
passwd oracle
** /mnt/oraclebackup is a network dumpspot we use to hold Software installs, RPMs, etc
** /mnt/rpms is a network dumpspot we use to hold ISOs for OS software such as Redhat Linux
mkdir /mnt/oraclebackup
mkdir /mnt/rpms
add the following to /etc/fstab
XXXXXXX:/patches/oraclebackup /mnt/oraclebackup nfs defaults,hard,nolock 0 0
XXXXXXX:/esxpress/nfs /mnt/rpms nfs rw,addr=XXX.XXX.XXX.XXX 0 0
mount /mnt/rpms
Next need to install various oracle needed RPMs.
cd /mnt/rpms/rh40_upd8/RedHat/RPMS/
rpm -ivh perl-Compress-Zlib-1.42-1.el4.i386.rpm
rpm -ivh libaio-devel-0.3.105-2.i386.rpm
rpm -ivh sysstat-5.0.5-25.el4.i386.rpm
rpm -ivh unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
service collectl restart
cd /tmp
wget http://oss.oracle.com/el4/oracle-validated/oracle-validated-1.0.0-18.el4.i386.rpm
rpm -ivh oracle-validated-1.0.0-18.el4.i386.rpm
Now we should have all the RPMs we need.
cd /etc/sysconfig/oracle-validated
./oracle-validated-verify
cd /var/log/oracle-validated/results
more orakernel.log
uname -a
should return 2.6.9 or higher
rpm -qa|grep gcc-
should return 3.4.3 or higher
rpm -qa|grep glibc
should return 2.3.4-2.9 or higher
rpm -qa|grep make
should return 3.80 or higher
rpm -qa|grep binutils
should return 2.15.92.0.2 or higher
rpm -qa|grep openmotif
should return 2.2.3-9.RHEL4.1 or higher
rpm -qa|grep compat-db
should return 4.1.25-9 or higher
rpm -qa|grep setarch
should return 1.6-1 or higher
cat /proc/sys/kernel/sem
should return 250 32000 100 128 or higher (250 32000 100 142 in our case)
cat /proc/sys/kernel/shmall (1073741824 in our case)
should return 2097152 or higher
cat /proc/sys/kernel/shmmax
should return half the size of physical memory (4294967295 in our case - NO LARGER on 32-bit OS)
cat /proc/sys/kernel/shmmni
should return 4096
cat /proc/sys/fs/file-max
should return 65536 (327679 in our case)
cat /proc/sys/net/ipv4/ip_local_port_range
should return 1024 65000
values in /etc/security/limits.conf set by oracle-validated rpm, no changes necessary
add the following line to /etc/pam.d/login
session required /lib/security/pam_limits.so
add the following to /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
mkdir -p /d01/oracle
chmod 777 /d01/oracle
init 6 the box (aka reboot)
Time to start the SES 10.1.8.2 installer
running SES 10.1.8.2 installer
as oracle
cd /mnt/oraclebackup/deathstar_patches/SES/SES10182
./runInstaller
search server name sesprod
administrative password XXXXXXXX for dev,
http port 7777
destination path /d01/oracle/10.1.8/sesdev (dev)
data storage path /d01/oracle/sesdevdata (dev)
next
inventory /d01/oracle/oraInventory
dba group
run orainstroot.sh as requested
continue
all tests should pass, continue
finished clean
tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
Now we need to get to 10.1.8.4 of SES
(yes, you need to keep the system up)
cd /mnt/oraclebackup/deathstar_patches/SES/SES10184/ses_10184pst_linux/
./runInstaller
Destination, choose sesdev
Next
Patchset successful
tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
Apply CPU Patch to SES
CPU JAN 10 says patch 9119261 is required - but patch requires extended support contract
CPU OCT 09 says patch 8836540 is required - but patch requires extended support contract
CPU JUL 09 says patch 8534394 is required - but patch requires extended support contract
CPU APR 09 says patch 8290534 is required - and you can actually download it
Need opatch from 6880880
cp -r /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/OPatch $ORACLE_HOME
export PATH=$ORACLE_HOME/OPatch:$PATH
shut down everything
cd $ORACLE_HOME/bin
./searchctl stopall
cd /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/8290534
opatch apply
cd $ORACLE_HOME/cpu/CPUApr2009
**Note: your sys password is what you set for your administrative password above
sqlplus "sys/XXXXXX" as sysdba;
startup
@catcpu
@?/rdbms/admin/utlrp
shutdown immediate
exit
cd /d01/oracle/10.1.8/sesdev/cpu/view_recompile/
sqlplus "sys/XXXXXXX" as sysdba;
startup upgrade;
@view_recompile_jan2008cpu.sql
@?/rdbms/admin/utlrp
shutdown immediate
cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/ext
mv mail.jar $HOME/mail.jar.backup02222010
mv mailapi.jar $HOME/mailapi.jar.back02222010
cp /d01/oracle/10.1.8/sesdev/search/lib/mail.jar .
SES 10.1.8.4 is now installed and updated with latest available CPU
tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
we're going to go with the standalone OC4j 10.1.3.3 and Oracle ADF 10.1.3.3 method
The URLs for these products are
http://blogs.oracle.com/ebssearch/2009/10/available_now_oracle_search_modeler_11_for_oracle_e-business_suite_11i.html
and specifically
OC4J - http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
ADF - http://www.oracle.com/technology/software/products/jdev/htdocs/adfinstaller10133.html
OC4J install
First you need to have Java 1.5 on the machine. Latest is 1.5.0_22. Package is in /mnt/oraclebackup/deathstar_patches/SES
as root on aussearchdev
cd /usr/local
cp /mnt/oraclebackup/deathstar_patches/SES/jdk-1_5_0_22-linux-i586.bin .
chmod 700 jdk-1_5_0_22-linux-i586.bin
./jdk-1_5_0_22-linux-i586.bin
yes
install OC4J just by copying over the directory
as oracle on aussearchdev
mkdir -p /d01/oracle/oc4j
cd /d01/oracle/oc4j
cp -r /mnt/oraclebackup/deathstar_patches/SES/oc4j/* .
ADF install
vi /mnt/oraclebackup/deathstar_patches/SES/adf/adfinstaller.properties
change the following
OracleHome = /mnt/oraclebackup/deathstar_patches/SES/adf
DesHome = /d01/oracle/oc4j/
type = OC4J
as root
cd /usr/bin
rm java
(yes)
ln -s /usr/local/jdk1.5.0_22/bin/java
su - oracle
java -version should now return 1.5.0_22
export JAVA_HOME=/usr/local/jdk1.5.0_22
cd /mnt/oraclebackup/deathstar_patches/SES/adf
java -jar runinstaller.jar -version
returns The version for the ADF libraries being installed is 10.1.3.41.57 - yes, that is apparently 10.1.3.3.
java -jar runinstaller.jar adfinstaller.properties
output looks good, do not be concerned by
WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/bc4j' whilst deleting bc4j application
WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/datatags' whilst deleting datatags application
as it was trying to delete the old version that didn't exist
Start OC4J
as oracle on aussearchdev
export JAVA_HOME=/usr/local/jdk1.5.0_22
export ORACLE_HOME=/d01/oracle/oc4j
cd $ORACLE_HOME/bin
./oc4j -start
you will be prompted for password - we're setting it. use XXXXXXXXXX
after it's up, kill it (ctrl-c) and restart it with
nohup ./oc4j -start &
last lines in nohup.out is
Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
10/02/23 03:22:38 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
So now on to search modeler installation, going by Installation steps in Note 781366.1
8326128 - This is not a patch to be applied to the Apps, keep reading
as oracle on aussearchdev
cd /mnt/oraclebackup/deathstar_patches/SES/8326128
mkdir -p /d01/oracle/oc4j/uploaded
vi build.properties, changing
installation.type=OC4J
oracle.home=/d01/oracle/oc4j
deploy.server=aussearchdev.domainname.com
deploy.port=23791
web.port=7777
password=XXXXXXXXX
extra.classpath=/d01/oracle/oc4j/uploaded
now set the following environment values in your ssh session
export ORACLE_HOME=/d01/oracle/oc4j
export JAVA_HOME=/usr/local/jdk1.5.0_22
export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
ant main
whole bunch of stuff to screen, errors due to undeploy something that doesn't exist. Finished after a minute with
BUILD SUCCESSFUL
Total time: 58 seconds
Now on to post install steps
restart OC4j
cd $ORACLE_HOME/bin
./modeler.sh -shutdown -port 23791 -password r*l*r*0*
export ORACLE_HOME=/d01/oracle/oc4j
export JAVA_HOME=/usr/local/jdk1.5.0_22
export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
nohup ./modeler.sh -start &
end of nohup.out should show
Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
Try going to http://aussearchdev:8888/modeler/faces/ModelerHome.jsp
Should get login screen, but wait, we haven't installed Oracle Apps interface yet...
Next let's do the Apps side of things
Going by note 953378.1
Using ERNIE (a development instance of E-Business Suite running 11.5.10.2 ATG RUP 7)
as applmgr on ausernieapp (ausernieapp is our app tier)
shut down apps services
apps patch 8225631
verify all the pre-req patches are in ERNIE
select * from ad_bugs where bug_number = '5903765';
select * from ad_bugs where bug_number = '6372396';
select * from ad_bugs where bug_number = '3219567';
select * from ad_bugs where bug_number = '3264822';
select * from ad_bugs where bug_number = '3261254';
select * from ad_bugs where bug_number = '5161676';
select * from ad_bugs where bug_number = '3036401';
select * from ad_bugs where bug_number = '3263588';
select * from ad_bugs where bug_number = '3264818';
select * from ad_bugs where bug_number = '3218526';
select * from ad_bugs where bug_number = '3263645';
select * from ad_bugs where bug_number = '4206794';
select * from ad_bugs where bug_number = '3262486';
select * from ad_bugs where bug_number = '3261243';
select * from ad_bugs where bug_number = '2614213';
select * from ad_bugs where bug_number = '3262159';
select * from ad_bugs where bug_number = '2819091';
select * from ad_bugs where bug_number = '3412795';
patch went in smooth
Log in to ERNIE Apps GUI as sysadmin user responsibility
Give users such as sysadmin FND Search Crawler responsibility
Go to system profile options, set
set FND: Search Enabling Flag to Y at site level
as applmgr on ausernieapp
cd /d01/oracle/ernieappl/fnd/11.5.0/patch/115/sql
sqlplus apps/$APPS_PWD @AFSRCHCF
Enter SES endpoint URL [e.g. http://ap637atg.us.oracle.com:7780]: http://aussearchdev.domainname.com:7777
Enter Apps Admin username [e.g. sysadmin]: sysadmin
Enter Apps Admin password: sysadmin_password
Enter SES Admin username [e.g. eqsys]: eqsys
Enter SES Admin password: eqsyspassword <-- This is the same as sys's password
on aussearchdev as oracle
had to kill modeler and start all the processes, so
kill -9 the modeler oc4j process, then
cd $ORACLE_HOME/bin
./searchctl startall
enter the password when prompted
in IE browser go to
http://aussearchdev.domainname.com:7777/search/admin
log in with eqsys password
global settings tab
identity management setup
click circle next to oracle.search.plugin.security.identity.ebs.EBS12IdentityPliginMgr
(yes, we're going with 12 even though we use Oracle Apps 11i)
http end point https://ausernieapp.domainname.com:8443/webservices/AppSearch/SecurityService
username sysadmin
password XXXXXXX
finish
Global Settings
Federation Trusted Entitites
####entity name sysadmin
####Entity Password XXXXXXXX
According to web conference with Oracle, this should NOT be eqsys but instead be sysadmin from above.
Select the Use Entity Plug-in for authentication check box
add
Trying to go to http://aussearchdev.domainname.com:7777/search/query/search and login (sysadmin / password)
stop midtier on both SES and Apps
cd $ORACLE_HOME/bin
./searchctl stopall
./adstpall.sh apps/$APPS_PWD on EBS app tier
start midtier on both SES and Apps
cd $ORACLE_HOME/bin
./searchctl startall
./adstrtal.sh apps/$APPS_PWD on EBS app tier
Now try and log in to Oracle SES user interface to verify the configuration
http://aussearchdev.domainname.com:7777/search/query
Now start up modeler again
export JAVA_HOME=/usr/local/jdk1.5.0_22
export ORACLE_HOME=/d01/oracle/oc4j
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME/bin
nohup ./modeler.sh -start &
Works now.
Now go to http://aussearchdev.domainname.com:8888/modeleradmin/AdminHome.jsp log in as oc4jadmin/XXXXXXX
Configure new target
Target Type 11i
Description ERNIE
Name ERNIE
EBS Database Host Name auserniedb
EBS Database Port 1521
EBS Database SID ERNIE
username apps
password XXXXXXXXx
oc4jadmin XXXXXXXx
export JAVA_HOME=/usr/local/jdk1.5.0_22
export ORACLE_HOME=/d01/oracle/oc4j
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME/j2ee/home
java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXXXX -addDataSourceConnectionPool -name "ERNIE2-pool" -factoryClass "oracle.jdbc.pool.OracleDataSource" -dbUser "apps" -dbPassword "XXXXXXX" -url "jdbc:oracle:thin:@auserniedb.domainname.com:1521:ERNIE" -applicationName appsearch
java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXX -addManagedDataSource -name "ERNIEDS" -jndiLocation "jdbc/ERNIEDS" -connectionPoolName "ERNIE2-pool" -applicationName appsearch
http://aussearchdev.domainname.com:8888/modeler/faces/ModelerHome.jsp
So, creating a self signed SSL certificate for ERNIE EBS instance (this will not work if you use an SSL certificate for another server like say, PROD)
doing this on ausernieapp
openssl genrsa -des3 -out ausernieapp.key 1024
PEM key is ausernieapp
openssl req -new -key ausernieapp.key -out ausernieapp.csr
PEM key is ausernieapp
Country US
State Texas
Locality Austin
Organization Name Corporation
Organizational Unit Name Information Technology
Common Name ausernieapp.domainname.com
Email address [email protected]
No challenge password
No optional company name
Now let's remove the passphrase from the key
cp ausernieapp.key ausernieapp.key.orig
openssl rsa -in ausernieapp.key.orig -out ausernieapp.key
Now let's generate a self-signed certificate
openssl x509 -req -days 1000 -in ausernieapp.csr -signkey ausernieapp.key -out ausernieapp.crt
Install the private key and certificate
cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.crt
cp server.crt server.crt.backup.03102010
chown applmgr:applmgr server.crt.backup.03102010
cp $HOME/ausernieapp.crt /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.crt/server.crt
cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.key/
cp server.key server.key.backup.03102010
cp $HOME/ausernieapp.key /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.key/server.key
chown applmgr:applmgr server.key.backup.03102010
bounce apache as applmgr
cd /d01/oracle/erniecomn/admin/scripts/ERNIE_ausernieapp
./adapcctl.sh stop
./adapcctl.sh start
In IE
https://ausernieapp.domainname.com:8443
Continue
Click on Certificate Error next to URL bar
Install Certificate -> Next-> Place all certificates in the following store -> trusted root certificate authorities ->finish
close browser, back to https://ausernieapp.domainname.com:8443
no errors,
Next step will be to import key into the SES and Search modelers
as oracle on aussearchdev
cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/security/
cp cacerts cacerts.backup.03102010
scp root@ausernieapp:/root/ausernieapp.crt .
export LANG=c
export PATH=$ORACLE_HOME/jdk/bin:$PATH
keytool -keystore ./cacerts -storepass changeit -alias rootausernieapp -import -trustcacerts -file ausernieapp.crt
--output
Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Serial number: b4e92089cf73076f
Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
Certificate fingerprints:
MD5: 2C:6B:EE:1A:63:6D:XX:A6:05:90:F6:XX:DD:88:F7:80
SHA1: F8:DC:E5:2A:3E:68:XX:E1:EA:E4:75:AE:CC:4F:4A:10:2F:8A:FE:9B
Trust this certificate? [no]: yes
Certificate was added to keystore
Now load our cert
keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
keytool -list -v -keystore ./cacerts now shows
Alias name: rootausernieapp
Creation date: Mar 10, 2010
Entry type: trustedCertEntry
Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Serial number: b4e92089cf73076f
Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
Certificate fingerprints:
MD5: 2C:6B:EE:1A:63:6D:CB:XX:05:90:F6:78:DD:88:F7:80
SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:FA:9E:10:2F:8A:FE:9B
Now we need to load it into the search modeler keystore
as root on aussearchdev
export JAVA_HOME=/usr/local/jdk1.5.0_22/
export PATH=$JAVA_HOME/bin:$PATH
cd /usr/local/jdk1.5.0_22/jre/lib/security/
scp root@ausernieapp:/root/ausernieapp.crt .
output
keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
Enter keystore password: changeit
Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
Serial number: b4e92089cf73076f
Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
Certificate fingerprints:
MD5: 2C:6B:EE:1A:63:6D:CB:A1:05:90:F6:78:DD:88:F7:80
SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:4F:9E:10:2F:8A:FE:9B
Trust this certificate? [no]: yes
Certificate was added to keystore
[root@aussearchdev security]#
output
For troubleshooting, if you go to end of /d01/oracle/10.1.8/sesdev/search/data/config/crawler.dat
you can modify the logLevel from the default of 4 to 2 to get better debug data. No services need to be restarted, it will become active with the next crawl.
While talking with Oracle, they mentioned the following patches
The patches identified 8321527 and 7586924 are SES patches to help with indexing
They also identified patch 9103851 which is an apps patch dealing with responsibilities <-- This is not yet available
Applying patch 7586924
as oracle on aussearchdev
cd $ORACLE_HOME/bin
./searchctl stopall
cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/7586924
opatch apply
cd $ORACLE_HOME/bin
./searchctl startall
sqlplus eqsys/XXXXXX@SESDEV
define SCH_NAME=EQSYS
define PROXY_USER=EQPROXY
define INST_USER=EQ_TEST
@$ORACLE_HOME/search/admin/eq0pkh.sql
@$ORACLE_HOME/search/admin/eq0plb.sql
@$ORACLE_HOME/search/admin/eq0bug_7586924.sql
cd $ORACLE_HOME/search/data/config/
cp crawler.dat crawler.dat.backup.03102010
vi crawler.dat
We're using the Oracle E-Business Suite R12 crawler, so we will add the line
USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
as the line immediately preceding IMPORT -
so the end of the file looks like this:
# system properies: separated by space for multiple system properties or define multiple SYSTEM_PROPERTIES
# logLevel values: DEBUG(2), INFO(4), WARN(6), ERROR(8), FATAL(10)
SYSTEM_PROPERTIES -Doracle.search.logLevel=4 -Doracle.search.log=oracle.search.util.Log4jImpl
USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
IMPORT -
Now on to patch 8321527
cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/8321527
cd $ORACLE_HOME/bin
./searchctl stopall
cd -
opatch apply
cd $ORACLE_HOME/bin
./searchctl startall
sqlplus eqsys/XXXXXXX@SESDEV
define SCH_NAME=EQSYS
define PROXY_USER=EQPROXY
select object_name from user_objects where status = 'INVALID';
--should be no rows selected
@$ORACLE_HOME/search/admin/eq0pkh.sql
@$ORACLE_HOME/search/admin/eq0plb.sql
--should be no rows selected
restart SES
cd -
./searchctl stopall
./searchctl startall -
How do I use Qt and OpenGL with Visual Studio
Hi! I mainly want to program in C++ and I want to use Qt and OpenGL with Visual Studio.
I am currently revising C++ and later on i am going to start reading Qt and OpenGL. I have a background of
Embedded firmware design(C and Assembly).
The Visual Studio Version I have is 2013 ultimate. How do I use Qt and OpenGL with Visual Studio?
Thanks
AlexandrosHi ClassicalGuitar,
The forum supports VS setup and installation. And your issue is not about the forum. I will move the thread to off-topic forum. Thanks for your understanding.
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
Open report with "Save as" and "Open with" dialogue
Hi,
I'm using jasper reports within my application. I manage to open them in a new window but in that case the url containing JasperServer username and password is shown. I would like to open the report without showing the url.
I tryed using a database procedure (http://sqlcur.blogspot.com/2009/02/jasperreports-in-apex.html) but all I get is a alert window saying "file does not begin with ' pdf-'". Couldn't see what is the problem (I used the same procedure as Ino has in his example) so I thought of another way. Is it possible, when someone clicks a button to open a report, to open that report with a "Save as" and "Open with" pop up window?
The javascript function that I use:
<script language="JavaScript" type="text/javascript">
function openLAPopUpJasper(url){
w = open(url,"winLov","toolbar=false,menubar=false,location=false,resizable=yes, //scrollbars=yes,status=yes,fullscreen=true");
if (w.opener == null)
w.opener = self;
w.focus();
</script>
Thanks in advance!
Edited by: Josip on Oct 29, 2009 2:55 AMAnyone?
-
Troubleshooting help needed: My iMac keeps crashing and restarting with a notice: "Spinlock application timed out" What can I do?
Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Console in the page that opens.
Select the most recent panic log under System Diagnostic Reports. Post the contents — the text, please, not a screenshot. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post shutdownStall, spin, or hang reports. -
Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content?
Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content? By anyone, I mean someone who can download and use the free Adobe Reader, on either a Mac or PC. I have Acrobat Pro, and would like to be able to create forms that can not only be filled out and printed, but saved and emailed, which is not an option with the forms I have created to date. They can be filled out, but not saved, with Adobe Reader.
TIA,
NancyTo do what Dave indicated you need to do, it depends on what version of Acrobat you have:
Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
Acrobat 9: Advanced > Extend Features in Adobe Reader
Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
I wonder what it will be next time? -
My Outlook/iCloud calendar invites to others appear to work on my end and sync with my PC and mobile, but when other people "accept" the invite, it will not populate/add in to their calendar. How can I fix this without turning off iCloud?
I am at a new office that uses Outlook (not Outlook Exchange) which does not sync with my mobile... I just got iCloud set up on my PC to sync my contacts, calendar, reminders, etc... The sync worked (not without flaws, but the other issues seem solvable... I think), so that i can now see all my appointments on both my phone and on my PC. The problem I am having is that iCloud moved all of my calendar items from Outlook into iCloud calendar and now when I send out meeting/calendar invites the recipients may accept them, but the meeting does not get added to their calendar. This is a huge problem and may mean that i need to turn off iCloud.
Does anyone know how to fix this?
Thanks!I am replying to my own post here as I seem to have fixed the problem.
I do have some calendars that are shared. Some of those are shared with users who have time zone support turned on. So i activated time zone support on my iphone, then deleted my icloud subscription. I then signed in to icloud again and voila... problem solved.
It is a weird one as the other calendar views were always fine and when you opened an event that appeared in the wrong day (on list view), the correct date of the event was shown in the information...
one more bug in a complicated system I guess -
My ipod nano is no longer recognized by itunes after I installed windows 8.1. The ipod nano still is recognized and works with a Windows 7 computer
Hello, Pete.
Here is an article I would recommend going through when an iPod is not recognized by iTunes or the computer.
iPod not recognized in My Computer and in iTunes for Windows
http://support.apple.com/kb/ts1369
Usually the resolution is updating the Apple Mobile Device Driver. See the section labeled Verify that the Apple Mobile Device USB Driver is installed > For Windows Vista, Windows 7, and Windows 8 > Update the Apple Mobile Device Driver.
iOS: Device not recognized in iTunes for Windows
http://support.apple.com/kb/TS1538
Cheers,
Jason H. -
All my purchased song from iTunes are not playing complete (iPod and computer with Windows Vista), unexpectedly stops and continues with next song. What am I doing wrong?
Are the songs playing whole in iTunes? if not download them again.
else read this Apple Support Article on your problem
Have a nice day! -
I have a Macbook Pro running Leopard 10.5.8. I had a problem with my my operating system (my fault, I moved a file I shoudnt have) couldnt boot up but was able to boot up from a backup. I managed to repair my original system except now all the system folders, including hidden folders are littered with duplicate folders and files with the suffix (from old Mac). For the most part the dupes are an exact copy, but not always. I want to remove them to free up space and cant imagine duplicate folders in the /system/library are not hindering my computer. But I dont know where to start and am afraid of doing irreparable damage. Any ideas
pacull,
Use iCal>View>Show Notifications to choose what to do with the notification. -
How can we get Dynamic columns and data with RTF Templates in BI Publisher
How can we get Dynamic columns and data with RTf Templates.
My requirement is :
create table xxinv_item_pei_taginfo(item_id number,
Organization_id number,
item varchar2(4000),
record_type varchar2(4000),
record_value CLOB,
State varchar2(4000));
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
select * from xxinv_item_pei_taginfo;
Item id Org Id Item Record_type Record_value State
493991 224 1265-D30 USES fever TX
493991 224 1265-D30 HOW TO USE one tablet daily TX
493991 224 1265-D30 SIDE EFFECTS XYZ TX
493991 224 1265-D30 DRUG INTERACTION ABC TX
493991 224 1265-D30 OVERDOSE Go and see doctor TX
493991 224 1265-D30 NOTES Take after meal TX
Above is my data
I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
its a BI Publisher report.
please suggestif you have data in db then you can create xml with needed structure
and so you can create bip report
do you have errors or .... ? -
Upgrade ERP database 11g and ATG7 with SSO integation
Please let us know how to Perform Upgrade ERP database 11g and ATG7 with SSO integation .
Regards .We have completed to upgrade ERP database from 9.2.0.6 to 11.2.0.1 and also apply ATG 7 on Test instance.
And user finish testing , there is no issue after upgrade and application can work as normal.
On Test instance we didn't implement Single Sign On
But on Production we have Single Sign ON.
Now we plan to upgrade on Production instance. But we afraid that we will found any issue on Production relate to SSO. Becase we don't have a chance to test it.
My question is:
Are there any spacial step we need to do if we have implemented SSO After upgrade DB 11g and ATG 7? -
Trying to sync ipod with itunes library, but I keep getting this message, " The ipod is synced with another itunes library. Do you want to erase this ipod and sync with this i tunes library?"
I do not want to erase my ipod!!! Any suggestions?? please help!Another way. You can use a USB flash drive & the camera connection kit.
Plug the USB flash drive (works the same with an SD card) into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
Using The iPad Camera Connection Kit
http://support.apple.com/kb/HT4101
Cheers, Tom -
I registered a digital copy of a movie on disneymoviesanywhere. I connected the account to my itunes account but I can't find the movie on my itunes account. I'm just trying to download the movie onto my ipod touch.
Hey cptniemo,
Thanks for the question. Connecting your iTunes Store and Disney Movies Anywhere accounts should sync all of your eligible Disney, Pixar, and Marvel movies between both services. After connecting your accounts, you can check your purchased history in the iTunes Store:
Download past purchases
http://support.apple.com/kb/HT2519
Alternatively you can download the free Disney Movies Anywhere app from the App Store (iOS 7 required):
https://itunes.apple.com/us/app/disney-movies-anywhere-watch/id766894692?mt=8&uo =4
For more information and support with Disney Movies Anywhere, see this resource:
About Disney Movies Anywhere and iTunes Store
http://support.apple.com/kb/HT6129
Thanks,
Matt M. -
Checking Account and help with code ?
Hi all..my computer hung up on me, so I'm not sure if my last post went through. First of all thank you all for helping me out the other day with my question on the Bank Account. It continues :)
I'm trying to work on each class one by one..when I test my Checking Account, it isn't printing out the correct balance. The string method to print this is coming from the Withdrawal class...so I know it has to be somewhere in there but I can't seem to figure out why it isn't totalling the balance...or how to get it too.
Then when I test my MyBank class, it hangs up on line 63..which I could swear I have written correctly. Again I am getting a NullPointerException and I honestly think I have the line of code written right, but I'm guessing I dont.
Any help would be appreciated.
public abstract class BankAccount {
public static final String bankName = "BrianBank";
protected String custName;
protected String pin;
protected Transaction[] history;
private double balance;
private double amt, amount;
private double bal, initBal;
private int transactions;
private final int MAX_HISTORY = 100;
private int acct;
protected BankAccount(String cname, String cpin, double initBal) {
custName = cname;
pin = cpin;
balance = initBal;
history = new Transaction[MAX_HISTORY];
transactions =0;
public double getBalance() {
return balance;
public void withdraw(double amt) {
history [transactions] = new Withdrawal (bal, amt);
balance = bal;
amount = amt;
balance -= amt;
transactions = transactions + 1;
public void deposit(double amt) {
history [transactions] = new Deposit (bal, amt);
balance = bal;
amount = amt;
balance += amt;
transactions = transactions +1;
// abstract method to return account number
public abstract int getAcctNum();
// abstract method to return a summary of transactions as a string
public abstract String getStatement();
public class CheckingAccount extends BankAccount implements IncursFee
private int transactions;
private double balance, initBal, amt;
private static final int NOFEE_WITHDRAWALS = 10;
private static final double TRANSACTION_FEE = 5.00;
public static final String bankName = "iBank";
public static final int STARTING_ACCOUNT_NUMBER = 10000;
private int checkingAccountNumber = STARTING_ACCOUNT_NUMBER;
private static int accountNumberCounter = STARTING_ACCOUNT_NUMBER;
private String custName;
private String pin;
public CheckingAccount (String cname, String cpin, double initBal)
super (cname, cpin, initBal);
custName = cname;
pin = cpin;
balance = initBal;
accountNumberCounter++;
checkingAccountNumber = accountNumberCounter;
//initialize a count of transactions
transactions = 0;
public double getBalance()
return balance;
public void withdraw(double amt)
super.withdraw (amt);
transactions ++;
public void deposit(double amt)
super.deposit (amt);
transactions ++;
public int getAcctNum ()
return checkingAccountNumber;
public String getStatement ()
int i = 0;
String output = "";
while ( i < history.length && history[i] != null )
output += history.toString () + "\n";
i++;
return output;
public void deductFee(double fee)
if (transactions > NOFEE_WITHDRAWALS)
{ fee = TRANSACTION_FEE *(transactions - NOFEE_WITHDRAWALS);
super.withdraw(fee);
balance -=fee;
transactions = 0;
public interface IncursFee {
public abstract void deductFee(double fee);
public abstract class Transaction {
protected double initBal;
protected double tranAmt;
// constructor
protected Transaction(double bal, double amt) {
initBal = bal;
tranAmt = amt;
abstract public String toString();
public class Withdrawal extends Transaction
private double initBal;
private double amount;
private static NumberFormat fmt = NumberFormat.getCurrencyInstance();
public Withdrawal (double bal, double amt)
super (bal, amt);
initBal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initBal) + "\n" + "Withdrawal : " + fmt.format(amount);
import java.text.NumberFormat;
public class Deposit extends Transaction
private double initbal, balance;
private double amount;
private static NumberFormat fmt = NumberFormat.getCurrencyInstance();
public Deposit (double bal, double amt)
super (bal, amt);
initbal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initbal) + "\n" + "Deposit : " + fmt.format(amount);
public class TestCheckingAcct {
public static void main(String[] args) {
BankAccount b1 = new CheckingAccount("Harry", "1234", 500.0);
System.out.println (b1.getBalance ());
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(50);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(10);
b1.withdraw(1);
System.out.println(b1.getStatement());
// This interface specifies the functionality requirements of a bank
public interface Bank {
public abstract int openNewAccount(String customerName, String customerPIN, String accType, double initDepAmount);
public abstract void processWithdrawal(int accNum, String pin, double amount);
// executes a deposit on the specified acct by the amount
public abstract void processDeposit(int accNum, String pin, double amount);
// returns the balance of acct
public abstract double processBalanceInquiry(int accNum, String pin);
// returns summary of transactions
public abstract String processStatementInquiry(int accNum, String pin);
import java.util.ArrayList;
public class MyBank implements Bank
private ArrayList<BankAccount> savAccounts = new ArrayList<BankAccount>(); //dynamically grows
private ArrayList<BankAccount> chkAccounts = new ArrayList<BankAccount>(); //dynamically grows
private SavingsAccount sav;
private CheckingAccount chk;
private int accNum;
private String customerName, customerPIN, accType, pin;
private double initDepAmount, amount, balance;
public int openNewAccount(String customerName, String customerPIN, String accType, double initDepAmount)
this.customerName = customerName;
this.customerPIN = customerPIN;
this.accType = accType;
this.initDepAmount = initDepAmount;
if ( accType.equals("Savings"))
BankAccount savAcct = new SavingsAccount(customerName, customerPIN, initDepAmount);
try
savAccounts.add(savAcct);
catch (ArrayIndexOutOfBoundsException savAccounts)
return savAcct.getAcctNum();
else
CheckingAccount chkAcct = new CheckingAccount(customerName, customerPIN, initDepAmount);
try
chkAccounts.add(chkAcct);
catch (ArrayIndexOutOfBoundsException chkAccounts)
return chkAcct.getAcctNum();
public void processWithdrawal (int accNum, String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.withdraw (amount);
if (accNum >50000 && accNum <60000)
sav.withdraw (amount);
public void processDeposit (int accNum, String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.deposit (amount);
if (accNum >50000 && accNum <60000)
sav.deposit (amount);
public double processBalanceInquiry (int accNum, String pin)
this.accNum = accNum;
this.pin = pin;
this.balance = 0;
if (accNum >10000 && accNum <20000)
balance = chk.getBalance ();
if (accNum >50000 && accNum <60000)
balance = sav.getBalance ();
return balance;
public String processStatementInquiry(int accNum, String pin)
this.accNum = accNum;
this.pin = pin;
this.statement = "";
if (accNum >10000 && accNum <20000)
statement = chk.getStatement ();
if (accNum >50000 && accNum <60000)
statement= sav.getStatement ();
return statement;Here's some quick code review:
public abstract class BankAccount {
public static final String bankName =
me = "BrianBank";
protected String custName;
protected String pin;
protected Transaction[] history;
private double balance;
private double amt, amount;
private double bal, initBal;
private int transactions;// make MAX_HISTORY private static final, too.
private final int MAX_HISTORY = 100;
private int acct;
protected BankAccount(String cname, String cpin,
pin, double initBal) {
custName = cname;
pin = cpin;
balance = initBal;
history = new Transaction[MAX_HISTORY];
transactions =0;
public double getBalance() {
return balance;
public void withdraw(double amt) {
history [transactions] = new Withdrawal (bal, amt);
balance = bal;
amount = amt;
balance -= amt;// ++transactions above would be elegant.
transactions = transactions + 1;
public void deposit(double amt) {
history [transactions] = new Deposit (bal, amt);
balance = bal;
amount = amt;
balance += amt;
transactions = transactions +1;
// abstract method to return account number// why abstract?
public abstract int getAcctNum();
// abstract method to return a summary of
y of transactions as a string// why abstract?
public abstract String getStatement();
public class CheckingAccount extends BankAccount
implements IncursFee
private int transactions;
private double balance, initBal, amt;
private static final int NOFEE_WITHDRAWALS =
WALS = 10;
private static final double TRANSACTION_FEE =
_FEE = 5.00;
public static final String bankName = "iBank";
public static final int STARTING_ACCOUNT_NUMBER
NUMBER = 10000;
private int checkingAccountNumber =
mber = STARTING_ACCOUNT_NUMBER;
private static int accountNumberCounter =
nter = STARTING_ACCOUNT_NUMBER;// BankAccount has a custName attribute; why does CheckingAccount need
// one if it extends BankAccount?
private String custName;
private String pin;
public CheckingAccount (String cname, String
String cpin, double initBal)
super (cname, cpin, initBal);
custName = cname;
pin = cpin;
balance = initBal;
accountNumberCounter++;
checkingAccountNumber =
tNumber = accountNumberCounter;
//initialize a count of transactions
transactions = 0;
// same as BankAccount - why rewrite it?
public double getBalance()
return balance;
// same as BankAccount - why rewrite it?
public void withdraw(double amt)
super.withdraw (amt);
transactions ++;
// same as BankAccount - why rewrite it?
public void deposit(double amt)
super.deposit (amt);
transactions ++;
// same as BankAccount - why rewrite it?
public int getAcctNum ()
return checkingAccountNumber;
public String getStatement ()
int i = 0;
String output = "";
while ( i < history.length && history[i] !=
ory[i] != null )
output += history.toString () + "\n";
i++;
return output;
public void deductFee(double fee)
if (transactions > NOFEE_WITHDRAWALS)
{ fee = TRANSACTION_FEE *(transactions -
ansactions - NOFEE_WITHDRAWALS);
super.withdraw(fee);
balance -=fee;
transactions = 0;
public interface IncursFee {
public abstract void deductFee(double fee);
public abstract class Transaction {
protected double initBal;
protected double tranAmt;
// constructor
// why protected? make it public.
protected Transaction(double bal, double amt) {
initBal = bal;
tranAmt = amt;
abstract public String toString();
public class Withdrawal extends Transaction
private double initBal;
private double amount;
private static NumberFormat fmt =
= NumberFormat.getCurrencyInstance();
public Withdrawal (double bal, double amt)
super (bal, amt);
initBal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initBal) + "\n" +
+ "Withdrawal : " + fmt.format(amount);
import java.text.NumberFormat;
public class Deposit extends Transaction
private double initbal, balance;
private double amount;
private static NumberFormat fmt =
= NumberFormat.getCurrencyInstance();
public Deposit (double bal, double amt)
super (bal, amt);
initbal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initbal) + "\n" +
+ "Deposit : " + fmt.format(amount);
public class TestCheckingAcct {
public static void main(String[] args) {
BankAccount b1 = new CheckingAccount("Harry",
, "1234", 500.0);
System.out.println (b1.getBalance ());
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(50);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(10);
b1.withdraw(1);
System.out.println(b1.getStatement());
// This interface specifies the functionality
requirements of a bank
public interface Bank {
public abstract int openNewAccount(String
String customerName, String customerPIN, String
accType, double initDepAmount);
public abstract void processWithdrawal(int
(int accNum, String pin, double amount);
// executes a deposit on the specified acct by
t by the amount
public abstract void processDeposit(int accNum,
Num, String pin, double amount);
// returns the balance of acct
public abstract double processBalanceInquiry(int
(int accNum, String pin);
// returns summary of transactions
public abstract String
ring processStatementInquiry(int accNum, String
pin);
import java.util.ArrayList;
public class MyBank implements Bank
private ArrayList<BankAccount> savAccounts =
unts = new ArrayList<BankAccount>(); //dynamically
grows
private ArrayList<BankAccount> chkAccounts =
unts = new ArrayList<BankAccount>(); //dynamically
grows
private SavingsAccount sav;
private CheckingAccount chk;
private int accNum;
private String customerName, customerPIN,
erPIN, accType, pin;
private double initDepAmount, amount, balance;
public int openNewAccount(String customerName,
erName, String customerPIN, String accType, double
initDepAmount)
this.customerName = customerName;
this.customerPIN = customerPIN;
this.accType = accType;
this.initDepAmount = initDepAmount;
if ( accType.equals("Savings"))
BankAccount savAcct = new
vAcct = new SavingsAccount(customerName, customerPIN,
initDepAmount);
try
savAccounts.add(savAcct);
catch (ArrayIndexOutOfBoundsException
Exception savAccounts)
return savAcct.getAcctNum();
else
CheckingAccount chkAcct = new
hkAcct = new CheckingAccount(customerName,
customerPIN, initDepAmount);
try
chkAccounts.add(chkAcct);
catch (ArrayIndexOutOfBoundsException
Exception chkAccounts)
return chkAcct.getAcctNum();
public void processWithdrawal (int accNum,
accNum, String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.withdraw (amount);
if (accNum >50000 && accNum <60000)
sav.withdraw (amount);
public void processDeposit (int accNum, String
String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.deposit (amount);
if (accNum >50000 && accNum <60000)
sav.deposit (amount);
public double processBalanceInquiry (int accNum,
String pin)
this.accNum = accNum;
this.pin = pin;
this.balance = 0;
if (accNum >10000 && accNum <20000)
balance = chk.getBalance ();
if (accNum >50000 && accNum <60000)
balance = sav.getBalance ();
return balance;
public String processStatementInquiry(int accNum,
m, String pin)
this.accNum = accNum;
this.pin = pin;
this.statement = "";
if (accNum >10000 && accNum <20000)
statement = chk.getStatement ();
if (accNum >50000 && accNum <60000)
statement= sav.getStatement ();
return statement;
Very bad style with those brace placements. Pick a style and stick with it. Consistency is the key.
Your code isn't very readable.
You don't have a SavingsAccount here anywhere, even though your MyBank uses one.
You use JDK 1.5 generics yet you've got ArrayList as the static type on those declarations. Better to use the interface type List as the compile time type on the LHS.
You have a lot of compile time problems, and some incomprehensible stuff, but I was able to change it enough to my TestCheckingAcct run to completion. No NPE exceptions.
I'm not sure I agree with your design.
No SavingsAccount. The accounts I have ALL incur fees - no need for a special interface there. Savings accounts are usually interest bearing. That's the way they behave differently from checking accounts. Where do you have that?
You rewrite too much code. If you put behavior in the abstract BankingAccount class (a good idea), the whole idea is that concrete classes that extend BankingAccount don't need to overload any methods whose default behavior is correct for them.
I don't know that I'd have separate Deposit and Withdrawal to implement Transaction. I'd make Transaction concrete and have starting balance, ending balance, and a transaction type String (e.g., "DEPOSIT", "WITHDRAWAL")
It'd be good to see some thought put into exception handling. I don't see an OverdrawnException anywhere. Seems appropriate.
No transfer methods from one account to another. I often do that with my bank.
That's enough to get started.
Maybe you are looking for
-
How do I use the XML-data from a callback in JSP?
I´ve tried this but with no success.. How do I recieve the data in a servlet/JSP-page? Thanks.
-
I have to join three tables but i m getting error as given below: Error i m getting- Syntax error(missing operator) in query expression 'invoice.INVOICE_NO=inv_ent_main.INVOICE_NO INNER JOIN invrate ON invrate.INVOICE_NO=inv_ent_main.INVOICE_N'. My Q
-
Where the create or replace packagebody will be stored?
Friends, can anybody clear this doubt pls?... writing create or replace packagebody in the sql*plus will be stored in the database. but if i write the same create or replace packagebody in the forms where it will be stored? will it store in the datab
-
How can I get my money back I BUY the Coins in the game fieldrunners 2 HD were cut $ 9.99 $ from my account and did not receive any coins?! No. process MHFQZV02X8 please cancel the operation, collected coins and thank you
-
Changing the look and feel of a JDialog
possible to do that? and how do i change it?