Troubleshooting

   

Incorrect Database Accessed When Using SQL Server

I get an error telling me that a table or column name doesn't exist in my database but I know that the name is valid.

You have to take an extra step when setting up a SQL Server database for use by WebLogic if you're using BEA's SQL Server JDBC driver. Even though the database name is specified as part of the database URL in the connection pool definition, it's ignored when the database server is accessed. The database that is accessed is always the default database for the login you specify. You have to create a login that has the database you want to use selected as its default.

Connection Factory or EJB Reference Not Found

I defined a connection factory or EJB reference in the ejb-jar.xml deployment descriptor for my bean, but the reference isn't found when I try to access it.

The entries you include in the ejb-jar.xml for a connection factory or EJB reference define part of what you need to do to put the reference in the bean's environment but not everything. You still have to do whatever your particular application server requires to complete the environment entry. If you're using WebLogic, this means adding entries to the weblogic-ejb-jar.xml file for the bean. For a connection factory reference, you have to associate the reference entry with a data source registered with the application server. For an EJB reference, you have to associate the reference entry with the JNDI name of the EJB you want to access.

ejbCreate or ejbPostCreate Not Implemented

I get an error compiling my EJB JAR file that tells me that I haven't implemented a particular ejbCreate or ejbPostCreate method.

You must provide a corresponding ejbCreate and ejbPostCreate method for every create method declared in the home interface of your bean. These methods must have the same parameter list as the create method and they can only throw application exceptions that are declared in throws clause of the create method (or subclasses of those exceptions). You must declare your ejbCreate methods to return the primary key class and your ejbPostCreate methods to return void . Missing or invalid implementations of these methods aren't detected by the Java compiler but by the validations steps performed by your vendor's deployment tools before it builds the container classes for your beans.

ejbFind Not Implemented

I get an error compiling my EJB JAR file that tells me that I haven't implemented a particular ejbFind method.

You must provide a corresponding ejbFind method for every finder method declared in the home interface of your bean. An ejbFind method must have the same parameter list as the finder method and it can only throw application exceptions that are declared in throws clause of the finder (or subclasses of those exceptions). You must declare your ejbFind methods to return either the remote interface type or a collection. A missing or invalid implementation of a finder isn't detected by the Java compiler but by the validations steps performed by your vendor's deployment tools before it builds the container classes for your beans.



Special Edition Using Enterprise JavaBeans 2.0
Special Edition Using Enterprise JavaBeans 2.0
ISBN: 0789725673
EAN: 2147483647
Year: 2000
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net