Right, so the primary key is a composite key here: (255 + 255) * 3 = 1530 which would be larger then 1000. Maybe you can check your mysql logs also. If things start working when switching to latin1, then maybe we should look into changing the PK. It'd be some sucky mysql bug.

--K

Jeremi Thebeau wrote:
Hi Kurt,

Here is the  server side error form juddi.log:

2009-08-11 09:41:50,243 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1146, SQLState: 42S02 2009-08-11 09:41:50,243 ERROR [org.hibernate.util.JDBCExceptionReporter] - Table 'JUDDI.juddiv3_service_projection' doesn't exist

And I think it's happening because the juddiv3_service_projection does not get created on startup:

2009-08-10 18:22:37,355 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Unsuccessful: create table juddiv3_publisher_assertion (from_key varchar(255) not null, to_key varchar(255) not null, from_check varchar(5) not null, key_name varchar(255) not null, key_value varchar(255) not null, tmodel_key varchar(255) not null, to_check varchar(5) not null, primary key (from_key, to_key)) 2009-08-10 18:22:37,355 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Specified key was too long; max key length is 1000 bytes 2009-08-10 18:22:37,455 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - *Unsuccessful: create table juddiv3_service_projection *(business_key varchar(255) not null, service_key varchar(255) not null, primary key (business_key, service_key)) 2009-08-10 18:22:37,455 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Specified key was too long; max key length is 1000 bytes 2009-08-10 18:22:39,070 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Unsuccessful: alter table juddiv3_publisher_assertion add index FKEE0A8FFBE3544929 (to_key), add constraint FKEE0A8FFBE3544929 foreign key (to_key) references juddiv3_business_entity (entity_key) 2009-08-10 18:22:39,070 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Table 'JUDDI.juddiv3_publisher_assertion' doesn't exist 2009-08-10 18:22:39,070 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Unsuccessful: alter table juddiv3_publisher_assertion add index FKEE0A8FFBCCEE22D8 (from_key), add constraint FKEE0A8FFBCCEE22D8 foreign key (from_key) references juddiv3_business_entity (entity_key) 2009-08-10 18:22:39,071 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Table 'JUDDI.juddiv3_publisher_assertion' doesn't exist 2009-08-10 18:22:39,233 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Unsuccessful: alter table juddiv3_service_projection add index FKC0AF7F1D2E448F3F (service_key), add constraint FKC0AF7F1D2E448F3F foreign key (service_key) references juddiv3_business_service (entity_key) 2009-08-10 18:22:39,233 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Table 'JUDDI.juddiv3_service_projection' doesn't exist 2009-08-10 18:22:39,233 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Unsuccessful: alter table juddiv3_service_projection add index FKC0AF7F1DEF04CFEE (business_key), add constraint FKC0AF7F1DEF04CFEE foreign key (business_key) references juddiv3_business_entity (entity_key) 2009-08-10 18:22:39,233 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Table 'JUDDI.juddiv3_service_projection' doesn't exist 2009-08-10 18:22:39,745 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] - schema update complete

I guess I haven't needed to write to that specific table until now. Any reason juddiv3_publisher_assertion and juddiv3_service_projection would not be created on my system?

Jeremi




Kurt T Stam wrote:
Hi Jeremi,

This is pretty much what the UDDI030 test does.. which work ok for me. Can you try running this test using your data? Also can you try to get the server side log of this error? Or is that what you attached below?

Cheers,

--Kurt

Jeremi Thebeau wrote:
Hi all,

on the Snapshot release of jUDDI (http://people.apache.org/repo/m2-snapshot-repository/org/apache/juddi/juddi-portal-bundle/3.0.0.SNAPSHOT/juddi-portal-bundle-3.0.0.20090723.201427-7.zip), I'm having trouble deleting businesses. I only insert an auth token and the business key (which does exist in the DB) in the DeleteBusiness object and get an "org.hibernate.exception.SQLGrammarException: could not initialize a collection" error:

[18:02:41,687] DEBUG [main] - Outbound Message:
HTTP Headers:

Soap Message:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/";>
   <S:Body>
<delete_business xmlns="urn:uddi-org:api_v3" xmlns:ns10="urn:uddi-org:policy_v3_instanceParms" xmlns:ns2="urn:uddi-org:custody_v3" xmlns:ns3="urn:uddi-org:repl_v3" xmlns:ns4="http://www.w3.org/2000/09/xmldsig#"; xmlns:ns5="urn:uddi-org:sub_v3" xmlns:ns6="urn:uddi-org:subr_v3" xmlns:ns7="urn:uddi-org:vscache_v3" xmlns:ns8="urn:uddi-org:policy_v3" xmlns:ns9="urn:uddi-org:vs_v3">
           <authInfo>
               authtoken:de780cf9-d473-46dd-8952-423fd6dc9e4f
           </authInfo>
           <businessKey>
uddi:juddi.apache.org:e03bb00e-4a88-4481-88da-e13d84f746c4
           </businessKey>
       </delete_business>
   </S:Body>
</S:Envelope>

Message Context Properties:
- com.sun.xml.internal.ws.api.message.HeaderList = []
- com.sun.xml.internal.ws.api.server.WSEndpoint = null
- com.sun.xml.internal.ws.client.ContentNegotiation = none
- com.sun.xml.internal.ws.client.handle = JAX-WS RI 2.1.6 in JDK 6: Stub for http://192.168.178.200:8080/juddi/services/publish - com.sun.xml.internal.ws.handler.config = com.sun.xml.internal.ws.client.handlerconfigurat...@52744
- com.sun.xml.internal.ws.server.OneWayOperation = true
- javax.xml.ws.handler.message.outbound = true
- javax.xml.ws.reference.parameters = []
- javax.xml.ws.service.endpoint.address = http://192.168.178.200:8080/juddi/services/publish
- javax.xml.ws.soap.http.soapaction.uri = delete_business
- javax.xml.ws.wsdl.interface = {urn:uddi-org:api_v3_portType}UDDI_Publication_PortType - javax.xml.ws.wsdl.port = {urn:uddi-org:api_v3_portType}UDDIPublishServicePort - javax.xml.ws.wsdl.service = {urn:uddi-org:api_v3_portType}UDDIPublishService

[18:02:41,697] DEBUG [main] - Inbound Message:
HTTP Headers:
- null = [HTTP/1.1 200 OK]
- Content-type = [text/xml;charset=UTF-8]
- Content-length = [395]
- Server = [Apache-Coyote/1.1]
- Date = [Mon, 10 Aug 2009 16:03:11 GMT]

Soap Message:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Header />
   <soap:Body>
       <soap:Fault>
           <faultcode>
               soap:Server
           </faultcode>
           <faultstring>
org.hibernate.exception.SQLGrammarException: could not initialize a collection: [org.apache.juddi.model.BusinessService.projectingBusinesses#uddi:juddi.apache.org:35b4b045-7fac-4edb-8082-937e9b9c9825]
           </faultstring>
       </soap:Fault>
   </soap:Body>
</soap:Envelope>

Message Context Properties:
- com.sun.xml.internal.ws.api.message.HeaderList = []
- com.sun.xml.internal.ws.api.server.WSEndpoint = null
- com.sun.xml.internal.ws.client.ContentNegotiation = none
- com.sun.xml.internal.ws.client.handle = null
- com.sun.xml.internal.ws.handler.config = com.sun.xml.internal.ws.client.handlerconfigurat...@52744
- com.sun.xml.internal.ws.server.OneWayOperation = null
- com.xceptance.xlt.ws.handler.requestData = com.xceptance.xlt.api.engine.requestd...@1ab6c1c
- javax.xml.ws.handler.message.outbound = false
- javax.xml.ws.http.response.code = 200
- javax.xml.ws.http.response.headers = {null=[HTTP/1.1 200 OK], Content-type=[text/xml;charset=UTF-8], Content-length=[395], Server=[Apache-Coyote/1.1], Date=[Mon, 10 Aug 2009 16:03:11 GMT]}
- javax.xml.ws.reference.parameters = []
- javax.xml.ws.service.endpoint.address = http://192.168.178.200:8080/juddi/services/publish
- javax.xml.ws.soap.http.soapaction.uri = null
- javax.xml.ws.wsdl.interface = {urn:uddi-org:api_v3_portType}UDDI_Publication_PortType - javax.xml.ws.wsdl.port = {urn:uddi-org:api_v3_portType}UDDIPublishServicePort - javax.xml.ws.wsdl.service = {urn:uddi-org:api_v3_portType}UDDIPublishService

[18:02:41,711] ERROR [main] - Execution step failed (user: 'TDeleteBusiness-0', output: '1249920157861'): javax.xml.ws.soap.SOAPFaultException: org.hibernate.exception.SQLGrammarException: could not initialize a collection: [org.apache.juddi.model.BusinessService.projectingBusinesses#uddi:juddi.apache.org:35b4b045-7fac-4edb-8082-937e9b9c9825] at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178) at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111) at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108) at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78) at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
   at $Proxy46.deleteBusiness(Unknown Source)
at org.apache.juddi.xlt.action.SOAP.UnregisterBusiness.execute(UnregisterBusiness.java:52) at com.xceptance.xlt.api.actions.AbstractAction.run(AbstractAction.java:315) at org.apache.juddi.xlt.test.TDeleteBusiness.deleteBusiness(TDeleteBusiness.java:59)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
   at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


If I pass it an invalid key I get a proper "key could not be found" error msg. Any ideas?

Thanks

Jeremi



Reply via email to