chuck keuper

Greenhorn
+ Follow
since Mar 17, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by chuck keuper

I am trying to figure out the operations of struts1.2. I was given Structs in Action by Husted. This book is not for the version1.2. This book uses ActionError in the validate method. I looked up ActionError and found out that it is depreciated. I was told to use ActionMessage in its place. Here is the code below with ActionMessage:

import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

...

/**
* Method validate
* @param mapping
* @param request
* @return ActionMessage
*/
public ActionMessage validate(
ActionMapping mapping,
HttpServletRequest request) {

ActionMessage errors = new ActionMessage();

if((userName == null) || (userName.length() < 1)) {
errors.add("username", new ActionMessage("error.username.required"));
}
if((password == null) || (password.length() < 1)) {
errors.add("password", new ActionMessage("error.password.required"));
}

//return errors;
}


The errors I am receiving is "The return type is incompatible with ActionForm.validate(ActionMapping,HttpServletRequest)" "The constructor ActionMessage is undefinded" ...

How do I use ActionMessage with the validate() in the UserLoginForm.java??
19 years ago
I am trying to figure out a way to generate the maximum primaryKey using a QL statement. Is there a way? I keep on running across code that says primaryKey should be created in the EJBcreate with the primaryKey + 1 to retrieve the next primaryKey;
I have a client

/*
* Created on Oct 12, 2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.synesis7.mcsi3.admin.versioncontrol.submitepdr.entity.client;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import com.synesis7.mcsi3.admin.versioncontrol.submitepdr.entity.interfaces.*;
import java.util.*;

public class EntityClient {

public static void main(String[] args) {
try {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
env.put(Context.PROVIDER_URL,"iiop://127.0.0.1:3700");

//get naming context
Context context = new InitialContext(env);

//look up jndi name
Object ref = context.lookup(ChangeDocsEntityHome.JNDI_NAME); //JNDI_NAME remote
//Object ref = context.lookup("ejb/ChangeDocsEntityHome"); //JNDI_NAME remote

//look up jndi name and cast to Home interface
ChangeDocsEntityHome home = (ChangeDocsEntityHome)PortableRemoteObject.narrow(ref,ChangeDocsEntityHome.class);
//ChangeDocsEntityLocalHome home = (ChangeDocsEntityLocalHome)PortableRemoteObject.narrow(ref,ChangeDocsEntityLocalHome.class);

Integer value = new Integer("1");
ChangeDocsEntity hl = home.findByPrimaryKey(value);
//ChangeDocsEntityLocal hl = home.findByPrimaryKey(value);
System.out.println("notes = " + hl.getNotes());
System.out.println("reason change = " + hl.getReasonChg());
System.out.println("recommendataion = " + hl.getRecommendation());
} catch (Exception e) {
e.printStackTrace();
System.out.println("Exception e = " + e.getMessage());
}
}
}

When I run in debug i get java.lang.ClassCastException at the narrow statement. The Exception e = null. I am running with SunApServ 8 with Eclipse 3.0.1. Any help would greatly be appreciated.
Dan,
this is generated code and it is slimmed down. Do you understand the code?
Here is the rest of the code from the entity test client main.

ContentsTagListTestClient4 client = new ContentsTagListTestClient4();
try {
int tagListId = 1;

client.generateTagList(); ... etc ...

public void generateTagList()
{
if (contentsTagListRemote == null)
{
System.out.println("Error in generateTagList(): " + ERROR_NULL_REMOTE);
return ;
}

long startTime = 0;
if (logging)
{
log("Calling generateTagList()");
startTime = System.currentTimeMillis();
}
try
{
contentsTagListRemote.generateTagList(); ... etc ...

Here is the code from the TagListBean.
public void genTagList()
{
String QUERY = "SELECT tl.tagDefTypId FROM TagListSchema tl WHERE tl.masterDocId = 1 AND tl.startPos >= 143816 AND tl.endPos <= 143840";
String DRIVER = "oracle.jdbc.driver.OracleDriver";
Connection connection = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
String url = "jdbc racle:thin:@10.103.0.69:1421 EVEL";
String userName = "userName";
String password = "password";

try {
Class.forName(DRIVER);
connection = DriverManager.getConnection("jdbc racle:thin:@10.103.0.69:1421 EVEL", userName, password);
preparedStatement = connection.prepareStatement(QUERY);
preparedStatement.executeQuery();
resultSet = preparedStatement.getResultSet();

while (resultSet.next()) {
System.out.println("resultSet = " + resultSet.getString("tagDefTypId"));
}

//close statement and connection
if (preparedStatement != null) preparedStatement.close();
if (connection != null) connection.close();
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("Exception = " + ex.getMessage());

}
}
I have created a method for an entity bean with home/remote interfaces. I have also created a test client that calls the method.

client.generateTagList();

The method was created within the "Methods that use Remote interface methods to access data through the bean" which calls the

TagListRemote.generateTagList();

I am getting this error:

Error in generateTagList(): Remote interface reference is null. It must be created by calling one of the Home interface methods first.

I assumed that the generated code was correct.

Can someone straighen me out?
My logic is to create a row in a database table. I use generatePrimaryKey to return a primaryKey (int). Here is the code for generatePrimaryKey


public int generatePrimaryKey()
{
String query = "SELECT MAX(changeDocId) FROM ChangeDocs";
Connection connection = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
String userName = "userName";
String password = "password";
int primaryKey = 0;

try {
connection = DriverManager.getConnection("jdbc racle:thin:@10.109.0.89:1521 EVEL", userName, password);
preparedStatement.
preparedStatement = connection.prepareCall(query);
preparedStatement.executeQuery();
resultSet = preparedStatement.getResultSet();

if (!resultSet.next()) {
System.out.println("Can not go to next resultSet in generatePrimaryKey of ChangeDoc");
} else {
primaryKey = resultSet.getInt(1);
}
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("Exception = " + ex.getStackTrace());
}
return (primaryKey + 1);
}

This particular table has a constraint on it and I have made sure that the changeCaseId in the MasterDoc table is found in the ChangeCase table.
I am having this exact same problem with JBuilder 9 and BES 5.2. Was a solution found??
I am trying to add a record into a table and I keep on getting a NullPointerException. Any help would be greatly appreciated!!

This is the code from the main.

EcrChangeDocsTestClient1 client = new EcrChangeDocsTestClient1();
int sChangeDocId = 6;
int sChangeCaseId = 1;
Date sChangeDt = new Date();
Integer sChangePriorityLvl = new Integer(1);
Integer sIsActive = new Integer(1);
int sMasterDocId = 1;
String sNotes = new String("okay");
String sReasonChg = new String("Why not");
Integer sSeverity = new Integer(1);

try {
EcrChangeDocsRemote ecrChg = client.create(sChangeCaseId, sChangeDt, sChangePriorityLvl, sIsActive, sMasterDocId, sNotes, sReasonChg, sSeverity);
ecrChg.setChangeCaseId(sChangeCaseId);
ecrChg.setChangeDt(sChangeDt);
ecrChg.setChangePriorityLvl(sChangePriorityLvl);
ecrChg.setIsActive(sIsActive);
ecrChg.setMasterDocId(sMasterDocId);
ecrChg.setNotes(sNotes);
ecrChg.setReasonChg(sReasonChg); ....

This is the code from the bean.

public EcrChangeDocsPK ejbCreate(int sChangeCaseId, java.util.Date sChangeDt, java.lang.Integer sChangePriorityLvl, java.lang.Integer sIsActive, int sMasterDocId, java.lang.String sNotes, java.lang.String sReasonChg, java.lang.Integer sSeverity) throws CreateException {

int primaryKey = 0;
primaryKey = this.generatePrimaryKey();

setChangeDocId(primaryKey);
setChangeCaseId(sChangeCaseId);
setChangeDocId(primaryKey);
setChangeDt(sChangeDt);
setChangePriorityLvl(sChangePriorityLvl);
setIsActive(sIsActive);
setMasterDocId(sMasterDocId);
setNotes(sNotes);
setReasonChg(sReasonChg);
setSeverity(sSeverity);

return new EcrChangeDocsPK(primaryKey);
}

This is the error.

-- Calling create(1, Thu Jun 24 13:26:36 MDT 2004, 1, 1, 1, okay, Why not, 1)
-- Failed: create(1, Thu Jun 24 13:26:36 MDT 2004, 1, 1, 1, okay, Why not, 1)
java.rmi.ServerException: java.rmi.RemoteException: null; nested exception is:
java.lang.NullPointerException
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.getSystemException(EJBHome.java:851)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1407)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1023)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:816)
at com.inprise.ejb.Dispatcher.create(Dispatcher.java:630)
at com.inprise.ejb.EntityHome.create(EntityHome.java:98)
at com.inprise.ejb.EJBHome.invoke(EJBHome.java:355)
at com.inprise.ejb.EJBHome.access$300(EJBHome.java:6)
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.invoke(EJBHome.java:740)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOAInvokeHandler.create(EcrChangeDocsRemoteHomePOAInvokeHandler.java:96)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOAInvokeHandler.create(EcrChangeDocsRemoteHomePOAInvokeHandler.java:144)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOA._invoke(EcrChangeDocsRemoteHomePOA.java:118)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOA._invoke(EcrChangeDocsRemoteHomePOA.java:44)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2693)
at com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:109)
at com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInterceptorManager.java:110)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:824)
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapter.java:68)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:1106)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.java:106)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)
Caused by: java.lang.NullPointerException
at com.borland.ejb.pm.EntityData.modifyObject(EntityData.java:174)
at com.borland.ejb.pm.EntityData.setInt(EntityData.java:534)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsBean_PM.setChangeCaseId(EcrChangeDocsBean_PM.java:44)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsBean.ejbCreate(EcrChangeDocsBean.java:26)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsBean_PM.ejbCreate(EcrChangeDocsBean_PM.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:32)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:166)
at com.inprise.ejb.Dispatcher$EntityCreateMethod.invoke(Dispatcher.java:1618)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1299)
... 19 more
; nested exception is:
java.rmi.RemoteException: null; nested exception is:
java.lang.NullPointerException
at com.synesis7.mcsi3.admin.versioncontrol._EcrChangeDocsRemoteHome_Stub.create(_EcrChangeDocsRemoteHome_Stub.java:376)
at ecr.EcrChangeDocsTestClient1.create(EcrChangeDocsTestClient1.java:105)
at ecr.EcrChangeDocsTestClient1.main(EcrChangeDocsTestClient1.java:913)
Caused by: java.rmi.RemoteException: null; nested exception is:
java.lang.NullPointerException
at com.inprise.vbroker.orb.DelegateImpl.handleReply(DelegateImpl.java:850)
at com.inprise.vbroker.orb.DelegateImpl.invoke(DelegateImpl.java:689)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at com.synesis7.mcsi3.admin.versioncontrol._EcrChangeDocsRemoteHome_Stub.create(_EcrChangeDocsRemoteHome_Stub.java:269)
... 2 more
Caused by: java.lang.NullPointerException
at com.borland.ejb.pm.EntityData.modifyObject(EntityData.java:174)
at com.borland.ejb.pm.EntityData.setInt(EntityData.java:534)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsBean_PM.setChangeCaseId(EcrChangeDocsBean_PM.java:44)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsBean.ejbCreate(EcrChangeDocsBean.java:26)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsBean_PM.ejbCreate(EcrChangeDocsBean_PM.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:32)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:166)
at com.inprise.ejb.Dispatcher$EntityCreateMethod.invoke(Dispatcher.java:1618)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1299)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1023)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:816)
at com.inprise.ejb.Dispatcher.create(Dispatcher.java:630)
at com.inprise.ejb.EntityHome.create(EntityHome.java:98)
at com.inprise.ejb.EJBHome.invoke(EJBHome.java:355)
at com.inprise.ejb.EJBHome.access$300(EJBHome.java:6)
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.invoke(EJBHome.java:740)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOAInvokeHandler.create(EcrChangeDocsRemoteHomePOAInvokeHandler.java:96)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOAInvokeHandler.create(EcrChangeDocsRemoteHomePOAInvokeHandler.java:144)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOA._invoke(EcrChangeDocsRemoteHomePOA.java:118)
at com.synesis7.mcsi3.admin.versioncontrol.EcrChangeDocsRemoteHomePOA._invoke(EcrChangeDocsRemoteHomePOA.java:44)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2693)
at com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:109)
at com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInterceptorManager.java:110)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:824)
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapter.java:68)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:1106)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.java:106)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)
-- Return value from create(1, Thu Jun 24 13:26:36 MDT 2004, 1, 1, 1, okay, Why not, 1): null.
I found an article at http://info.borland.com/techpubs/bes/v6/html_books/developersguide/ejb-ql.html that talks about sun-queries.


Sub-Queries
Sub-queries are permitted as deep as the database implementation being queried allows. For example, you could use the following sub-query (in bold) specified in ejb-jar.xml. Note that the sub-query includes ORDER BY as well, and the results are to be returned in descending (DESC) order.

<query>
<query-method>
<method-name>findApStatisticsWithGreaterThanAverageValue</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT Object(s1) FROM ApStatistics s1 WHERE s1.averageValue > SELECT AVG(s2.averageValue) FROM ApStatistics s2 ORDER BY s1.averageValue DESC</ejb-ql>
</query>
See your database implementation documentation for details on the appropriate use of sub-queries.
I have this sql statement that I am trying to convert to a ql statement.

This is the sql statement

SELECT * FROM Text
WHERE tagListId IN
(SELECT tagListId FROM TagList
WHERE startPos>=
(SELECT startPos FROM TagList WHERE tagDefTypId=25
AND startPos<=(SELECT startPos FROM TagList WHERE tagListId=821) AND
endPos>=(SELECT endPos FROM TagList WHERE tagListId=821))
AND endPos<=
(SELECT endPos FROM TagList WHERE tagDefTypId=25
AND startPos<=(SELECT startPos FROM TagList WHERE tagListId=821) AND
endPos>=(SELECT endPos FROM TagList WHERE tagListId=821))
)
I have converted it to this ql statment
SELECT OBJECT(tl) FROM TagListSchema tl, TextSchema t WHERE t.data LIKE ?1 AND tl.tagListId IN
(SELECT tlist.tagListId FROM TagListSchema tlist WHERE tlist.startPos>=
(SELECT tlst.startPos FROM TagListSchema tlst WHERE tlst.tagDefTypId=25
AND tlst.startPos<=(SELECT tagl.startPos FROM TagListSchema tagl WHERE
tagl.tagListId=821) AND tlst.endPos>=(SELECT tglst.endPos FROM
TagListSchema tglst WHERE tglst.tagListId=821)) AND
tlist.endPos<=(SELECT tgl.endPos FROM TagListSchema tgl WHERE
tgl.tagDefTypId=25 AND tgl.startPos<=(SELECT tlt.startPos FROM
TagListSchema tlt WHERE tlt.tagListId=821) AND tgl.endPos>=(SELECT
tglt.endPos FROM TagList tglt WHERE tglt.tagListId=821)))

My problem is the IN statement in sql. I try to put it in ql language and I receive errors stating that a string is exspected by an integer found. Error below

ejbcontainer: Throwing System exception for the container-started transaction for method: public abstract java.util.Collection doccontents.ContentsTagListRemoteHome.findByContentsData(java.lang.String) throws javax.ejb.FinderException,java.rmi.RemoteException
ejbcontainer: com.borland.ejb.ql.QueryError: [line 1, col 83] Operator IN expects a <String> type, but a <integer> type was found
ejbcontainer: at com.borland.ejb.ql.QueryError.raiseQueryError(QueryError.java:154)
ejbcontainer: at com.borland.ejb.ql.QueryError.expectedType(QueryError.java:49) ...

I have looked in O'reilly ejb book, suns site and they seem to have very simple examples. How do I apply this in operator???
I have an entity bean with textId (Integer), tagListId (Intger), data (clob). I have created a simple finder method with this code:

SELECT OBJECT(t) FROM Text AS t

This is the error that is being returned:

java.rmi.ServerException: java.rmi.RemoteException: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor; nested exception is:
com.borland.ejb.ql.QueryError: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.getSystemException(EJBHome.java:851)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1407)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1023)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:816)
at com.inprise.ejb.Dispatcher.find(Dispatcher.java:695)
at com.inprise.ejb.EntityHome.doFind(EntityHome.java:221)
at com.inprise.ejb.EntityHome.find(EntityHome.java:235)
at com.inprise.ejb.EJBHome.invoke(EJBHome.java:369)
at com.inprise.ejb.EJBHome.access$300(EJBHome.java:6)
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.invoke(EJBHome.java:740)
at text.TextRemoteHomePOAInvokeHandler.findTOCData(TextRemoteHomePOAInvokeHandler.java:36)
at text.TextRemoteHomePOAInvokeHandler.findTOCData(TextRemoteHomePOAInvokeHandler.java:107)
at text.TextRemoteHomePOA._invoke(TextRemoteHomePOA.java:62)
at text.TextRemoteHomePOA._invoke(TextRemoteHomePOA.java:44)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2693)
at com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:109)
at com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInterceptorManager.java:110)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:824)
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapter.java:68)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:1106)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.java:106)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)
Caused by: com.borland.ejb.ql.QueryError: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor
at com.borland.ejb.ql.QueryError.raiseQueryError(QueryError.java:139)
at com.borland.ejb.ql.QueryError.unknownSchemaName(QueryError.java:56)
at com.borland.ejb.ql.VariableDeclaration.attribute(VariableDeclaration.java:36)
at com.borland.ejb.ql.BaseAst.requiredType(BaseAst.java:106)
at com.borland.ejb.ql.SelectAst.attribute(SelectAst.java:47)
at com.borland.ejb.ql.QueryTranslater.translate(QueryTranslater.java:39)
at com.borland.ejb.pm.JdbcQlFinder.translateQuery(JdbcQlFinder.java:195)
at com.borland.ejb.pm.JdbcEntityManager.prepareJdbcQlFinder(JdbcEntityManager.java:460)
at com.borland.ejb.pm.JdbcEntityManager.getFinder(JdbcEntityManager.java:316)
at com.borland.ejb.pm.JdbcEntityManager.findCollection(JdbcEntityManager.java:828)
at com.borland.ejb.pm.JdbcEntityManager.findCollection(JdbcEntityManager.java:815)
at text.TextBean_PM.ejbFindTOCData(TextBean_PM.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:32)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:166)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1301)
... 20 more
; nested exception is:
java.rmi.RemoteException: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor; nested exception is:
com.borland.ejb.ql.QueryError: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor-- Failed: findTOCData()
at text._TextRemoteHome_Stub.findTOCData(_TextRemoteHome_Stub.java:116)
at text.TextTestClient8.findTOCData(TextTestClient8.java:108)
at text.TextTestClient8.main(TextTestClient8.java:398)
Caused by: java.rmi.RemoteException: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor; nested exception is:
com.borland.ejb.ql.QueryError: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor
at com.inprise.vbroker.orb.DelegateImpl.handleReply(DelegateImpl.java:850)
at com.inprise.vbroker.orb.DelegateImpl.invoke(DelegateImpl.java:689)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at text._TextRemoteHome_Stub.findTOCData(_TextRemoteHome_Stub.java:26)
... 2 more
Caused by: com.borland.ejb.ql.QueryError: [line 1, col 23] The schema name <Text> was not found in the deployment descriptor
at com.borland.ejb.ql.QueryError.raiseQueryError(QueryError.java:139)
at com.borland.ejb.ql.QueryError.unknownSchemaName(QueryError.java:56)
at com.borland.ejb.ql.VariableDeclaration.attribute(VariableDeclaration.java:36)
at com.borland.ejb.ql.BaseAst.requiredType(BaseAst.java:106)
at com.borland.ejb.ql.SelectAst.attribute(SelectAst.java:47)
at com.borland.ejb.ql.QueryTranslater.translate(QueryTranslater.java:39)
at com.borland.ejb.pm.JdbcQlFinder.translateQuery(JdbcQlFinder.java:195)
at com.borland.ejb.pm.JdbcEntityManager.prepareJdbcQlFinder(JdbcEntityManager.java:460)
at com.borland.ejb.pm.JdbcEntityManager.getFinder(JdbcEntityManager.java:316)
at com.borland.ejb.pm.JdbcEntityManager.findCollection(JdbcEntityManager.java:828)
at com.borland.ejb.pm.JdbcEntityManager.findCollection(JdbcEntityManager.java:815)
at text.TextBean_PM.ejbFindTOCData(TextBean_PM.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:32)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:166)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1301)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1023)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:816)
at com.inprise.ejb.Dispatcher.find(Dispatcher.java:695)
at com.inprise.ejb.EntityHome.doFind(EntityHome.java:221)
at com.inprise.ejb.EntityHome.find(EntityHome.java:235)
at com.inprise.ejb.EJBHome.invoke(EJBHome.java:369)
at com.inprise.ejb.EJBHome.access$300(EJBHome.java:6)
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.invoke(EJBHome.java:740)
at text.TextRemoteHomePOAInvokeHandler.findTOCData(TextRemoteHomePOAInvokeHandler.java:36)
at text.TextRemoteHomePOAInvokeHandler.findTOCData(TextRemoteHomePOAInvokeHandler.java:107)
at text.TextRemoteHomePOA._invoke(TextRemoteHomePOA.java:62)
at text.TextRemoteHomePOA._invoke(TextRemoteHomePOA.java:44)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2693)
at com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:109)
at com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInterceptorManager.java:110)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:824)
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapter.java:68)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:1106)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.java:106)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)
-- Return value from findTOCData(): null.
Exception = null

I have checked the deployment descriptor editor and can find the entity Text. I have created other finder methods without clobs and have had no problem.

can anyone set me straight???
Can a clob be returned in a finder method?? I believe the bean instance
and/or a collection are returned.
I have a finder method

SELECT OBJECT(t) FROM Text t, TagList l, MasterDocCatalog c WHERE
c.masterDocId = ?1 AND l.tagListId = ?2 AND l.tagDefTypId = 8 AND
t.tagListId = l.tagListId

The information being returned from the Text is a textId (Integer),
tagListId (Integer), data (Clob);

I am receiving a NullPointerException.
I have created a finder method, listed below:

SELECT OBJECT(t) FROM Text t, TagList l, MasterDocCatalog c WHERE
c.masterDocId = ?1 AND l.tagListId = ?2 AND l.tagDefTypId = 8 AND
t.tagListId = l.tagListId

TagList has a relation (1-1 uni) to Text and (1-m uni) to MasterDocCatalog.

-- Calling findTOCData(1, 1)
javax. ejb. ObjectNotFoundException
at com.borland.ejb.pm.JdbcOneProvider.executeQuery(JdbcOneProvider.java:33)
at com.borland.ejb.pm.JdbcEntityManager.findOne(JdbcEntityManager.java:586)
at com.borland.ejb.pm.JdbcEntityManager.findOne(JdbcEntityManager.java:566)
at text.EntityTextBean_PM.ejbFindTOCData(EntityTextBean_PM.java:55)--
Failed: findTOCData(1, 1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:32)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:166)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1301)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1023)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:816)
at com.inprise.ejb.Dispatcher.find(Dispatcher.java:695)
at com.inprise.ejb.EntityHome.doFind(EntityHome.java:221)
at com.inprise.ejb.EntityHome.find(EntityHome.java:235)
at com.inprise.ejb.EJBHome.invoke(EJBHome.java:369)
at com.inprise.ejb.EJBHome.access$300(EJBHome.java:6)
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.invoke(EJBHome.java:740)
at
text.EntityTextRemoteHomePOAInvokeHandler.findTOCData(EntityTextRemoteHomePO
AInvokeHandler.java:40)
at
text.EntityTextRemoteHomePOAInvokeHandler.findTOCData(EntityTextRemoteHomePO
AInvokeHandler.java:112)
at text.EntityTextRemoteHomePOA._invoke(EntityTextRemoteHomePOA.java:66)
at text.EntityTextRemoteHomePOA._invoke(EntityTextRemoteHomePOA.java:44)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2693)
at
com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:109)
at
com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInte
rceptorManager.java:110)
at
com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.j
ava:824)
at
com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapt
er.java:68)
at
com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAda
pter.java:1106)
at
com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.j
ava:106)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)
-- Return value from findTOCData(1, 1): null.
Exception = null

I have defined the object t from text t?? Can anyone set me straight???
I am working on SessionFacade/DTO's. I created a test client for the Members table and used an iterator to loop through the values. The code is below:

try {
Integer sMemberId = new Integer("1");
Collection c = client.findByDocNames(sMemberId);
Iterator i = c.iterator();
while (i.hasNext()) {
MasterDocCatalogRemote mcr = (MasterDocCatalogRemote)PortableRemoteObject.narrow(i.next(),MasterDocCatalogRemote.class);
System.out.println("DocId = " + mcr.getMasterDocId() + " DocName = " + mcr.getDocName());
}
} catch (Exception ex) {
ex.getStackTrace();
System.out.println("Exception = " + ex);
}

The SessionFacade/DTO's is returning an array of MasterDocCatalogDto[]. I want to be able to loop through and see values. I need an object and class for the narrow parameters and i am not sure what needs to be placed in the object parameter. The code is listed below:

try {
Integer sMemberId = new Integer("1");
int i;
MasterDocCatalogDto[] c = client.masterDocCatalogFindByDocNames(sMemberId);
for (i=1; i lessthan c.length; i++) {
MasterDocCatalogRemote mcr = (MasterDocCatalogRemote)PortableRemoteObject.narrow(???, MasterDocCatalogRemote.class);
System.out.println("DocId = " + mcr.getMasterDocId() + "DocName = " + mcr.getDocName());
}
} catch (Exception ex) {
ex.getStackTrace();
System.out.println("Exception = " + ex);
}


Can someone set me staight???