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.

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/

 

 

 

 

 

 


 
  Obsah této zásilky byl zkontrolován na přítomnost virů technologií BitDefender
  Odesláno 602LAN SUITE - http://www.software602.cz/
 

Odpovedet emailem