WAR file does not deploy because of table without PK

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

WAR file does not deploy because of table without PK

Postby omar » Thu Dec 12, 2019 12:00 pm

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: Any suggestions?
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 347
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: WAR file does not deploy because of table without PK

Postby jcompagner » Thu Dec 12, 2019 2:33 pm

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?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8454
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: WAR file does not deploy because of table without PK

Postby omar » Thu Dec 12, 2019 3:04 pm

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?
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 347
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: WAR file does not deploy because of table without PK

Postby omar » Thu Dec 12, 2019 3:56 pm

I think I may have to do a clean install. How can I remove any dependencies to previous versions of the application?
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 347
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: WAR file does not deploy because of table without PK

Postby jcompagner » Thu Dec 12, 2019 4:37 pm

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)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8454
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: WAR file does not deploy because of table without PK

Postby omar » Thu Dec 12, 2019 4:49 pm

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??
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 347
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: WAR file does not deploy because of table without PK

Postby jcompagner » Thu Dec 12, 2019 6:37 pm

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?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8454
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: WAR file does not deploy because of table without PK

Postby omar » Thu Dec 12, 2019 7:57 pm

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 [ ]
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 347
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: WAR file does not deploy because of table without PK

Postby omar » Thu Dec 12, 2019 11:35 pm

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.
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 347
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: WAR file does not deploy because of table without PK

Postby jcompagner » Fri Dec 13, 2019 11:45 am

omar wrote: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
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8454
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 4 guests