Erro ao Subir Spring-Annotation

Sr(s), estou tentando fzr subir uma webapp com spring-annotation no tomcat e tenho o erro abaixo, baixei os fontes e não consegui entender de onde ele tira esse package antigo do framework.

tks por alguma luz.
(Até o mendigo da paulista não consegue resolver)

2007-04-12 20:29:06 ERROR [main] (StandardContext.java:3680) - Error configuring application listener of class net.java.dev.springannotation.web.RequestContextListener
java.lang.ClassNotFoundException: net.java.dev.springannotation.web.RequestContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2007-04-12 20:29:07 ERROR [main] (StandardContext.java:3687) - Skipped installing application listeners due to previous error(s)
Apr 12, 2007 8:29:07 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 12, 2007 8:29:07 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/SAnnotationJSF] startup failed due to previous errors
Apr 12, 2007 8:29:07 PM org.apache.catalina.core.StandardContext processTlds
SEVERE: Error reading tld listeners java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.log4j.Category.isEnabledFor(Category.java:746)

George,

Não tenho certeza, mas acho que está faltando algum listener no seu web.xml
Posta aqui o seu web.xml para darmos uma olhada e verifique, também, se tem alguma Servlet do Spring.
A propósito, esse erro ocorre quando você tenta levantar ou quando você tenta realizar alguma ação na aplicação?

Abraço.

quando esta subindo o container…

mando 13/4 no primeiro horário, isso ta me causando problemas, preciso resolver urgente.

ou não usar.

tks

é um erro nesta ultima versão beta, que foi lançada logo depois de mover o projeto para o sourceforge …
dentro do jar spring-annotation-web no arquivo dummy.tld tem duas classes com o nome errado, o nome da classe ainda esta apontando para o código antigo

para corrigir pode baixar o código do SVN que ja esta corrigido, ou simplesmente abrir o jar e substituir conteúdo do arquivo com isto:

[code]

<?xml version="1.0" encoding="ISO-8859-1" ?> 1.0 1.2 dummy http://sannotations.sourceforge.net/dummy Dummy taglib, no tags in here, just listeners net.sourceforge.sannotations.web.RequestContextListener org.springframework.web.context.request.RequestContextListener dummy net.sourceforge.sannotations.web.dummy.DummyTag [/code]

esse erro eu já achei e consertei, mais ainda continua o problema.

estou com os fontes na minha workspace, já pesquisei pelo package antigo e não tem mais nada, mais continua com o problema.

tks

se o erro foi concertado, e continua a mesma mensagem, é problema de cache, o jar antigo deve ainda estar no classpath …
tu criou um jar novo e substituiu o antigo?
ta usando maven mesmo pra testar?

(odeio quando o webtools se perde na atualização do deployment da aplicação)

Urubatan, quanto ao deploy, acho que não seja isso…

Tenho 2 tomcat e testei nos 2s que não tem nada de spring.

não estou gerando jar, estou colocando junto com meu projeto pra já saber se resolveria…

meu web.xml :

<?xml version="1.0"?>


SAnnotationJSF


contextConfigLocation
classpath*:applicationContext.xml



State saving method: “client” or “server” (= default) See
JSF Specification 2.5.2

javax.faces.STATE_SAVING_METHOD
server



This parameter tells MyFaces if javascript code should be
allowed in the rendered HTML output. If javascript is
allowed, command_link anchors will have javascript code that
submits the corresponding form. If javascript is not
allowed, the state saving info and nested parameters will be
added as url parameters. Default: “true”

org.apache.myfaces.ALLOW_JAVASCRIPT
true



This parameter tells MyFaces if javascript code should be
allowed in the rendered HTML output. If javascript is
allowed, command_link anchors will have javascript code that
submits the corresponding form. If javascript is not
allowed, the state saving info and nested parameters will be
added as url parameters. Default: “false”

		Setting this param to true should be combined with
		STATE_SAVING_METHOD "server" for best results.

		This is an EXPERIMENTAL feature. You also have to enable the
		detector filter/filter mapping below to get JavaScript
		detection working.
	</description>
	<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
	<param-value>false</param-value>
</context-param>
<context-param>
	<description>
		If true, rendered HTML code will be formatted, so that it is
		"human readable". i.e. additional line separators and
		whitespace will be written, that do not influence the HTML
		code. Default: "true"
	</description>
	<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
	<param-value>true</param-value>
</context-param>
<context-param>
	<description>
		If true, a javascript function will be rendered that is able
		to restore the former vertical scroll on every request.
		Convenient feature if you have pages with long lists and you
		do not want the browser page to always jump to the top if
		you trigger a link or button action that stays on the same
		page. Default: "false"
	</description>
	<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
	<param-value>true</param-value>
</context-param>
<!-- Extensions Filter -->
<filter>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<filter-class>
		org.apache.myfaces.webapp.filter.ExtensionsFilter
	</filter-class>
	<init-param>
		<description>
			Set the size limit for uploaded files. Format: 10 - 10
			bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
		</description>
		<param-name>maxFileSize</param-name>
		<param-value>20m</param-value>
	</init-param>
</filter>
<filter>
	<filter-name>requestContextFilter</filter-name>
	<filter-class>
		org.springframework.web.filter.RequestContextFilter
	</filter-class>
</filter>
<filter-mapping>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
	<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
<filter-mapping>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<!-- Listener, that does all the startup work (configuration, init). -->
<listener>
	<listener-class>
		org.apache.myfaces.webapp.StartupServletContextListener
	</listener-class>
</listener>
<listener>
	<listener-class>
		org.springframework.web.context.ContextLoaderListener
	</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
	<servlet-name>Faces Servlet</servlet-name>
	<servlet-class>
		org.apache.myfaces.webapp.MyFacesServlet
	</servlet-class>
	<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
	<servlet-name>dispatcher</servlet-name>
	<servlet-class>
		org.springframework.web.servlet.DispatcherServlet
	</servlet-class>
	<init-param>
		<param-name>contextClass</param-name>
		<param-value>
			net.sourceforge.springannotation.utils.FakeWebApplicationContext
		</param-value>
	</init-param>
	<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
	<servlet-name>dispatcher</servlet-name>
	<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
	<servlet-name>Faces Servlet</servlet-name>
	<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
	<servlet-name>Faces Servlet</servlet-name>
	<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<login-config>
	<auth-method>BASIC</auth-method>
</login-config>

meu applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>


<sa:annotation-autoload />

a principio ta certo, mas se esta ocorrendo ainda o mesmo erro, é por que o dummy.tld ainda esta no classpath em algum lugar, provavelmente no META-INF do jar spring-annotation-web.jar

se o erro mudou, posta aqui o stack pra mim dar uma olhada :smiley:

mais não estou gerando o jar novamente, estou colocando os fontes tudo no meu war…

tem alguma idéia?

erro dado agora :

INFO: validateJarFile(C:\java\sannotation.metadata.plugins\org.eclipse.wst.server.core\tmp1\webapps\SAnnotationJSF\WEB-INF\lib\servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2007-04-13 16:53:42 ERROR [main] (StandardContext.java:3680) - Error configuring application listener of class net.java.dev.springannotation.web.RequestContextListener
java.lang.ClassNotFoundException: net.java.dev.springannotation.web.RequestContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)

2007-04-13 16:53:42 ERROR [main] (StandardContext.java:3687) - Skipped installing application listeners due to previous error(s)
Apr 13, 2007 4:53:42 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 13, 2007 4:53:42 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/SAnnotationJSF] startup failed due to previous errors
Apr 13, 2007 4:53:42 PM org.apache.catalina.core.StandardContext processTlds
SEVERE: Error reading tld listeners java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.log4j.Category.isEnabledFor(Category.java:746)

primeiro, acho que tem jars demais no exemplo pelo que tu mostrou ai, o servlet-api e o jsp-api não precisam estar la …

segundo: net.java.dev.springannotation.web.RequestContextListener
o dummy.tld antigo aidna esta no classpath …

olha agora depois q re-gerei o jar do sannotatio-web

PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property val
e of type [java.lang.String] to required type [java.lang.Class] for property ‘c
ntextClass’; nested exception is java.lang.IllegalArgumentException: Cannot fin
class [net.sourceforge.springannotation.utils.FakeWebApplicationContext]. Root
cause: java.lang.ClassNotFoundException: net.sourceforge.springannotation.utils
FakeWebApplicationContext
Caused by:
java.lang.IllegalArgumentException: Cannot find class [net.sourceforge.springan
otation.utils.FakeWebApplicationContext]. Root cause: java.lang.ClassNotFoundEx
eption: net.sourceforge.springannotation.utils.FakeWebApplicationContext
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java
223)
at org.springframework.beans.propertyeditors.ClassEditor.setAsText(Clas
Editor.java:63)
at org.springframework.beans.TypeConverterDelegate.convertValue(TypeCon
erterDelegate.java:269)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(T
peConverterDelegate.java:190)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(T
peConverterDelegate.java:139)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapp
rImpl.java:771)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapp
rImpl.java:604)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(
bstractPropertyAccessor.java:49)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues
AbstractPropertyAccessor.java:74)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues
AbstractPropertyAccessor.java:61)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean
java:107)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper
java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:9
2)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardConte
t.java:3917)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:
201)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBas
.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:7
9)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524

    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809

    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:69

)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:47
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.jav
:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecyc
eSupport.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:44

)
at org.apache.catalina.core.StandardService.start(StandardService.java:
50)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:70
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2007-04-13 17:39:42 ERROR [main] (ApplicationContext.java:675) - StandardWrappe
.Throwable
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessEx
eption details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property val
e of type [java.lang.String] to required type [java.lang.Class] for property ‘c
ntextClass’; nested exception is java.lang.IllegalArgumentException: Cannot fin
class [net.sourceforge.springannotation.utils.FakeWebApplicationContext]. Root
cause: java.lang.ClassNotFoundException: net.sourceforge.springannotation.utils
FakeWebApplicationContext
Caused by:
java.lang.IllegalArgumentException: Cannot find class [net.sourceforge.springan
otation.utils.FakeWebApplicationContext]. Root cause: java.lang.ClassNotFoundEx
eption: net.sourceforge.springannotation.utils.FakeWebApplicationContext
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java
223)
at org.springframework.beans.propertyeditors.ClassEditor.setAsText(Clas
Editor.java:63)

web.xml:

<?xml version="1.0"?>


SAnnotationJSF

contextConfigLocation classpath*:applicationContext.xml State saving method: "client" or "server" (= default) See JSF Specification 2.5.2 javax.faces.STATE_SAVING_METHOD server This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output. If javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters will be added as url parameters. Default: "true" org.apache.myfaces.ALLOW_JAVASCRIPT true This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output. If javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters will be added as url parameters. Default: "false"
		Setting this param to true should be combined with
		STATE_SAVING_METHOD "server" for best results.

		This is an EXPERIMENTAL feature. You also have to enable the
		detector filter/filter mapping below to get JavaScript
		detection working.</description>

org.apache.myfaces.DETECT_JAVASCRIPT
false


If true, rendered HTML code will be formatted, so that it is
“human readable”. i.e. additional line separators and
whitespace will be written, that do not influence the HTML
code. Default: “true”
org.apache.myfaces.PRETTY_HTML
true


If true, a javascript function will be rendered that is able
to restore the former vertical scroll on every request.
Convenient feature if you have pages with long lists and you
do not want the browser page to always jump to the top if
you trigger a link or button action that stays on the same
page. Default: “false”
org.apache.myfaces.AUTO_SCROLL
true


requestContextFilter
org.springframework.web.filter.RequestContextFilter

org.apache.myfaces.webapp.StartupServletContextListener org.springframework.web.context.ContextLoaderListener Faces Servlet org.apache.myfaces.webapp.MyFacesServlet 1 dispatcher org.springframework.web.servlet.DispatcherServlet contextClass net.sourceforge.springannotation.utils.FakeWebApplicationContext 1 dispatcher /faces/* Faces Servlet *.jsf Faces Servlet /faces/* BASIC

retirei o ExtensioFilter do myfaces…

[quote=urubatan]é um erro nesta ultima versão beta, que foi lançada logo depois de mover o projeto para o sourceforge …
dentro do jar spring-annotation-web no arquivo dummy.tld tem duas classes com o nome errado, o nome da classe ainda esta apontando para o código antigo

para corrigir pode baixar o código do SVN que ja esta corrigido, ou simplesmente abrir o jar e substituir conteúdo do arquivo com isto:

[code]

<?xml version="1.0" encoding="ISO-8859-1" ?> 1.0 1.2 dummy http://sannotations.sourceforge.net/dummy Dummy taglib, no tags in here, just listeners net.sourceforge.sannotations.web.RequestContextListener org.springframework.web.context.request.RequestContextListener dummy net.sourceforge.sannotations.web.dummy.DummyTag [/code][/quote]

Não estou encontrando o arquivo dummy.tld no jar .
Estou usando spring 2.5.6 e estou com o mesmo erro.

Sabe o porque?