The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Don Stadler (74) [Avatar] Offline
#1
I started the servicemix JDBC example by first following the instructions to modify the jndi.xml file on page 214, then following the instructions on page 221. The servicemix instance started in item 3 throws the following error:

I have checked and rechecked the entry in jndi.xml and all appears to be in order.
Contents follow:

=================================


<util:map id="jndiEntries">
<!-- PXE DB datasource -->
<!-- <br /> <entry key="java:comp/env/jdbc/pxe__pm"> <br /> <bean class="org.hsqldb.jdbc.jdbcDataSource"> <br /> <property name="database" value="jdbc:hsqldb:mem:pxe"/> <br /> <property name="user" value = "sa"/> <br /> <property name="password" value = ""/> <br /> </bean> <br /> </entry> <br /> <entry key="java:comp/env/jdbc/defaultDS"> <br /> <bean class="org.hsqldb.jdbc.jdbcDataSource"> <br /> <property name="database" value="jdbc:hsqldb:hsql://localhost/xdb" <br /> /> <br /> <property name="user" value = "sa"/> <br /> <property name="password" value = ""/> <br /> </bean> <br /> </entry> <br /> -->
=================================
[java] SEVERE: Unexpected exception Occured while processing the MEP.
[java] javax.jbi.messaging.MessagingException: Error occured while looking
p jndi resource with jndi name.java:comp/env/jdbc/defaultDS
[java] at com.sun.jbi.jdbcbc.InboundMessageProcessor.getDataAccessObjec
(InboundMessageProcessor.java:512)
[java] at com.sun.jbi.jdbcbc.InboundMessageProcessor.processInOnly(Inbo
ndMessageProcessor.java:343)
[java] at com.sun.jbi.jdbcbc.InboundMessageProcessor.execute(InboundMes
ageProcessor.java:277)
[java] at com.sun.jbi.jdbcbc.InboundMessageProcessor.run(InboundMessage
rocessor.java:207)
[java] at java.lang.Thread.run(Thread.java:619)
[java] Caused by: javax.naming.NamingException: scheme java not recognized
[java] at org.apache.xbean.spring.jndi.DefaultContext.lookup(DefaultCon
ext.java:131)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at com.sun.jbi.jdbcbc.InboundMessageProcessor.getDataSourceFromC
ntext(InboundMessageProcessor.java:820)
[java] at com.sun.jbi.jdbcbc.InboundMessageProcessor.getDatabaseConnect
on(InboundMessageProcessor.java:829)
[java] at com.sun.jbi.jdbcbc.InboundMessageProcessor.getDataAccessObjec
(InboundMessageProcessor.java:463)
[java] ... 4 more
Don Stadler (74) [Avatar] Offline
#2
Re: chapter 6 servicemix jdbc example throwing exception
Ok, I think I found the problem, it was that I inserted the new datasource inside a comment in jndi.xml. Once extracted from the xml comment it appears to work.

Message was edited by:
Don Stadler