-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: HibernateUtil throws Exception when bundeled in jar
PostPosted: Fri Jul 14, 2006 2:03 am 
Newbie

Joined: Thu Jul 13, 2006 10:09 am
Posts: 3
hi all,

I am creating a webService and using Hibernate3.0 . I am using Axis2 ( version 0.95 ) for creating webService . When i make aar ( 'axis archive' , a file like jar ) of my project , following exception is thrown . Although when i run my project with-out bundeling in jar , it works fine . Actually in case of bundeling in jar , hibernate creates such problem as path contains '!' symbol .
Using zip handling i have provided 'hibernate.cfg.xml' and have ensured the mapping also .
Can somebody tell me what is the problem and how to resolve it ?

The stack trace is given below :--


- No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: null
org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Cannot configure CacheManager: null
at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:134)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:173)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
at com.daffodilwoods.framework.datasource.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:122)
at com.daffodilwoods.framework.datasource.ResourceManager.currentResource(ResourceManager.java:122)
at com.daffodilwoods.framework.datasource.ResourceManager.getPersistentDataSource(ResourceManager.java:183)
at com.daffodilwoods.framework.processmanager.ProcessService.updateProcessStage(ProcessService.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:394)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:282)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
at java.lang.Thread.run(Thread.java:534)
Caused by: net.sf.ehcache.CacheException: Cannot configure CacheManager: null
at net.sf.ehcache.CacheManager.configure(CacheManager.java:170)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:138)
at net.sf.ehcache.CacheManager.create(CacheManager.java:193)
at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:130)
... 41 more
- Addressing is disbaled .....


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 14, 2006 5:57 pm 
Beginner
Beginner

Joined: Tue Sep 27, 2005 2:51 pm
Posts: 27
You may already know this,

insure you have hibernate3.jar in both the axis2\WEB-INF\lib folder and the axis2\WEB-INF\services\<your service name>\lib.

as well you may want to try having your hibernate.cfg.xml (configuration) files in both the axis2\WEB-INF\classes folder and the axis2\WEB-INF\<your service name>\classes folder.

I have my stuff jared up and the jar exists in the same folders as the hibernate3.jar does

"may" help - I found this on a link somewere... but can't find the link again.

Hope it helps

_________________
Dave Ziebol


Top
 Profile  
 
 Post subject: HibernateUtil throws Exception when bundeled in jar
PostPosted: Mon Jul 17, 2006 1:23 am 
Newbie

Joined: Thu Jul 13, 2006 10:09 am
Posts: 3
Hi Dave ,
I did as u told but now it says that "no jndi name configured" . The prints available are given below . Plz see it and tell me what can be done to resolve the problem ?

The prints that are available :-

Using Hibernate built-in connection pool (not for production use!)
Hibernate connection pool size: 20
autocommit mode: false
using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/NorthWind3
connection properties: {user=root, password=****}
RDBMS: MySQL, version: 5.0.2-alpha
JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.4-beta ( $Date: 2004/08/12 20:28:29 $, $Revision: 1.27.4.42 $ )
Using dialect: org.hibernate.dialect.MySQLDialect
Using default transaction strategy (direct JDBC transactions)
No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Automatic flush during beforeCompletion(): disabled
Automatic session close at end of transaction: disabled
JDBC batch size: 15
JDBC batch updates for versioned data: disabled
Scrollable result sets: enabled
JDBC3 getGeneratedKeys(): enabled
Connection release mode: auto
Maximum outer join fetch depth: 2
Default batch fetch size: 1
Generate SQL with comments: disabled
Order SQL updates by primary key: disabled
Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Using ASTQueryTranslatorFactory
Query language substitutions: {}
Second-level cache: enabled
Query cache: disabled
Cache provider: org.hibernate.cache.EhCacheProvider
Optimize cache for minimal puts: disabled
Structured second-level cache entries: disabled
Echoing all SQL to stdout
Statistics: disabled
Deleted entity synthetic identifier rollback: disabled
Default entity-mode: pojo
building session factory
No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: file:/C:/programs/Tomcat5.0/work/Catalina/localhost/axis2/loader/ehcache-failsafe.xml
Not binding factory to JNDI, no JNDI name configured
Addressing is disbaled .....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 17, 2006 1:29 am 
Newbie

Joined: Thu Jul 13, 2006 10:09 am
Posts: 3
Hi Dave,
I did all as u told but now it shows the problem " no JNDI name configured " . Iam sending the prints available . Plz see them and tell me how it can be resolved .

Thanks

Using Hibernate built-in connection pool (not for production use!)
Hibernate connection pool size: 20
autocommit mode: false
using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/NorthWind3
connection properties: {user=root, password=****}
RDBMS: MySQL, version: 5.0.2-alpha
JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.4-beta ( $Date: 2004/08/12 20:28:29 $, $Revision: 1.27.4.42 $ )
Using dialect: org.hibernate.dialect.MySQLDialect
Using default transaction strategy (direct JDBC transactions)
No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Automatic flush during beforeCompletion(): disabled
Automatic session close at end of transaction: disabled
JDBC batch size: 15
JDBC batch updates for versioned data: disabled
Scrollable result sets: enabled
JDBC3 getGeneratedKeys(): enabled
Connection release mode: auto
Maximum outer join fetch depth: 2
Default batch fetch size: 1
Generate SQL with comments: disabled
Order SQL updates by primary key: disabled
Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Using ASTQueryTranslatorFactory
Query language substitutions: {}
Second-level cache: enabled
Query cache: disabled
Cache provider: org.hibernate.cache.EhCacheProvider
Optimize cache for minimal puts: disabled
Structured second-level cache entries: disabled
Echoing all SQL to stdout
Statistics: disabled
Deleted entity synthetic identifier rollback: disabled
Default entity-mode: pojo
building session factory
No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: file:/C:/programs/Tomcat5.0/work/Catalina/localhost/axis2/loader/ehcache-failsafe.xml
Not binding factory to JNDI, no JNDI name configured
Addressing is disbaled .....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 18, 2006 8:09 am 
Beginner
Beginner

Joined: Tue Sep 27, 2005 2:51 pm
Posts: 27
Please post with your hibernate.cfg.xml, along with your \conf\Catalina\localhost\axis2.xml and relevent source code. An issue may be obvious, but allas, I'm not having much luck getting Axis2, Hibernate 3, and Tomcat 5 all working together.

Axis2 is at Release 1 now, you may want to start there.

_________________
Dave Ziebol


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.