RE: Getting exception while running OpenJMS
"Tim Anderson" <[email protected]>
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <002301c55102$385869f0$387ffddc@xerces> |
Your PROVIDER_URL is incorrect. It should be:
env.put(Context.PROVIDER_URL,"tcp://peterpan:3035/");
-Tim
-----Original Message-----
From: openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
[email protected]
Sent: Wednesday, 4 May 2005 2:51 AM
To: [email protected]
Subject: [openjms-user] Getting exception while running OpenJMS
Hi,
I am getting following error:
$ Starting JmsCollector
Error: Could not create JNDI API context: javax.naming.NamingException:
Operation getNameParser failed: java.io.EOFException
Check jmscollector.provider.initialcontext value in
$XMYHOME/config/jmscollector.properties.
JmsCollector stopped.
My environment is as follows:
1st console :
I am using openjms-0.7.6.1 in HP.
I have started openjms in a console using ./startup.
Configuration for this openjms is at the end of this mail.
2nd console :
In another console I have a java code to start the jms collector.
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,JNDI_FACTORY);
env.put(Context.PROVIDER_URL,"tcp://peterpan:3030/");
try {
jndiContext = new InitialContext(env);
//The commented line is for Sun's J2EE impl.
//jndiContext = new InitialContext();
} catch (NamingException e) {
Logger.trace("Error: Could not create JNDI API context: " +
e.toStri
ng());
Logger.trace("Check jmscollector.provider.initialcontext value
in $X
MYHOME/config/jmscollector.properties.");
System.err.println("Error: Could not create JNDI API context: "
+ e.
toString());
System.err.println("Check jmscollector.provider.initialcontext
value
in $XMYHOME/config/jmscollector.properties.");
}
[mynah513.dev.hp11.11] $ Starting JmsCollector
Error: Could not create JNDI API context: javax.naming.NamingException:
Operation getNameParser failed: java.io.EOFException
Check jmscollector.provider.initialcontext value in
$XMYHOME/config/jmscollector.properties.
JmsCollector stopped.
jar in the path :
XMY_JMS_JAR=/nafs/mynah/Vendor/openjms/HP/peterpan-5.13/lib/exolabcore-0.3.7
.jar:/nafs/mynah/Vendor/openjms/HP/peterpan-5.13/lib/openjms-0.7.6.1.jar:/na
fs/mynah/Vendor/openjms/HP/peterpan-5.13/lib/openjms-client-0.7.6.1.jar:/naf
s/mynah/Vendor/openjms/HP/peterpan-5.13/lib/jms-1.0.2a.jar:/nafs/mynah/Vendo
r/openjms/HP/peterpan-5.13/lib/jndi-1.2.1.jar:/nafs/mynah/Vendor/openjms/HP/
peterpan-5.13/lib/commons-logging-1.0.3.jar
XML Configuration:
<?xml version="1.0"?>
<!-- OpenJMS configuration:
. RMI connectors
. JDBM persistency
. embedded JNDI provider
. embedded RMI registry, running on port 1099
. preconfigured destinations
NOTES: this configuration shows all configuration elements relevant
when using an RMI connector.
-->
<Configuration>
<!-- Optional. This represents the default configuration -->
<ServerConfiguration host="localhost" embeddedJNDI="true" />
<!-- Required when using an RMI connector -->
<Connectors>
<Connector scheme="rmi">
<ConnectionFactories>
<QueueConnectionFactory name="JmsQueueConnectionFactory" />
<TopicConnectionFactory name="JmsTopicConnectionFactory" />
</ConnectionFactories>
</Connector>
<Connector scheme="tcp">
<ConnectionFactories>
<QueueConnectionFactory name="TCPQueueConnectionFactory" />
<TopicConnectionFactory name="TCPTopicConnectionFactory" />
</ConnectionFactories>
</Connector>
</Connectors>
<!-- Required -->
<DatabaseConfiguration>
<JdbmDatabaseConfiguration name="openjms.db" />
</DatabaseConfiguration>
<!-- Required -->
<AdminConfiguration script="${openjms.home}\bin\startup.bat" />
<!-- Optional. If not specified, no users will be created -->
<Users>
<User name="admin" password="openjms" />
<User name="madmin" password="!madmin" />
<User name="madminpt" password="madminpt" />
</Users>
</Configuration>
Regards,
Venkatesh Srinivasan