Element type "Resource" must be followed by either attribute specifications, ">" or "/>".

来源:互联网 发布:达芬奇调色 mac 编辑:程序博客网 时间:2024/06/10 16:59

配置数据源是出现这个错误:Element type "Resource" must be followed by either attribute specifications, ">" or "/>".

搞了半天找不到

<Resource name="jdbc/epai" 
       auth="Container"type="javax.sql.DataSource"  maxActive="100"  
       maxIdle="30" maxWait="10000"   username="sa"   password="accp" 
      driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"  
     url="jdbc:sqlserver://localhost:1433;databaseName=epai" >
  </Resource>

在context.xml中配置的这个没一点问题,用IT把这个xml文件打开时才发现错误了, auth="Container"type=。。这个地方中间要有空格。2个靠的太近了。如图:

原创粉丝点击