By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,924 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,924 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a

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.