Announcement Announcement Module
Collapse
No announcement yet.
Bean creation issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bean creation issue

    I've been having trouble with creating a certain bean. It's a very straight forward configuration:

    Code:
    <bean id="saxHandlerGeneric"			     
    class="com.zenobjects.logixseries.warehouse.io.InterfaceFileSaxHandlerGeneric">
    			<property name="serviceLocator" ref="serviceLocator"/>
    		</bean>
    and i get this Exception when starting up the Spring container

    Code:
    2007-06-25 16:32:03,133 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saxHandlerGeneric' defined in ServletContext resource [/WEB-INF/logix-serviceContext.xml]: Instantiation of bean failed; nested exception is java.lang.VerifyError: arguments are not type compatible (class: com/zenobjects/logixseries/warehouse/io/InterfaceFileSaxHandlerGeneric method: endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V) at pc: 89
    Caused by:
    java.lang.VerifyError: arguments are not type compatible (class: com/zenobjects/logixseries/warehouse/io/InterfaceFileSaxHandlerGeneric method: endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V) at pc: 89
            at java.lang.J9VMInternals.verifyImpl(Native Method)
            at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
            at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
            at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:82)
            at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:59)
            at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:52)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:639)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:625)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
            at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:615)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    The bean which i'm creating is a class which extends a DefaultHandler. But I'm not sure why it's complaining about the endElement method. It just doesn't make sense to me why it's trying to verify this method's arguments.

    Anybody with any ideas?

    Thanks in advance
    J

  • #2
    Make sure you have the correct versions of the jar in your classpath. It might be that you have a different version in your classpath and that the method signature for the endElement method have changed between versions. The loader sees that you extend DefaultHandler and that it expects a method endElement with a certain signature. You probably have a method endElement with a different signature, due to incompatible versions.

    Comment


    • #3
      May be,you must check you include jar at you project,i think you include two same name jars in you project or other jar include this java file.

      Comment

      Working...
      X