This can occur when you deploy an Application Server sample that uses Java DB after running the default Application Server command to restart Java DB (asadmin stop-database then asadmin start-database). Portal Server samples are no longer be accessible.
Suggested Fix. There are a number ways to approach this problem
Do not stop Java DB.
If Java DB was stopped, restart Java DB with the following command allowing the Application Server database to be created in an alternate location.
Solaris OS: /asadmin start-database --dbhome /var/opt/SUNWportal/derby
Linux: /asadmin start-database --dbhome /var/opt/sun/portal/derby
If you want the database to be located in the default location, start a second instance of Java DB using a non-default port, then specify the correct Derby port in the Application Server samples common.properties file. For example: asadmin start-database --dbport 1528