Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: ROO XML issue

  1. #1
    Join Date
    Mar 2010
    Posts
    15

    Default ROO XML issue

    Hi, i'm new with ROO and i'm having some troubles with the "pizzashop" example. It worked so far but when i tried to to list some item, firefox 3.5.8 shows me:

    "Error de lectura XML: mal formado
    Ubicación: http://localhost:8080/RooProject/loc...page=1&size=10
    Número de línea 6, columna 20:

    for(var i=0;i < ca.length;i++) { ..."


    So in the xml source code it seems to be an issue with a "<" simbol from the above FOR loop. I mean it's a less than, not a tag one. Is there any way to modify this file?? i don't fin it anywhere in my project...this file seems to be dinamic generated??

    This is the source code:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <html>
    	<head>
    		<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    		<link href="/RooProject/static/styles/standard.css" media="screen"
    			type="text/css" rel="stylesheet"></link>
    		<link href="/RooProject/resources/dijit/themes/tundra/tundra.css"
    			type="text/css" rel="stylesheet"></link>
    		<link href="/RooProject/static/images/favicon.ico" rel="SHORTCUT ICON" />
    		<script type="text/javascript">
    			function readCookie(name) {
    				var nameEQ = name + '=';
    				var ca = document.cookie.split(';');
    				for(var i=0;i < ca.length;i++) {
    					var c = ca[i];
    					while (c.charAt(0)==' ') {
    						c = c.substring(1,c.length);
    					}
    					if (c.indexOf(nameEQ) == 0) {
    						return c.substring(nameEQ.length,c.length);
    					}
    				}
    			return null;
    			}
    			var djConfig={locale:readCookie('locale')}; 
    		</script>
    		<script type="text/javascript" src="/RooProject/resources/dojo/dojo.js"></script>
    		<script type="text/javascript" src="/RooProject/resources/spring/Spring.js"></script>
    		<script type="text/javascript" src="/RooProject/resources/spring/Spring-Dojo.js"></script>
    		<script type="text/javascript" language="JavaScript">dojo.require("dojo.parser");
    		</script>
    		<title>Bienvenido a RooProject</title>
    	</head>
    	<body class="tundra spring">
    		<div id="main">
    			<div version="2.0">
    				<script type="text/javascript">dojo.require("dijit.TitlePane")</script>
    				<div id="_title">
    					<script type="text/javascript">Spring.addDecoration(new
    						Spring.ElementDecoration({elementId : '_title', widgetType :
    						'dijit.TitlePane', widgetAttrs : {title: 'Error Interno'}}));
    					</script>
    					<h2>Error Interno</h2>
    					<p>Lo sentimos, ha ocurrido un error interno.</p>
    				</div>
    			</div>
    			<div class="footer">
    				<span>
    					<a href="/RooProject/">Inicio</a>
    				</span>
    				<span>
    					| Idioma:
    					<a title="Cambiar idioma a English" href="?lang=en&page=1&size=10">
    						<img alt="Cambiar idioma a English" src="/RooProject/static/images/gb.png" />
    					</a>
    					<a title="Cambiar idioma a Deutsch" href="?lang=de&page=1&size=10">
    						<img alt="Cambiar idioma a Deutsch" src="/RooProject/static/images/de.png" />
    					</a>
    					<a title="Cambiar idioma a Svenska" href="?lang=sv&page=1&size=10">
    						<img alt="Cambiar idioma a Svenska" src="/RooProject/static/images/sv.png" />
    					</a>
    					<a title="Cambiar idioma a Espanol" href="?lang=es&page=1&size=10">
    						<img alt="Cambiar idioma a Espanol" src="/RooProject/static/images/es.png" />
    					</a>
    					<a title="Cambiar idioma a Italiano" href="?lang=it&page=1&size=10">
    						<img alt="Cambiar idioma a Italiano" src="/RooProject/static/images/it.png" />
    					</a>
    				</span>
    				<span>
    					| Tema:
    					<a title="estandarte" href="?theme=standard&page=1&size=10">estandarte</a>
    					|
    					<a title="alt" href="?theme=alt&page=1&size=10">alt</a>
    				</span>
    				<span>
    					<a title="Sponsored by SpringSource" href="http://springsource.com">
    						<img align="right" alt="Sponsored by SpringSource"
    							src="/RooProject/static/images/springsource-logo.png" />
    					</a>
    				</span>
    			</div>
    		</div>
    	</body>
    </html>
    I'm using STS 2.3.0
    and ROO 1.0.0.RC4

    Please help me, i'm working with this, thank you very much, this forum helped me a lot.

  2. #2
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Post

    Is there any way to modify this file?? i don't fin it anywhere in my project...this file seems to be dinamic generated??
    That chunk of JavaScript appears in src/main/webapp/WEB-INF/layouts/default.jspx.
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  3. #3
    Join Date
    Sep 2009
    Posts
    101

    Default

    chino_salta,

    I remember something like this happening to me. Check both your log file and your console. If you don't find any errors there, look carefully at the source of your page. I think it will be a page that reports an error, and it's the error report that actually breaks the page and causes the invalid xml.

  4. #4
    Join Date
    Sep 2009
    Posts
    101

    Default

    Also...wrap the cookie function in <![CDATA[]]> in your default.jspx.

  5. #5
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Red face

    Quote Originally Posted by mikej View Post
    chino_salta,

    I remember something like this happening to me. Check both your log file and your console. If you don't find any errors there, look carefully at the source of your page. I think it will be a page that reports an error, and it's the error report that actually breaks the page and causes the invalid xml.
    You're absolutely right Mike, this happens every time there's a page error (e.g. a malformed JSP document or a missing translation of an i18n message code). I don't know what I was thinking pointing the poor guy to default.jspx, even though that's where the incorrectly blamed JavaScript is actually located.
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  6. #6
    Join Date
    Mar 2010
    Posts
    15

    Default

    how do i check the log file and console??...sorry i'm a newby...

  7. #7
    Join Date
    Sep 2009
    Posts
    101

    Default

    If you set up logging, the log file will be specified in log4j.properties.

    Your console will depend on your development environment. If you are using Eclipse/STS, select Window->Show View->Console.

  8. #8
    Join Date
    Mar 2010
    Posts
    15

    Default

    mikej
    I performed a "loggign setup" in Roo shell and the log4j.properties is this:
    Code:
    #Updated at Tue Mar 02 23:21:24 GMT 2010
    #Tue Mar 02 23:21:24 GMT 2010
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.R.File=application.log
    log4j.rootLogger=info, stdout, R
    log4j.appender.R.MaxFileSize=100KB
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.MaxBackupIndex=1
    log4j.logger.org.springframework.web=DEBUG
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    then i run it on dm server and it says:

    HTTP Status 404 - /pizza
    type: Status report
    message: /pizza
    description: The requested resource (/pizza) is not available.

    i tried on tomcat and in the console it says:

    "org.springframework.beans.factory.NoSuchBeanDefin itionException: No bean named 'springSecurityFilterChain' is defined"

    and also "The requested resource (/pizza) is not available." on the browser.

    And i have two errors:
    1 - "classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)"
    2 - "Unexpected exception parsing XML document from file [C:/Documents and Settings/Administrador/Documents/workspace-sts-2.3.0.RELEASE/pizza/src/main/webapp/WEB-INF/spring/webmvc-config.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'org.springframework.web.servlet.handler.SimpleUrl HandlerMapping#pizza#src/main/webapp/WEB-INF/spring/webmvc-config.xml#20' is defined"

    In the wedding example is the same, but in tomcat console i get:
    "java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [META-INF/spring/log4j.properties] cannot be resolved to URL because it does not exist"

    I'm following step by step th documentation examples, i don't know what's happening...i tried reinstalling STS but i get the same thing...

  9. #9
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    It looks like you have made some changes in your application configs (web.xml, app contexts, etc). Make sure that you have run 'security setup' which installs the applicationContext-security.xml config and registers the springSecurityFilterChain in web.xml. Maybe you run the tutorial again from scratch.

    Also Roo ships a sample script called 'vote.roo' which installs security by default. You could take a look there to see how those configs are different to yours at the moment.

    HTH,
    Stefan
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  10. #10
    Join Date
    Mar 2010
    Posts
    15

    Default

    Stefan
    I've just executed the script vote.roo and i get the same thing starting tomcat:

    "java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [META-INF/spring/log4j.properties] cannot be resolved to URL because it does not exist"

    And in the browser i get the same HTTP Status 404...

    I didn't change any application configs...i just followed the instructions...can`t believe it isn't working...

Posting Permissions

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