( large object locator datablade ) lld_locator column & JDBC

( large object locator datablade ) lld_locator column & JDBC

Post by mrs.nospa » Sun, 05 Jun 2005 06:39:17


'm trying to write to an lld_locator column via JDBC. I believe the
way to do this is to wrap this type in a class which extends SQLData.
However I can't seem to quite get it to work correctly. It's a bit
confusing since the lld_locator type:

lld_locator
{
lo_protocol char(18)
lo_pointer informix.lld_lob
lo_location informix.lvarchar
}

also uses this user defined subtype

typedef struct
{
ifx_lo_t lo;
int type;
} lld_lob_t;

lo is a pointer to the location of the smart large object.
type is the type of the object. For an object containing binary data,
set type to LLD_BLOB; for an object containing character data,set type
to LLD_CLOB.


I get an exception in writeSQL() when I try and write out the int lob
type. Here is the stack trace:


java.sql.SQLException: Type requested (int) doesn't match row type
information (udt fixed) type.
at com.informix.jdbc.IfxComplex.a(IfxComplex.java:854)
at com.informix.jdbc.IfxComplexOutput.c(IfxComplexOutput.java:3348)
at com.informix.jdbc.IfxComplexOutput.b(IfxComplexOutput.java:3279)
at com.informix.jdbc.IfxComplexOutput.a(IfxComplexOutput.java:250)
at
com.informix.jdbc.IfxComplexOutput.writeInt(IfxComplexOutput.java:405)
at com.cnn.broadcast.msmm.jdbc.LLDLocator.writeSQL(LLDLocator.java:86)
at com.informix.jdbc.IfxComplexOutput.b(IfxComplexOutput.java:1190)
at com.informix.jdbc.IfxRow.fromObject(IfxRow.java:141)
at com.informix.jdbc.IfxValue.a(IfxValue.java:1227)
at com.informix.jdbc.IfxValue.a(IfxValue.java:452)
at com.informix.jdbc.IfxValue.a(IfxValue.java:434)
at
com.informix.jdbc.IfxPreparedStatement.setObject(IfxPreparedStatement.java:2504)
at
com.cnn.broadcast.msmm.dao.AssetDAO.insertKeyframes(AssetDAO.java:559)
at
com.cnn.broadcast.msmm.unittest.MessageUnitTest.testBuildKeyframeMeta(MessageUnitTest.java:153)
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:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


byte[] buffer = new byte[200];
IfxLobDescriptor loDesc = new IfxLobDescriptor(connection);
IfxLocator loPtr = new IfxLocator();
IfxSmartBlob smb = new IfxSmartBlob(connection); // Create a
smart large object in server
int loFd = smb.IfxLoCreate(loDesc, IfxSmartBlob.LO_RDWR,
loPtr);
System.out.println("A smart-blob has been created ");
int n = smb.IfxLoWrite(loFd, buffer);
smb.IfxLoClose(loFd);
System.out.println("Wrote: " + n +" bytes into it");
//IfxBblob ifxblob = new IfxBblob(loPtr);

log
 
 
 

1. locators controlling and object and object controlling those locators...

2. locators controlling an object and the object controlling the locators

I have a planar equiliateral triangle who's movement and rotation I want
to be controlled by 3 locators: one placed in the center of each of the
triangle's edges. So basically each locator is like a "hinge" that the
triangle will rotate around. When I move/rotate one locator I want the
triangle and all of the locators to move along with it and if I
move/rotate the triangle I want all of the locators to move along with
it and reorient to the new position. I'm not really "set" on using
locators, I chose them because I didn't know what else to do, I just
want to really be able to rotate the triangle like it had hinges at the
centers of each of the edges. I usually don't ever leave the Modelling
or Rendering modules, so I'm clueless when it comes to anything related
to rigging or animation :( Any ideas would be greatly appreciated. Thanks!

-Sal

3. need a dealer locator/zip code locator

4. Issue with Locator's crosshairs object

5. ACT - Could not create the Windows Management locator object.

6. Could not create the Windows Management Locator object

7. windows management locator object

8. obtain the associated table/column for LOB locator

9. LARGE 1, LARGE 2, LARGE 3, LARGE 4

10. Handling large record sets in JDBC/web app

11. MS SQL Server JDBC driver breaks when dealing with large BigDecimals

12. Reading Large Oracle DBs via JDBC

13. Slow Jscript objects response with large number of objects

14. Large objects container populate object fields that are inside it.

15. ORA-00904 & JDBC: get name of invalid column