Hi ,
I am providing some detailed information on the same issue.
The following is the log messag which i got . Can anyone helps me
In this issue?
I am giving my Folder structure here.
My ear file contans
1)cdviewer.war
2)cdviewer.har
3)jboss-app.xml
4)application.xml
My ear file doesn't have any ejbs.
The following is the code i am using to get sessionfactory.
InitialContext ctx= new InitialContext();
SessionFactory sessionFactory=(SessionFactory)ctx.lookup("java:/hibernate/SessionFactory");
System.out.println("sessionFactory :===============>"+sessionFactory);
Anyone please help me . What could be the problem? I guess SessionFactory is not binding with jndi. But while deploying which gave
the following message .
INFO [SessionFactoryImpl] Checking 0 named queries
INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/SessionFactory]
Vasu.
21:40:33,703 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.5.0
21:40:33,781 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
21:40:33,968 INFO [SettingsFactory] JDBC batch size: 15
21:40:33,968 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
21:40:33,984 INFO [SettingsFactory] Scrollable result sets: enabled
21:40:33,984 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
21:40:33,984 INFO [SettingsFactory] Aggressive release : enabled
21:40:33,984 INFO [SettingsFactory] Default batch fetch size: 1
21:40:33,984 INFO [SettingsFactory] Generate SQL with comments: disabled
21:40:33,984 INFO [SettingsFactory] Order SQL updates by primary key: disabled
21:40:34,000 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
21:40:34,015 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
21:40:34,015 INFO [SettingsFactory] Query language substitutions: {}
21:40:34,015 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
21:40:34,046 INFO [NamingHelper] JNDI InitialContext properties:{}
21:40:34,062 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransa
21:40:34,078 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
21:40:34,078 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransa
21:40:34,093 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
21:40:34,093 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
21:40:34,093 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
21:40:34,093 INFO [SettingsFactory] Second-level cache: enabled
21:40:34,093 INFO [SettingsFactory] Query cache: disabled
21:40:34,093 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
21:40:34,109 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
21:40:34,140 INFO [SettingsFactory] Structured second-level cache entries: enabled
21:40:34,156 INFO [SettingsFactory] Echoing all SQL to stdout
21:40:34,156 INFO [SettingsFactory] Statistics: disabled
21:40:34,156 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
21:40:34,171 INFO [SettingsFactory] Default entity-mode: pojo
21:40:34,734 INFO [SessionFactoryImpl] building session factory
21:40:35,812 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
21:40:35,859 INFO [NamingHelper] JNDI InitialContext properties:{}
21:40:35,859 INFO [SessionFactoryImpl] Checking 0 named queries
21:40:35,859 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/SessionFactory]
21:40:35,906 INFO [TomcatDeployer] deploy, ctxPath=/cdviewer, warUrl=file:/D:/jboss-4.0.2/server/default/tmp/deploy/tmp4990cdview
21:40:38,359 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
21:40:38,359 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
21:40:39,687 INFO [PropertyMessageResources] Initializing, config='MessageResources', returnNull=true
21:40:39,828 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml'
21:40:40,359 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml'
21:40:40,562 INFO [EARDeployer] Started J2EE application: file:/D:/jboss-4.0.2/server/default/deploy/cdviewer.ear
21:40:40,875 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
21:40:41,062 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
21:40:41,234 INFO [JkMain] Jk running ID=0 time=0/203 config=null
21:40:41,250 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 2m:2s:672ms
21:41:43,609 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
21:41:43,734 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
21:41:43,796 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
21:41:43,906 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
21:41:44,031 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.bean.LocalStrings', returnNull=true
21:41:44,328 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
21:41:44,328 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
21:41:44,406 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
21:41:52,312 INFO [STDOUT] Get CurrentDate :
21:41:52,328 INFO [STDOUT] Get CurrentDate Time Stamp :2005-05-17 21:41:52.312
21:41:52,640 WARN [SessionFactoryObjectFactory] Not found: 4028810903eb6bb60103eb6bbb850000
21:41:52,640 INFO [STDOUT] sessionFactory :===============>null
21:41:52,671 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
21:41:52,671 ERROR [[action]] Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at login.ConnectionFactory.getSession(ConnectionFactory.java:61)
at login.ItemService.addUser(ItemService.java:77)
at login.LoginAction.execute(LoginAction.java:37)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
|