Where is the ACME demo data stored?!

19 Oct '13, 09:37 PM
39,129 Views
Forum Forum Starter - Level 2

Hi, I'm testing some changes I've made in the Acme demo project. I've installed it and registered as a user and the genereate/run all works fine.

But if I connect to the Acme database (using SQuirrel for the client) to query the table contents they are all empty! The extra tables I added are there along with the Acme demo tables. My tables contain the data that I included, but each Acme table (user, products, store, etc) all has a row count of zero. Does anyone know where this data is located?

I'm using the same connection string in SQuirrel as the demo project "jdbc:derby://localhost:50123/AcmeDB;create=true", username=manager. I'm querying the APP schema, all the tables are there.

One final issue: when I tried to build a power list in the demo WR project that used my table, I could add my table and fields to the list, but at run-time I received an error "No such table APP.SIGN". But in my SQuirrel connection I can see and query both my new tables and the Acme tables. Does the Acme tables point off to a reference or something?!

 
x 1
Follow
Answer Answer at this question and get points!
Forum Starter - Level 2

See comment above about 2 AcmeDbs : one in Tomcat, one in Webratio's workspace:

So it makes sense that there's a ./Tomcat/bin/AcmeDb! After all, your Development database isn't going to be what's running in Production environment (viz.: Tomcat).

So I'm thinking that's obviously gotta be where WebRatio is initialising the data I'm seeing in my web site. After all, they know what they're doing ... even if we don't!

So in the IDE the connection to AcmeDb must be to the ./workspace version of the AcmeDB for design-time. That makes sense.

So it stands to reason that my SQuirrel connection (* using the same connection parameters as what I'm using in my Custom Unit) must be connecting to the ./workspace (design-time) version of AcmeDB... because I can't imagine the good people at WebRatio (or Acme) populating their Development database instance with their data.

Therefore my connection string in SQuirrel and my custom unit are pointing to Dev instead of Prod.

So, providing this logic is correct, the real question is : If I want to connect to the tomcat's ./webapp/bin/AcmeDb from within my custom unit while playing in the WebRatio runtime space how do I do it????

At the moment I'm using the following code :

try
{
    String DbConnnection = "jdbc:derby://localhost:50123/AcmeDb;";
    Class.forName("org.apache.derby.jdbc.ClientDriver");
    NetworkServerControl serverControl = new NetworkServerControl(
            InetAddress.getByName("localhost"),1527);
    serverControl.start (null);
    con = DriverManager.getConnection(Environment.DbConnnection); 
}
catch (Exception ee)
{
    System.out.println("Can't connect to port for Db: " + ee.getMessage());
}

Help me Obiwan Kenobi! Your my only hope!

   
x 1
Forum Starter - Level 2

Before I start ... please has anyone passed parameters using the wr:AjaxURL tag in their Custom Unit?! I really would like a solution to AjaxUrl tag and getting parameters from Http request.

So ... a few final comments for anyone trying to get their Custom Unit working as a data-aware plugin used within a different WebRatio Web project:

Firstly if you uses SQuirrel (or other UI) to connect to the production instance you need a connection string such as :

jdbc:derby://localhost:50123/C:/WebRatio/WebRatio Personal 7.2.0/workspace/.metadata/.plugins/com.webratio.commons.db/derby/AcmeDB;create=true;password=manager

Secondly, copying just the data model classes and mapping files into your Custom Unit doesn't mean that WebRatio will crate the tables in the AcmeDb (prod). Synchronizing your data model will create any tables from the data model into the development version of AcmeDb, but fails to create the tables in the target derby production instance. This is because there are Acme scripts that create the database and populate it with the play data.

Therefore you need to copy the create table / alter table scripts from:

.\workspace\Acme\DBScripts\*.sql

to:

.\workspace\Acme\WebContent\WEB-INF\descr\sql\structure.sql

and:

.\workspace\Acme\SQL\PrepareDB.sql

If you read the articleQuerying with Hibernate there is a paragraph:

I'm not sure what the the "hibernate configuration files" are? Just what do we do with these? Which specific files? And exactly where do they go?! If the hibernate config files are not copied, is that why my non-Acme tables are being created? Or is it just because of the demo AcmeDb assumptions made in it's auto-init pre-configuration.

 
x 1
Answer at this question and get points!

Related questions

502 proxy error-generate and run Adding and deleting from the database Add to Bag link in ACME Agregar boton de cambio de contraseña en el login Alimentar graficas con base de datos Any way to localize the Tab Grid Template (Webratio Store)? Atributos Condicionales heredados Attribute comparison in a selector unit [beginner] - How to store and browse data collected with BPM app? Business object data Cancellare campi e tabelle dal database Cannot add a Database in the Domain Model Cannot connect to MySQL Can not get generate and run option for DataService Project Cannot insert an entity in the database Cannot invoke method selectSingleNode() on null object Can't generate and run database or start tomcat server! Change uplod directory and protect anauthorized access to files Como mostrar una imagen en una lista o en la componente detalles? Como recuperar todos los atributos de una relacion N:N y insertar registros? Como se usa la componente paypal en web ratio? Componente de pagos paypal Conexion a Oracle 12g Connection refused. connect to Cloud Convert data in a Calculated attribute Convert selector component result to single value Could not open the editor: This copy of WebRatio is not registered Creación DB Apache Derby - Modelado BPMN Criptare dati sensibili nel database CSV Component with utf8 encoding Database connection, Host and Port number Database password encrypting Database properties Database resource consumption Database Tables Creation After Remote Deploy DB in Data Service Project Deploy in Cloud Amazon Beanstalk with Postgres Dynamic data type Empty record mistakenly saved Error updating metadata process EverLasting error "The TCP/IP connection to the host has failed. Connection refused" Examples at WebRatio 7.2 (Acme, BookStore, ...) Examples of WebRatio (Acme) Execute truncate sql query Facebook login and personalization Facebook Unit file analysis then update MySQL database Find Model Problemas Foriegn key relationship Generate and run locally on webratio professional edition. Geolocalizzazione con Twitter Component getting data from database Google map is not shown properly in the tab grid Graph Component Problem Groovy and Database Guardar Saltos de LINEA Hide a form if condition if true How can I add a credit card payment gateway or integrate paypal in my web app logic? How can I import a view in the Domain Model as an attribute of an Entity? How can I see the administration page of bookstore example on the cloud? How database or datamodel migration? How I can receive the primary key value after adding into database from OK Port. How to block empty string in Database How to disble derby database? How to fix Network error(status 0) How to modify the FertileEnviroment Default page How to scale a image? How to show certain values derived from relations in the domain model? How to use GoogleGeocoding Add-on I can't run any application with WebRatio (Table/View 'APP.POST' does not exist) Image in List field Insert data into database Is it possible to create a derived relationship between databases? JDBC4 Postgresql Driver JDBC connection with mysql on mac Job not start correctly Mapping database of the entity '...' is unspecified [MOBILE] Can't synchronize domain model with beck end DB Mostrar datos de diferentes tablas/ show dates from diferentes entities MS SQL server jdbc file multi selections field problem MySQL Driver jdbc No Apache Derby driver found No Database on Cloud account No database on my cloud account Overlays for Google Map Unit. Passing JSON Object to Model Personalizzare lo stile di un progetto PostgreSQL Predefined values in database Problem accessing MySQL with WebRatio 6 Problema Grafo da una lista gerarchica Problema ¨HTTP Status 404" Problemas con el Operations View Delete Problem saving multi selection from input Problems to connect Sql Server DB from Webratio Problems with Database Metadata Problems with the page refresh (Tab Grid) Problem with adding templates Problem with fields with accents used in attribute condition Problem with query unit! Problem with stored procedure Problem with the deletion of more than 50.000 records in a table publish web service for storing information in PostgreSQL DB following XSD Resource query a database Refresh and Synchronize DB Problems Relaciones Removing the User-Group-Module tagles Retrieve a value and add some value to it reverse engineering, problema con le relazioni di default Script Unit e Mysql Selezione sul giorno "Events Planning" Share database connection Solve "Generation Error" with Generate and Run option Statistics Component for WebRatio > 7.2.0 Status ProcessInstance and activityInstance in spanish store problme Sybase JConnect 4 JAR replace Sync DataService Project with Mobile Project Table 'freeapp43.profesion' doesn't exist Tarea de servicio no me evalua el valor Target tabs in Tab Grid Control Trying to Synchronize Domain Model Twitter Unit - Get Geo location of twitt Unable to execute the script java.lang.NullPointerException Unknow property on Dynaclass after generation Unspecified BPM Engine Database Update mutiple records with the same value upload file and the move it to other location Usage of the Gantt Unit User Login Timestamp Username come chiave Using own User and Group tables Webratio - Add-ons Webratio Add-ons no permite login Web Ratio Add-ons shop not working Web ratio data model WebRatio - list results of joined tables Web Ratio Mobile and Foreign Key Web Ratio Mobile plateform Macos Sierra Web Ratio Mobile - Remote data mapping problem WebRatio no imports all attributes (fields) of a table WebRation Store connection problem When stars web ratio between dofollow and nofollow backlink has affected? Where can i find ifml sample with webratio? which of these three models is closer to webratio/ifml way of creating web applications White report