Technote (troubleshooting)
Problem
Creating a federated repository with the command, wp-create-db could result in a NullPointerException.
Symptom
Following exception is seen in SystemOut.log (Deployment Manager's SystemOut.log if in a cluster):
[2/21/12 12:01:00:548 CST] 0000008f JDBCSqlImport I
com.ibm.ws.wim.dao.schema.JDBCSqlImport importFile(String file)
CREATE TABLE myfeddbuser.DBENTITY (
ENTITY_ID NUMERIC(38, 0) NOT NULL,
ENTITY_TYPE VARCHAR(36) NOT NULL,
UNIQUE_ID NCHAR(36) NOT NULL,
UNIQUE_NAME NVARCHAR(1000) NOT NULL,
UNIQUE_NAME_KEY NVARCHAR(236) NOT NULL
)
[2/21/12 12:01:00:577 CST] 0000008f JMXObjectOutp E ADMC0001E: Unable to serialize object: com.microsoft.sqlserver.jdbc.StreamError
where myfeddbuser is the name of the federated db user.
Cause
The following are the reasons why the w-create-db task could fail:
- Table already exists
- Schema name is not valid.
- wp-create-db script is being executed a subsequent time for a new db user.
If the table already exists, drop the table, if the schema is not valid, correct it. If it is not clear why the CREATE TABLE command failed, run the same manually from a database command prompt or a database sql tool.
Important to Note: If the script wp-create-db needs to be executed more than once for a different user, make sure the schema.sql file in the below "Resolving the problem" section is updated with the correct federated db user.
Diagnosing the problem
A few things can be done to verify if the issue is with the database user that was created.
1) Check if the table myfeddbuser.DBENTITY exists in the new database.
2) If table is present, drop the table and to Step 4 and if table is not present, go to step 3.
3) Manually create the same table with the above table creation SQL statement using the same exact user, myfeddbuser, if this fails, check with your DBA why tables cannot be created. If successful, go to step 4.
4) Enable the following trace string:
com.ibm.ws.wim.*=all
in WSAS Admin console if standalone portal and DMGR console if in a cluster.
5) Restart server and recreate the problem and engage IBM Support.
Resolving the problem
Check the file, <WAS_HOME>/etc/wim/setup/database/sqlserver/schema.sql if it has @DbUser@, if so replace the literal with the correct db user. Re-run the task
where <WAS_HOME> is location of WebSphere AppServer on a standalone server or the location of dmgr node in a cluster setup.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.