[JNDI and Naming] - Unable to create SessionFactory
by Lulseged Zerfu
Lulseged Zerfu [http://community.jboss.org/people/lulseged] created the discussion
"Unable to create SessionFactory"
To view the discussion, visit: http://community.jboss.org/message/538021#538021
--------------------------------------------------------------
Hi
I have not still got any help with my SessionFactory problem.
I get the following error always:
2010-04-16 15:49:05,805 INFO [org.hibernate.impl.SessionFactoryObjectFactory] - <Factory name: jdbc/resource-list>
2010-04-16 15:49:05,807 INFO [org.hibernate.util.NamingHelper] - <JNDI InitialContext properties:{}>
2010-04-16 15:49:05,810 WARN [org.hibernate.impl.SessionFactoryObjectFactory] - <Could not bind factory to JNDI>
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.getNameParser(InitialContext.java:480)
at org.hibernate.util.NamingHelper.bind(NamingHelper.java:75)
at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:113)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:376)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at com.ericsson.ims.pag.xdms.resource.list.session.ResourceListSession.<init>(ResourceListSession.java:14)
at com.ericsson.ims.pag.xdms.resource.list.session.ResourceListSession.instance(ResourceListSession.java:30)
at com.ericsson.ims.pag.xdms.resource.list.session.ResourceListSessionTest.setUp(ResourceListSessionTest.java:17)
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:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
2010-04-16 15:49:05,830 INFO [org.hibernate.cache.UpdateTimestampsCache] - <starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache>
2010-04-16 15:49:05,836 INFO [org.hibernate.cache.StandardQueryCache] - <starting query cache at region: org.hibernate.cache.StandardQueryCache>
I have attached my hibernate.cfg.xml file.
It works fine if I remove session name (name="jdbc/resource-list") . Session will not then be bound to JNDI. I want to bound it to JDNI.
Any help is appreciated.
Lulseged
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538021#538021]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 1 month
Re: [jboss-user] [JBoss Microcontainer Development] - JBoss Reflect Performance Javassist vs Introspection
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] replied to the discussion
"JBoss Reflect Performance Javassist vs Introspection"
To view the discussion, visit: http://community.jboss.org/message/538013#538013
--------------------------------------------------------------
To summarize, the steps I want to take here are:
1) Decide if we should bother to do parameter checking. If we decide to keep it, it should be done by Javassist[Method/Constructor/Field]Info and not in the generated JavassistMethod/-Constructor/-Field implementations. This can easily be turned off in the generated classes by passing in check=false to the JavassistMemberFactory create methods.
2) Enable stats for the JavassistMethodInfo.invoke(), JavassistConstructorInfo.newInstance() and JavassistFieldInfo.get()/set() so we can run AS with that and get an idea of the usage of these joinpoints.
3) Avoid creating too many JavassistMethod/-Constructor/-Field implementations. There is an overhead associated with creating these, both in terms of filling up PermGenSpace and in CPU time since each member that gets one of these needs to first generate the class and then to call ClassLoader.defineClass() which takes time. JavassistMethod/-Constructor/-Field should only be generated for Javassist[Method/Constructor/Field]Infos whose invoke()/newInstance()/get()/set() are called a lot. The data from 2) should give us some understanding of which members they are. Javassist[Method/Constructor/Field]Infos which are NOT called a lot should simply use reflection to call the target member. I think reflection should be the default.
4) Come up with some differentiator (as mentioned earlier) to be able to specify if a member should have JavassistMethod/-Constructor/-Field generated or not.
5) Let's stay with Javassist for now, and go with asm if javassist can not be improved upon in the time allowed. Creating yesterday's benchmark, I found as long as you have got the hang of one it is quite easy to look at the other.
I will start off by doing some work on 2) and let you know how far I get with the others before Tuesday
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538013#538013]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 1 month
Re: [jboss-user] [jBPM Development] - jBPM5 Request for Comments
by Sebastian Schneider
Sebastian Schneider [http://community.jboss.org/people/sebastian.s] commented on the document
"jBPM5 Request for Comments"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-15172#comment-3149
--------------------------------------------------
Here are my remarks and questions:
1.) Will jBPM 5.0 be based upon jBPM 4.x? You mention the PVM and the native BPMN 2.0-implementation. So I assume it will be. Am I right?
2.) What's the reason for replacing the task management with WS-Human Task? The task life cycle model? Will this be implemented as a webservice as most of the other vendors do or will you supply a java implementation using the same model? You are stating that the engine will continue to be embeddable so I hope this will be a java implementation of the task life cycle model.
3.) Will JBoss ESB be an optional component? I am thinking of embeddability again. Why use an ESB when you don't need one? One of the strengths of jBPM IMHO is the small footprint.
--------------------------------------------------
16 years, 1 month
[JBoss Microcontainer Development] - JBoss Reflect and javassist status
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] created the discussion
"JBoss Reflect and javassist status"
To view the discussion, visit: http://community.jboss.org/message/538003#538003
--------------------------------------------------------------
In case the volcanic ashes clear and the planes work on Tuesday so I can go on holidays, here is the current status of the jboss-reflect on javassist implementation.
The javassist implementation is feature complete as far as I know, we are just waiting for javassist 3.12.0 before we can do a release.
I created a branch to test it in AS: https://svn.jboss.org/repos/jbossas/branches/KABIR_JAVASSIST_REFLECT/ https://svn.jboss.org/repos/jbossas/branches/KABIR_JAVASSIST_REFLECT/ and a Hudson run using that branch at http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-6.0.x-test... http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-6.0.x-test.... There seem to be no major differences between the test runs, although that is hard to say due to timeout issues on Hudson, and AS trunk's number of failures changing. Once AS 6.0.0-M3 is out, it might be an idea to delete and recreate the branch off M3 since we then know for sure that trunk completed with 0 failures. The differences between the branch's component-matrix/pom.xml and the one in trunk are:
- <version.javassist>3.11.0.GA</version.javassist>
+ <version.javassist>3.12.0-SNAPSHOT</version.javassist>
- <version.org.jboss.man>2.1.1.SP1</version.org.jboss.man>
+ <version.org.jboss.man>2.1.1.SP2</version.org.jboss.man>
- <version.org.jboss.reflect>2.2.0.Alpha4</version.org.jboss.reflect>
+ <version.org.jboss.reflect>2.2.0-SNAPSHOT</version.org.jboss.reflect>
This has been added to the branches run.sh to make sure javassist is being used by jboss-reflect:
# Setup JBoss specific properties
JAVA_OPTS="${JAVA_OPTS:+$JAVA_OPTS -Dprogram.name=$PROGNAME}"
+JAVA_OPTS="${JAVA_OPTS:+$JAVA_OPTS -Dorg.jboss.reflect.spi.TypeInfoFactory=org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactory}"
JAVA_OPTS="${JAVA_OPTS:--Dprogram.name=$PROGNAME}"
Apart from that everything should be the same. I use http://www.orcaware.com/svn/wiki/Svnmerge.py svnmerge.py to periodically merge the latest changes from Hudson trunk, to do this download svnmerge.py and then go into your local checkout of the branch and merge using svnmerge.py, e.g:
$cd KABIR_JAVASSIST_REFLECT
$~/svnmerge.py merge
$svn commit -F svnmerge-commit-message.txt
Give it time to filter through to anonsvn and then start the Hudson run, I think Flavia already has the admin password. If not ask QA for a password.
The main thing I am looking at now is making the javassist implementation more performant. This is documented in http://community.jboss.org/thread/150697 JBoss Reflect Performance Javassist vs Introspection since using the javassist implementation is currently slower than using the introspection one. I'll let you know where I get in that thread before I leave.
It just occurred to me that another factor in currently making this slow _could_ be the classpools since we need to look CtClasses up there. I have not measured anything, but it is worth bearing in mind and investigating since it is an extra layer on top of the plain classloading which is used by the introspection implementation.
If I can think of anything else I will let you know on this thread before I go away.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538003#538003]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 1 month