• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Ranch Hand
Posts: 1048
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1048
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1048
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I managed to get it now.  I just simply remove &amp.
 
You'll never get away with this you overconfident blob! The most you will ever get is this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic