Bug 622017 - on-premises import error: PropertyValueException: no t-null property references a null or transient value
Summary: on-premises import error: PropertyValueException: no t-null property referenc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: All
OS: Solaris
high
high
Target Milestone: ---
: ---
Assignee: Devan Goodwin
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 621850
TreeView+ depends on / blocked
 
Reported: 2010-08-06 18:59 UTC by wes hayutin
Modified: 2019-09-24 14:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-24 14:17:33 UTC
Embargoed:


Attachments (Terms of Use)
catalina.out (132.27 KB, text/plain)
2010-08-10 13:36 UTC, wes hayutin
no flags Details

Description wes hayutin 2010-08-06 18:59:44 UTC
[root@localhost proxy]# echo $FORCECERT

[root@localhost proxy]# echo $IMPORTDIR

[root@localhost proxy]# echo $GENDB
1
[root@localhost proxy]# md5sum /etc/candlepin/certs/candlepin-upstream-ca.crt 
de5ef50453a48a53524aff9bb9af2fcd  /etc/candlepin/certs/candlepin-upstream-ca.crt

Deploy on-premises candlepin:
<snip>
Starting tomcat6:                                          [  OK  ]
Initializing Candlepin...
Initialized!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Please point IMPORTDIR to the location of the product data 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


CLIENT:
[root@localhost src]# ./subscription-manager-cli register --username=xeops --pass=redhat --type=candlepin --force
07fe3019-092a-4679-87c7-5953374ead74 xeops

[root@localhost src]# ./subscription-manager-cli list --available
07fe3019-092a-4679-87c7-5953374ead74
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Premium
                        (Unlimited Sockets) w/ 24 x 7 Phone/Web Support
ProductId:         	SYS0373                  
PoolId:            	608                      
Quantity:          	12                       
Expires:           	2011-08-01               


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Standard
                        (Unlimited Sockets)
ProductId:         	SYS0372                  
PoolId:            	609                      
Quantity:          	1                        
Expires:           	2010-12-31               


ProductName:       	JBoss jBPM Framework (for up to 4 CPUs), Premium (w/ 24 x 7
                        Phone/Web Support)
ProductId:         	SYS0415                  
PoolId:            	610                      
Quantity:          	2                        
Expires:           	2012-02-05               


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Standard
                        (Unlimited Sockets)
ProductId:         	SYS0372                  
PoolId:            	611                      
Quantity:          	0                        
Expires:           	2010-12-31               


ProductName:       	RHN Provisioning + Management
ProductId:         	SYS0081                  
PoolId:            	612                      
Quantity:          	0                        
Expires:           	2010-12-31               


ProductName:       	Red Hat Desktop Extension Pack
ProductId:         	MCT0475                  
PoolId:            	613                      
Quantity:          	50                       
Expires:           	2011-07-13               

[root@localhost src]# ./subscription-manager-cli subscribe --pool=608 --pool=609 --pool=610
[root@localhost src]# ls /etc/pki/entitlement/product/
1378.pem  1379.pem  1380.pem
[root@localhost src]# 


*******************
[root@client02-rhel6-beta2 src]# curl -k -u candlepin_system_admin:admin https://candlepin1.devlab.phx1.redhat.com:443/candlepin/consumers/07fe3019-092a-4679-87c7-5953374ead74/export > /tmp/export.zip
root@localhost tmp]# unzip export.zip 
Archive:  export.zip
signed Candlepin export for 07fe3019-092a-4679-87c7-5953374ead74
  inflating: consumer_export.zip     
  inflating: signature               
[root@localhost tmp]# ls
consumer_export.zip  
export.zip          

[root@localhost tmp]# unzip consumer_export.zip 
Archive:  consumer_export.zip
Candlepin export for 07fe3019-092a-4679-87c7-5953374ead74
  inflating: export/consumer.json    
  inflating: export/entitlement_certificates/1378.pem  
  inflating: export/entitlement_certificates/1380.pem  
  inflating: export/entitlement_certificates/1379.pem  
  inflating: export/entitlements/595.json  
  inflating: export/entitlements/594.json  
  inflating: export/entitlements/593.json  
  inflating: export/meta.json        
  inflating: export/products/22.json  
  inflating: export/products/29.json  
  inflating: export/products/28.json  
  inflating: export/products/SYS0373.json  
  inflating: export/products/SYS0415.json  
  inflating: export/products/SYS0372.json  
  inflating: export/rules/rules.js   
  inflating: export/consumer_types/system.json  
  inflating: export/consumer_types/person.json  
  inflating: export/consumer_types/candlepin.json  
  inflating: export/consumer_types/domain.json  
[root@localhost tmp]# 

*************************************************************8
IMPORT:
 curl -u admin:admin -k -F export= https://localhost:8443/candlepin/owners/1/import

ERROR:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><exceptionMessage><displayMessage>Runtime Error org.hibernate.PropertyValueException: not-null property references a null or transient value: org.fedoraproject.candlepin.model.ProductAttribute.product at org.hibernate.engine.Nullability.checkNullability:95</displayMessage></exceptionMessage>[

TRACE:
***********************************************
Aug 06 14:41:35 [http-8443-1] DEBUG org.fedoraproject.candlepin.servlet.filter.logging.LoggingFilter - Request: 'POST https://localhost:8443/candlepin/owners/1/import'
Aug 06 14:41:35 [http-8443-1] DEBUG org.fedoraproject.candlepin.servlet.filter.logging.LoggingFilter - ====RequestBody====
Aug 06 14:41:35 [http-8443-1] DEBUG org.fedoraproject.candlepin.servlet.filter.logging.LoggingFilter - ------------------------------9d593fe78be8
Content-Disposition: form-data; name="export"; filename="export.zip"
Content-Type: application/octet-stream

<SNIP>

ATTACHED THE catalina.out


VERSION:
[root@localhost candlepin]# git show
commit f33150c124b5e6f0d86e4dce46ccdd22f79c1e46
Merge: 69bd342 7cab612
Author: root <root>
Date:   Fri Aug 6 13:24:36 2010 -0400

    Merge branch 'master' of git://git.fedorahosted.org/git/candlepin

[root@localhost candlepin]#

Comment 1 Devan Goodwin 2010-08-09 13:47:17 UTC
Fixed in candlepin.git: c0097097378fb196708a2561c5d2726f2b13d2f0

This fix is only required for the "downstream" Candlepin server, so technically this can be tested before a full re-deploy is done in the QA environment, you just need to update the git source for your downstream CP and re-deploy.

Comment 2 wes hayutin 2010-08-10 13:35:35 UTC
[root@localhost ~]# export FORCECERT=""
[root@localhost ~]# export IMPORTDIR=""
[root@localhost ~]# export GENDB=1
[root@localhost ~]# ls
anaconda-ks.cfg            entitlement_integration
candlepin                  export.zip
candlepin-upstream-ca.crt  install.log
cert-gen                   install.log.syslog
CERTS                      subscription-manager
cp.conf                    subscription-manager-0.68-1.el6.i686.rpm
cp_product_utils           TEST_CERTS
diff.txt
[root@localhost ~]# cp candlepin-upstream-ca.crt /etc/candlepin/certs/
candlepin-ca.crt           candlepin-upstream-ca.crt
candlepin-ca.key           keystore
candlepin-ca-password.txt  old/
candlepin-ca-pub.key       
[root@localhost ~]# cp candlepin-upstream-ca.crt /etc/candlepin/certs/
cp: overwrite `/etc/candlepin/certs/candlepin-upstream-ca.crt'? y
cp: cannot create regular file `/etc/candlepin/certs/candlepin-upstream-ca.crt': Permission denied
[root@localhost ~]# md5sum /etc/candlepin/certs/candlepin-upstream-ca.crt
de5ef50453a48a53524aff9bb9af2fcd  /etc/candlepin/certs/candlepin-upstream-ca.crt
[root@localhost ~]# 

Backing up current server.xml ...
Updating tomcat configuration in /etc/tomcat6...
done!
Starting tomcat6:                                          [  OK  ]
Initializing Candlepin...
Initialized!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Please point IMPORTDIR to the location of the product data 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[root@localhost proxy]# 

[root@localhost src]# ./subscription-manager-cli register --username=xeops --pass=redhat --type=candlepin
0185848b-79c5-474f-a2a6-f829f6cae429 xeops

[root@localhost src]# ./subscription-manager-cli list --available
0185848b-79c5-474f-a2a6-f829f6cae429
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Premium
                        (Unlimited Sockets) w/ 24 x 7 Phone/Web Support
ProductId:         	SYS0373                  
PoolId:            	608                      
Quantity:          	11                       
Expires:           	2011-08-01               


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Standard
                        (Unlimited Sockets)
ProductId:         	SYS0372                  
PoolId:            	609                      
Quantity:          	1                        
Expires:           	2010-12-31               


ProductName:       	JBoss jBPM Framework (for up to 4 CPUs), Premium (w/ 24 x 7
                        Phone/Web Support)
ProductId:         	SYS0415                  
PoolId:            	610                      
Quantity:          	1                        
Expires:           	2012-02-05               


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Standard
                        (Unlimited Sockets)
ProductId:         	SYS0372                  
PoolId:            	611                      
Quantity:          	0                        
Expires:           	2010-12-31               


ProductName:       	RHN Provisioning + Management
ProductId:         	SYS0081                  
PoolId:            	612                      
Quantity:          	0                        
Expires:           	2010-12-31               


ProductName:       	Red Hat Desktop Extension Pack
ProductId:         	MCT0475                  
PoolId:            	613                      
Quantity:          	50                       
Expires:           	2011-07-13               

[root@localhost src]# ./subscription-manager-cli subscribe --pool=608
[root@localhost src]# ./subscription-manager-cli subscribe --pool=609 --pool=610
[root@localhost src]# ls /etc/pki/entitlement/product/
1643(1).pem  1643.pem  1644.pem  1645.pem

[root@localhost src]# unzip -t /tmp/export810.zip
Archive:  /tmp/export810.zip
signed Candlepin export for 0185848b-79c5-474f-a2a6-f829f6cae429
    testing: consumer_export.zip      OK
    testing: signature                OK
No errors detected in compressed data of /tmp/export810.zip.
[root@localhost src]# 

[root@localhost src]# unzip /tmp/consumer_export.zip 
Archive:  /tmp/consumer_export.zip
Candlepin export for 07fe3019-092a-4679-87c7-5953374ead74
  inflating: export/consumer.json    
  inflating: export/entitlement_certificates/1378.pem  
  inflating: export/entitlement_certificates/1380.pem  
  inflating: export/entitlement_certificates/1379.pem  
  inflating: export/entitlements/595.json  
  inflating: export/entitlements/594.json  
  inflating: export/entitlements/593.json  
  inflating: export/meta.json        
  inflating: export/products/22.json  
  inflating: export/products/29.json  
  inflating: export/products/28.json  
  inflating: export/products/SYS0373.json  
  inflating: export/products/SYS0415.json  
  inflating: export/products/SYS0372.json  
  inflating: export/rules/rules.js   
  inflating: export/consumer_types/system.json  
  inflating: export/consumer_types/person.json  
  inflating: export/consumer_types/candlepin.json  
  inflating: export/consumer_types/domain.json  
[root@localhost src]# 


[root@localhost tmp]# curl -u admin:admin -k -F export= https://localhost:8443/candlepin/owners/1/import
[root@localhost tmp]# su - postgress

Comment 3 wes hayutin 2010-08-10 13:36:58 UTC
Created attachment 437878 [details]
catalina.out

Comment 4 John Sefler 2011-05-04 14:41:03 UTC
Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING


Note You need to log in before you can comment on or make changes to this bug.