For Programmers: Free Programming Magazines  


Home > Archive > Java Help > September 2004 > Problem with a simple CMP bean while working on JBoss









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem with a simple CMP bean while working on JBoss
Subra

2004-09-21, 9:05 am

Problem with a simple CMP bean while working on JBoss

CLIENT : EmployeeSalInsertClient.java
CMP Jar: emp
------------------------------------------------
Database : MS SQL SERVER
Table Name is : emp
Column names:
eno - int
ename - varchar(30)
esal - float

It is a simple ejb.........
able to insert the records into the database.............
unable to find records..................

The error is given below

C:\javajava -classpath

..;D:\jboss-3.2.4\server\default\lib\jboss-j2ee.jar;D:\jboss-3.2.4\serv

er\default\lib\jbossall-client.jar;D:\jboss-3.2.4\server\default\lib\jnet.jar;
EmployeeSalInsertClient
Exception in thread "main" javax.ejb.FinderException: Unknown query:
public
abstract emp.Employee
emp.EmployeeHome.findByPrimaryKey(java.lang.Integer)
throws java.rmi.RemoteException,javax.ejb.FinderException
at

sun.rmi.transport.StreamRemoteCall. exceptionReceivedFromServer(StreamRemote
Call.jav
a:245)
at

sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at
org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
Source)
at

org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:
135)
at

org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
at

org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at

org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
at
org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy0.findByPrimaryKey(Unknown Source)
at
EmployeeSalInsertClient.main(EmployeeSalInssimertClient.java:34)
Tomer Ben-David

2004-09-23, 3:59 pm

s_vaddi@yahoo.com (Subra) wrote in message news:<f4283ea5.0409210222.45e2e7b5@posting.google.com>...
> Problem with a simple CMP bean while working on JBoss
>
> CLIENT : EmployeeSalInsertClient.java
> CMP Jar: emp
> ------------------------------------------------
> Database : MS SQL SERVER
> Table Name is : emp
> Column names:
> eno - int
> ename - varchar(30)
> esal - float
>
> It is a simple ejb.........
> able to insert the records into the database.............
> unable to find records..................
>
> The error is given below
>
> C:\javajava -classpath
>
> .;D:\jboss-3.2.4\server\default\lib\jboss-j2ee.jar;D:\jboss-3.2.4\serv
>
> er\default\lib\jbossall-client.jar;D:\jboss-3.2.4\server\default\lib\jnet.jar;
> EmployeeSalInsertClient
> Exception in thread "main" javax.ejb.FinderException: Unknown query:
> public
> abstract emp.Employee
> emp.EmployeeHome.findByPrimaryKey(java.lang.Integer)
> throws java.rmi.RemoteException,javax.ejb.FinderException
> at
>
> sun.rmi.transport.StreamRemoteCall. exceptionReceivedFromServer(StreamRemote
Call.jav
> a:245)
> at
>
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
> at
> org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
> Source)
> at
>
> org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:
> 135)
> at
>
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
> at
>
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
> at
>
> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
> at
> org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
> at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
> at $Proxy0.findByPrimaryKey(Unknown Source)
> at
> EmployeeSalInsertClient.main(EmployeeSalInssimertClient.java:34)



do you have a findByPrimaryKey method in your bean home interface ?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com