我正在尝试使用Eclipse 2018-09和Payara 5在开发中部署示例JSF 2.3应用程序,但它会向我返回此错误:
table1.objects.annotate(dt=Truncmonth('created')).values('dt').orderby().annotate(Count('dt'))
table1.objects.annotate(dte=Truncmonth('expires')).values('dte').orderby().annotate(Count('dte'))
table1.objects.annotate(dta=Truncmonth('activated')).values('dta').orderby().annotate(Count('dta'))
table1.objects.annotate(dtr=Truncmonth('renewed')).values('dtr').orderby().annotate(Count('dtr'))
这是我的using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
namespace ConsoleApplication1
{
class Program
{
const string FILENAME = @"c:\temp\gps.xml";
static void Main(string[] args)
{
XDocument doc = XDocument.Load(FILENAME);
XElement root = doc.Root;
XNamespace ns = root.GetDefaultNamespace();
var results = doc.Descendants(ns + "trkpt").Select(x => new
{
lat = x.Attribute("lat"),
lon = x.Attribute("lon"),
ele = (decimal)x.Element(ns + "ele"),
time = (DateTime)x.Element(ns + "time")
}).ToList();
}
}
}
文件:
2018-10-14T15:19:42.783-0300|Severe: Exception during lifecycle processing java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 15; Deployment descriptor file META-INF/persistence.xml in archive [classes]. cvc-complex-type.2.4.b: The content of element 'persistence' is not complete. One of '{"http://xmlns.jcp.org/xml/ns/persistence":persistence-unit}' is expected.
这是我的控制台输出的摘录:
persistence.xml
我该如何解决?
谢谢。
答案 0 :(得分:0)