The import net.sf.jasperreports.engine.export cannot be resolved.

0

Nie wiem jak z tym sobie poradzić jako że jestem początkujący.

Dodam że ja tej aplikacji nie stworzyłem.

DEBUG main com.itfuture.project.webapp.listener.StartupListener - Initializing context...
DEBUG main com.itfuture.project.webapp.listener.StartupListener - Remember Me Enabled? false
DEBUG main com.itfuture.project.webapp.listener.StartupListener - Password Encoder: org.springframework.security.providers.encoding.ShaPasswordEncoder
DEBUG main com.itfuture.project.webapp.listener.StartupListener - Populating drop-downs...
DEBUG main com.itfuture.project.dao.hibernate.LookupDaoHibernate - Retrieving all role names...
DEBUG main com.itfuture.project.webapp.listener.StartupListener - Drop-down initialization complete [OK]
DEBUG main com.itfuture.project.webapp.filter.LocaleFilter - Initializing filter 'localeFilter'
DEBUG main com.itfuture.project.webapp.filter.LocaleFilter - Filter 'localeFilter' configured successfully
ERROR main org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'officeTrialCostRepReportController' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.itfuture.project.webapp.controller.OfficeTrialCostRepReportController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import net.sf.jasperreports.engine.export cannot be resolved
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:948)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:270)
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:499)
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:412)
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:400)
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:474)
at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:81)
at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:66)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:736)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'officeTrialCostRepReportController' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.itfuture.project.webapp.controller.OfficeTrialCostRepReportController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import net.sf.jasperreports.engine.export cannot be resolved
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:881)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:837)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:295)
at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandlers(SimpleUrlHandlerMapping.java:129)
at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext(SimpleUrlHandlerMapping.java:103)
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:69)
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:70)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1329)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
... 41 more

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.itfuture.project.webapp.controller.OfficeTrialCostRepReportController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import net.sf.jasperreports.engine.export cannot be resolved
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:111)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:875)
... 62 more

Caused by: java.lang.Error: Unresolved compilation problems:
The import net.sf.jasperreports.engine.export cannot be resolved
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable
JRXlsExporterParameter cannot be resolved to a variable

at com.itfuture.project.webapp.controller.OfficeTrialCostRepReportController.<init>(OfficeTrialCostRepReportController.java:11)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:96)
... 64 more
0

Aż mi słabo. Brakuje ci zależności w projekcie. Jeśli leci to przy uruchamianiu a nie przy kompilacji to znaczy że do wara nie wpakowałeś odpowiednich bibliotek.

0

Shalom brakuje zależności tzn?

Chodzi o jasperreports-3.6.0.jar?

Mavenem robię import do Eclipsa.

[Edit]
Sahlom może inaczej jak sprawdzić których zależności brakuje dokładnie? Można poleceniem Mavena?

Pewnie ten plik .classpath też mi powie co nie co?

0

To raczej wygląda na bląd przy deployowaniu aplikacji co znaczy że war jest źle zbudowany i brakuje libów.

0

Ok, dodaję liby ale mimo że dodam je dostaję przy "mvn test".

error: package net.sf.jasperreports.engine.export does not exist.

Dodaję liba przez java build path i tam dodaję Add Jar.

Ale mimo, że dodam brakujące biblioteki i znikają w Eclipsie czerwone errory w okienku Problems.

To przy "mvn test" dostaję errory, że nie widać tych libów.

Co mogę dalej działać?

0

LOL
Masz te liby dodac do poma tak żeby maven je widział w repo a nie na pałe dodawać je w Eclipse!

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0