Back Forum Reply New

error here from--www.springframework.org/dtd/spring-beans.dtd

Hello guys

i have a code with spring2.0RC2 since 1 month ago and i didnt some change in code, just today i started up my tomcat i see that i have errors, and very weards, related with the declaraions of my lt;beangt; that not accept the scope=quot;sessionquot; anymore!!!!

well, if i copy and enter here dtd/spring-beans.dtd with Firefox

i see this Code:
Error de lectura XML: error de sintaxis
Ubicación: dtd/spring-beans.dtd
Número de línea 47, columna 1:lt;!ELEMENT beans (
^
the error appear in my browser in spanish, well try it to see in your native language

this is the same error but with Opera

Code:
Error!
XML parsing failed

XML parsing failed: syntax error (Line: 47, Character: 2)

Reparse document as HTML
Error:invalid syntax
Specification:TR/REC-xml/44: The document root. A document can contain bean definitions only,45: imports only, or a mixture of both (typically with imports first).46: --gt;47: lt;!ELEMENT beans (48: description?,49: (import | alias | bean)*50: )gt;

this error of the ucl can be my problem???

thanks for your time

It seems you upgraded to Spring 2.0 RC 4, where @scope has been removed from the former DTD again. Therefore a versioned DTD has been introduced: Changelog 2.0 RC 4. The now different DOCTYPE declaration can be found in the documentation.

For the errors in the browsers: They try to read the DTD as XML. A DTD obviously has no XML syntax and so the browsers complain.

Jörg

Hello Jörg Heinicke

thanks for the reply, well i am working with RC2 and i have already solved this problem and i am still using this:Code:
lt;!DOCTYPE beans PUBLIC quot;-//SPRING//DTD BEAN 2.0//ENquot; quot;dtd/spring-beans-2.0.dtdquot;gt;
thanks anyway for your time

Sorry, but this can't be true. spring-beans-2.0.dtd has only been added recently in RC 4. Better to make sure you are using the version you expect

Jörg

Hello Jörg Heinicke

well in my all pc, only i have Spring 2.0 RC2 and RC3, but only work with RC2 and works!

what type of error should i see???

i dont want ofense you, your experience is appreciate, but works

i have a obvious question, the new version should be compatible with the old version??

thanks for your time

Spring 2.0 is backwards compatible in general. The migration of an application running with Spring 1.2.x to Spring 2.0 should be quite smooth.

But don't expect complete compatibility between the pre-releases when using the new features. XML configuration using @scope and spring-beans.dtd is one of those issues in RC 4, it does no longer work while it worked up to RC 3. Instead a spring-beans-2.0.dtd has been introduced allowing @scope in the XML configuration as well, but therefore complaining about the old @singleton. So this is an incompatible change.

So the error you mentioned in your starting post of this thread is RC 4 specific and this is why I (still *sigh*) think you are using RC 4. You can verify your Spring version by checking META-INF/MANIFEST.MF in your Spring jar in your classpath.

The other way around (using Spring 2.0 RC 3 or below with the spring-beans-2.0.dtd) it can work as well, but only with a from request to dtd/spring-beans-2.0.dtd. But as I said using RC 3 or below, @scope and spring-beans.dtd should not have caused any error as it did for you.

I really don't want to annoy you. The actual version is unimportant if it works, but I'd really wonder if you are not using RC 4 - in which way ever it gets onto your classpath

Jörg

Hello Jörg Heinicke

well i see the manifest and show these linesCode:
Manifest-Version: 1.0

Ant-Version: Apache Ant 1.6.5

Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)

Implementation-Title: Spring Framework

Implementation-Version: 2.0-rc2

Spring-Version: 2.0-rc2

Premain-Class: org..instrument.InstrumentationSavingAgent
about of rc3, i never used, i only downloaded RC3, thinking that my old errors could be a bug with RC2, but not was the case, and about RC4 i never downloaded.

i thinking that both have right, but maybe you more, in the sentide that in my all code i never use something like @ , i only work with the declarative way.

maybe if i start to work with the @ , i should have errors.

i dont take any ofense, it is a sane and friendly discution or converation, always is good share experience for all.

best wishes


Originally Posted by dr_pompeiiSpring-Version: 2.0-rc2

That's really strange and I can't explain it ...Originally Posted by dr_pompeiii thinking that both have right, but maybe you more, in the sentide that in my all code i never use something like @ , i only work with the declarative way.

maybe if i start to work with the @ , i should have errors.

Having an XML background with @scope I meant the scope attribute in the XML config file, not the annotations in Java 5.

Regards,
Jörg

Hello Jörg Heinicke

well, i am a study case, lol , yes i only work with Spring 2.0 RC2Originally Posted by Jörg HeinickeHaving an XML background with @scope I meant the scope attribute in the XML config file, not the annotations in Java 5.

yes i know, the dtd or the DOCTYPE is for the scope of the xml file,, i dont know nothing about annotations in Java 5, so i dont think that the xml can work with the annonation in the java file, if i am wrong, sorry, i dont know nothing about this topic.

i am not an expert with Spring, but i can work with Spring a intemedium level, i guess

a friendly conversation,  

regards
DrPompeii
¥
Back Forum Reply New