467,892 Members | 1,857 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,892 developers. It's quick & easy.

SQLJ - java.sql.SQLException: profile DimoiPolyInsert_SJProfile0 not found

I'm trying to insert large polygon data via sql statement. since the
data was over 32k I had to use sqlj to insert my data.

I made a class that inserts the data. ran sqlj, generated the .java
and .ser files then used
db2profc to bind the ser file.. not exacly 100% sure what this is
about.. but I kind of get the idea..

I imported the java file into my project and attempted to use it..

I'm initializing the class with:

Connection con = MyManager.getInstance().getConnection();
DimoiPolyInsert dpi = new DimoiPolyInsert(new
DefaultContext(con));

to set the default context.. then calling the insert function from
DimoiPolyInsert (the generated java file)

I get:

java.sql.SQLException: profile DimoiPolyInsert_SJProfile0 not found:
java.lang.ClassNotFoundException: DimoiPolyInsert_SJProfile0

What am I doing wrong? I'm guessing its looking for the .class of
the .ser file that was serialized? is this a file that should have
been generated?

any help please.. I'm lost with this one.

thank you!
Vasili
the results of the binding were:

C:\>db2profc -user myusr -password 12345 -url jdbc:db2://localhost:
50000/MYDB DimoiPolyInsert_SJProfile0.ser
[ibm][db2][jcc][sqlj]
[ibm][db2][jcc][sqlj] Begin Customization
[ibm][db2][jcc][sqlj] Loading profile: DimoiPolyInsert_SJProfile0
[ibm][db2][jcc][sqlj] Customization complete for profile
DimoiPolyInsert_SJProfile0.ser
[ibm][db2][jcc][sqlj] Begin Bind
[ibm][db2][jcc][sqlj] Loading profile: DimoiPolyInsert_SJProfile0
[ibm][db2][jcc][sqlj] Driver defaults(user may override): BLOCKING ALL
VALIDATE
BIND STATICREADONLY YES
[ibm][db2][jcc][sqlj] Fixed driver options: DATETIME ISO DYNAMICRULES
BIND
[ibm][db2][jcc][sqlj] Binding package DIMOIP01 at isolation level UR
[ibm][db2][jcc][sqlj] Binding package DIMOIP02 at isolation level CS
[ibm][db2][jcc][sqlj] Binding package DIMOIP03 at isolation level RS
[ibm][db2][jcc][sqlj] Binding package DIMOIP04 at isolation level RR
[ibm][db2][jcc][sqlj] Bind complete for DimoiPolyInsert_SJProfile0

Mar 31 '07 #1
  • viewed: 3175
Share:
1 Reply

Starting to feel like there murphy's laws still apply here.. no matter
how long I've been trying to figure something out.. a soon as I ask a
question I find the answer.. apparantely theres a -ser2class option in
sqlj.. weird why this isn't by default.. what can you do with the ser
file without the class?

vasili
/ vasilip :
I'm trying to insert large polygon data via sql statement. since the
data was over 32k I had to use sqlj to insert my data.

I made a class that inserts the data. ran sqlj, generated the .java
and .ser files then used
db2profc to bind the ser file.. not exacly 100% sure what this is
about.. but I kind of get the idea..

I imported the java file into my project and attempted to use it..

I'm initializing the class with:

Connection con = MyManager.getInstance().getConnection();
DimoiPolyInsert dpi = new DimoiPolyInsert(new
DefaultContext(con));

to set the default context.. then calling the insert function from
DimoiPolyInsert (the generated java file)

I get:

java.sql.SQLException: profile DimoiPolyInsert_SJProfile0 not found:
java.lang.ClassNotFoundException: DimoiPolyInsert_SJProfile0

What am I doing wrong? I'm guessing its looking for the .class of
the .ser file that was serialized? is this a file that should have
been generated?

any help please.. I'm lost with this one.

thank you!
Vasili
the results of the binding were:

C:\>db2profc -user myusr -password 12345 -url jdbc:db2://localhost:
50000/MYDB DimoiPolyInsert_SJProfile0.ser
[ibm][db2][jcc][sqlj]
[ibm][db2][jcc][sqlj] Begin Customization
[ibm][db2][jcc][sqlj] Loading profile: DimoiPolyInsert_SJProfile0
[ibm][db2][jcc][sqlj] Customization complete for profile
DimoiPolyInsert_SJProfile0.ser
[ibm][db2][jcc][sqlj] Begin Bind
[ibm][db2][jcc][sqlj] Loading profile: DimoiPolyInsert_SJProfile0
[ibm][db2][jcc][sqlj] Driver defaults(user may override): BLOCKING ALL
VALIDATE
BIND STATICREADONLY YES
[ibm][db2][jcc][sqlj] Fixed driver options: DATETIME ISO DYNAMICRULES
BIND
[ibm][db2][jcc][sqlj] Binding package DIMOIP01 at isolation level UR
[ibm][db2][jcc][sqlj] Binding package DIMOIP02 at isolation level CS
[ibm][db2][jcc][sqlj] Binding package DIMOIP03 at isolation level RS
[ibm][db2][jcc][sqlj] Binding package DIMOIP04 at isolation level RR
[ibm][db2][jcc][sqlj] Bind complete for DimoiPolyInsert_SJProfile0
Apr 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bernard Dhooghe | last post: by
10 posts views Thread by Raquel | last post: by
12 posts views Thread by Rhino | last post: by
7 posts views Thread by Jean-Marc Blaise | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.