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: 965040000 -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 Architect        WWW: 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

Reply via email to