2006/5/25, Chuck Hill <[EMAIL PROTECTED]>:
On May 25, 2006, at 12:30 PM, Luigi Giannini wrote:
> Yes I have a EO_PK_TABLE.
> What is the function of this table?
It is what EOF uses to generate primary key values when the database
does not provide usable, native support.
> Where I can read about it from a more technical point of view?
>
If you search on Apple's site, you can find some mention of it.
Usually all you have to do is to not delete it. :-)
> I have modelled the primary key for PazientiAnagrafica entity with
> following attributes:
> - "Allows null" set to no
> - "Class property" set to no
> - "Locking" set to yes
> - "External Type" set to int
> - "Width" set to 4
>
Width is for strings, leave this blank.
Done
> - "Value class java" set to number
> - "Value Type" set to i
> for "External Type" I try different values with no success within some
> (but not all) of these:
> - uniqueidentifier
> - tinyint identity
> - smallint identity
> - numeric() identity
> - decimal() identity
> - bigint identity
>
It is difficult to use identity columns with EOF. You should avoid
them. Just make the column int or bigint or something like that and
EOF will make sure the PK gets generated.
> And I not find nothing about the right choose about "External Type"
> setting when the fields in DB is the primary key.
Numeric, int, bigint should all be fine.
Done. set to int
> Moreover I want
> specify that the attributes in MSSQL table for this field are normal:
> Data type=int ; Lenght=4 ; Allows null=no.
> Is clear also for a newbie like me that the error depends by a JDBC
> problem but, without the someone else help, I have no chance.
> In the technical specifications of official Apple WebObjects web site
> you can read that Microsoft SQL Server 2000 8.00.194 is supported.
> Where one newbie WOdeveloper can find jdbc for this RDBMS?
> I search in the web and find JTDS jdbc that seem (to me) a valid,
> mature and fast jdbc driver for MS-sql-srv.
> May be that the jdbc driver generate the problem but if so, please,
It may be that driver. Can you post the entire stack trace?
Please be patient: what you mean with 'stack trace'?
Below there's the Xcode Run Log (I hope is what you ask ...):
java.lang.IllegalStateException: Adaptor
[EMAIL PROTECTED] failed to provide new
primary keys for entity 'PazientiAnagrafica'
at
com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5885)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:409)
at
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3226)
at
com.webobjects.webservices.generation.WOOperation.saveChangesInEditingContext(WOOperation.java:96)
at
com.webobjects.webservices.generation.WOInsertOperation.invoke(WOInsertOperation.java:63)
at
com.webobjects.webservices.generation.WOOperation._invoke(WOOperation.java:120)
at
com.webobjects.webservices.generation._WSRuleUtilities.invokeOperationOnService(_WSRuleUtilities.java:208)
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:585)
at
com.webobjects.appserver._private.WORPCProvider.processMessage(WORPCProvider.java:351)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at
com.webobjects.appserver._private.WOWebService.performActionNamed(WOWebService.java:375)
at
com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
at
com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:142)
at
com.webobjects.appserver._private.WOWebServiceRequestHandler.handleRequest(WOWebServiceRequestHandler.java:95)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)[2006-05-25
21:47:45 CEST] <WorkerThread9> AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.IllegalArgumentException:
java.lang.IllegalStateException: Adaptor
[EMAIL PROTECTED] failed to provide new
primary keys for entity 'PazientiAnagrafica'
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:
java.lang.IllegalArgumentException: java.lang.IllegalStateException:
Adaptor [EMAIL PROTECTED] failed to
provide new primary keys for entity 'PazientiAnagrafica'
at
com.webobjects.webservices.generation._WSRuleUtilities.invokeOperationOnService(_WSRuleUtilities.java:212)
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.j
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
ava:585)
at
com.webobjects.appserver._private.WORPCProvider.processMessage(WORPCProvider.java:351)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at
com.webobjects.appserver._private.WOWebService.performActionNamed(WOWebService.java:375)
at
com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
at
com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:142)
at
com.webobjects.appserver._private.WOWebServiceRequestHandler.handleRequest(WOWebServiceRequestHandler.java:95)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
java.lang.IllegalArgumentException: java.lang.IllegalStateException:
Adaptor [EMAIL PROTECTED] failed to
provide new primary keys for entity 'PazientiAnagrafica'
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:343)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at
com.webobjects.appserver._private.WOWebService.performActionNamed(WOWebService.java:375)
at
com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
at
com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:142)
at
com.webobjects.appserver._private.WOWebServiceRequestHandler.handleRequest(WOWebServiceRequestHandler.java:95)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.IllegalArgumentException:
java.lang.IllegalStateException: Adaptor
[EMAIL PROTECTED] failed to provide new
primary keys for entity 'PazientiAnagrafica'
at
com.webobjects.webservices.generation._WSRuleUtilities.invokeOperationOnService(_WSRuleUtilities.java:212)
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:585)
at
com.webobjects.appserver._private.WORPCProvider.processMessage(WORPCProvider.java:351)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
... 13 more
Many thanks Chuck
Luigi Giannini
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]