you obviously use a store that is no longer supported (slidestore.j2ee.J2EEContentStore). However, the current version in
org.apache.slide.store.impl.rdbms.J2EEStore seems to have the same code, so it should not matter:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
ds = (DataSource) envCtx.lookup(datasource);This looks correct to me. I have no idea why this does not work with Weblogic. If it turns out there is no other way to get it working than
Context initCtx = new InitialContext();
ds = (DataSource) initCtx.lookup(datasource);I will introduce another switch to enable this lookup. Could you try a little bit more Jean-Claude and keep us informed. Maybe you could turn to Weblogic lists or groups as well and tell us what you find out.
Thanks :)
Oliver
Antonio Jean Claude wrote:
Hello,
I manage to configure JDBC Store script to work with MySQL.
But when I want to switch to use J2EE store, but I get the following error.
"22 Dec 2003 14:43:10 - org.apache.slide.common.Domain - ERROR - Service [EMAIL PROTECTED] init ialization failed : While trying to look up jdbcMtx in java:comp/env. Service [EMAIL PROTECTED] initialization failed : While trying to look up jdbcMtx in java:comp /env."
So I tested my call to JNDI with a piece of code: - When I call without subcontext, I manage to get a datasource. Context initCtx = new InitialContext(); DataSource ds = (DataSource) initCtx.lookup(jndi); - When I call with subcontext, I manage to get a "name not found" exception. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); DataSource ds = (DataSource) envCtx.lookup(jndi);
What should I do to have a subcontext in Weblogic? I looked at the one for TC at http://jakarta.apache.org/slide/howto-j2eestore.html, there was no subcontext defined either.
Thanks for your help
Jean-Claude
--- DATA SOURCE DEFINITION in WEBLOGIC ---
<JDBCConnectionPool DriverName="org.gjt.mm.mysql.Driver" Name="jdbcMtxPool" Password="{3DES}gcuedhGXQrE=" Properties="user=slideDB" Targets="portalServer" URL="jdbc:mysql://antonio-jc:3306/slidedb"/> <JDBCTxDataSource JNDIName="jdbcMtx" Name="jdbcMtx" PoolName="jdbcMtxPool" Targets="portalServer"/>
--- DEFINITION FOR J2EE ---
<definition> <store name="j2ee"> <nodestore classname="slidestore.j2ee.J2EEDescriptorsStore"> <parameter name="datasource">jdbcMtx</parameter> </nodestore> <securitystore> <reference store="nodestore"/> </securitystore> <lockstore> <reference store="nodestore"/> </lockstore> <revisiondescriptorsstore> <reference store="nodestore"/> </revisiondescriptorsstore> <revisiondescriptorstore> <reference store="nodestore"/> </revisiondescriptorstore> <contentstore classname="slidestore.j2ee.J2EEContentStore"> <parameter name="datasource">jdbcMtx</parameter> <parameter name="version">true</parameter> <parameter name="resetBeforeStarting">false</parameter> </contentstore> </store> <scope match="/" store="j2ee"/> </definition>
--- DEFINITION FOR JDBC ---
<definition> <store name="jdbc"> <nodestore classname="slidestore.reference.JDBCDescriptorsStore"> <parameter name="driver">org.gjt.mm.mysql.Driver</parameter> <parameter name="url">jdbc:mysql://antonio-jc:3306/slidedb</parameter> <parameter name="user">root</parameter> <parameter name="password"></parameter> </nodestore> <securitystore> <reference store="nodestore" /> </securitystore> <lockstore> <reference store="nodestore" /> </lockstore> <revisiondescriptorsstore> <reference store="nodestore" /> </revisiondescriptorsstore> <revisiondescriptorstore> <reference store="nodestore" /> </revisiondescriptorstore> <contentstore classname="slidestore.reference.JDBCContentStore"> <parameter name="driver">org.gjt.mm.mysql.Driver</parameter> <parameter name="url">jdbc:mysql://antonio-jc:3306/slidedb</parameter> <parameter name="user">root</parameter> <parameter name="password"></parameter> <parameter name="version">true</parameter> <parameter name="resetBeforeStarting">false</parameter> </contentstore>
</store> <scope match="/" store="jdbc" />
</definition>
Jean-Claude
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
