|
Nevíte prosím jakým způsobem to definovat? -----Original Message----- Ta SessionFactory asi
neni bindnuta v JNDI. Nekde pri startu app serveru nebo aplikace musite Prosím o radu, zkouším propojení struts-hibernate3-db sybase
na aplikačním serveru Sun Java System Application Server 8.1. Omlouvám se za
začátečnický dotaz, určitě mi chybí něco na aplikačním serveru: Děkuji
moc. Webová aplikace. V xxxAction
struts mám: Context
init = new InitialContext();
Context ctx = (Context) init.lookup("java:/hibernate/SessionFactory");
SessionFactory sf = (SessionFactory) ctx.lookup("moje");
hibSession = sf.openSession(); chyba: javax.naming.NameNotFoundException:
No object bound to name java:/hibernate/SessionFactory
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:668)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:155)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:351) Definice: hibernate.properties ## JNDI Datasource hibernate.connection.datasource
java:/comp/env/jdbc/asa hibernate.connection.username
dba hibernate.connection.password
sql ## Sybase hibernate.dialect
org.hibernate.dialect.SybaseDialect hibernate.connection.driver_class
com.sybase.jdbc2.jdbc.SybDriver hibernate.connection.username
dba hibernate.connection.password
sql hibernate.connection.url
jdbc:sybase:Tds:localhost:2638/webbec ## specify a JNDI
name for the SessionFactory hibernate.session_factory_name
java:hibernate/SessionFactory/moje ## specify a JNDI
name for the SessionFactory hibernate.session_factory_name
java:hibernate/SessionFactory/moje #file system hibernate.jndi.class
com.sun.jndi.fscontext.RefFSContextFactory hibernate.jndi.url
iiop://localhost:3700/
-- Ing. Vlastimil Elias Qbizm technologies, a.s.vedouci analytik ... the art of software.____________________________________________________________________www.qbizm-technologies.cz www.qbizm.cz www.qbizm-services.cz
|
- Struts-hibernate3-Sun Java Application Server definice Jiri Smejkal
- Re: Struts-hibernate3-Sun Java Application Server d... Vlastimil Eliáš
- RE: Struts-hibernate3-Sun Java Application Serv... Jiri Smejkal
