You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Albert Kam <mo...@gmail.com> on 2007/11/09 13:23:44 UTC

Thank you Derby ! ( was : Error while importing csv files in Pocket PC )

Dear Derby !
This posting was originally for seeking help for my error, but when i re-run
it, everything is fine for now !
I was skeptic, and tried running it again, but the problem didnt happen
anymore.
Thanks derby, i owe you ! Hope to repay it someday.

Here is the output of my command :
preparing to ask file from server ..
sending mydevice:send; to server
receiving file from server
file received : \sync\receive.zip file
fetched from server in 3826 ms
connection fetched in 12992 ms
processing sql \sync\syncin\create.sql
sql processing done in 5718 ms
processing csv MST_MENU_STRUCTURE
processing csv MST_POSITION
processing csv MST_PRODUCT csv
processing done in 42406 ms
committing connection

*Anyway, here goes the original mail i was gonna post, haha :*

Dear lively Derby-Community,

Hi all, my name is Albert Kam. I've been trying to find posts similar with i
experience now, but with no luck.
This is my first post. Hope could contribute a question that could be useful
in the future >:)

I've been trying to embed derby in my cdc java app for ppc, and so far it
works great.
Anyway, the queries, insert, create tables, etc works very well.
The problem comes when trying to import csv files in the ppc device

So i ran the program to sync db updates for the ppc using the command :
"\J9\PPRO11\bin\j9.exe" "-jcl:ppro11"
"-Xbootclasspath/a:\J9\PPRO11\examples\jsr169.jar" "-cp"
"\J9\PPRO11\examples\sofco_pda.jar;\J9\PPRO11\examples\derby.jar;." "
sync.SyncClient" "get"
And these steps occur :
1. the java program in the ppc requests a zip file from a server via java
socket
2. the ppc device gets the file, extracts the file
3. the extracted files, which consist of *.sql and *.csv are to be processed
by the java
4. the sqls, which are create statements are processed fine by java + derby
5. when processing the csv files, the exception that is logged in derby.log:
----------------------------------------------------------------
2007-11-09 08:09:50.230 GMT:
 Booting Derby version The Apache Software Foundation - Apache Derby -
10.3.1.4 - (561794): instance c013800d-0116-2375-2576-000005468cf7
on database directory \sync\distr

Database Class Loader started - derby.database.classpath=''
2007-11-09 08:10:02.849 GMT Thread[main,5,main] (XID = 1822), (SESSIONID =
0), (DATABASE = distr), (DRDAID = null), Cleanup action starting
2007-11-09 08:10:02.851 GMT Thread[main,5,main] (XID = 1822), (SESSIONID =
0), (DATABASE = distr), (DRDAID = null), Failed Statement is: CALL
SYSCS_UTIL.SYSCS_IMPORT_TABLE (?,?,?,?,?,?,?)
java.lang.UnsatisfiedLinkError: j9fdm23 ((14) Not enough storage is
available to complete this operation.)
    at java.lang.ClassLoader.loadLibraryWithPath(Unknown Source)
    at java.lang.ClassLoader.loadLibraryWithClassLoader(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at java.lang.StrictMath$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Unknown Source)
    at java.lang.StrictMath.<clinit>(Unknown Source)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(Unknown Source)
    at org.apache.derby.catalog.SystemProcedures.<clinit>(Unknown Source)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(Unknown Source)
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at
org.apache.derby.impl.services.reflect.DatabaseClasses.loadApplicationClass(Unknown
Source)
    at org.apache.derby.iapi.services.loader.ClassInspector.getClass(Unknown
Source)
    at org.apache.derby.iapi.services.loader.ClassInspector.accessible(Unknown
Source)
    at org.apache.derby.impl.sql.compile.QueryTreeNode.verifyClassExist(Unknown
Source)
    at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(Unknown
Source)
    at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(Unknown
Source)
    at org.apache.derby.impl.sql.compile.CallStatementNode.bindStatement(Unknown
Source)
    at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
    at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
    at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown
Source)
    at org.apache.derby.jdbc.Driver169.newEmbedPreparedStatement(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
Source)
    at sync.SyncClient.syncFromServerAndUpdate(Unknown Source)
    at sync.SyncClient.main(Unknown Source)
Cleanup action completed

I thought the storage is not enough, so i moved my app and derby to the 1G
memory card storage, but the error persisted.
Could it be the memory problem ?

Thank you !
Albert Kam

-- 
Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)