Search This Blog
Monday, April 30, 2012
How to install local copy of WCS info center
Sunday, April 29, 2012
Recover Database without Archive log
When we did a cloning, startup nomount :
$ sqlplus '/as sysdba' SQL*Plus: Release 10.2.0.4.0 - Production on Tue Apr 13 13:54:43 2010 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup nomount pfile=initMYDB.ora ORACLE instance started. Total System Global Area 5251268608 bytes Fixed Size 2091368 bytes Variable Size 1040189080 bytes Database Buffers 4194304000 bytes Redo Buffers 14684160 bytes
Create New control File:
SQL> @createctl.sql Control file created.
we don’t need to resetlogs, but the one of datafile need to recover :
SQL> alter database open; alter database open * ERROR at line 1: ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '/u01/system01.dbf'
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 5991183372639 generated at 04/13/2010 13:51:42 needed for
thread 1
ORA-00289: suggestion :
/u02/db/10.2.0/dbs/arch1_1125_714320021.dbf
ORA-00280: change 5991183372639 for thread 1 is in sequence #1125
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/system01.dbf'
ORA-01112: media recovery not started
SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01194: file 1 needs more recovery to be consistent ORA-01110: data file 1: '/u01/system01.dbf'
1. Shutdown immediate
SQL> Shutdown immediate
- - UNDO_MANAGEMENT=AUTO
- UNDO_TABLESPACE=OLD_UNDOTS
- - UNDO_MANAGEMENT=MANUAL
- _ALLOW_RESETLOGS_CORRUPTION = TRUE
- _ALLOW_ERROR_SIMULATION = TRUE
$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Apr 13 16:06:56 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup mount pfile=initMYDB.ora
ORACLE instance started.
Total System Global Area 5251268608 bytes
Fixed Size 2091368 bytes
Variable Size 1040189080 bytes
Database Buffers 4194304000 bytes
Redo Buffers 14684160 bytes
Database mounted.
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 5991183372639 generated at 04/13/2010 13:51:42 needed for
thread 1
ORA-00289: suggestion :
/u02/db/10.2.0/dbs/arch1_1125_714320021.dbf
ORA-00280: change 5991183372639 for thread 1 is in sequence #1125
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/system01.dbf'
ORA-01112: media recovery not started
SQL> alter database open resetlogs;
Database altered.
6. Create new UNDO Tablespace
SQL> Create UNDO tablespace NEW_UNDOTS datafile '/u02/undo01.dbf' size 2048M;
SQL> alter tablespace OLD_UNDOTS offline;
SQL> alter tablespace NEW_UNDOTS ;
SQL> shutdown immediate;
- + Remark the parameter :
- UNDO_MANAGEMENT=MANUAL - _ALLOW_RESETLOGS_CORRUPTION = TRUE - _ALLOW_ERROR_SIMULATION = TRUE
- + Add and edit the parameter :
UNDO_MANAGEMENT=AUTO UNDO_TABLESPACE=NEW_UNDOTS
12. Startup the database :
SQL> startup
SQL> alter system set undo_tablespace=NEW_UNDOTS;
SQL> drop tablespace OLD_UNDOTS including contents and datafiles;
15. Good Luck
Monday, April 23, 2012
Changing ATP to NON-ATP inventory model
1. Change inventory system value on STORE table. For NON-ATP, inventory system value will be -2
2. NON-ATP mode need default shipmode at store level. For this update storedef table and put a default shipmode id... you can use query like below
update storedef set shipmode_id=12053;
3. Update store id and ffmcenter id in inventory table
4. update end date and shipmode id in SHPARRANGE
Restart server and see WCS is working on NON-ATP...
Saturday, April 7, 2012
Enacting customer in WCS
WCS provides following two URL for enacting customer
- RunAsUserSetInSession URL
- RestoreOriginalUserSetInSession URL
This URL allows administrators with the proper authority to run subsequent commands in the same session under a specified customer's identity.
This URL allows administrators with the proper authority to run subsequent commands in the same session under a specified customer's identity. The access control framework checks that the current user belongs to one of the following roles:
- Customer Service Representative (CSR)
- Customer Service Supervisor (CSS)
- Operations Manager
- Sales Manager
- Seller
URL structure
Parameter values
langId
The preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
URL
The URL to be called when the command completes successfully. The default value is RunAsUserSetInSessionView.
storeId
The reference number of the store to which the user is logging on.
runAsUserId
The registered customer's user ID. This is the customer under whom subsequent requests will run.
Example 1
To switch to a specified customer's user ID (for example, 5) an administrator needs to execute the RunAsUserSetInSession URL with the runAsUserId parameter set to "5". Upon successfully running the RunAsUserSetInSession URL, RunAsUserSetInSessionView gets called. https:// myhostname/webapp/wcs/stores/servlet/RunAsUserSetInSession?runAsUserId=5
Example 2
The following example switches to user ID 5 and calls the specified URL (UserAccountView): https:// myhostname/webapp/wcs/stores/servlet/RunAsUserSetInSession?runAsUserId=5&URL=UserAccountView
Behavior
Ensure that the user who executes the command is of registerType 'A'.
The customer to which the command tries to switch (runAsUserId) is of registerType 'R' (registered user).
Saves the runAsUserId value in the command context to be stored in the session so that in subsequent requests or commands, the runAsUserId value can be restored.
If you have switched to a user ID using the RunAsUserSetInSession URL, you cannot switch to another user ID. You must first call RestoreOriginalUserSetInSession before you can make another RunAsUserSetInSession call.
If you have switched to another user ID, and when running the command, you want to retrieve the original identity, you can make a call to getCallerId on the CommandContext.
Exception conditions
Exception message key
Description
_ERR_MISSING_PARMS
The command throws this exception if the runAsUserId value is not specified.
_ERR_MEMBER_USER_ADMIN_TYPE
The command throws this exception if the current user is not of registerType 'A' (administrator).
_ERR_MEMBER_USER_REGISTERED_TYPE
The command throws this exception if the user that the command tries to switch under is not of registerType 'R' (registered).
If the forUser parameter is specified while the administrator session is populated with a customer's session information, an exception is generated.
RestoreOriginalUserSetInSession URL
This URL resets the session for subsequent commands so they revert back to the original administrator user ID after an administrator has established the runAsUser value in the session by running the RunAsUserSetInSession command.
Parameter values
langId
The preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
URL
The URL to be called when the command completes successfully. The default value is RestoreOriginalUserSetInSessionView.
storeId
The reference number of the store.
Example 1
To revert back to the administrator's original user ID, the administrator runs the RestoreOriginalUserSetInSession URL. Upon successfully running this URL, the default view RestoreOriginalUserSetInSessionView is called. https://myhostname/webapp/wcs/stores/servlet/RestoreOriginalUserSetInSession?storeId=11001&URL=AjaxLogonForm&myAcctMain=1
Example 2
Upon successfully running this URL, the specified URL (UserAccountView) is called. https://myhostname/webapp/wcs/stores/servlet/RestoreOriginalUserSetInSession?storeId=11001&URL=AjaxLogonForm&myAcctMain=1
Behavior
Removes the runAsUserId value from the command context such that it is no longer stored in the session. Subsequent requests and commands are run under the original user ID.
If runAsUserId is not set, that is RunAsUserSetInSession was not previously run in the same session, this command leaves the current session unchanged.
By Default CSR or Store agent cannot modify customer current basket, becuase its locked by customer
There are two ways to resolve this locking issue
1. Disable locking
Add following line in WC-Server.xml
orderlockfeature enabled="false"
2. Customize order enacting flow using
User AdvancedOrderEditBeginCmd for taking lock and modify order
Finally User AdvancedOrderEditEndCmd to release lock..
In this duration customer will not be able to modify or place order because lock is with CSR agent.
Monday, April 2, 2012
ClassNotFound for WebSphereCommerceServerExtensionsLogic folder
1/31/08 11:39:37:718 EST 0000000a CommerceSrvr I RegistryManager initializeRegistryEntry CMN0007S: Initialization has started for "
Solution:
Right click WC > properties > JAVA EE Module Dependecies > Make sure for project WebSphereCommerceServerExtensionsLogic column JAR is checked and In Lib Dir column is unchecked.Reason: Issue comes because, WC searches for logic jar (which has all classes of logic) in lib directory of itself, which is not present.