Hi,
we're just evaluating OFBiz for a bigger project. First of all: OFBiz seems to be fantastic, but please, care for more documentation. I'd like to help you, but actually I don't know where to start, because our project has a higher priority and I don't think I know already enough about OFBiz... I hope our training DVDs will arrive soon. But now to my problem: I'm using OFBiz from trunk (last update yesterday / 2006-07-06), having a Postgres-DB connected to it and trying to learn and use OFBiz. I've created a new project in hot-deploy and have defined three entities, one service in minilang and created two widgets. Up to now this is not much, but there are some errors with the entities and I have no idea how to handle them. I've checked everything twice, but I think I'm lost between all of those XML-files. ;) All other entities defined by the OFBiz default distribution are created and managed properly. After deleting the my tables from the database they are recreated without any problems. So there must be an error in the internal entity management. Did I miss a parameter? Or is there anything else? TIA Best regards, Fabian. PS: If you need more log- or config-files, I'll send them. ---- From console.log: ---- *snip* 4570 (main) [ UtilXml.java:263:DEBUG] XML Read 0.015s: D:/dev/eclipse_workspace/ofbiz/hot-deploy/srm/entitydef/entitymodel.xm *snip* 5348 (main) [ UtilXml.java:263:DEBUG] XML Read 0.0s: D:/dev/eclipse_workspace/ofbiz/hot-deploy/srm/entitydef/entitygroup.xml *snip* 5783 (main) [ GenericDelegator.java:176:INFO ] Delegator "default" initializing helper "localpostgres" for entity group "org.ofbiz". 5799 (main) [ GenericDelegator.java:193:INFO ] Doing database check as requested in entityengine.xml with addMissing=true 6560 (main) [ DatabaseUtil.java:765:INFO ] Database Product Name is PostgreSQL 6560 (main) [ DatabaseUtil.java:766:INFO ] Database Product Version is 8.1.4 6560 (main) [ DatabaseUtil.java:774:INFO ] Database Driver Name is PostgreSQL Native Driver 6576 (main) [ DatabaseUtil.java:775:INFO ] Database Driver Version is PostgreSQL 8.1 JDBC3 with SSL (build 405) 6576 (main) [ DatabaseUtil.java:776:INFO ] Database Driver JDBC Version is 3.0 6576 (main) [ DatabaseUtil.java:786:INFO ] Database Setting/Support Information (those with a * should be true): 6576 (main) [ DatabaseUtil.java:787:INFO ] - supports transactions [true]* 6576 (main) [ DatabaseUtil.java:788:INFO ] - isolation None [false] 6576 (main) [ DatabaseUtil.java:789:INFO ] - isolation ReadCommitted [true] 6576 (main) [ DatabaseUtil.java:790:INFO ] - isolation ReadUncommitted[true] 6576 (main) [ DatabaseUtil.java:791:INFO ] - isolation RepeatableRead [true] 6592 (main) [ DatabaseUtil.java:792:INFO ] - isolation Serializable [true] 6592 (main) [ DatabaseUtil.java:793:INFO ] - default fetchsize [0] 6592 (main) [ DatabaseUtil.java:794:INFO ] - forward only type [true] 6592 (main) [ DatabaseUtil.java:795:INFO ] - scroll sensitive type [false] 6592 (main) [ DatabaseUtil.java:796:INFO ] - scroll insensitive type [true] 6592 (main) [ DatabaseUtil.java:797:INFO ] - is case sensitive [false] 6592 (main) [ DatabaseUtil.java:798:INFO ] - stores LowerCase [true] 6592 (main) [ DatabaseUtil.java:799:INFO ] - stores MixedCase [false] 6592 (main) [ DatabaseUtil.java:800:INFO ] - stores UpperCase [false] 6669 (main) [ DatabaseUtil.java:801:INFO ] - max table name length [63] 6669 (main) [ DatabaseUtil.java:802:INFO ] - max column name length [63] 6669 (main) [ DatabaseUtil.java:803:INFO ] - max schema name length [63] 6669 (main) [ DatabaseUtil.java:804:INFO ] - concurrent connections [8192] 6669 (main) [ DatabaseUtil.java:805:INFO ] - concurrent statements [1] 6669 (main) [ DatabaseUtil.java:806:INFO ] - ANSI SQL92 Entry [true] 6669 (main) [ DatabaseUtil.java:807:INFO ] - ANSI SQL92 Itermediate [false] 6669 (main) [ DatabaseUtil.java:808:INFO ] - ANSI SQL92 Full [false] 6669 (main) [ DatabaseUtil.java:809:INFO ] - ODBC SQL Grammar Core [false] 6669 (main) [ DatabaseUtil.java:810:INFO ] - ODBC SQL Grammar Extended[false] 6669 (main) [ DatabaseUtil.java:811:INFO ] - ODBC SQL Grammar Minimum [true] 6669 (main) [ DatabaseUtil.java:812:INFO ] - outer joins [true]* 6669 (main) [ DatabaseUtil.java:813:INFO ] - limited outer joins [true] 6669 (main) [ DatabaseUtil.java:814:INFO ] - full outer joins [true] 6669 (main) [ DatabaseUtil.java:815:INFO ] - group by [true]* 6669 (main) [ DatabaseUtil.java:816:INFO ] - group by not in select [true] 6669 (main) [ DatabaseUtil.java:817:INFO ] - column aliasing [true] 6669 (main) [ DatabaseUtil.java:818:INFO ] - order by not in select [true] 6669 (main) [ DatabaseUtil.java:820:INFO ] - alter table add column [true]* 6669 (main) [ DatabaseUtil.java:821:INFO ] - non-nullable column [true]* 6669 (main) [ DatabaseUtil.java:858:INFO ] Getting Table Info From Database 6809 (main) [ DatabaseUtil.java:993:INFO ] Getting Column Info From Database *snip* 8582 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserDetails] has no table in the database 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_DETAILS]: SQL Exception while executing the following: CREATE TABLE srm.SRM_USER_DETAILS (USER_ID VARCHAR(20) NOT NULL, USER_DETAIL_ID VARCHAR(20) NOT NULL, USER_TYPE_ID VARCHAR(20), USER_FIRST_NAME VARCHAR(60), USER_LAST_NAME VARCHAR(60), USER_PHONE VARCHAR(60), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_DETAILS PRIMARY KEY (USER_ID, USER_DETAIL_ID)) Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_details" already exists 8613 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserLogins] has no table in the database 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_LOGINS]: SQL Exception while executing the following: CREATE TABLE srm.SRM_USER_LOGINS (USER_ID VARCHAR(20) NOT NULL, USER_TYPE_ID VARCHAR(20), USER_LOGIN VARCHAR(60), USER_PASSWORD VARCHAR(60), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_LOGINS PRIMARY KEY (USER_ID)) Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_logins" already exists 8613 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserTypes] has no table in the database 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_TYPES]: SQL Exception while executing the following: CREATE TABLE srm.SRM_USER_TYPES (USER_TYPE_ID VARCHAR(20) NOT NULL, USER_TYPE_NAME VARCHAR(60), USER_TYPE_DESC VARCHAR(255), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_TYPES PRIMARY KEY (USER_TYPE_ID)) Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_types" already exists 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_DETAILS] exists in the database but has no corresponding entity 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_LOGINS] exists in the database but has no corresponding entity 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_TYPES] exists in the database but has no corresponding entity ---- From ofbiz-component.xml: --- <?xml version="1.0" encoding="UTF-8"?> <ofbiz-component name="srm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-component.xsd"> <resource-loader name="main" type="component"/> <classpath type="dir" location="config"/> <classpath type="dir" location="script"/> <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/> <entity-resource type="group" reader-name="main" loader="main" location="entitydef/entitygroup.xml"/> <service-resource type="model" loader="main" location="servicedef/services.xml"/> <webapp name="srm" title="Die ersten Versuche mit Widgets" server="default-server" location="webapp/srm" base-permission="" mount-point="/srm"/> </ofbiz-component> ---- From entitymodel.xml: ---- <?xml version="1.0" encoding="UTF-8"?> <entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitymodel.xsd"> <title>srm</title> <version>1.0</version> <entity entity-name="SrmUserTypes" package-name="org.ofbiz" title="Example for some kinds of users"> <field name="userTypeId" type="id-ne"/> <field name="userTypeName" type="short-varchar"/> <field name="userTypeDesc" type="long-varchar"/> <prim-key field="userTypeId"/> </entity> <entity entity-name="SrmUserLogins" package-name="org.ofbiz" title="Example for logins an passwords"> <field name="userId" type="id-ne"/> <field name="userTypeId" type="id-ne"/> <field name="userLogin" type="short-varchar"/> <field name="userPassword" type="short-varchar"/> <prim-key field="userId"/> <relation rel-entity-name="SrmUserTypes" type="one"> <key-map field-name="userTypeId"/> </relation> </entity> <entity entity-name="SrmUserDetails" package-name="org.ofbiz" title="Some details, multiple times per user"> <field name="userId" type="id-ne"/> <field name="userDetailId" type="id-ne"/> <field name="userTypeId" type="id-ne"/> <field name="userFirstName" type="short-varchar"/> <field name="userLastName" type="short-varchar"/> <field name="userPhone" type="short-varchar"/> <prim-key field="userId"/> <prim-key field="userDetailId"/> <relation type="one" rel-entity-name="SrmUserLogins"> <key-map field-name="userId"/> </relation> <relation rel-entity-name="SrmUserTypes" type="one"> <key-map field-name="userTypeId"/> </relation> </entity> </entitymodel> ---- From entitygroup.xml ---- <?xml version="1.0" encoding="UTF-8"?> <entitygroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitygroup.xsd"> <entity-group group="org.ofbiz" entity="SrmUserTypes"/> <entity-group group="org.ofbiz" entity="SrmUserLogins"/> <entity-group group="org.ofbiz" entity="SrmUserDetails"/> </entitygroup> |
I have gotten this, but it really does not matter.
if you notice it says, after the error. already exists I checked my DB after this and the tables were there. Fabian Gorsler sent the following on 7/6/2006 3:29 AM: > Hi, > > we're just evaluating OFBiz for a bigger project. First of all: OFBiz seems to be fantastic, but please, care for more documentation. I'd like to help you, but actually I don't know where to start, because our project has a higher priority and I don't think I know already enough about OFBiz... I hope our training DVDs will arrive soon. > > But now to my problem: I'm using OFBiz from trunk (last update yesterday / 2006-07-06), having a Postgres-DB connected to it and trying to learn and use OFBiz. I've created a new project in hot-deploy and have defined three entities, one service in minilang and created two widgets. Up to now this is not much, but there are some errors with the entities and I have no idea how to handle them. I've checked everything twice, but I think I'm lost between all of those XML-files. ;) > > All other entities defined by the OFBiz default distribution are created and managed properly. After deleting the my tables from the database they are recreated without any problems. So there must be an error in the internal entity management. Did I miss a parameter? Or is there anything else? > > TIA > > Best regards, > Fabian. > > PS: If you need more log- or config-files, I'll send them. > > ---- From console.log: ---- > *snip* > 4570 (main) [ UtilXml.java:263:DEBUG] XML Read 0.015s: D:/dev/eclipse_workspace/ofbiz/hot-deploy/srm/entitydef/entitymodel.xm > *snip* > 5348 (main) [ UtilXml.java:263:DEBUG] XML Read 0.0s: D:/dev/eclipse_workspace/ofbiz/hot-deploy/srm/entitydef/entitygroup.xml > *snip* > 5783 (main) [ GenericDelegator.java:176:INFO ] Delegator "default" initializing helper "localpostgres" for entity group "org.ofbiz". > 5799 (main) [ GenericDelegator.java:193:INFO ] Doing database check as requested in entityengine.xml with addMissing=true > 6560 (main) [ DatabaseUtil.java:765:INFO ] Database Product Name is PostgreSQL > 6560 (main) [ DatabaseUtil.java:766:INFO ] Database Product Version is 8.1.4 > 6560 (main) [ DatabaseUtil.java:774:INFO ] Database Driver Name is PostgreSQL Native Driver > 6576 (main) [ DatabaseUtil.java:775:INFO ] Database Driver Version is PostgreSQL 8.1 JDBC3 with SSL (build 405) > 6576 (main) [ DatabaseUtil.java:776:INFO ] Database Driver JDBC Version is 3.0 > 6576 (main) [ DatabaseUtil.java:786:INFO ] Database Setting/Support Information (those with a * should be true): > 6576 (main) [ DatabaseUtil.java:787:INFO ] - supports transactions [true]* > 6576 (main) [ DatabaseUtil.java:788:INFO ] - isolation None [false] > 6576 (main) [ DatabaseUtil.java:789:INFO ] - isolation ReadCommitted [true] > 6576 (main) [ DatabaseUtil.java:790:INFO ] - isolation ReadUncommitted[true] > 6576 (main) [ DatabaseUtil.java:791:INFO ] - isolation RepeatableRead [true] > 6592 (main) [ DatabaseUtil.java:792:INFO ] - isolation Serializable [true] > 6592 (main) [ DatabaseUtil.java:793:INFO ] - default fetchsize [0] > 6592 (main) [ DatabaseUtil.java:794:INFO ] - forward only type [true] > 6592 (main) [ DatabaseUtil.java:795:INFO ] - scroll sensitive type [false] > 6592 (main) [ DatabaseUtil.java:796:INFO ] - scroll insensitive type [true] > 6592 (main) [ DatabaseUtil.java:797:INFO ] - is case sensitive [false] > 6592 (main) [ DatabaseUtil.java:798:INFO ] - stores LowerCase [true] > 6592 (main) [ DatabaseUtil.java:799:INFO ] - stores MixedCase [false] > 6592 (main) [ DatabaseUtil.java:800:INFO ] - stores UpperCase [false] > 6669 (main) [ DatabaseUtil.java:801:INFO ] - max table name length [63] > 6669 (main) [ DatabaseUtil.java:802:INFO ] - max column name length [63] > 6669 (main) [ DatabaseUtil.java:803:INFO ] - max schema name length [63] > 6669 (main) [ DatabaseUtil.java:804:INFO ] - concurrent connections [8192] > 6669 (main) [ DatabaseUtil.java:805:INFO ] - concurrent statements [1] > 6669 (main) [ DatabaseUtil.java:806:INFO ] - ANSI SQL92 Entry [true] > 6669 (main) [ DatabaseUtil.java:807:INFO ] - ANSI SQL92 Itermediate [false] > 6669 (main) [ DatabaseUtil.java:808:INFO ] - ANSI SQL92 Full [false] > 6669 (main) [ DatabaseUtil.java:809:INFO ] - ODBC SQL Grammar Core [false] > 6669 (main) [ DatabaseUtil.java:810:INFO ] - ODBC SQL Grammar Extended[false] > 6669 (main) [ DatabaseUtil.java:811:INFO ] - ODBC SQL Grammar Minimum [true] > 6669 (main) [ DatabaseUtil.java:812:INFO ] - outer joins [true]* > 6669 (main) [ DatabaseUtil.java:813:INFO ] - limited outer joins [true] > 6669 (main) [ DatabaseUtil.java:814:INFO ] - full outer joins [true] > 6669 (main) [ DatabaseUtil.java:815:INFO ] - group by [true]* > 6669 (main) [ DatabaseUtil.java:816:INFO ] - group by not in select [true] > 6669 (main) [ DatabaseUtil.java:817:INFO ] - column aliasing [true] > 6669 (main) [ DatabaseUtil.java:818:INFO ] - order by not in select [true] > 6669 (main) [ DatabaseUtil.java:820:INFO ] - alter table add column [true]* > 6669 (main) [ DatabaseUtil.java:821:INFO ] - non-nullable column [true]* > 6669 (main) [ DatabaseUtil.java:858:INFO ] Getting Table Info From Database > 6809 (main) [ DatabaseUtil.java:993:INFO ] Getting Column Info From Database > *snip* > 8582 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserDetails] has no table in the database > 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_DETAILS]: SQL Exception while executing the following: > CREATE TABLE srm.SRM_USER_DETAILS (USER_ID VARCHAR(20) NOT NULL, USER_DETAIL_ID VARCHAR(20) NOT NULL, USER_TYPE_ID VARCHAR(20), USER_FIRST_NAME VARCHAR(60), USER_LAST_NAME VARCHAR(60), USER_PHONE VARCHAR(60), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_DETAILS PRIMARY KEY (USER_ID, USER_DETAIL_ID)) > Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_details" already exists > 8613 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserLogins] has no table in the database > 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_LOGINS]: SQL Exception while executing the following: > CREATE TABLE srm.SRM_USER_LOGINS (USER_ID VARCHAR(20) NOT NULL, USER_TYPE_ID VARCHAR(20), USER_LOGIN VARCHAR(60), USER_PASSWORD VARCHAR(60), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_LOGINS PRIMARY KEY (USER_ID)) > Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_logins" already exists > 8613 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserTypes] has no table in the database > 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_TYPES]: SQL Exception while executing the following: > CREATE TABLE srm.SRM_USER_TYPES (USER_TYPE_ID VARCHAR(20) NOT NULL, USER_TYPE_NAME VARCHAR(60), USER_TYPE_DESC VARCHAR(255), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_TYPES PRIMARY KEY (USER_TYPE_ID)) > Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_types" already exists > 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_DETAILS] exists in the database but has no corresponding entity > 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_LOGINS] exists in the database but has no corresponding entity > 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_TYPES] exists in the database but has no corresponding entity > > ---- From ofbiz-component.xml: --- > <?xml version="1.0" encoding="UTF-8"?> > <ofbiz-component name="srm" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-component.xsd"> > <resource-loader name="main" type="component"/> > <classpath type="dir" location="config"/> > <classpath type="dir" location="script"/> > > <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/> > <entity-resource type="group" reader-name="main" loader="main" location="entitydef/entitygroup.xml"/> > <service-resource type="model" loader="main" location="servicedef/services.xml"/> > > <webapp name="srm" > title="Die ersten Versuche mit Widgets" > server="default-server" > location="webapp/srm" > base-permission="" > mount-point="/srm"/> > </ofbiz-component> > > ---- From entitymodel.xml: ---- > <?xml version="1.0" encoding="UTF-8"?> > <entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitymodel.xsd"> > <title>srm</title> > <version>1.0</version> > <entity entity-name="SrmUserTypes" package-name="org.ofbiz" > title="Example for some kinds of users"> > <field name="userTypeId" type="id-ne"/> > <field name="userTypeName" type="short-varchar"/> > <field name="userTypeDesc" type="long-varchar"/> > <prim-key field="userTypeId"/> > </entity> > <entity entity-name="SrmUserLogins" package-name="org.ofbiz" > title="Example for logins an passwords"> > <field name="userId" type="id-ne"/> > <field name="userTypeId" type="id-ne"/> > <field name="userLogin" type="short-varchar"/> > <field name="userPassword" type="short-varchar"/> > <prim-key field="userId"/> > <relation rel-entity-name="SrmUserTypes" type="one"> > <key-map field-name="userTypeId"/> > </relation> > </entity> > <entity entity-name="SrmUserDetails" package-name="org.ofbiz" > title="Some details, multiple times per user"> > <field name="userId" type="id-ne"/> > <field name="userDetailId" type="id-ne"/> > <field name="userTypeId" type="id-ne"/> > <field name="userFirstName" type="short-varchar"/> > <field name="userLastName" type="short-varchar"/> > <field name="userPhone" type="short-varchar"/> > <prim-key field="userId"/> > <prim-key field="userDetailId"/> > <relation type="one" rel-entity-name="SrmUserLogins"> > <key-map field-name="userId"/> > </relation> > <relation rel-entity-name="SrmUserTypes" type="one"> > <key-map field-name="userTypeId"/> > </relation> > </entity> > </entitymodel> > > ---- From entitygroup.xml ---- > <?xml version="1.0" encoding="UTF-8"?> > <entitygroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitygroup.xsd"> > <entity-group group="org.ofbiz" entity="SrmUserTypes"/> > <entity-group group="org.ofbiz" entity="SrmUserLogins"/> > <entity-group group="org.ofbiz" entity="SrmUserDetails"/> > </entitygroup> > |
Hi,
Can anyone explain why the detailImage in the product detail page does not contain a URL but rather some bizarre string? For example, the lines below were taken using "view source" on the browser... function popupDetail() { var defaultDetailImage = "L2ltYWdlcy9zaG9wL3NhbXBsZS1wcm9kdWN0LmdpZg%3D%3D"; if (defaultDetailImage == null || defaultDetailImage == "null") { defaultDetailImage = "_NONE_"; What on earth is "L2ltYWdlcy9zaG9wL3NhbXBsZS1wcm9kdWN0LmdpZg%3D%3D" ??? Thanks in advance -- Kind Regards Andrew Sykes <[hidden email]> Sykes Development Ltd http://www.sykesdevelopment.com |
In reply to this post by Fabian Gorsler
Looks like a problem with the schema name. Are you explicitly saying the schema-name on the datasource element is "srm"? -David Fabian Gorsler wrote: > Hi, > > we're just evaluating OFBiz for a bigger project. First of all: OFBiz seems to be fantastic, but please, care for more documentation. I'd like to help you, but actually I don't know where to start, because our project has a higher priority and I don't think I know already enough about OFBiz... I hope our training DVDs will arrive soon. > > But now to my problem: I'm using OFBiz from trunk (last update yesterday / 2006-07-06), having a Postgres-DB connected to it and trying to learn and use OFBiz. I've created a new project in hot-deploy and have defined three entities, one service in minilang and created two widgets. Up to now this is not much, but there are some errors with the entities and I have no idea how to handle them. I've checked everything twice, but I think I'm lost between all of those XML-files. ;) > > All other entities defined by the OFBiz default distribution are created and managed properly. After deleting the my tables from the database they are recreated without any problems. So there must be an error in the internal entity management. Did I miss a parameter? Or is there anything else? > > TIA > > Best regards, > Fabian. > > PS: If you need more log- or config-files, I'll send them. > > ---- From console.log: ---- > *snip* > 4570 (main) [ UtilXml.java:263:DEBUG] XML Read 0.015s: D:/dev/eclipse_workspace/ofbiz/hot-deploy/srm/entitydef/entitymodel.xm > *snip* > 5348 (main) [ UtilXml.java:263:DEBUG] XML Read 0.0s: D:/dev/eclipse_workspace/ofbiz/hot-deploy/srm/entitydef/entitygroup.xml > *snip* > 5783 (main) [ GenericDelegator.java:176:INFO ] Delegator "default" initializing helper "localpostgres" for entity group "org.ofbiz". > 5799 (main) [ GenericDelegator.java:193:INFO ] Doing database check as requested in entityengine.xml with addMissing=true > 6560 (main) [ DatabaseUtil.java:765:INFO ] Database Product Name is PostgreSQL > 6560 (main) [ DatabaseUtil.java:766:INFO ] Database Product Version is 8.1.4 > 6560 (main) [ DatabaseUtil.java:774:INFO ] Database Driver Name is PostgreSQL Native Driver > 6576 (main) [ DatabaseUtil.java:775:INFO ] Database Driver Version is PostgreSQL 8.1 JDBC3 with SSL (build 405) > 6576 (main) [ DatabaseUtil.java:776:INFO ] Database Driver JDBC Version is 3.0 > 6576 (main) [ DatabaseUtil.java:786:INFO ] Database Setting/Support Information (those with a * should be true): > 6576 (main) [ DatabaseUtil.java:787:INFO ] - supports transactions [true]* > 6576 (main) [ DatabaseUtil.java:788:INFO ] - isolation None [false] > 6576 (main) [ DatabaseUtil.java:789:INFO ] - isolation ReadCommitted [true] > 6576 (main) [ DatabaseUtil.java:790:INFO ] - isolation ReadUncommitted[true] > 6576 (main) [ DatabaseUtil.java:791:INFO ] - isolation RepeatableRead [true] > 6592 (main) [ DatabaseUtil.java:792:INFO ] - isolation Serializable [true] > 6592 (main) [ DatabaseUtil.java:793:INFO ] - default fetchsize [0] > 6592 (main) [ DatabaseUtil.java:794:INFO ] - forward only type [true] > 6592 (main) [ DatabaseUtil.java:795:INFO ] - scroll sensitive type [false] > 6592 (main) [ DatabaseUtil.java:796:INFO ] - scroll insensitive type [true] > 6592 (main) [ DatabaseUtil.java:797:INFO ] - is case sensitive [false] > 6592 (main) [ DatabaseUtil.java:798:INFO ] - stores LowerCase [true] > 6592 (main) [ DatabaseUtil.java:799:INFO ] - stores MixedCase [false] > 6592 (main) [ DatabaseUtil.java:800:INFO ] - stores UpperCase [false] > 6669 (main) [ DatabaseUtil.java:801:INFO ] - max table name length [63] > 6669 (main) [ DatabaseUtil.java:802:INFO ] - max column name length [63] > 6669 (main) [ DatabaseUtil.java:803:INFO ] - max schema name length [63] > 6669 (main) [ DatabaseUtil.java:804:INFO ] - concurrent connections [8192] > 6669 (main) [ DatabaseUtil.java:805:INFO ] - concurrent statements [1] > 6669 (main) [ DatabaseUtil.java:806:INFO ] - ANSI SQL92 Entry [true] > 6669 (main) [ DatabaseUtil.java:807:INFO ] - ANSI SQL92 Itermediate [false] > 6669 (main) [ DatabaseUtil.java:808:INFO ] - ANSI SQL92 Full [false] > 6669 (main) [ DatabaseUtil.java:809:INFO ] - ODBC SQL Grammar Core [false] > 6669 (main) [ DatabaseUtil.java:810:INFO ] - ODBC SQL Grammar Extended[false] > 6669 (main) [ DatabaseUtil.java:811:INFO ] - ODBC SQL Grammar Minimum [true] > 6669 (main) [ DatabaseUtil.java:812:INFO ] - outer joins [true]* > 6669 (main) [ DatabaseUtil.java:813:INFO ] - limited outer joins [true] > 6669 (main) [ DatabaseUtil.java:814:INFO ] - full outer joins [true] > 6669 (main) [ DatabaseUtil.java:815:INFO ] - group by [true]* > 6669 (main) [ DatabaseUtil.java:816:INFO ] - group by not in select [true] > 6669 (main) [ DatabaseUtil.java:817:INFO ] - column aliasing [true] > 6669 (main) [ DatabaseUtil.java:818:INFO ] - order by not in select [true] > 6669 (main) [ DatabaseUtil.java:820:INFO ] - alter table add column [true]* > 6669 (main) [ DatabaseUtil.java:821:INFO ] - non-nullable column [true]* > 6669 (main) [ DatabaseUtil.java:858:INFO ] Getting Table Info From Database > 6809 (main) [ DatabaseUtil.java:993:INFO ] Getting Column Info From Database > *snip* > 8582 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserDetails] has no table in the database > 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_DETAILS]: SQL Exception while executing the following: > CREATE TABLE srm.SRM_USER_DETAILS (USER_ID VARCHAR(20) NOT NULL, USER_DETAIL_ID VARCHAR(20) NOT NULL, USER_TYPE_ID VARCHAR(20), USER_FIRST_NAME VARCHAR(60), USER_LAST_NAME VARCHAR(60), USER_PHONE VARCHAR(60), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_DETAILS PRIMARY KEY (USER_ID, USER_DETAIL_ID)) > Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_details" already exists > 8613 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserLogins] has no table in the database > 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_LOGINS]: SQL Exception while executing the following: > CREATE TABLE srm.SRM_USER_LOGINS (USER_ID VARCHAR(20) NOT NULL, USER_TYPE_ID VARCHAR(20), USER_LOGIN VARCHAR(60), USER_PASSWORD VARCHAR(60), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_LOGINS PRIMARY KEY (USER_ID)) > Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_logins" already exists > 8613 (main) [ DatabaseUtil.java:356:WARN ] Entity [SrmUserTypes] has no table in the database > 8613 (main) [ DatabaseUtil.java:364:ERROR] Could not create table [srm.SRM_USER_TYPES]: SQL Exception while executing the following: > CREATE TABLE srm.SRM_USER_TYPES (USER_TYPE_ID VARCHAR(20) NOT NULL, USER_TYPE_NAME VARCHAR(60), USER_TYPE_DESC VARCHAR(255), LAST_UPDATED_STAMP TIMESTAMPTZ, LAST_UPDATED_TX_STAMP TIMESTAMPTZ, CREATED_STAMP TIMESTAMPTZ, CREATED_TX_STAMP TIMESTAMPTZ, CONSTRAINT PK_SRM_USER_TYPES PRIMARY KEY (USER_TYPE_ID)) > Error was: org.postgresql.util.PSQLException: ERROR: relation "srm_user_types" already exists > 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_DETAILS] exists in the database but has no corresponding entity > 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_LOGINS] exists in the database but has no corresponding entity > 8690 (main) [ DatabaseUtil.java:383:WARN ] Table named [SRM_USER_TYPES] exists in the database but has no corresponding entity > > ---- From ofbiz-component.xml: --- > <?xml version="1.0" encoding="UTF-8"?> > <ofbiz-component name="srm" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-component.xsd"> > <resource-loader name="main" type="component"/> > <classpath type="dir" location="config"/> > <classpath type="dir" location="script"/> > > <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/> > <entity-resource type="group" reader-name="main" loader="main" location="entitydef/entitygroup.xml"/> > <service-resource type="model" loader="main" location="servicedef/services.xml"/> > > <webapp name="srm" > title="Die ersten Versuche mit Widgets" > server="default-server" > location="webapp/srm" > base-permission="" > mount-point="/srm"/> > </ofbiz-component> > > ---- From entitymodel.xml: ---- > <?xml version="1.0" encoding="UTF-8"?> > <entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitymodel.xsd"> > <title>srm</title> > <version>1.0</version> > <entity entity-name="SrmUserTypes" package-name="org.ofbiz" > title="Example for some kinds of users"> > <field name="userTypeId" type="id-ne"/> > <field name="userTypeName" type="short-varchar"/> > <field name="userTypeDesc" type="long-varchar"/> > <prim-key field="userTypeId"/> > </entity> > <entity entity-name="SrmUserLogins" package-name="org.ofbiz" > title="Example for logins an passwords"> > <field name="userId" type="id-ne"/> > <field name="userTypeId" type="id-ne"/> > <field name="userLogin" type="short-varchar"/> > <field name="userPassword" type="short-varchar"/> > <prim-key field="userId"/> > <relation rel-entity-name="SrmUserTypes" type="one"> > <key-map field-name="userTypeId"/> > </relation> > </entity> > <entity entity-name="SrmUserDetails" package-name="org.ofbiz" > title="Some details, multiple times per user"> > <field name="userId" type="id-ne"/> > <field name="userDetailId" type="id-ne"/> > <field name="userTypeId" type="id-ne"/> > <field name="userFirstName" type="short-varchar"/> > <field name="userLastName" type="short-varchar"/> > <field name="userPhone" type="short-varchar"/> > <prim-key field="userId"/> > <prim-key field="userDetailId"/> > <relation type="one" rel-entity-name="SrmUserLogins"> > <key-map field-name="userId"/> > </relation> > <relation rel-entity-name="SrmUserTypes" type="one"> > <key-map field-name="userTypeId"/> > </relation> > </entity> > </entitymodel> > > ---- From entitygroup.xml ---- > <?xml version="1.0" encoding="UTF-8"?> > <entitygroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitygroup.xsd"> > <entity-group group="org.ofbiz" entity="SrmUserTypes"/> > <entity-group group="org.ofbiz" entity="SrmUserLogins"/> > <entity-group group="org.ofbiz" entity="SrmUserDetails"/> > </entitygroup> smime.p7s (4K) Download Attachment |
In reply to this post by Fabian Gorsler
Hi Andrew,
thanks for your fast reply. On Thu, Jul 06, 2006 at 11:41:01AM +0100, Andrew Sykes wrote: > Just a guess, could it be that you already have tables with another name > using this same foreign key id? Well, I've checked this, but even after defining self-chosen PKs the problem still resists. The errors remain the same. ---- Changed entitymodel.xml: ---- <?xml version="1.0" encoding="UTF-8"?> <entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitymodel.xsd"> <title>srm</title> <version>1.0</version> <entity entity-name="SrmUserTypes" package-name="org.ofbiz" title="Example for some kinds of users"> <field name="srmUserTypeId" type="id-ne" /> <field name="srmUserTypeName" type="short-varchar" /> <field name="srmUserTypeDesc" type="long-varchar" /> <prim-key field="srmUserTypeId" /> </entity> <entity entity-name="SrmUserLogins" package-name="org.ofbiz" title="Example for logins an passwords"> <field name="srmUserLogin" type="short-varchar" /> <field name="srmUserTypeId" type="id-ne" /> <field name="srmUserPassword" type="short-varchar" /> <prim-key field="srmUserLogin" /> <relation rel-entity-name="SrmUserTypes" type="one" fk-name="srm_fk_01"> <key-map field-name="srmUserTypeId" /> </relation> </entity> <entity entity-name="SrmUserDetails" package-name="org.ofbiz" title="Some details, multiple times per user"> <field name="srmUserLogin" type="short-varchar" /> <field name="srmUserDetailId" type="id-ne" /> <field name="srmUserTypeId" type="id-ne" /> <field name="srmUserFirstName" type="short-varchar" /> <field name="srmUserLastName" type="short-varchar" /> <field name="srmUserPhone" type="short-varchar" /> <prim-key field="srmUserId" /> <prim-key field="srmUserDetailId" /> <relation type="one" rel-entity-name="SrmUserLogins" fk-name="srm_fk_02"> <key-map field-name="srmUserLogin" /> </relation> <relation rel-entity-name="SrmUserTypes" type="one" fk-name="srm_fk_03"> <key-map field-name="srmUserTypeId" /> </relation> </entity> </entitymodel> ------------- Did i oversee anything? I would copy the logs again, but their content is the same, so I think this is unnecessary. Could you perhaps imagine anything else? In my last mail I forgot to mention that it's no problem to work with these two entities by using Webtools. The entered values are also stored in the database. I don't know whether I should open a bug report in JIRA or if there is anything I did wrong. > lso, it looks as if much of what you are doing is already in the > default entities, are you sure you need to create these? These entities were just created for "playing" with OFBiz. I want to learn how to work with it and I want to know how to handle errors. The error is already there, just the second part is missing. ;-) Best regards, Fabian. |
In reply to this post by BJ Freeman
Hi BJ,
On Thu, Jul 06, 2006 at 03:41:16AM -0700, BJ Freeman wrote: > I have gotten this, but it really does not matter. > if you notice it says, after the error. > already exists Well, I think if OFBiz says there is an error, there is one. I don't want to produce software which gives during start up already errors, that's the wrong way IMHO. > I checked my DB after this and the tables were there. Yes, here it is the same. The tables are there, primary/foreign keys are defined and indexes are created. Even values can be stored through Webtools. |
In reply to this post by David E Jones-2
Hi David,
On Thu, Jul 06, 2006 at 05:08:31AM -0600, David E. Jones wrote: > > Looks like a problem with the schema name. Are you explicitly saying the > schema-name on the datasource element is "srm"? Yes, I am. Except the error with my self-defined entities, everything belonging to the entity enginge works well. In order to be sure my entityengine.xml is right, I paste it too. ;) ---- From entityengine.xml: ---- *snip* <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false"> <group-map group-name="org.ofbiz" datasource-name="localpostgres"/> </delegator> <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false"> <group-map group-name="org.ofbiz" datasource-name="localpostgres"/> </delegator> <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main"> <group-map group-name="org.ofbiz" datasource-name="localpostgres"/> </delegator> <delegator name="other" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main"> <group-map group-name="org.ofbiz" datasource-name="localpostgres"/> </delegator> *snip* <datasource name="localpostgres" helper-class="org.ofbiz.entity.datasource.GenericHelperDAO" schema-name="srm" field-type-name="postgres" check-on-start="true" add-missing-on-start="true" use-fk-initially-deferred="false" join-style="ansi"> <!-- use this attribute to make the EntityListIterator more effective for pgjdbc 7.5devel and later: result-fetch-size="50" --> <read-data reader-name="seed"/> <read-data reader-name="demo"/> <read-data reader-name="ext"/> <inline-jdbc jdbc-driver="org.postgresql.Driver" jdbc-uri="jdbc:postgresql://127.0.0.1/sandbox" jdbc-username="srm_user" jdbc-password="" isolation-level="ReadCommitted" pool-minsize="2" pool-maxsize="20"/> <!-- <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/localpostgres" isolation-level="ReadCommitted"/>--> <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localpostgres" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name --> <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="PostgresDataSource"/> --> <!-- Weblogic Style JNDI name --> <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localpostgres" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name --> <!-- <tyrex-dataSource dataSource-name="localpostgres" isolation-level="ReadCommitted"/> --> </datasource> Best regards, Fabian. |
In reply to this post by Andrew Sykes
I couldn't tell you why it is, but the image location
is base 64 encoded (productdetail.bsh) --- Andrew Sykes <[hidden email]> wrote: > Hi, > > Can anyone explain why the detailImage in the > product detail page does > not contain a URL but rather some bizarre string? > > For example, the lines below were taken using "view > source" on the > browser... > > > function popupDetail() { > var defaultDetailImage = > "L2ltYWdlcy9zaG9wL3NhbXBsZS1wcm9kdWN0LmdpZg%3D%3D"; > if (defaultDetailImage == null || > defaultDetailImage == "null") { > defaultDetailImage = "_NONE_"; > > What on earth is > "L2ltYWdlcy9zaG9wL3NhbXBsZS1wcm9kdWN0LmdpZg%3D%3D" > ??? > > Thanks in advance > -- > Kind Regards > Andrew Sykes <[hidden email]> > Sykes Development Ltd > http://www.sykesdevelopment.com > > |
Thank you Chris,
That's an interesting observation that had slipped my notice! - Andrew On Thu, 2006-07-06 at 06:17 -0700, Chris Howe wrote: > I couldn't tell you why it is, but the image location > is base 64 encoded (productdetail.bsh) > > --- Andrew Sykes <[hidden email]> wrote: > > > Hi, > > > > Can anyone explain why the detailImage in the > > product detail page does > > not contain a URL but rather some bizarre string? > > > > For example, the lines below were taken using "view > > source" on the > > browser... > > > > > > function popupDetail() { > > var defaultDetailImage = > > "L2ltYWdlcy9zaG9wL3NhbXBsZS1wcm9kdWN0LmdpZg%3D%3D"; > > if (defaultDetailImage == null || > > defaultDetailImage == "null") { > > defaultDetailImage = "_NONE_"; > > > > What on earth is > > "L2ltYWdlcy9zaG9wL3NhbXBsZS1wcm9kdWN0LmdpZg%3D%3D" > > ??? > > > > Thanks in advance > > -- > > Kind Regards > > Andrew Sykes <[hidden email]> > > Sykes Development Ltd > > http://www.sykesdevelopment.com > > > > > Kind Regards Andrew Sykes <[hidden email]> Sykes Development Ltd http://www.sykesdevelopment.com |
Free forum by Nabble | Edit this page |