Re: Configuration Issues moving from 0.7.6 to 0.7.7

TJ Greenier <[email protected]>
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
Tim,

As always thank you for the reply. Sometimes your mind gets focused on 
something and you tend to overlook the obvious.

Also,I was able to get 0.7.7 working with an http connection behind a secure 
switch. The new version of http connection vi the tunnel is working great!

Thanks again for the help!
T.J. Greenier

On 7/26/05, Tim Anderson <[email protected]> wrote:
> 
> Your client has the 0.7.6 client jar in its classpath.
>  See http://openjms.sourceforge.net/usersguide/jars.html for the jars 
> required
> in 0.7.7-alpha-1.
>  -Tim
> 
>  ------------------------------
> *From:* openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:
> openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] *On Behalf Of *TJ Greenier
> *Sent:* Wednesday, 27 July 2005 6:28 AM
> *To:* [email protected]
> *Subject:* [openjms-user] Configuration Issues moving from 0.7.6 to 0.7.7
> 
> Hi all,
> 
> I am trying to run an example program that was running fine under 0.7.6, 
> but with version 0.7.7 I am having problems with the configuration of the 
> openJMS server. From reading the documentation it seems that some things 
> have changes, but for the most part I believe the code I wrote should still 
> work on the new JMS version. I think my problem is a configuration problem, 
> but I am not 100% sure. Below are some snippets from my code and the 
> openjms.xml file.
> 
> ===========================OPENJMS.XMLFILE=============================================
> <?xml version="1.0"?>
> 
> <Configuration>
> 
> <!-- Optional. This represents the default configuration -->
> <ServerConfiguration host="localhost" embeddedJNDI="true" />
> 
> <Connectors>
> <Connector scheme="http">
> <ConnectionFactories>
> <ConnectionFactory name="HTTPConnectionFactory"/>
> <TopicConnectionFactory name="HTTPTopicConnectionFactory" />
> </ConnectionFactories>
> </Connector>
> <Connector scheme="tcp">
> <ConnectionFactories>
> <ConnectionFactory name="ConnectionFactory" />
> </ConnectionFactories>
> </Connector>
> <Connector scheme="rmi">
> <ConnectionFactories>
> <ConnectionFactory name="RMIConnectionFactory" />
> <QueueConnectionFactory name="JmsQueueConnectionFactory" />
> <TopicConnectionFactory name="JmsTopicConnectionFactory" />
> </ConnectionFactories>
> </Connector>
> </Connectors>
> 
> <!-- Required -->
> <DatabaseConfiguration>
> <RdbmsDatabaseConfiguration
> driver="org.apache.derby.jdbc.EmbeddedDriver"
> url="jdbc:derby:openjmsdb;create=true" 
> user="openjms" 
> password="openjms"/>
> </DatabaseConfiguration>
> 
> <!-- Required --> 
> <AdminConfiguration script="${openjms.home}\bin\startup.bat" />
> 
> 
> 
> <!-- Optional. If not specified, no destinations will be created -->
> <AdministeredDestinations>
> <AdministeredTopic name="topic1">
> <Subscriber name="sub1" />
> <Subscriber name="sub2" />
> </AdministeredTopic>
> 
> <AdministeredQueue name="queue1" />
> <AdministeredQueue name="queue2" />
> <AdministeredQueue name="queue3" />
> </AdministeredDestinations>
> 
> <!-- Optional. If not specified, no users will be created -->
> <Users>
> <User name="admin" password="openjms" /> 
> </Users>
> 
> </Configuration>
> ===========================END OPENJMS.XMLFILE========================================
> 
> ===========================CODE 
> SNIPPET===============================================
> /**
> * Method will establish connection to the OPENJMS server.
> */
> private void initConnections() {
> Hashtable props = new Hashtable();
> 
> //http test
> props.put(Context.INITIAL_CONTEXT_FACTORY,"
> org.exolab.jms.jndi.InitialContextFactory");
> props.put(Context.PROVIDER_URL, "http://localhost:8080/")<http://localhost:8080/%22%29>
> ;
> 
> try {
> context = new InitialContext(props);
> factory = (TopicConnectionFactory) context.lookup
> ("HTTPTopicConnectionFactory");
> 
> } catch (NamingException e) {
> e.printStackTrace();
> System.err.println("Connection Error Received, System Will Exit");
> System.exit(0);
> }
> 
> }
> ===========================END CODE 
> SNIPPET===========================================
> 
> ===========================TOMCAT 
> LOG================================================
> Jun 23, 2005 10:58:17 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jun 23, 2005 10:58:17 AM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 3176 ms
> Jun 23, 2005 10:58:17 AM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jun 23, 2005 10:58:17 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
> Jun 23, 2005 10:58:17 AM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Jun 23, 2005 10:58:22 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Jun 23, 2005 10:58:23 AM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Jun 23, 2005 10:58:23 AM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/50 config=null
> Jun 23, 2005 10:58:23 AM org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> Jun 23, 2005 10:58:23 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 6002 ms
> Jun 23, 2005 11:43:41 AM org.apache.coyote.http11.Http11Protocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-8080
> Jun 23, 2005 11:43:42 AM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Jun 23, 2005 11:43:43 AM org.apache.coyote.http11.Http11Protocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-8080
> ===========================END TOMCAT 
> LOG============================================
> 
> ===========================OPENJMS 
> LOG==============================================
> 15:54:42.537 INFO [main] - Server accepting connections on http-
> server://10.1.11.93:3030/
> 15:54:42.547 INFO [main] - JNDI service accepting connections on http-
> server://10.1.11.93:3030/
> 15:54:42.547 INFO [main] - Admin service accepting connections on http-
> server://10.1.11.93:3030/
> 15:54:42.567 INFO [main] - Server accepting connections on 
> tcp://10.1.11.93:3035/
> 15:54:42.567 INFO [main] - JNDI service accepting connections on 
> tcp://10.1.11.93:3035/
> 15:54:42.567 INFO [main] - Admin service accepting connections on 
> tcp://10.1.11.93:3035/
> 15:54:42.597 INFO [main] - Server accepting connections on 
> rmi://10.1.11.93:1099/
> 15:54:42.597 INFO [main] - JNDI service accepting connections on 
> rmi://10.1.11.93:1099/
> 15:54:42.607 INFO [main] - Admin service accepting connections on 
> rmi://10.1.11.93:1099/
> ===========================END OPENJMS 
> LOG==========================================
> 
> Can anyone provide some guidance or examples for using openjms 0.7.7 with 
> http? I can provide more code if needed, but the error I get happens when I 
> get to "context = new InitialContext(props);"
> Here is the exception I see:
> 
> javax.naming.NamingException: Operation failed: 
> java.io.FileNotFoundException: http://10.1.11.93:8080/openjms/OpenJMSJndi
> at org.exolab.jms.jndi.http.NameServiceProxy.send(NameServiceProxy.java
> :245)
> at org.exolab.jms.jndi.http.NameServiceProxy.getNameParser(
> NameServiceProxy.java:84)
> at 
> org.exolab.jms.jndi.http.HttpJndiInitialContextFactory.getInitialContext(
> HttpJndiInitialContextFactory.java:117)
> at org.exolab.jms.jndi.InitialContextFactory.getInitialContext(
> InitialContextFactory.java:109)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java
> :667)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
> at javax.naming.InitialContext.init(InitialContext.java:223)
> at javax.naming.InitialContext.<init>(InitialContext.java:197)
> at com.ctc.openjmstest.MessengerFrame.initConnections(MessengerFrame.java
> :146)
> at com.ctc.openjmstest.MessengerFrame.<init>(MessengerFrame.java:103)
> at com.ctc.openjmstest.MessengerFrame.main(MessengerFrame.java:409)
> 
> In the exception above it is pointing to 
> http://10.1.11.93:8080/openjms/OpenJMSJndi, however this does not exist. 
> Under my tomcat webapps folder I have the openjms-tunnel folder, but not 
> openjms. How is that configured? 
> 
> I appreciate anytime and feedback on this issue.
> 
> Thank you,
> T.J. Greenier
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.