- This topic has 9 replies, 3 voices, and was last updated 19 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
RobMemberHi,
This is a different issue as reported in an earlier thread. I currently have a Spring/iBATIS project in Eclipse 3.0.1 and MyEclipse 3.8.3. I have the project set up as a J2EE-Web/Struts project.
For some reason, the MyEclipse parser is choking on the following:
<bean id=”baseTransactionProxy” class=”org.springframework.transaction.interceptor.TransactionProxyFactoryBean” abstract=”true”>
<property name=”transactionManager”><ref bean=”transactionManager”/></property>
<property name=”transactionAttributes”>
<props>
<prop key=”insert*”>PROPAGATION_REQUIRED</prop>
<prop key=”create*”>PROPAGATION_REQUIRED</prop>
<prop key=”update*”>PROPAGATION_REQUIRED</prop>
<prop key=”*”>PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>The Error: Attribute “abstract” must be declared for element type “bean”.
…as you can see, the element is declared. The project deploys and works perfectly, and this in fact, is the applicationContext.xml from the jPetstore Demo.
I am also getting a similar error on an sqlMap XML file. The same type of error where the parser is expecting an Attribute that is there in the code.
This project works fine, and the ONLY problem I am having is with the project added as a STRUTS/Web project. Before I enabled Struts through MyEclipse, everything was fine….
Thanks!
Rob.
Scott AndersonParticipantRob,
We’ve run down the issue around ‘abstract’ in this thread:
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-5392-highlight-spring+catalog+catalogue+abstract.html
RobMemberI have tried this fix, and have not seen any results.
I am also having strange issues where the XML editor will put an error mark, saying “Missing closing quote”. There is no quote missing, and when I click on
“MyEclipse” –> Run Validation, everything works fine.Why is the XML editor so buggy, and when can we expect some patches?
Thanks.
Rob.
Riyad KallaMemberRob,
Just to clarify, you followed this thread: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-5331-highlight-spring+dtd+abstract.html and updated the Catalog entry for the DTD correct?If so, right click on your XML file > Open With and check that the “MyEclipse XML Editor” is the default editor; we are not aware of any outstanding bugs with the XML editor so the fact that you are getting so much flakiness makes me think this might be a setup issue. Can you check your log file for possible exceptions from the XML editor (workspace dir\.metadata\.log) to see if we can get to the bottom of this?
RobMemberThanks. I verified the steps, and the MyEclipse Catalog entries are correct.
Restarted Eclipse…
I opened the file in the MyEclipse XML Editor (default), right-clicked on the document and ran “Validate XML File”: “The XML file is not valid. See the Problems view for a list of the validation errors.”
I right-clicked on the file (in the explorer view), and selected MyEclipse –> Run Validation: “Validation of resource /proj_name/docroot/WEB-INF/applicationContext.xml is complete.”
Through all this, ME displays the problem markers on the margin borders, and reports the error in the “Problems” View.
There are no errors in the log file.
Riyad KallaMemberStrange, can you paste the file contents here so I can try it locally and file a bug with the problem if I find one? Please wrap the XML in code tags so it maintains format (hit Post Reply and use Code button to do it automatically)
RobMemberHere it is:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <!-- ========================= GENERAL DEFINITIONS ========================= --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>WEB-INF/mail.properties</value> <value>WEB-INF/jdbc.properties</value> </list> </property> </bean> <!-- ========================= BUSINESS OBJECT DEFINITIONS ======================== --> <bean id="accountValidator" class="com.comerxia.idc.domain.logic.AccountValidator"/> <bean id="orderValidator" class="com.comerxia.idc.domain.logic.OrderValidator"/> <bean id="baseTransactionProxy" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" > <property name="transactionManager"><ref bean="transactionManager"/></property> <property name="transactionAttributes"> <props> <prop key="insert*">PROPAGATION_REQUIRED</prop> <prop key="create*">PROPAGATION_REQUIRED</prop> <prop key="update*">PROPAGATION_REQUIRED</prop> <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> </props> </property> </bean> <bean id="idc" parent="baseTransactionProxy"> <property name="target"> <bean class="com.comerxia.idc.domain.logic.IDCImpl"> <property name="merchantUserDao"><ref bean="merchantUserDao"/></property> <property name="merchantDao"><ref bean="merchantDao"/></property> <property name="merchantPODao"><ref bean="merchantPODao"/></property> <property name="securityDao"><ref bean="securityDao"/></property> <property name="orderItemDao"><ref bean="orderItemDao"/></property> <property name="orderDao"><ref bean="orderDao"/></property> <property name="logDao"><ref bean="logDao"/></property> </bean> </property> </bean> </beans>
Riyad KallaMemberHere is what I did:
1) Pasted these contents into a brand new empty spring.xml file
2) CTRL-S to save, validation error talking about ‘abstract’ popped up
3) Tried right-click validate from tree, still failed.
4) Followed instructions from post above to update the DTD in the catalog by adding a new user entry
5) Hit OK on the preference dialog
6) Right click > Validate XML file, validation was successful and problem marker was removed.Please paste the contents of your XML Catalog entry from the “User Specified Entry” section here so I can see if it differs from mine. I just followed the post exactly.
RobMemberOK, I got it working now. I triple-checked the KEY value in Catalog entery and found a trailing space (Damn the Cut & Paste Inventor !!! ).
Now everything is validating. Thank you for your patience. 🙂
Riyad KallaMemberGlad it is working now
-
AuthorPosts