File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes string tokeniser .. error unknown source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "string tokeniser .. error unknown source" Watch "string tokeniser .. error unknown source" New topic
Author

string tokeniser .. error unknown source

manu kaushik
Greenhorn

Joined: Aug 20, 2012
Posts: 7
Hi ,

I want to populate database table by reading the data file which is in this format(manu , kaushik, software , engineer) its not a csv file its a .data file!!! I have used string tokeniser but it is just reading first field of file i.e manu only and giving unknown source error . Where is the problem?


Main class


Model class



and DAOclass method
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 1939
    
  28
StringTokenizer is no longer the recommended way to split strings, using the String.split() method is now the preferred way.

If you really want to stick with StringTokenizer can you post the full error message and stack trace.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7052
    
  16

manu kaushik wrote:Where is the problem?

Manu,

Please DontWriteLongLines. It makes your thread very hard to read, which may put people off answering.

In some cases (eg, your SQL statement string) that even means breaking up Strings into shorter chunks. I've done it for you this time, but please read the link above, and also the UseCodeTags page again.

Thanks

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: string tokeniser .. error unknown source
 
Similar Threads
Error with user defined object datatypes
Problem while Join in hibernate
Hibernate Mapping Issue
Address Book Java Issues
Pesudo coding