Unhandled exception because of XML error

Unhandled exception because of XML error

Postby gamedever » Fri Mar 19, 2010 7:33 pm

When editing the XML file incorrectly, I get this:
Code: Select all
0    [main] INFO  com.avatar_reality.blue_mars.iam.IamBeanHelper.getIamBeans(IamBeanHelper.java:63) - Found 1 xml files
90   [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323) - Loading XML bean definitions from file [C:\Users\Mark\workspace\AIMLAshlee\Ashlee.xml]
[color=#FF0000]Exception in thread "main" java.util.NoSuchElementException
   at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
   at com.avatar_reality.blue_mars.tkclient.TemporaryLoginService.login(TemporaryLoginService.java:41)
   at com.avatar_reality.blue_mars.tkclient.RemoteTKConnectionFactory.createClient(RemoteTKConnectionFactory.java:70)
   at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
   at sun.rmi.transport.Transport$1.run(Transport.java:159)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
   at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:619)
   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
   at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy0.createClient(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientManager.init(TKClientManager.java:92)
   at com.avatar_reality.blue_mars.iam.IamMain.main(IamMain.java:126)
   at TestMyIam.main(TestMyIam.java:17)[/color]
gamedever
 
Posts: 2
Joined: Tue Mar 16, 2010 2:27 am

Re: Unhandled exception because of XML error

Postby admin » Fri Mar 19, 2010 8:27 pm

Can you post the AIMLAshlee.xml file as well?
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Unhandled exception because of XML error

Postby gamedever » Fri Mar 19, 2010 8:28 pm

Code: Select all
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
        "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>
   <bean id="AliceLocation" class="com.avatar_reality.blue_mars.iam.map.Location">
      <constructor-arg index="0" value="3092"/>
      <constructor-arg index="1" value="3288"/>
      <constructor-arg index="2" value="34.25"/>
   </bean>
   
   <bean id="AIMLAshlee" class="AIMLBehavior" scope="prototype"/>

   <bean id="Ashlee" class="com.avatar_reality.blue_mars.iam.framework.IamBot">
      <property name="jar" value="file:AIMLBot.jar"/>
      <property name="spawnLocation">
         <ref bean="AliceLocation"/>
      </property>
      <property name="isMonitored" value="true"/>
      <property name="genderString" value="Female"/>
      <property name="behaviorList">
         <ref bean="AIMLAshlee"/>
      </property>
      <property name="password" value="MarkSum"/>
      <property name="cityID" value="20001"/>
      <property name="hair">
         <value>FemaleShortHair01_Silver</value>
      </property>
      <property name="topWear">
         <value>FemalePoloShirts01_Green</value>
      </property>
      <property name="bottomWear">
         <value>FemaleMiniSkirt01_Leopard</value>
      </property>
      <property name="footWear">
         <value>FemaleHighHeel02_Black</value>
      </property>
      <property name="name" value="Ashlee"/>
   </bean>
</beans>
gamedever
 
Posts: 2
Joined: Tue Mar 16, 2010 2:27 am

Re: Unhandled exception because of XML error

Postby admin » Fri Mar 19, 2010 8:42 pm

The error is that the user-ID "Ashlee" is not known. You need to change it to the registered user-ID that you used to register the Iam.

Unfortunately the error it gives is not very clear. I'll fix it so it will tell you that the name and password doesn't match.

Mark
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron