-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Context.xml is not parseable n valid?
PostPosted: Mon Aug 16, 2010 5:40 am 
Newbie

Joined: Mon Aug 16, 2010 5:30 am
Posts: 2
Hi All,

Please help me by giving me the solution of this error:

[Fatal Error] :4:2: The markup in the document following the root element must be well-formed.
C:\Documents and Settings\Neetu.Khanna\My Documents\NetBeansProjects\HibernateExp\nbproject\build-impl.xml:584:
Deployment error:
Tomcat configuration file C:\Documents and Settings\Neetu.Khanna\My Documents\NetBeansProjects\HibernateExp\web\META-INF\context.xml seems to be broken. Please make sure it is parseable and valid.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:205)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:498)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException: Tomcat configuration file C:\Documents and Settings\Neetu.Khanna\My Documents\NetBeansProjects\HibernateExp\web\META-INF\context.xml seems to be broken. Please make sure it is parseable and valid.
at org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getContext(TomcatModuleConfiguration.java:173)
at org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getDatasources(TomcatModuleConfiguration.java:198)
at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDatasources(ConfigSupportImpl.java:340)
at org.netbeans.modules.j2ee.deployment.impl.DeploymentHelper.deployJdbcDrivers(DeploymentHelper.java:82)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:155)
... 16 more
Caused by: java.lang.RuntimeException: DOM graph creation failed: org.netbeans.modules.schema2beans.Schema2BeansRuntimeException: Failed to create the XML-DOM Document. Check your XML to make sure it is correct.
The markup in the document following the root element must be well-formed.
at org.netbeans.modules.tomcat5.config.gen.Context.createGraph(Context.java:3177)
at org.netbeans.modules.tomcat5.config.gen.Context.createGraph(Context.java:3161)
at org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getContext(TomcatModuleConfiguration.java:166)

Thanks


Top
 Profile  
 
 Post subject: Re: Context.xml is not parseable n valid?
PostPosted: Mon Aug 16, 2010 5:47 am 
Regular
Regular

Joined: Fri Aug 06, 2010 1:49 am
Posts: 102
Location: shynate26@gmail.com
Hi nitukhanna,

Open context.xml in notepad and save as "ASCII", it may be saved in some other format. If it is in UTF format or other parsing could not be completed. Get back after saving in ascii format.

_________________

Cheers!
Shynate
mailto:shynate26@gmail.com
www.CSSCORP.com


Top
 Profile  
 
 Post subject: Re: Context.xml is not parseable n valid?
PostPosted: Mon Aug 16, 2010 6:00 am 
Newbie

Joined: Mon Aug 16, 2010 5:30 am
Posts: 2
Fir the following code


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<Context antiJARLocking="true" path="/HibernateExp"/>
<hibernate-mapping>
<class name ="emp_table" table="emp_table">
<id name= "Id" type ="int" column="Id">
<generator class="assigned"></generator>
</id>
<property name="ename" columnname ="Emp_Name"></property>
<property name="econtact" columnname="Contact_No"></property>
</class>
</hibernate-mapping>


I am getting this error

Checking file:/C:/Documents%20and%20Settings/Neetu.Khanna/My%20Documents/NetBeansProjects/HibernateExp/web/META-INF/emp_table.xml...
Document root element "emp_table", must match DOCTYPE root "hibernate-configuration". [3]
Element type "emp_table" must be declared. [3]
The markup in the document following the root element must be well-formed. [4]
XML validation finished.


Top
 Profile  
 
 Post subject: Re: Context.xml is not parseable n valid?
PostPosted: Tue Aug 17, 2010 3:45 am 
Regular
Regular

Joined: Fri Aug 06, 2010 1:49 am
Posts: 102
Location: shynate26@gmail.com
What happen to the previous post , was it resolved.

There are 2 files in hibernate.
1) Configuration
2) Mapping

DOCTYPE says as configuration but the element you have declared belongs to mapping. Try to get the DTD of both hiberate-configration.dtd & hibernate-mapping-3.dtd.

Refer and create accordingly.

_________________

Cheers!
Shynate
mailto:shynate26@gmail.com
www.CSSCORP.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.