[JBoss-user] [EJB/JBoss] - Unexpected problem

2004-12-25 Thread johntodd
Hi all.
I have a J2EE application, consists of some entity beans, session beans and 
JSPs.
I have deployed this application into JBoss and I don't have any problems.
I added some entries to the database using entity beans.
then, I tried to deploy this application to J2EE RI 1.4 (SJSAS 8.0).
now the application is running on RI 1.4 , I search for some values that I have 
entered previously in JBoss and I got the expected results without any problems.
then I treid to add some recoreds to the database while the application on RI 
1.4 using my
entity beans, no problems here.
I shut down the RI 1.4 and run JBoss.
I want to search for the entity bean that has been added in RI 1.4 but I got 
the following
exception :

  | org.jboss.tm.JBossTransactionRolledbackException: Entity not found: 
primaryKey=; 
  | CausedByException is:   
  | Entity not found: primaryKey=; nested exception is: 
  | javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=; - 
nested throwable: 
  | (javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=)
  | 
well, I am confused here, J2EE applications should be portable between J2EE 
servers but not
in my case !
RI 1.4 is able to search for entity beans that had been added in JBoss but not 
vise versa..
some one shed some lights here ??
thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3859883#3859883

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859883


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - unable to lookup an EJB from a JavaBean

2004-12-24 Thread johntodd
Hi all.
I'm creating a J2EE application.
my web application contains a simple JavaBean that hides the operation of 
locating my Session EJB.

  | Object obj = ic.lookup(java:comp/env/ejb/Liga);
  | LigaHome home = (LigaHome)PortableRemoteObject.narrow(obj, LigaHome.class);
  | 
this JavaBean will be used by servlets, JSPs.
this is the important part of jboss.xml :

ejb-nameLigaBean/ejb-bean
jndi-nameejb/Liga

when trying to use the application, I got the exception :
javax.naming.NameNotFoundException: ejb not bound
I changed jndi-element to Liga , I got the same exception
the application is only works if I do the following :
Object obj = ic.lookup(Liga);
any ideas ???
thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3859868#3859868

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859868


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Re: Error creating the dlq connection, not my fault

2004-12-22 Thread johntodd
No way, I got the same problem..
any help

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3859700#3859700

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859700


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Re: Error creating the dlq connection, not my fault

2004-12-22 Thread johntodd
The page says :
In conf/jboss-service.xml change the scanner to the following: 

  True
well, my confs is already contains this line ! changing the value to false, a 
new exception is thrown...

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3859701#3859701

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859701


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Error creating the dlq connection, not my fault

2004-12-21 Thread johntodd
Hi all.
I'm facing a bang head situation and I need help.
(I'm using JBoss 3.2.5)
I have 2 beans:
a stateless session bean that send a message to a queue.
a MDB that listens to the previous queue and prints the message to the console.
snipets from ejb-jar.xml

  | session
  |resource-ref
  |   res-ref-namejms/QueueFactory/res-ref-name
  |   res-typejavax.jms.QueueConnectionFactory/res-type
  |   res-authContainer/res-auth
  |   res-sharing-scopeShareable/res-sharing-scope
  |   /resource-ref
  |   resource-env-ref
  |   resource-env-ref-namejms/TicketQueue/resource-env-ref-name
  |   resource-env-ref-typejavax.jms.Queue/resource-env-ref-type
  |   /resource-env-ref
  | /session
  | 
jboss.xml

  | jboss
  | enterprise-beans
  | session
  | ejb-nameProducerEJB/ejb-name
  | jndi-nameProducerRemoteHome/jndi-name
  | resource-ref
  | res-ref-namejms/QueueFactory/res-ref-name
  | jndi-namejava:/JmsXA/jndi-name
  | /resource-ref
  | resource-env-ref
  | 
resource-env-ref-namejms/TicketQueue/resource-env-ref-name
  | jndi-namequeue/liga-TicketQueue/jndi-name
  | /resource-env-ref
  | /session
  | message-driven
  | ejb-nameMessengerEJB/ejb-name
  |   
destination-jndi-namequeue/liga-TicketQueue/destination-jndi-name 
  | /message-driven
  | /enterprise-beans
  | /jboss
  | 
before deploying the application, I created a file called 
jbossmq-liga-service.xml and dropped
it in jms dir without any problem.

  | ?xml version=1.0 encoding=UTF-8?
  | server
  |   mbean code=org.jboss.mq.server.jmx.Queue
  |  name=jboss.mq.destination:service=Queue,name=liga-TicketQueue
  | depends 
optional-attribute-name=DestinationManagerjboss.mq:service=DestinationManager/depends
  |   /mbean
  | /server
  | 
when deploying the application, I got the exception :
javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory 
not bound
any help will be great...
thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3859524#3859524

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859524


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Generating auto incrementing filed ...

2004-12-19 Thread johntodd
Hi all.
I have JBoss 3.2.5 and MySQL 4.0
my entity bean has an auto generated field.
I know how to create an auto generated field in MySQL but how to make this in 
JBoss ?
I mean, which of JBoss specific deployment files this attribute should occure ?
what is its syntax ??
another question :
this entity bean has a method called : getProcudtID( )
should I declare a cmp-field element in ejb-jar.xml file like this :
cmp-fieldfiled-nameproductID/field-name/cmp-field
thanks.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3859208#3859208

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859208


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - How not to hardcode these lines ?

2004-10-09 Thread johntodd
Hi all.
I wrote a swing application that uses EJBs hosted in JBoss.
the client contains the following lines :

  | Properties properties = new Properties();
  | properties.put(Context.INITIAL_CONTEXT_FACTORY, 
org.jnp.interfaces.NamingContextFactory);
  | properties.put(Context.PROVIDER_URL, localhost:1099);
  | 
I don't want to hard code them in my code.
how can I isolate them from the code ?
thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850883#3850883

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850883


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [O'Reilly JBoss 3.0/4.0 Workbook] - XAConnectionFactory not bound (workbookEJB3)

2004-10-01 Thread johntodd
Hi all.
I am trying examples from workbook EJB 3rd (JBoss 3.2)
when trying to deploy the application that contains MDB, I got :
javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory not 
bound
any ideas ?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850131#3850131

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850131


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: Weired problem, exception should be thrown

2004-09-30 Thread johntodd
let me ask you a qestion.
when we get a FinderException ?
I provided a value that does not exit in a database, so findByCityName( ) should throw 
an excpetion, but it don't.
in which situations we get FinderException ??
thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850018#3850018

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850018


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - Help me to run my first MDB in JBoss

2004-09-30 Thread johntodd
Hi all.
I developing my fist MDB in JBoss3.2.5
I created this file (jbossmq-todd-service.xml) and drop it in deploy dir :

  | ?xml version=1.0 encoding=UTF-8?
  | server
  | mbean code=org.jboss.mq.server.jmx.Queue 
  | name=jboss.mq.destination:service=Queue,name=ToddQueue
  | depends optional-attribute-name=DestinationManager
  | jboss.mq:service=DestinationManager/depends
  | /mbean
  | /server
  | 
the following is jboss.xml 

  | jboss
  | enterprise-beans
  | message-driven
  | ejb-nameMessengerEJB/ejb-name
  |   destination-jndi-namequeue/ToddQueue/destination-jndi-name   
 
  | /message-driven
  | session
  | ejb-nameProducerEJB/ejb-name
  | jndi-nameProducerRemoteHome/jndi-name
  | resource-ref
  | res-ref-namejms/QueueFactory/res-ref-name
  | jndi-namejava:/JmsXA/jndi-name
  | /resource-ref
  | resource-env-ref
  | 
resource-env-ref-namejms/JToddQueue/resource-env-ref-name
  | jndi-namequeue/ToddQueue/jndi-name
  | /resource-env-ref
  | /session
  | 
  | /enterprise-beans
  | /jboss
  | 
as you noted, the session bean will send a message to queue that MDB is listening to.
running JBoss I got :
javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory not 
bound
any ideas ??

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850050#3850050

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850050


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Weired problem, exception should be thrown

2004-09-29 Thread johntodd
Hi all.
I have a weired problem.
I have the following finder method in a local home interface:
Collection findByCityName(String city) throws FinderException;
the ejb-ql for the previous finder is:
SELECT OBJECT(T) FROM Team AS T WHERE T.city = ?1
the previous method is used by a session facade as the following :

  | public Collection getTeamsByCity(String city) {
  | Collection result = null;
  | try {
  | Collection tmp = teamHome.findByCityName(city);
  | // This method will convert LocalTeam collection to a collection of 
TeamDTO
  | result = this.convertTeamsCollection(tmp);
  | } catch (FinderException e) {
  | throw new EJBException(There is no such a team ,e);
  | }
  | return result;
  | }
  | 
now, when using this method from a client and supplied a correct value (a value that 
exists in a database), I got a right answer, but when supplied a value that does not 
exists in the database, I got nothing.
not an exception in the console, not an exception in JBoss console and not in the log 
file !
any ideas ??
thanks

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3849941#3849941

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849941


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Confused, create this field ?

2004-09-28 Thread johntodd
Hey all.
assume we have two CMP beans TeamBean, PlayerBean
the relationship is one to many and bidirectional.
TeamBean has the following CMP fields:
name, city
TeamBean has setter and getter methods for these fields.
the database schema for TeamBean is :
NAME, CITY
PlayerBean has the following CMP fields :
id, email
PlayerBean has setter and getter methods for these fields.
the database schema for PlayerBean is :
ID, EMAIL, TEAM (TEAM is FK)
I have the following code (in a facade bean):

  | public void addPlayer(id, name, String team) {
  |  LocalPlayer lp = playerHome.create(id, name);
  |  LocalTeam lt = teamHome.findByPrimayKey(team);
  |  lp.setTeamLocal(lt);
  | }
  | 
the container will insert a right value at TEAM column of Player table.
but I have read some articles that said :
we should a CMP field called team in PlayerBean and create setter and getter methods 
for this CMP field.
this is because (as the article says), we want to create a transfer object for 
PlayerBean with these fields :
id, email, team
so we able to write :

  | new PlayerDO(local.getID( ), local.getEmail( ), local.getTeam( ));
  | 
in my case (which I didn't create getTeam( )), I can write :

  | new PlayerDO(local.getID( ), local.getEmail( ), local.getTeamLocal( ).getName( ));
  | 
what is the right approach ??
as far as I know, if we create a method like setTeam( ), this may damage the mapping 
that has been done by the container.
should I create a CMP field called team and create setter and getter methods for it ?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3849785#3849785

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849785


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Odd exception

2004-09-25 Thread johntodd
Hola all.
I have the following problem.
I have bidirectional, one to many relation (Team and Players)
I have a session facade bean contains the following methods :

  | public Collection getTeamPlayers(String name) {
  | Collection players = null;
  | try {
  | LocalTeam team = teamHome.findByPrimaryKey(name);
  | players = team.getPlayers();
  | this.convertCollection(players);
  | } catch (FinderException e) {
  | System.err.println(Error in getTeamPlayers():  + e.toString( ));
  | }
  | return players;
  | }
  | 
  | private Collection convertCollection(Collection col) {
  |Iterator it = col.iterator();
  |Vector vec = new Vector(1);
  |while (it.hasNext()) {
  |PlayerDTO dto = this.extract((LocalPlayer)it.next());
  |vec.addElement(dto);
  |}
  |return vec;
  | }
  | 
  | private PlayerDTO extract(LocalPlayer player) {
  | PlayerDTO dto = null;
  | try {
  | dto = new PlayerDTO(player.getNum(), player.getName());
  | } catch (Exception e) {
  | System.err.println(Error in extract( ):  + e.toString( ));
  | }
  | return dto;
  | }
  | 
I have create a team with some players and set the CMR field (correctly, coz
I didn't get any exception, and the database contains the right values).
when invoking :
Collection col = manager.getTeamPlayers(FC Barcelona);
I got :
java.lang.reflect.UndeclaredThrowableException
caused by :
java.io.NotSerializableException : org.jboss.ejb.plugins.cmp.jdbc.bridge.Relationset
any help will be great.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3849527#3849527

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849527


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Odd exception

2004-09-25 Thread johntodd
I found it.
take a look at getTeamPlayers( ) and you will know !

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3849534#3849534

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849534


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user