Posted by Albin Joseph | Posted in WebSphere Commerce | Posted on 24-05-2009
0
CNTR0031W: Error starting CMP bean wcfull#WebSphereCommerceServerExtensionsData.jar#XXXX:
javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: jdbc/Default: First component in name Default not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:968)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1431)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3493)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1521)
..............................
JDBCPersister W CNTR0032W: Error creating CMP persister using datasource: jdbc/Default
BeanMetaData E CNTR0035E: EJB container caught com.ibm.ejs.container.ContainerException: ; nested exception is:
com.ibm.websphere.cpi.CPIException: Persister creation failed.The bean's J2EEName is wcfull#WebSphereCommerceServerExtensionsData.jar#XXXX. The data source name is jdbc/Default.; nested exception is:
javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: jdbc/Default: First component in name Default not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
at com.ibm.ejs.container.BeanMetaData.completeInitialization(BeanMetaData.java:1299)
at com.ibm.ws.runtime.component.EJBContainerImpl.createBeanMetaData(EJBContainerImpl.java:1039)
at com.ibm.ws.runtime.component.EJBContainerImpl.createModuleMetaData(EJBContainerImpl.java:830)
at com.ibm.ws.runtime.component.EJBContainerImpl.createMetaData(EJBContainerImpl.java:1575)
at com.ibm.ws.runtime.component.MetaDataMgrImpl.createFactoryMetaData(MetaDataMgrImpl.java:115)
......................
This was the exception I got when I tried to start my WebSphere Commerce Full Test environment after creating a new EJB. Even though the solution was very simple, for me it took some time to figure it out what exactly went wrong. If any of you facing the same problem, then here is the fix.
Open your ibm-ejb-jar-bnd.xmi file. Search for jdbc/Default. Here jdbc/Default is the name of the data source that was not found by the server. You will be able to see an entry like
<defaultDatasource xmi:id="ResourceRefBinding_1242722240919" jndiName="jdbc/Default"/>
Just to remove the above line and your server will again start properly.
Posted by Albin Joseph | Posted in WebSphere | Posted on 16-12-2008
0
Alert in Tools Framework
Tools Framework uses its own JavaScript function to display an alert message instead of JavaScript alert function. The normal JavaScript alert function does not use UTF-8 encoding to display any message. So double byte character messages will not be displayed correctly. So to address this issue, Tools Framework uses its own JavaScript functions for displaying any messages to the client.
The Tools Framework JavaScript function for displaying an alert is
alertDialog("Alert Message");
Posted by Albin Joseph | Posted in WebSphere Commerce | Posted on 12-12-2008
0
Commerce Accelerator Customization
I was customizing WebSphere Commerce Accelerator for that last couple of weeks. We are adding a new feature for configuring a product dynamically. WCS does not provide any product configurator OTB and hence no screen was available in Commerce Accelerator to manage the Product Configuration. Our business wants to manage the Product Configuration from commerce accelerator. So the only option available to us was to customize Commerce Accelerator. Customizing WebSphere Commerce Accelerator is a very difficult task. Commerce Accelerator uses a framework called Tools Framework which manages all the state using JavaScript. If someone wants to learn Object oriented JavaScript the best thing to do is to customize some of the Tools Framework components. The biggest issue with Commerce Accelerator customization is JavaScript debugging. CA works only in IE and there are no good debuggers available for JavaScript debugging in IE.
Every time I customize Tools Framework I will think to document how to do this customization. However unfortunately it never happens. So next time when I started customization I need to do the same research again and again. So this time I kept some notes on how to create Wizard, Notebook, Dialog, Tree etc.
I am thinking of some posts that contain these notes on customizing and debugging of commerce accelerator whenever I get some time.
Posted by Albin Joseph | Posted in WebSphere Commerce | Posted on 19-11-2008
2
Creating a new Key in WCS
In WebSphere Commerce, tables that need a unique primary key, the keys are not auto generated. They are coming from the KEYS table. The WCS table KEYS defines the range of key values for all tables that require a unique key. So always new key generated will be using values of KEYS table.
Any time if you need this value programmatically, you can get it using ECKeyManager class. So the code for getting the next keys table for a table is
com.ibm.commerce.key.ECKeyManager keyMgr = com.ibm.commerce.key.ECKeyManager.singleton();
Long key = keyMgr.getNextKey("tablename");
Where tablename is your table’s name. Table name is case sensitive. If your primary key is defined as long data type use getNextKeyAsLong instead of getNextKey method.
In order to work the above code, we need to have an entry in the KEYS table.
Posted by Albin Joseph | Posted in WebSphere Commerce | Posted on 05-08-2008
3
WebSphere Commerce Developer Enterprise 6.0 installation – Part 1 covers the installation of RAD and WAS Fix packs. Once we have done with all that installation we are ready for our WebSphere Commerce Developer 6.0 installation. If we are planning to install IBM Sales Center as part of our development environment, we need to install IBM Sales Center before installing WCS Toolkit.
To perform the WCS installation follow the below steps. I had already installed IBM Sales Center in my machine.
1. Double click on setup.exe from WCS Toolkit CD. This will bring the installation wizard.

2. Click on Next and from the page appears accept the license.

3. Click on Next and select the installation directory. Please select a directory with no spaces and no long file paths.

4. Click on Next. This screen would ask us to select the installation components. Select the components you want to install. (Select at least the WebSphere Commerce development environment
).

4. Click on Next. This page will be the installation summary page.

5. Now click on next. The installation of WCS Toolkit begins and you will be presented with a screen as shown below.

6. Once the installation is over. Click on Finish and exit the wizard.

We are done with our WCS 6 Toolkit installation. Go to Start -> Programs -> IBM WebSphere Commerce Developer Enterprise 6.0 -> WebSphere Commerce development environment and start your toolkit. Publish a store and start coding.