Results 1 to 4 of 4

Thread: unable to determine parameter names for method in LocalVariableTableParameterNameDisc

  1. #1
    Join Date
    Nov 2011
    Posts
    7

    Default unable to determine parameter names for method in LocalVariableTableParameterNameDisc

    Hi All,

    I am using spring+JPA+Hibernate and able to connect to the DB succesfully but when I look into the console an error is happening. The following is the error
    HTML Code:
    [main] DEBUG o.s.c.LocalVariableTableParameterNameDiscoverer - IOException whilst attempting to read '.class' file for class [$Proxy20] - unable to determine parameter names for method: public final org.hibernate.SessionFactory $Proxy20.getSessionFactory()
    java.io.FileNotFoundException: Class file for class [$Proxy20] not found
    	at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getClassReader(LocalVariableTableParameterNameDiscoverer.java:136) ~[spring-core-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.core.LocalVariableTableParameterNameDiscoverer.visitMethod(LocalVariableTableParameterNameDiscoverer.java:111) ~[spring-core-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:67) ~[spring-core-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:445) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:964) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:868) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842) [spring-context-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416) [spring-context-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:333) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [junit-4.7.jar:na]
    	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit-4.7.jar:na]
    	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) [junit-4.7.jar:na]
    	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) [junit-4.7.jar:na]
    	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) [junit-4.7.jar:na]
    	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) [junit-4.7.jar:na]
    	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) [junit-4.7.jar:na]
    	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.junit.runners.ParentRunner.run(ParentRunner.java:236) [junit-4.7.jar:na]
    	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE]
    	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) [.cp/:na]
    	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp/:na]
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) [.cp/:na]
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) [.cp/:na]
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) [.cp/:na]
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) [.cp/:na]

    Please Help me out if you have any idea on the error

    Thanks in Advance,
    Shiva

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,626

    Default

    Have you actually LOOKED at the stack trace...

    Code:
    [main] DEBUG o.s.c.LocalVariableTableParameterNameDiscoverer - IOException whilst attempting to read '.class' file for class [$Proxy20] - unable to determine parameter names for method: public final org.hibernate.SessionFactory $Proxy20.getSessionFactory()
    It is debug logging... It is NOT an error and has no consequence (at least for this case).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Nov 2011
    Posts
    7

    Default

    Hi Marten,

    Thanks for the reply!!!

    Sorry!!! I might be wrong in conveying the information... but can you please tell me why this FileNotFoundException is arising in thise case.. have I missed any jars or any configuration is required?

    Thanks in Advance,
    Shiva

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,626

    Default

    Again read the stack trace.

    Code:
    [main] DEBUG o.s.c.LocalVariableTableParameterNameDiscoverer - IOException whilst attempting to read '.class' file for class [$Proxy20] - unable to determine parameter names for method: public final org.hibernate.SessionFactory $Proxy20.getSessionFactory()
    There is a proxy and proxies are dynamically generated and as such don't have files on the file system. I suggest you take a look a the source code and javadoc of the LocalVariableTableParameterNameDiscoverer.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •