# WAR file does not deploy because of table without PK

**URL:** <https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138>\
**Category:** Classic Servoy\
**Created:** [December 12, 2019, 10:00am UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138 "2019-12-12T10:00:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [December 12, 2019, 10:00am UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/1 "2019-12-12T10:00:35Z")

</div>

Hi,

I am having trouble deploying a war file. In my solution I reference an external database in which there is a table without a primary key. In Servoy developer I put the row\_ident mark on the first column which is unique. In developer this works fine and I can browse the data without any issues.

However, no matter what I try, I can’t get the WAR file to successfully reference the same database on the server (the database is accessible from the server through dbVisualizer). I define my database properties using the servoy\_server.properties file using DBI files.

If i include a dummy form with a reference to the table TOMCAT refuses to deploy my WAR file saying it can’t find the database. If I don’t include the form it will not add the database reference and I can add it manually in Servoy Server Admin console but then it will complain about the table not having a primary key… ![:cry:]( "Crying or Very sad") Any suggestions?

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 12, 2019, 12:33pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/2 "2019-12-12T12:33:50Z")

</div>

The question is more why doesn’t tomcat deploy your war that has the dbi info of that server/table?

What is the exact error that you see in the tomcat logs or in the servoy log?

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [December 12, 2019, 1:04pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/3 "2019-12-12T13:04:36Z")

</div>

Hi Johan,

Thanks for your response. If I include a dummy form with a reference to the table the error I get is that it cannot find the database server:

Caused by: com.servoy.j2db.persistence.RepositoryException: Cannot find database server “bronboek”, import failed.

It looks like the server properties are automatically excluded from the servoy\_server.properties file when exporting the war file?

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [December 12, 2019, 1:56pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/4 "2019-12-12T13:56:13Z")

</div>

I think I may have to do a clean install. How can I remove any dependencies to previous versions of the application?

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 12, 2019, 2:37pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/5 "2019-12-12T14:37:05Z")

</div>

so you didn’t add “bronboek” as a server definition when making the WAR?

What do you mean with “automatically excluded” we don’t exclude anything, you have to say which servers we should export (from the developer the last export pages if you don’t choose a external servoy.properties file)

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [December 12, 2019, 2:49pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/6 "2019-12-12T14:49:10Z")

</div>

I have a servoy\_server.properties file that includes a “bronboek” server definition. However, when I deploy the solution the connection seems to be missing or invalid??

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 12, 2019, 4:37pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/7 "2019-12-12T16:37:21Z")

</div>

You really see in the log an connection error?  
It is invalid for a reason. It should be there.

What happens if you deploy that war without an active solution (but with your properties file) is it then listed on the admin page?

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [December 12, 2019, 5:57pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/8 "2019-12-12T17:57:54Z")

</div>

Just tried that. It does not. I do get an error however. Does this ring any bells?

2019-12-12 18:45:01,454 WARN [http-nio-8080-exec-6] org.sablo.specification.WebObjectSpecification - Unknown type name ‘array’ encountered while parsing spec servoyextra-table

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [December 12, 2019, 9:35pm UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/9 "2019-12-12T21:35:55Z")

</div>

Pfew, finally got it to work. What I basically did is:

1. Switched to a new workspace
2. As Johan suggested, I did a WAR export (named test.war) without the active solution (uncheck “include active solution and modules”)
3. Instead of using the servoy\_server.properties file I switched back to filling the tabs with database connections (maybe it contained properties that worked in 2019.6 but no longer did in 2019.9?, the connections were valid I checked them over and over)
4. Switched back to my normal workspace, did the same, this time with the active solution. NullPointer Error.
5. Checked DBI files checkbox, exported the WAR file and this time it worked.

Beats me. Main takeaway with deployment database connection problems: do step2 and take your solution out of the equation, it helps focus on what matters. Thanks Johan! I appreciate it.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 13, 2019, 9:45am UTC](https://forum.servoy.com/t/war-file-does-not-deploy-because-of-table-without-pk/20138/10 "2019-12-13T09:45:03Z")

</div>

> omar:  
> Just tried that. It does not. I do get an error however. Does this ring any bells?
> 
> 2019-12-12 18:45:01,454 WARN [http-nio-8080-exec-6] org.sablo.specification.WebObjectSpecification - Unknown type name ‘array’ encountered while parsing spec servoyextra-table

this is just a problem of a wrong spec definition in our servoy-extra component, we will fix that shortly
