Sathish Ramadas

Greenhorn
+ Follow
since Feb 18, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sathish Ramadas

Hi all

Requirement : Read data from a flat file and insert into database.

The total number of rows in the data file are around 1 lakh ( each line contains 700 characters). We need to dump those data into databse.

Method:
Read the data using buffered input stream and store it in arraylist and insert into database. Since we cannot directly store all 1 lakh lines of data into arraylist at the same time, i am doing it block by block. Storing 25000 lines at a time and insert into database then clear arraylist then again start the process.

This way it takes 12 min to insert 1 lakh record into database.

I am not very sure how much time will it take really?

please suggest me.
[ January 04, 2006: Message edited by: Ajith Kallambella ]
18 years ago
Actually i am using welogic jdk for the production environment (Linux). I am creating the PDF files using iText api. When i try to use new Color(,,,) awt constructor it gives me this error. but at the same time when i use the same code with sun's jdk then it works fine.

pls advice me to proceed wiht the weblogic environment.

java.lang.UnsatisfiedLinkError: /opt/beajrockit/8.1.SP2LB2/jre/lib/i386/libawt.so: /lib/i686/l
at java.lang.ClassLoader$NativeLibrary.load(Ljava.lang.String I(Native Method)
at java.lang.ClassLoader.loadLibrary0(Ljava.lang.Class;Ljava.io.File Z(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Ljava.lang.Class;Ljava.lang.String;Z)V(Unknown Source)
at java.lang.Runtime.loadLibrary0(Ljava.lang.Class;Ljava.lang.String V(Unknown Source)
at java.lang.System.loadLibrary(Ljava.lang.String V(Unknown Source)
at sun.security.action.LoadLibraryAction.run()Ljava.lang.Object;(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Ljava.security.PrivilegedAction Ljava.lang.Object;(Native Method)
at java.awt.Toolkit.loadLibraries()V(Toolkit.java:1401)
at java.awt.Toolkit.<clinit>()V(Toolkit.java:1422)
at COM.jrockit.vm.RNI.toNative(I)I(Native Method)
at COM.jrockit.vm.RNI.trampoline()V(Native Method)
at java.awt.Toolkit.loadLibraries()V(Toolkit.java:???)
at java.awt.Color.<clinit>()V(Color.java:250)
at COM.jrockit.vm.RNI.toNative(I)I(Native Method)
at COM.jrockit.vm.RNI.clinitTrampoline()V(Native Method)
19 years ago
hi all...pls help me to solve this problem...........
19 years ago
ERROR reading C:\Program Files\Real\jakarta-tomcat-3.3.2\conf\server.xml
At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080 maxThreads=150 min
SpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100 debug=0 c
onnectionTimeout=20000 disableUploadTimeout=true

sun.misc.InvalidJarIndexException: Invalid index!
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:594)
at sun.misc.URLClassPath.getResource(URLClassPath.java:134)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:553)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at org.apache.tomcat.util.xml.ObjectCreate.start(XmlMapper.java:795)
at org.apache.tomcat.util.xml.XmlMapper.matchStart(XmlMapper.java:516)
at org.apache.tomcat.util.xml.XmlMapper.startElement(XmlMapper.java:114)

at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.ja
va:333)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)

at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:334)
at org.apache.tomcat.modules.config.ServerXmlReader.loadConfigFile(Serve
rXmlReader.java:137)
at org.apache.tomcat.modules.config.ServerXmlReader.addInterceptor(Serve
rXmlReader.java:113)
at org.apache.tomcat.core.ContextManager.addInterceptor(ContextManager.j
ava:393)
at org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTom
cat.java:613)
at org.apache.tomcat.startup.EmbededTomcat.execute1(EmbededTomcat.java:7
91)
at org.apache.tomcat.startup.EmbededTomcat$1.run(EmbededTomcat.java:775)

at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Jdk12S
upport.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Jdk12Support.
java:76)
at org.apache.tomcat.startup.EmbededTomcat.execute(EmbededTomcat.java:77
3)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.
java:52)
at org.apache.tomcat.startup.Main.execute(Main.java:272)
at org.apache.tomcat.startup.Main.main(Main.java:98)
EmbededTomcat: exception initializing ContextManager
org.apache.tomcat.core.TomcatException: Root cause - Invalid index!
at org.apache.tomcat.modules.config.ServerXmlReader.loadConfigFile(Serve
rXmlReader.java:141)
at org.apache.tomcat.modules.config.ServerXmlReader.addInterceptor(Serve
rXmlReader.java:113)
at org.apache.tomcat.core.ContextManager.addInterceptor(ContextManager.j
ava:393)
at org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTom
cat.java:613)
at org.apache.tomcat.startup.EmbededTomcat.execute1(EmbededTomcat.java:7
91)
at org.apache.tomcat.startup.EmbededTomcat$1.run(EmbededTomcat.java:775)

at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Jdk12S
upport.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Jdk12Support.
java:76)
at org.apache.tomcat.startup.EmbededTomcat.execute(EmbededTomcat.java:77
3)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.
java:52)
at org.apache.tomcat.startup.Main.execute(Main.java:272)
at org.apache.tomcat.startup.Main.main(Main.java:98)
Guessed home=C:\Program Files\Real\jakarta-tomcat-3.3.2
Exception: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException: org.apache.tomcat.core.TomcatExcept
ion: EmbededTomcat.initContextManager
at org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTom
cat.java:631)
at org.apache.tomcat.startup.EmbededTomcat.execute1(EmbededTomcat.java:7
91)
at org.apache.tomcat.startup.EmbededTomcat$1.run(EmbededTomcat.java:775)

at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Jdk12S
upport.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Jdk12Support.
java:76)
at org.apache.tomcat.startup.EmbededTomcat.execute(EmbededTomcat.java:77
3)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.
java:52)
at org.apache.tomcat.startup.Main.execute(Main.java:272)
at org.apache.tomcat.startup.Main.main(Main.java:98)
Root Exception: org.apache.tomcat.core.TomcatException: EmbededTomcat.initContex
tManager
org.apache.tomcat.core.TomcatException: EmbededTomcat.initContextManager
at org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTom
cat.java:631)
at org.apache.tomcat.startup.EmbededTomcat.execute1(EmbededTomcat.java:7
91)
at org.apache.tomcat.startup.EmbededTomcat$1.run(EmbededTomcat.java:775)

at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Jdk12S
upport.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Jdk12Support.
java:76)
at org.apache.tomcat.startup.EmbededTomcat.execute(EmbededTomcat.java:77
3)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.
java:52)
at org.apache.tomcat.startup.Main.execute(Main.java:272)
at org.apache.tomcat.startup.Main.main(Main.java:98)
19 years ago
I heard that latest version of tomcat can be started without using sun's jdk. Anybody have an idea of how to run the server without using jdk.

Thanks
19 years ago
i have used the UBB code now the above discussions what we discussed are not dispalying now. I have tried the trim () but itgives the same problem still.
19 years ago
Pasting the sample output again


FG|M000196 |11 GNMA |00|000156620|5618000 |MTS|010873358|FNMA SF 30 YEAR |FNMA SF 30 YEAR |DEBT |FNMA | |31400SR68|00696309| |S|USD|PR|14.40.14|1900-01-01-00.00.00.000000|P|8CEF1F0 |000000000|2004-07-12|2004-08-12|2004-07-15|08|+000000002010278.000|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|014|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|+000000000.497443530|+000000000999999.780|+00000000000.0000000|+000000000999999.780|N|HSBC BANK USA |001306441| |000852|10 |+000000000000000.000|+000000000000000.000| |+000000000.060000000|2033-03-01|2003-03-01|+000000000.000000000|+00000000000.0000000|F1 |+000000000999999.780|+000000001012314.760|+000000001012314.760|033|F/R VS F/D |F/R vs F/D |F/R vs F/D |CSAM | |

FG|M000196 |11 GNMA |00|000156620|5618000 |MTS|010873358|FNMA SF 30 YEAR |FNMA SF 30 YEAR |DEBT |FNMA | |31400SR68|00696309| |S|USD|PR|14.40.14|1900-01-01-00.00.00.000000|P|8CEF1F0 |000000000|2004-07-12|2004-08-12|2004-07-15|08|+000000002010278.000|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|014|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|+000000000.497443530|+000000000999999.780|+00000000000.0000000|+000000000999999.780|N|HSBC BANK USA |001306441| |000852|10 |+000000000000000.000|+000000000000000.000| |+000000000.060000000|2033-03-01|2003-03-01|+000000000.000000000|+00000000000.0000000|F1 |+000000000999999.780|+000000001012314.760|+000000001012314.760|033|F/R VS F/D |F/R vs F/D |F/R vs F/D |CSAM | |

[ removed code tags -ds ]
[ August 30, 2004: Message edited by: Dirk Schreckmann ]
19 years ago
i have tried the trim() function but still the problem occurs. i am pasting the sample data with UBB code format.

Data : 1

FG|M000196 |11 GNMA |00|000156620|5618000 |MTS|010873358|FNMA SF 30 YEAR |FNMA SF 30 YEAR |DEBT |FNMA | |31400SR68|00696309| |S|USD|PR|14.40.14|1900-01-01-00.00.00.000000|P|8CEF1F0 |000000000|2004-07-12|2004-08-12|2004-07-15|08|+000000002010278.000|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|014|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|+000000000.497443530|+000000000999999.780|+00000000000.0000000|+000000000999999.780|N|HSBC BANK USA |001306441| |000852|10 |+000000000000000.000|+000000000000000.000| |+000000000.060000000|2033-03-01|2003-03-01|+000000000.000000000|+00000000000.0000000|F1 |+000000000999999.780|+000000001012314.760|+000000001012314.760|033|F/R VS F/D |F/R vs F/D |F/R vs F/D |CSAM | |


Data 2:
FG|M000196 |11 GNMA |00|000156620|5618000 |MTS|010873358|FNMA SF 30 YEAR |FNMA SF 30 YEAR |DEBT |FNMA | |31400SR68|00696309| |S|USD|PR|14.40.14|1900-01-01-00.00.00.000000|P|8CEF1F0 |000000000|2004-07-12|2004-08-12|2004-07-15|08|+000000002010278.000|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|014|+00000000100.9981650|+000000001012314.760|+000000001009981.430|+00000002333.3300000|+000000000.497443530|+000000000999999.780|+00000000000.0000000|+000000000999999.780|N|HSBC BANK USA |001306441| |000852|10 |+000000000000000.000|+000000000000000.000| |+000000000.060000000|2033-03-01|2003-03-01|+000000000.000000000|+00000000000.0000000|F1 |+000000000999999.780|+000000001012314.760|+000000001012314.760|033|F/R VS F/D |F/R vs F/D |F/R vs F/D |CSAM |

[ August 30, 2004: Message edited by: Joe Ess ]


[ removed code tags -ds ]
[ August 30, 2004: Message edited by: Dirk Schreckmann ]
19 years ago
pls see the sample data Data 1 is one row and Data 2 is another row.

Data 1:

FG|M000196 |11 GNMA |00|000156620|5618000
|MTS|010873358|FNMA SF 30 YEAR
|NMA SF 30 YEAR |DEBT |FNMA |
|31400SR68|00696309|
S|USD|PR|14.40.14|1900-01-01-00.00.00.000000|P|8CEF1F0 |000000000|2004-07-12|2004-08-12|2004-07-15|08|+000000002010278.000|
+00000000100.9981650|+000000001012314.760|+000000001009981.430|
+00000002333.3300000|014|+00000000100.9981650|+000000001012314.760|
+000000001009981.430|+00000002333.3300000|+000000000.497443530|
+000000000999999.780|+00000000000.0000000|+000000000999999.780|N|HSBC BANK USA |001306441| |000852|10
|+000000000000000.000|+000000000000000.000|
|+000000000.060000000|2033-03-01|2003-03-01|+000000000.000000000|
+00000000000.0000000|F1
|+000000000999999.780|+000000001012314.760|+000000001012314.760|033|F/R VS
F/D |F/R vs F/D
|F/R vs F/D |CSAM | |



Data 2:

FG|M000196 |11 GNMA |00|000156620|5618000 |MTS|010873358|FNMA SF 30 YEAR |FNMA SF 30 YEAR |DEBT |FNMA | |31400SR68|00696309| |S|USD|PR|14.40.14|1900-01-01-00.00.00.000000|P|8CEF1F0 |000000000|2004-07-12|2004-08-12|2004-07-15|08|
+000000002010278.000|+00000000100.9981650|+000000001012314.760|
+000000001009981.430|+00000002333.3300000|014|+00000000100.9981650|
+000000001012314.760|+000000001009981.430|+00000002333.3300000|
+000000000.497443530|+000000000999999.780|+00000000000.0000000|
+000000000999999.780|N|HSBC BANK USA |001306441|
|000852|10 |+000000000000000.000|+000000000000000.000|
|+000000000.060000000|2033-03-01|2003-03-01|+000000000.000000000|
+00000000000.0000000|F1
|+000000000999999.780|+000000001012314.760|+000000001012314.760|033|F/R VS
F/D |F/R vs F/D
|F/R vs F/D |CSAM |

[ August 30, 2004: Message edited by: Joe Ess ]

[ August 30, 2004: Message edited by: Gregg Bolinger ]

[ August 30, 2004: Message edited by: Gregg Bolinger ]

[ removed code tags -ds ]
[ August 30, 2004: Message edited by: Dirk Schreckmann ]
19 years ago
here it seems okay the Javaranch is doing some trailing before display the page. but when i write the details in the txt file the next line not starting exactly from the begining instead the second line starts with something like 2 tabs space and the third line with 4 tabs spaces...it keeps going like that.

suggest me a solution for the prob.
thnx.
19 years ago
I am using the below code to append the data at the end of the line for every time. but the problem is the new line is not correctly started . so the new line start from the middle of the line and keeps increasing for every new line. suggest me to go for a write api.

sample output:

FG|M000196 |11 GNMA |00|000156620|5618000 |MTS|010873358|FNMA SF 30 YEAR

FG|M000196 |11 GNMA |00|000156620|5618000 |MTS|010873358|FNMA SF 30 YEAR

u can see the FG | M000196 starts in the middle of the line

[ August 30, 2004: Message edited by: Joe Ess ]

[ removed code tags -ds ]
[ August 30, 2004: Message edited by: Dirk Schreckmann ]
19 years ago
Eric ....Thank you so much for your kind information.
once innerhtml is constructed in the child window then it will be displayed in the parent window.
then if you try to acces the div tag elements for eg.one hyperlink is displaying the div tag area (parent window) but when i click that it is not calling the method what i defined while constructing the innerHtml code.

also i right click the parent window and open view souce but i could't see any details of the DIV tag.
i have generated the HTML code in the child window. the Html code contains check boxes and hyperlink. Once i submit the child window the HTML code is pasted in the parent window (DIV tag). but how can acces those checkboxes values and hyper link method.
hi,
i am creating DIv tag in the parent window. Then open a child window (popup) and do the submit operation in it. update the parent DIV tag using opener and the parent window also update propely. now i could't access those div tag elements from the parent window. how do i access those attribute.

becos once the data come from child window to parent then i am submitting the parent window. here servlet could't get the div attribute values.