Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Problem with a simple CMP bean while working on JBoss
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.ja
r;
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
C
all.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(JRMPInvokerProx
y.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)

Report this thread to moderator Post Follow-up to this message
Old Post
Subra
09-21-04 02:05 PM


Re: Problem with a simple CMP bean while working on JBoss
s_vaddi@yahoo.com (Subra) wrote in message news:<f4283ea5.0409210222.45e2e7b5@posting.googl
e.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(StreamRemot
eCall.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(JRMPInvokerPr
oxy.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 ?

Report this thread to moderator Post Follow-up to this message
Old Post
Tomer Ben-David
09-23-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:15 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.