Re: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time :)
You need to have a jndi.properties in your classpath, containing somethinh like this: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=localhost java.naming.factory.url.pkgs=org.jboss.naming //Peter On 24 Apr, [EMAIL PROTECTED] wrote: Thank you Peter!...now i can compile my java file but i'm still having problems to run this example: I suppose the 'TopicConnectionFactory' should be defined anywhere in the context...but, in which file? and, how it looks? When i try to run my compiled java file i get the following: javax.naming.NoInitialContextException: Need to specify class name in enviroment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial ... (and other java messages) I think it is dued to the line: ... TopicConnectionFactory tf = (TopicConnectionFactory) ctx.lookup(TopicConnectionFactory); ... The JVM can't find this variable in the context, isn't it? Perhaps i need to define 'something' else in 'jboss.jcml'? Thanks a lot in advance! __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __ [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 23/04/01 18:39 Please respond to jboss-user To: [EMAIL PROTECTED] cc: Subject:Re: [JBoss-user] About TOPIC_FACTORY on MDB's sample. On 23 Apr, [EMAIL PROTECTED] wrote: Hello again: (JBoss Documentation, Chapter 7 Writing Message Driven Bean) After deploying de MDB.class + META-INF i've began to write the 'Main.java' application in order to send a stuff to my bean. The problem arrives when compiling this file, i get the following: Main.java:9: cannot resolve symbol symbol: variable TOPIC_FACTORY location: class Main TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY) ^ 1 error what is 'TOPIC_FACTORY'? should this variable be declared anywhere? Yes. Typicaly a static final String, ie static final String TOPIC_FACTORY = TopicConnectionFactory; which I obviously missed to get when I ripped the example from some of my programs. Sorry. //Peter Thanks in advance! Regards: _ Jaume Soriano Sivera [EMAIL PROTECTED] _ -- Jobba hos oss: http://www.tim.se/weblab Peter Antman Technology in Media, Box 34105 100 26 Stockholm Systems ArchitectWWW: http://www.tim.se Email: [EMAIL PROTECTED]WWW: http://www.backsource.org Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : )
I'm working on this example also at the moment: here are the changes I have make, I changed the ejb-nameDurableTopicBean/ejb-name to ejb-nameMDB/ejb-name and the trans-attributeNoRequired/trans-attribute to trans-attributeNotSupported/trans-attribute. I have added the jndi.properties file to my path as suggested but I'm still getting the error of not being able to resolve the variable TOPIC_FACTORY Any clues Eoin -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]Sent: 24 April 2001 11:28To: [EMAIL PROTECTED]Subject: RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : )Chris wrote: This looks like an error in that you have not defined the jndi settings - doyou have a jndi.properties file?It should be on your classpath of the client and look something like this;Hi Chris! : that's not the problem. My 'jdni.properties' file is Ok! A pair of clues, in my 'ejb-jar.xml' file: * I have had problems with the tag: trans-attributeNotRequired/trans-attribute is not recognized by the parser (it fails when i deploy the application): i have changed by trans-attributeRequired/trans-attribute * ...Moreover, can not label 'DurableTopicBean' the tag ejb-name... in section 'assembly-descriptor'. The only way to deploy my bean is labeling as tag ejb-name in the 'message-driver' section. More clues: To run my 'Main.class' file i do the following: java -classpath jboss-client.jar:jbs.jar:jbosssx-client.jar Main Thanks __Jaume Soriano Sivera [EMAIL PROTECTED]Tel: 96504 -ext. 44744 Fax: 965040047Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __ "Kimpton,C (Chris)" [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 24/04/01 10:23 Please respond to jboss-user To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED] cc: Subject: RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : )Hi,-Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] "javax.naming.NoInitialContextException: Need to specify class name inenviroment or system property, or as an applet parameter, or in an applicationresource file: java.naming.factory.initial java.naming.factory.initial=org.jnp.interfaces.NamingContextFactoryjava.naming.provider.url=localhost:1099java.naming.factory.url.pkgs=org.jboss.naming#HTH,ChrisThis electronic message (email) and any attachments to it are subject to copyright and are sent for the personal attention of the addressee. Although you may be the named recipient, it may become apparent that this email and its contents are not intended for you and an addressing error has been made. This email may include information that is legally privileged and exempt from disclosure. If you have received this email in error, please advise us immediately and delete this email and any attachments from your computer system.Rabobank International is the trading name of Coöperatieve Centrale Raiffeisen-Boerenleenbank B.A. which is incorporated in the Netherlands. Registered with the Registrar of Companies for England Wales No. BR002630 and regulated by the SFA for the conduct of investment business in the UK.The presence of this footnote also confirms that this email has been automatically checked by Rabobank International for the presence of computer viruses prior to it being sent, however, no guarantee is given or implied that this email is virus free upon delivery.___JBoss-user mailing list[EMAIL PROTECTED]http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : )
Hi Eoin: Instead of TOPIC_FACTORY write this: TopicConnectionFactory ...Or, before 'main()' method you can write: static final String TOPIC_FACTORY= TopicConnectionFactory; Regards: __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __ Eoin Lane [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 24/04/01 13:34 Please respond to jboss-user To:[EMAIL PROTECTED] cc: Subject:RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : ) I'm working on this example also at the moment: here are the changes I have make, I changed the ejb-nameDurableTopicBean/ejb-name to ejb-nameMDB/ejb-name and the trans-attributeNoRequired/trans-attribute to trans-attributeNotSupported/trans-attribute. I have added the jndi.properties file to my path as suggested but I'm still getting the error of not being able to resolve the variable TOPIC_FACTORY Any clues Eoin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: 24 April 2001 11:28 To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : ) Chris wrote: This looks like an error in that you have not defined the jndi settings - do you have a jndi.properties file? It should be on your classpath of the client and look something like this; Hi Chris! : that's not the problem. My 'jdni.properties' file is Ok! A pair of clues, in my 'ejb-jar.xml' file: * I have had problems with the tag: trans-attributeNotRequired/trans-attribute is not recognized by the parser (it fails when i deploy the application): i have changed by trans-attributeRequired/trans-attribute * ...Moreover, can not label 'DurableTopicBean' the tag ejb-name... in section 'assembly-descriptor'. The only way to deploy my bean is labeling as tag ejb-name in the 'message-driver' section. More clues: To run my 'Main.class' file i do the following: java -classpath jboss-client.jar:jbs.jar:jbosssx-client.jar Main Thanks __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __ Kimpton,C (Chris) [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 24/04/01 10:23 Please respond to jboss-user To:'[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject:RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : ) Hi, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] javax.naming.NoInitialContextException: Need to specify class name in enviroment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=localhost:1099 java.naming.factory.url.pkgs=org.jboss.naming # HTH, Chris This electronic message (email) and any attachments to it are subject to copyright and are sent for the personal attention of the addressee. Although you may be the named recipient, it may become apparent that this email and its contents are not intended for you and an addressing error has been made. This email may include information that is legally privileged and exempt from disclosure. If you have received this email in error, please advise us immediately and delete this email and any attachments from your computer system.Rabobank International is the trading name of Coöperatieve Centrale Raiffeisen-Boerenleenbank B.A. which is incorporated in the Netherlands. Registered with the Registrar of Companies for England Wales No. BR002630 and regulated by the SFA for the conduct of investment business in the UK. The presence of this footnote also confirms that this email has been automatically checked by Rabobank International for the presence of computer viruses prior to it being sent, however, no guarantee is given or implied that this email is virus free upon delivery. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : )
On 24 Apr, [EMAIL PROTECTED] wrote: Chris wrote: This looks like an error in that you have not defined the jndi settings - do you have a jndi.properties file? It should be on your classpath of the client and look something like this; Hi Chris! : that's not the problem. My 'jdni.properties' file is Ok! A pair of clues, in my 'ejb-jar.xml' file: * I have had problems with the tag: trans-attributeNotRequired/trans-attribute is not recognized by the parser (it fails when i deploy the application): i have changed by trans-attributeRequired/trans-attribute * ...Moreover, can not label 'DurableTopicBean' the tag ejb-name... in section 'assembly-descriptor'. The only way to deploy my bean is labeling as tag ejb-name in the 'message-driver' section. More clues: To run my 'Main.class' file i do the following: java -classpath jboss-client.jar:jbs.jar:jbosssx-client.jar Main Well, whwre is the jndi.properties in that classpath? You tell me! I see only jboss-client.jar:jbs.jar:jbosssx-client.jar. Do you have it in jbs.jar? //Peter Thanks __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __ Kimpton,C (Chris) [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 24/04/01 10:23 Please respond to jboss-user To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject:RE: [JBoss-user] About TOPIC_FACTORY on MDB's sample (1 more time : ) Hi, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] javax.naming.NoInitialContextException: Need to specify class name in enviroment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=localhost:1099 java.naming.factory.url.pkgs=org.jboss.naming # HTH, Chris This electronic message (email) and any attachments to it are subject to copyright and are sent for the personal attention of the addressee. Although you may be the named recipient, it may become apparent that this email and its contents are not intended for you and an addressing error has been made. This email may include information that is legally privileged and exempt from disclosure. If you have received this email in error, please advise us immediately and delete this email and any attachments from your computer system.Rabobank International is the trading name of Coöperatieve Centrale Raiffeisen-Boerenleenbank B.A. which is incorporated in the Netherlands. Registered with the Registrar of Companies for England Wales No. BR002630 and regulated by the SFA for the conduct of investment business in the UK. The presence of this footnote also confirms that this email has been automatically checked by Rabobank International for the presence of computer viruses prior to it being sent, however, no guarantee is given or implied that this email is virus free upon delivery. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user -- Jobba hos oss: http://www.tim.se/weblab Peter Antman Technology in Media, Box 34105 100 26 Stockholm Systems ArchitectWWW: http://www.tim.se Email: [EMAIL PROTECTED]WWW: http://www.backsource.org Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user