Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Don't understand ant-deploy.xml how it works with Netbeans IDE 8.2 etc  RSS feed

 
Ranch Hand
Posts: 491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently, I downloaded a web app which uses Ant-deploy.xml so I open it with Netbeans IDE 8.2.

The problem is that whenever I changed something, for eg. the driver uses one which doesn't work for MYSQL version 8, it will gives me the message that the persistence.xml cannot be deleted when I did a clean and build.

Furthermore, after I changed the persistence xml, it keeps giving me the old message from Tomcat.server log which doesn't apply any more.

<quote>
<"jdbc:mysql://localhost:3306/music_store?autoReconnect=true&UseLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=False"/>
</quote>

And here's the error message:


Caused by: Exception [EclipseLink-30009] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while trying to load persistence unit at url: file:/C:/Users//MusicStore-master/MusicStore-master/build/web/WEB-INF/classes/
Internal Exception: Exception [EclipseLink-30004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/C:/Users//MusicStore-master/MusicStore-master/build/web/WEB-INF/classes/
Internal Exception:
(1. The reference to entity "ampUseLegacyDatetimeCode" must end with the ';' delimiter.)





How do I refresh the tomcat directory in this case?

Another strange thing is that Tomcat is residing at AppData Folder!  And so any role etc has to be specified in the tomcat-user.xml there!

I am unfamiliar with ant-deploy.xml.

Can I know if I were to delete ant-deploy.xml will it affect running the app to see how it run?





 
Sheriff
Posts: 5928
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try fixing the problem described in the error message?

Exception Description: An exception was thrown while processing persistence.xml from URL: file:/C:/Users//MusicStore-master/MusicStore-master/build/web/WEB-INF/classes/
Internal Exception:
(1. The reference to entity "ampUseLegacyDatetimeCode" must end with the ';' delimiter.)  

 
tangara goh
Ranch Hand
Posts: 491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:Did you try fixing the problem described in the error message?

Exception Description: An exception was thrown while processing persistence.xml from URL: file:/C:/Users//MusicStore-master/MusicStore-master/build/web/WEB-INF/classes/
Internal Exception:
(1. The reference to entity "ampUseLegacyDatetimeCode" must end with the ';' delimiter.)  



Hi Knute,

I am not sure where lies the problem cos my the other web app can be connected to MYSQL without a hitch so not sure why the same URL cannot work here in persistence.xml.

Here's the URL:



 
Knute Snortum
Sheriff
Posts: 5928
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a problem with ampersand entities.  Your intention of escaping the "&" character is correct but you didn't quite do it correctly.  An escaped & character in XML is:

   &amp;

Notice the trailing semicolon (;).  This is why the error message thinks that you have an ampersand entity of "ampUseLegacyDatetimeCode".
 
tangara goh
Ranch Hand
Posts: 491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I managed to get it now.  I just simply remove &amp.
 
Does this tiny ad smell okay to you?
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!