Java Database Encoding Problems
Hi,
I'm developing java under an AIX machine connecting to a DB2/400 database. The DB2/400 database contains records which are in Thai and English characters encoding.
My Java program will have to extract these records and write them to a text file. My problem is, when I try to write the records in Thai characters, it doesn't get encoded right. Please advise me on what to do about my code. I hope anybody can help.
Regards,
Edgardolito
Do you have a proof that your Java Strings contain
the right characters?
I think so. It's just that it's not encodedcorrectly
when it goes to the text file.So if you have some kind of user interface and print
this text, it shows both Thai and English correctly?The AIX machine can read and display Thai and English characters correctly. Actually, I'm developing a console application. No nifty user interfaces. I just flatly write the records to a text file.
What's your platform's default encoding?My platform's (AIX) default encoding is inISO8859_1.
It's locale is in English. I am not allowed tochange
this setting.
What encoding do you use when creating theFileReader?
I'm not using file reader. I just use
resultset.getString() to get the strings from the
database and write it to the text file using a new
BufferedWriter(new FileWriter(File));My mistake, I actually meant FileWriter. So if you
don't state the encoding to be used, platform
encoding will be used (in your case: ISO Latin 1,
which of course has no support for Thai). The
question is, what encoding should be used, as a mix
of both languages can only be handled by Unicode
encoding, e.g. UTF-8 or UTF-16. You could try to use
an OutputStreamWriter based on a FileOutputStream and
encapsulated into the BufferedWriter -- the
OutputStreamWriter can be created for an encoding of
your choice.please give me a sample code on how to do this... My code goes something like this:
BuffereWriter bw = new BufferedWriter(FileWriter(new File("out.txt")));
StringBuffer data = new StringBuffer("");
rs = statement.executeQuery("SELECT thaiField FROM library.table");
while(rs.next()) {
data.append(new String(rs.getBytes(), "Cp838"));
bw.write(data.toString());
bw.newLine();
bw.flush();
bw.close();I hope you could help. Thanks a lot!
Similar Messages
-
Encoding problem while reading binary data from MQ-series
Dear all,
we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
It seems to us that
1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
2. Both CCSID parameters are not used anyway in JMS-adapter
How can we solve this problem without changing anything on MQ-site?
Here is the stack-trace:
Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
at java.lang.Thread.run(Thread.java:770)
Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
... 36 more
Caused by: sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
at java.io.InputStreamReader.read(InputStreamReader.java:208)
at java.io.BufferedReader.fill(BufferedReader.java:153)
at java.io.BufferedReader.readLine(BufferedReader.java:316)
at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
... 40 more
Any ideas?
Kind regards, StefanHi Stefan,
for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
The second MTB, which does the XML-Wrapping, is configured like this:
Transform.Class = com.sap.aii.messaging.adapter.Conversion
Transform.ContentType = application/xml
xml.conversionType = SimplePlain2XML
xml.fieldNames = value
xml.fieldSeparator = §%zulu§%
xml.processFieldNames = fromConfiguration
xml.structureTitle = payload
Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á). E1 is (different from ISO) an "ß" in 850.
Any ideas? -
Java DataBase in NetBeans!!
Hi there,
can you help guy,
I have the NetBeans IDE 4.1,
Oracle 9,
j2sdk1.4.0,
and win xp (on standalone machine)
I remember the old version of NetBeans, you can use Mounting FileSystem for jdbc\oracle\driver
to use the OracleDriver
but I get message error at compiler says that package jdbc.oracle.driver does not exist
please I need help in who to do Mounting FileSystem or other way
here is my code of java
// Database application using Oracle and Java programming Language
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import jdbc.sql.*
import java.awt.*;
public class OracleJavaCustomerWindow extends JFrame
private JLabel labelCId,labelCName,labelCCity,labelCPhone;
private JTextField textCId,textCName,textCCity,textCPhone;
private JPanel labelPanel,buttonPanel,textAreaPanel,labelTextAreaPanel;
private JTextArea outputArea;
private JScrollPane scrollPane;
private JButton buttonDisplay,buttonAdd,buttonModifyRecord,buttonUpdate,buttonDelete;
private JButton buttonClear;
private JTextField field1,field2,field3,field4;
private JLabel label1,label2,label3,label4;
private JPanel mixedPanel,mixedPanel2,fieldPanel1,fieldPanel2,fieldPanel3,fieldPanel4;
static Connection sqlconn = null;
// set up GUI with constrictor(IT IS A METHOD. EACHO CLASS AT LEST HAVE ONE)
public OracleJavaCustomerWindow ()
super("Display Oracle Data for Customers");
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
sqlconn= DriverManager.getConnection ("jdbc:oracle:oci:@Kawasaki", "scott", "tiger");
catch(SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
// add GUI components to container
Container container = getContentPane();
container.setLayout(new FlowLayout(FlowLayout.CENTER));
// Build labelPanel
labelCId = new JLabel(" Customer ID");
labelCName = new JLabel("Customer Name");
labelCCity = new JLabel("Customer City");
labelCPhone = new JLabel("Customer Phone");
labelPanel = new JPanel();
labelPanel.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
labelPanel.add(labelCId);
labelPanel.add(labelCName);
labelPanel.add(labelCCity);
labelPanel.add(labelCPhone);
// Build textAreaPanel
outputArea = new JTextArea(10,30);
outputArea.setEditable(false);
scrollPane = new JScrollPane(outputArea);
textAreaPanel = new JPanel();
textAreaPanel.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
textAreaPanel.add(scrollPane);
// Build labelTextAreaPanel which contains labelPanel and textAreaPanel
// to be ready for adding to container
labelTextAreaPanel= new JPanel();
labelTextAreaPanel.setLayout(new BorderLayout());
labelTextAreaPanel.add(labelPanel,BorderLayout.NORTH);
labelTextAreaPanel.add(textAreaPanel,BorderLayout.SOUTH);
// Buld buttonPanel
buttonDisplay = new JButton ("Display Table");
buttonClear = new JButton ("Clear");
buttonAdd = new JButton("Add New Record");
buttonUpdate= new JButton("Display Record");
buttonModifyRecord = new JButton("Modify Record");
buttonDelete = new JButton("Delete Record");
buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(6,1,10,5));
buttonPanel.add(buttonAdd);
buttonPanel.add(buttonUpdate);
buttonPanel.add(buttonModifyRecord);
buttonPanel.add(buttonDisplay);
buttonPanel.add(buttonDelete);
buttonPanel.add(buttonClear);
// build fieldPanel1
label1 = new JLabel("Customer Number");
field1 = new JTextField(10);
fieldPanel1 = new JPanel();
fieldPanel1.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel1.add(label1);
fieldPanel1.add(field1);
// build fieldPanel2
fieldPanel2 = new JPanel();
label2 = new JLabel("Customer Name");
field2 = new JTextField(10);
fieldPanel2.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel2.add(label2);
fieldPanel2.add(field2);
// build fieldPanel3
fieldPanel3 = new JPanel();
label3 = new JLabel("Customer City");
field3 = new JTextField(10);
fieldPanel3.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel3.add(label3);
fieldPanel3.add(field3);
// build fieldPanel4
fieldPanel4 = new JPanel();
label4 = new JLabel("Customer Phone");
field4 = new JTextField(10);
fieldPanel4.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel4.add(label4);
fieldPanel4.add(field4);
// Build mixedPanel which contains fieldPanel1, fieldPanel2,fieldPanel3
// to be ready for adding to container
mixedPanel = new JPanel();
mixedPanel.setLayout(new BorderLayout());
mixedPanel.add(fieldPanel1,BorderLayout.NORTH);
mixedPanel.add(fieldPanel2,BorderLayout.CENTER);
mixedPanel.add(fieldPanel3,BorderLayout.SOUTH);
mixedPanel2 = new JPanel();
mixedPanel2.add(fieldPanel4,BorderLayout.SOUTH);
// add all panels to the container
container.add(mixedPanel);
container.add(mixedPanel2);
container.setBackground(Color.DARK_GRAY);
container.add(labelTextAreaPanel);
container.add(buttonPanel);
//--------- Messages to communicate with different objects
//----------- method to clear the outputarea
buttonClear.addActionListener(
// anonymous inner class
new ActionListener()
public void actionPerformed(ActionEvent event)
outputArea.setText("");
}// actionPerformed
}// anonymous inner class
//--------- method to use button event--------------------
buttonDisplay.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlca = null;
Statement sqlStatement = null;
ResultSet rset = null;
try{
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
rset = sqlStatement.executeQuery ("select * from customers");
while (rset.next ()){
String CUSTOMERID=rset.getObject(1).toString();
String CUSTOMERNAME =rset.getObject(2).toString();
String CUSTOMERCITY =rset.getObject(3).toString();
String CUSTOMERPHONE =rset.getObject(4).toString();
//String map=rset.getObject(4).toString();
//String region=rset.getObject(5).toString();
//System.out.println (id + "\t" + name + "\t" + loc );
outputArea.append(CUSTOMERID + "\t" + CUSTOMERNAME + "\t" + CUSTOMERCITY + "\t" + CUSTOMERPHONE + "\n" );
} // end while
}// end try
catch (SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
// ------ method to add Customers to the database
buttonAdd.addActionListener(
// anonymous inner class
new ActionListener()
public void actionPerformed(ActionEvent event)
try{
Statement sqlStatement = null;
ResultSet rtbookset = null;
// create statement
sqlStatement = sqlconn.createStatement();
int CUSTOMERID = Integer.parseInt(field1.getText());
String CUSTOMERNAME = field2.getText();
String CUSTOMERCITY = field3.getText();
int CUSTOMERPHONE = Integer.parseInt(field4.getText());
// create query
String insertquery = "INSERT INTO CUSTOMERS VALUES("
+ CUSTOMERID + "," + "'" + CUSTOMERNAME + "'," + "'" + CUSTOMERCITY + "'," + CUSTOMERPHONE + ")";
// execute the query
sqlStatement.executeQuery(insertquery);
// clear the textfields
field1.setText("");
field2.setText("");
field3.setText("");
field4.setText("");
JOptionPane.showMessageDialog(null,"Record added");
}// try
catch(SQLException ex)
System.out.println("Record exists :" + ex.getMessage() + "<BR>");
}// catch
}// actionPerformed
}// anonymous inner class
//--------- method to use buttonUpdate event--------------------
buttonUpdate.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlconn = null;
Statement sqlStatement = null;
ResultSet rset = null;
int CUSTOMER_ID = Integer.parseInt(field1.getText());
try{
//int CUSTOMER_ID = Integer.parseInt(field1.getText());
//String d_name = field2.getText();
//String d_loc = field3.getText();
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
rset = sqlStatement.executeQuery ("select * from CUSTOMERS where CUSTOMER_ID =" + CUSTOMER_ID);
rset.next ();
//int id=rset.getInt("DEPTNO");
String CUSTOMERID = rset.getObject(1).toString();
String CUSTOMERNAME=rset.getString("CUSTOMER_NAME");
String CUSTOMERCITY=rset.getString("CUSTOMER_CITY");
String CUSTOMERPHONE=rset.getString("CUSTOMER_PHONE");
field1.setText(CUSTOMERID);
field2.setText(CUSTOMERNAME);
field3.setText(CUSTOMERCITY);
field4.setText(CUSTOMERPHONE);
//buttonUpdate.setEnabled(false);
//buttonModifyRecord.setEnabled(true);
//rset.close();
}// end try
catch (SQLException ex)
JOptionPane.showMessageDialog(null,"No Record found with CUSTOMER ID :" + CUSTOMER_ID );
//System.out.println("SQLException:No record found" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
//---------Method to modify record------------------------------------
buttonModifyRecord.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlconn = null;
Statement sqlStatement = null;
ResultSet rset = null;
try{
//int dept_no = Integer.parseInt(field1.getText());
//String d_name = field2.getText();
//String d_loc = field3.getText();
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
int CUSTOMERID = Integer.parseInt(field1.getText());
String CUSTOMERNAME = field2.getText();
String CUSTOMERCITY = field3.getText();
int CUSTOMERPHONE = Integer.parseInt(field4.getText());
String updatequery = "UPDATE CUSTOMERS SET CUSTOMER_NAME = " + "'" + CUSTOMERNAME + "',"
+ " CUSTOMER_CITY = " + "'" + CUSTOMERCITY + "'," + " CUSTOMER_PHONE = " + CUSTOMERPHONE
+ " Where CUSTOMER_ID = " + CUSTOMERID;
// execute the query
sqlStatement.executeQuery(updatequery);
// clear the textfields
field1.setText("");
field2.setText("");
field3.setText("");
field4.setText("");
JOptionPane.showMessageDialog(null,"Record modified");
//buttonUpdate.setEnabled(true);
//buttonModifyRecord.setEnabled(false);
}// end try
catch (SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
//---------Method to modify record------------------------------------
buttonDelete.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlca = null;
Statement sqlStatement = null;
ResultSet rset = null;
try{
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
int CUSTOMERID = Integer.parseInt(field1.getText());
//String d_name = field2.getText();
//String d_loc = field3.getText();
String deletequery = "DELETE from CUSTOMERS "
+ " Where CUSTOMER_ID = " + CUSTOMERID;
// execute the query
sqlStatement.executeQuery(deletequery);
// clear the textfields
field1.setText("");
field2.setText("");
field3.setText("");
field4.setText("");
JOptionPane.showMessageDialog(null,"Record Deleted");
//buttonUpdate.setEnabled(true);
//buttonModifyRecord.setEnabled(false);
}// end try
catch (SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
// specify the size of the window
setSize(800,500);
show();
}// constructor
public static void main(String args[]) throws IOException{
OracleJavaCustomerWindow application = new OracleJavaCustomerWindow();
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}// main
} // class OracleJavaWindow
// exceptions classes
// inserFailedException is a general exception for
// SQL insert problems
/*class insertFailedException extends SQLException
public insertFailedException(String reason)
super(reason);
public insertFailedException(String reason)
super();
}*/Sorry guys here is the correction of details i have provided
the Error message tells me that
package oracle.jdbc.driver does not exist
and the folder I used to do Mounting SystemFile for was
C:\Oracle\jdbc\lib\classes12 -
Jre 1.4.2_12 + java excel api problem.
I got problem when i write a program to read chinese excel sheet with jre 1.4.2_12, chinese will encoding incorrect in java, but when I change jre version to jre 1.4.2_10 or jre 1.5.0 update 7 , everything s ok . any solution?
p.s. jexcelapi 2.5.8I got problem when i write a program to read chinese
excel sheet with jre 1.4.2_12, chinese will encoding
incorrect in java, but when I change jre version to
jre 1.4.2_10 or jre 1.5.0 update 7 , everything s ok
. any solution?
p.s. jexcelapi 2.5.8Hi Vencent,
I am also seeing encoding problems with 1.4.2_12 and havent been able to find a solution. Did you find a solution to your problem? If so I'd appreciate it if you could post it.
Thanks,
Declan. -
I need troubleshooting techniques how to deal with database connectivity problems.
I am using netbean6m10, Java6.0_1b6 and my program reads these properties before opening the database.
lsfbvol.db.url="jdbc:derby:/etsdDB/ds8300DB;create=yes"
lsfbvol.db.driver=org.apache.derby.jdbc.EmbeddedDriver
For debugging purposes, I printed the driver to ensure it was read properly and it was.
DB Driver=org.apache.derby.jdbc.EmbeddedDriver
Below is the captured exception. Please advice.
Thanks
Arsi
java.sql.SQLException: No suitable driver found for "jdbc:derby:/etsdDB/ds8300DB;create=yes
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
---SQLException Caught---
SQLState: 08001
Severity: 0
Message: No suitable driver found for "jdbc:derby:/etsdDB/ds8300DB;create=yes
at loadDB.MatchGroup.dbConnect(MatchGroup.java:458)
at loadDB.RxProps.dbCreateTable(RxProps.java:308)
at loadDB.RxProps.init(RxProps.java:122)
at loadDB.RxProps.<init>(RxProps.java:97)
at loadDB.File2DB.<init>(File2DB.java:58)
at ds8300.Main.main(Main.java:33)
Java Result: 1
BUILD SUCCESSFUL (total time: 3 seconds)Thanks for the response.
This is a working program under MySQL and modified for a good practice to learn the new Java DB included in jdk6. Actually, all I changed was my property file which contained all the properties for URL and Driver for the DB.
My URL was pointing to my working-directory which happend to be my flash-card. I changed it to my C drive but still is having same problem.
About my driver not being loaded. My understanding was under jdk6 there was no need to load the driver for embeded Java DB because was already included into the system.
Not sure what to try next. Please advice.
Thanks. Arsi -
Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem
Hi,
I failed to connect Tomcat 5.0.24 with Postgresql
7.4.2. The files created by me and the changes i had
made in the existing files are rates.jsp,
conversionDAO.java, web.xml and server.xml. The error
message on the top of the rest of it was "The value of
useBean class attribute converter.conversionDAO is
invalid". So far I found out that the coding for
database connectivity purpose in conversionDAO.java
cause the error. Another thing is Postgresql jdbc
driver is required to set in the CLASSPATH for the
java file to access the Postgresql database. I don't
know where should I put it in Tomcat for web
application. Anyway, I put it in
$CATALINA_HOME/shared/lib according the book i
refered. I do the database connectivity coding refer
to the Tomcat Kick Start book from Sams Publishing.
Below are the coding involved, please show me the
mistake i had made. Thank you.
----server.xml----
<Context path="/database"
docBase="${catalina.home}/webapps/database" debug="0"
reload="true">
<ResourceParams name="jdbc/conversion">
<parameter>
<name>username</name>
<value>myusername</value>
</parameter>
<parameter>
<name>password</name>
<value>mypassword</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.postgresql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:postgresql://localhost/conversion</value>
</parameter>
</ResourceParams>
</Context>
----web.xml----
<servlet>
<servlet-name>conversionDAO</servlet-name>
<servlet-class>converters.conversionDAO</servlet-class>
</servlet>
<resource-ref>
<res-ref-name>jdbc/conversion</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
----conversionDAO.java----
public conversionDAO() throws SQLException,
NamingException
Context init = new InitialContext();
Context ctx = (Context)
init.lookup("java:comp/env");
DataSource ds = (DataSource)
ctx.lookup("jdbc/conversion");
con = ds.getConnection();
select = con.prepareStatement(
"SELECT rate FROM Exchange WHERE src= ? AND dst =Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem (cont.)
Errors log
2004-06-06 01:07:53 StandardContext[servlets-examples]SessionListener: contextDestroyed()
2004-06-06 01:07:53 StandardContext[servlets-examples]ContextListener: contextDestroyed()
2004-06-06 01:07:53 StandardContext[jsp-examples]SessionListener: contextDestroyed()
2004-06-06 01:07:53 StandardContext[jsp-examples]ContextListener: contextDestroyed()
2004-06-06 01:07:59 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2004-06-06 01:08:00 StandardContext[jsp-examples]ContextListener: contextInitialized()
2004-06-06 01:08:00 StandardContext[jsp-examples]SessionListener: contextInitialized()
2004-06-06 01:08:00 StandardContext[servlets-examples]ContextListener: contextInitialized()
2004-06-06 01:08:00 StandardContext[servlets-examples]SessionListener: contextInitialized()
2004-06-06 01:08:01 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /rates/rates.jsp(5,0) The value for the useBean class attribute converters.conversionDAO is invalid.
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:141)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1217)
at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
----more---- -
I'm using Jdeveloper version 11.1.2.1. I have a encoding problem when creating View Object based on a query. This is my query:
select id, DECODE(id,'11','Индивидуално,'13','Semejno','14','Grupno') naziv
from ins_type
where class_id = '14' and id in ('11', '13', '14')
It is a simple LOV query with cyrilic letters. When I save the ViewObject and re-open it im getting question marks(???????) instead of the cyrilic letters. This only happens in the view object. I dont have other encoding issues when working with cyrilic letters only when im trying to build a View Object based on a query that has cyrilic letters. If i read those values from the database everything is fine
Thanks,Change the encoding of your application to UTF-8 which appears to be sufficient for cyrilic chars. Here is a quick guide on how to do this http://docs.oracle.com/cd/E17984_01/doc.898/e14693/appa_configuring_jdev.htm
You may also need to update any pages that have encoding explicitly set -
Database configuring problem in setup of managed systems in SMD
Hello,
i'm doing the setup of a CRM 5.0 in SMD Abap+Java and the setup results returns following:
"Database configuration problem" with the exception:
java.lang.NullPointerException
at com.sap.smd.server.manager.SMDPluginProperties.setProperty(SMDPluginProperties.java:114)
at com.sap.smd.agent.plugins.database.ConfigurationTask.configureCustomProperties(ConfigurationTask.java:242)
at com.sap.smd.agent.plugins.database.ConfigurationTask.configureProperties(ConfigurationTask.java:370)
at com.sap.smd.agent.plugins.database.ConfigurationTask.execute(ConfigurationTask.java:124)
at com.sap.sup.admin.setup.AppCfgTasks.configureDbApp(AppCfgTasks.java:115)
at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:202)
at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:217)
at com.sap.sup.admin.setup.SapCluster.setup(SapCluster.java:461)
at com.sap.sup.admin.setup.SapCluster.access$000(SapCluster.java:26)
at com.sap.sup.admin.setup.SapCluster$SetupRunner.run(SapCluster.java:669)
at java.lang.Thread.run(Thread.java:534)
Anybody knows which can be the problem?
Thanks a lot
CarlosHi Shriraj,
ensure that the installation path is correct. I only put /urs/sap/<SID> and you must put /usr/sap/<SID>/DV***/.
In my case with that the setup returns all in green.
I hope it helps you
Regards
Carlos -
I generated a document in a solaris machine which follows the encoding scheme "ISO-8859-1". This document contains symbols such as British currency pound symbols.
Now, I am passing this document as an input to my application. My application runs on another machine which follows "US-ASCII 7bit" encoding scheme. Here, the input file undergoes some processing by my application and when I see the file now, the British currency pound symbols is converted to question marks.
To stop this, can I use the -Dfile.encoding option as
java -Dfile.encoding=ISO-8859-1 -classpath.......
Is the format right? will I get any problem changing the format? once I complete running my application will the encoding scheme revert back to the the default one?
Thanks
ShivThat should be fine but you should avoid setting file.encoding for reading only one file. What will you do when your program grows and needs to communicate with the system using the system's own default character encoding? It's better to set the encoding in the program itself, like this:final String ENCODING = "ISO-8859-1";
Reader in = new InputStreamReader(new FileInputStream(file), ENCODING);The encoding does not have to be hardcoded, instead you could use System.getProperty("my.program.encoding", "ISO-8859-1") or what ever. -
Database connection problem when i try store the values in JTable
Hi Sir,
I have a database connection problem when i try to store the data's in a JTable.I think the problem is with in the database connection.I have used 3 vectors here.The database which i have used is
Access.Where the program is compiling well.But when i run it only the first column heading is printed and error message showing that
"Invalid Cursor State".I need to solve this problem.pls. do help me.
I will provide u with the code.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.sql.*;
public class DataBaseVector extends JPanel
//Container contentPane=getContentPane();
JScrollBar jsb = new JScrollBar(JScrollBar.HORIZONTAL);
JScrollBar jsb1 = new JScrollBar(JScrollBar.VERTICAL);
Image i1;
String url="jdbc:odbc:Ananth";
Vector col=new Vector();
Vector rows=new Vector();
Vector rdata=new Vector();
Connection conn;
public DataBaseVector()
//super("JTable With ScrollBars");
this.setLayout(new BorderLayout());
UIManager.put("ScrollBar.track",Color.red);
UIManager.put("ScrollBar.thumb",Color.blue);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection(url); // Is there any problem here?
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("Select * from AccountMaster");
// rs is the result set obtained
ResultSetMetaData rsmd=rs.getMetaData();
int cols=rsmd.getColumnCount();
for(int i=1;i<=cols;i++)
col.addElement(rsmd.getColumnName(i));
rdata.addElement(rs.getString(i));
rows.addElement(rdata);
}catch(Exception e)
System.out.println("The Error Message was:"+e.getMessage());
JTable jt=new JTable(rows,col);
int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
JScrollPane jsp=new JScrollPane(jt,v,h);
this.add(jsp,BorderLayout.CENTER);
this.add(jsb, BorderLayout.SOUTH);
this.add(jsb1, BorderLayout.EAST);
public static void main(String args[])
JFrame jf=new JFrame();
JPanel frame=new DataBaseVector();
jf.getContentPane().add(frame);
jf.setSize(800,600);
jf.setVisible(true);
Thanx,
m.ananthuThe problem is ResultSet.next() is not called.
Try this and modify the table creation as you need.
ResultSetMetaData rsmd=rs.getMetaData();
int cols=rsmd.getColumnCount();
while(rs.next()) {
for(int i=1;i<=cols;i++)
col.addElement(rsmd.getColumnName(i));
rdata.addElement(rs.getString(i));
rows.addElement(rdata);
Hope this helps -
XML deserialize and decrypting encoding problem. Please help me
This is my first topic here, so at first I'd like to say "Hi" everyone and apologise for my bad english ;)
I have just finished my new application about signing/checking and encrypting/decrypting XML files. I use Apache XML Security packages to do this.
Everything works fine, instead of one...
I'm Polish and sometimes I have to encrypt or decrypt XML which includes polish letters like: 'ą' , 'ę', 'ł' and some others... If I encrypt such file, it succeeds. The problem is when I try to decrypt such an encrypted file. I recieve an error like :
"[Fatal Error] :2:7: An invalid XML character (Unicode: 0x19) was found in the element content o
f the document.
gov.mf.common.exceptions.SenderException: E_SENDER_DECRYPTION
at gov.mf.common.xml.encryption.EncryptTool.decrypt(Unknown Source)
at gov.mf.CERBER.TestCBR.main(Unknown Source)
Caused by: org.apache.xml.security.encryption.XMLEncryptionException: An invalid XML character
(Unicode: 0x19) was found in the element content of the document.
Original Exception was org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x19)
was found in the element content of the document.
at org.apache.xml.security.encryption.XMLCipher$Serializer.deserialize(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher.decryptElement(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown Source)
... 2 more
What's wrong? My XML document is UTF-8 encoded, with or without BOM. I wrote in in Notepad++ or any other editior which has UTF-8 encoding.
I'm parsing my XML with DOM. There is an interesting line in an error above like: " at org.apache.xml.security.encryption.XMLCipher$Serializer.deserialize(Unknown Source)" , do you know that?
Everything is fine when I try to encrypt/decrypt '�' or 'ń', but things go wrong with 'ą', 'ę', 'ł' and others... I also managed to encrypt and decrypt 'ł' but unfortunately, after decryption 'ł' turns into 'B'. It obviously an encoding problem, but how to fix it?
I would be really thankfull if some of You guys would help me.
Looking forward fo any answers.
Matthew
Message was edited by:
matthew_plHi once again.
I still don't havy any solution to my problem. I used Apache XML Security examples to encrypt/decrypt my XML document with Polish charaters but I also recieve the same error. What's wrong?
Here is some code:
----- Parsing XML do Document ------
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
//Bardzo wazna linijka - bless TEK ;)
factory.setNamespaceAware(true);
DocumentBuilder builder;
builder = factory.newDocumentBuilder();
File f = new File(Const.FILE_IN_PATH + File.separator + Const.FILE_IN);
org.w3c.dom.Document doc = builder.parse(f);
---------- Encrypting & Decrypting XML document (whole class) -------------
import java.io.*;
import java.security.*;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.apache.xml.security.keys.KeyInfo;
import org.apache.xml.security.utils.EncryptionConstants;
import org.apache.xml.security.encryption.XMLCipher;
import org.apache.xml.security.encryption.EncryptedData;
import org.apache.xml.security.encryption.EncryptedKey;
public class EncryptTool
private PublicKey publicKey;
private PrivateKey privateKey;
static
org.apache.xml.security.Init.init();
public EncryptTool()
publicKey = KeyStores.getCerberPublicKey();
privateKey = KeyStores.getCerberPrivateKey();
public Document encrypt(Document doc, String sufix)
try
byte[] passPhrase = "24 Bytes per DESede key!".getBytes("UTF-8");
DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
SecretKey secretKey = keyFactory.generateSecret(keySpec);
XMLCipher keyCipher = XMLCipher.getInstance(XMLCipher.RSA_v1dot5);
keyCipher.init(XMLCipher.WRAP_MODE, publicKey);
EncryptedKey encryptedKey = keyCipher.encryptKey(doc, secretKey);
Element elementToEncrypt = (Element) doc.getDocumentElement();
System.out.println("Szyrfuję: " + elementToEncrypt.getTextContent());
XMLCipher xmlCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES);
xmlCipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
EncryptedData encryptedDataElement = xmlCipher.getEncryptedData();
KeyInfo keyInfo = new KeyInfo(doc);
keyInfo.add(encryptedKey);
encryptedDataElement.setKeyInfo(keyInfo);
boolean encryptContentsOnly = true;
xmlCipher.doFinal(doc, elementToEncrypt, encryptContentsOnly);
// output the resulting document
String [] parts = Const.FILE_IN.split("\\.");
String saveAs = Const.FILE_OUT_PATH + File.separator + parts[0] + sufix + "." + parts[1];
OutputStream os = new FileOutputStream(saveAs);
XMLUtil.sameXMLtoFile(doc, os);
} catch (Exception ex)
throw new TestCBRException("E_CERBER_ENCRYPTION", ex);
return doc;
public void decrypt(Document doc, String sufix) throws SenderException
try
String namespaceURI = EncryptionConstants.EncryptionSpecNS;
String localName = EncryptionConstants._TAG_ENCRYPTEDDATA;
int ile = doc.getElementsByTagNameNS(namespaceURI, localName).getLength();
if (ile == 0) throw new SenderException("E_SENDER_DECRYPTION_NEEDED");
for(int i=0; i < ile; i++)
Element encryptedDataElement = (Element) doc.getElementsByTagNameNS(namespaceURI, localName).item(0);
XMLCipher xmlCipher = XMLCipher.getInstance();
xmlCipher.init(XMLCipher.DECRYPT_MODE, null);
xmlCipher.setKEK(privateKey);
xmlCipher.doFinal(doc, encryptedDataElement);
String [] parts = Const.FILE_IN.split("\\.");
String saveAs = Const.FILE_OUT_PATH + parts[0] + sufix + "." + parts[1];
OutputStream os = new FileOutputStream(saveAs);
XMLUtil.saveXMLtoFile(doc, os);
} catch (SenderException ex) {
throw ex;
} catch (Exception ex) {
throw new SenderException("E_SENDER_DECRYPTION", ex);
Please help me. I'm going into madness what's wrong with it... -
Loading Java Sneak Preview freezes at Load Java Database
I have tried installing the java sneak preview on two different machines and it freezes everytime at Load Java Database. I searched the form and found a similiar post with no response. Has anyone had this problem or any ideas.
1st Box was WinXp 1gig ram p42.8
2nd Box was Win2003 1gig p41.8Agustin,
Were you able to solve your situation ?
I have the same situation, I have an ABAP NW2004s (v7.00 SP8) installed and working on my PC. I am trying to install the Java NW2004s FULL on the same PC, and after entering the location for the JCE files, the setup displays message:
Collecting information about installed SAP systems: checking SAP service SAPNSP_00...
then an error comes up, the log has the following :
ERROR 2006-11-16 15:03:13
FJS-00003 TypeError: this._name has no properties (in script NW_Java_OneHost|ind|ind|ind|ind, line 8987: ???)
ERROR 2006-11-16 15:03:13
FCO-00011 The step collect with step key |NW_Java_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_GetSidNoProfiles|ind|ind|ind|ind|1|0|collect was executed with status ERROR .
I am installing on a PC WIn XP SP2, with 1GB of RAM, and have 16.7 GB available on the Hard Disk.
Please let me know, thanks -
Error Installing at phase 22, load Java Database Content
I am using XP SP1. I got the error at phase 22, load Java Database Content. The following is the log file.
Please help.
James
SAPinst is getting started.
Please be patient ...
guiengine: login in process.
ERROR 2005-09-03 06:00:14 [ianxbservi.hpp:235]
CServiceHandle::Open(SAPOsCol)
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPOsCol).
ERROR 2005-09-03 06:00:44 [ianxbservi.hpp:235]
CServiceHandle::Open(SAPJ2E_01)
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_01).
ERROR 2005-09-03 06:00:44 [ianxbservi.hpp:235]
CServiceHandle::Open(SAPJ2E_01)
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_01).
ERROR 2005-09-03 06:00:44 [ianxbservi.hpp:235]
CServiceHandle::Open(SAPJ2E_00)
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_00).
ERROR 2005-09-03 06:00:44 [ianxbservi.hpp:235]
CServiceHandle::Open(SAPJ2E_00)
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_00).
ERROR 2005-09-03 06:01:32 [ianxbservi.hpp:235]
CServiceHandle::Open(SAPOsCol)
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPOsCol).
ERROR 2005-09-03 06:53:19
CJSlibModule::writeError_impl()
CJS-20065 Execution of JLoad tool 'C:\j2sdk1.4.2_08/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;c:\sapdb\programs\runtime\jar\sapdbc.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jce_export.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jsse.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_smime.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_ssl.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'J2E,jdbc/pool/J2E,C:\usr\sap\J2E\SYS\global/security/data/SecStore.properties,C:\usr\sap\J2E\SYS\global/security/data/SecStore.key' '-dataDir' 'C:/@SAP/NW04SneakPrevJavaSP11/NW04SneakPrevJavaSP11/NWSneakPreviewSP11/SAP_NetWeaver_04_SR_1_Installation_Master_DVD__ID__51030843\IM01_NT_I386\..\..\SneakPreviewContent\JDMP' '-job' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/IMPORT.XML' '-log' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log'' aborts with returncode 2. Check 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log' and 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.java.log' for more information.
ERROR 2005-09-03 11:56:24
CJSlibModule::writeError_impl()
CJS-20065 Execution of JLoad tool 'C:\j2sdk1.4.2_08/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;c:\sapdb\programs\runtime\jar\sapdbc.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jce_export.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jsse.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_smime.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_ssl.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'J2E,jdbc/pool/J2E,C:\usr\sap\J2E\SYS\global/security/data/SecStore.properties,C:\usr\sap\J2E\SYS\global/security/data/SecStore.key' '-dataDir' 'C:/@SAP/NW04SneakPrevJavaSP11/NW04SneakPrevJavaSP11/NWSneakPreviewSP11/SAP_NetWeaver_04_SR_1_Installation_Master_DVD__ID__51030843\IM01_NT_I386\..\..\SneakPreviewContent\JDMP' '-job' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/IMPORT.XML' '-log' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log'' aborts with returncode 2. Check 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log' and 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.java.log' for more information.
ERROR 2005-09-03 11:56:40
CJSlibModule::writeError_impl()
CJS-20065 Execution of JLoad tool 'C:\j2sdk1.4.2_08/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;c:\sapdb\programs\runtime\jar\sapdbc.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jce_export.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jsse.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_smime.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_ssl.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'J2E,jdbc/pool/J2E,C:\usr\sap\J2E\SYS\global/security/data/SecStore.properties,C:\usr\sap\J2E\SYS\global/security/data/SecStore.key' '-dataDir' 'C:/@SAP/NW04SneakPrevJavaSP11/NW04SneakPrevJavaSP11/NWSneakPreviewSP11/SAP_NetWeaver_04_SR_1_Installation_Master_DVD__ID__51030843\IM01_NT_I386\..\..\SneakPreviewContent\JDMP' '-job' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/IMPORT.XML' '-log' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log'' aborts with returncode 2. Check 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log' and 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.java.log' for more information.
ERROR 2005-09-03 12:00:42
CJSlibModule::writeError_impl()
CJS-20065 Execution of JLoad tool 'C:\j2sdk1.4.2_08/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;c:\sapdb\programs\runtime\jar\sapdbc.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jce_export.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jsse.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_smime.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_ssl.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'J2E,jdbc/pool/J2E,C:\usr\sap\J2E\SYS\global/security/data/SecStore.properties,C:\usr\sap\J2E\SYS\global/security/data/SecStore.key' '-dataDir' 'C:/@SAP/NW04SneakPrevJavaSP11/NW04SneakPrevJavaSP11/NWSneakPreviewSP11/SAP_NetWeaver_04_SR_1_Installation_Master_DVD__ID__51030843\IM01_NT_I386\..\..\SneakPreviewContent\JDMP' '-job' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/IMPORT.XML' '-log' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log'' aborts with returncode 2. Check 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log' and 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.java.log' for more information.
ERROR 2005-09-03 12:00:47
CJSlibModule::writeError_impl()
CJS-20065 Execution of JLoad tool 'C:\j2sdk1.4.2_08/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;c:\sapdb\programs\runtime\jar\sapdbc.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jce_export.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_jsse.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_smime.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/iaik_ssl.jar;C:/usr/sap/J2E/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'J2E,jdbc/pool/J2E,C:\usr\sap\J2E\SYS\global/security/data/SecStore.properties,C:\usr\sap\J2E\SYS\global/security/data/SecStore.key' '-dataDir' 'C:/@SAP/NW04SneakPrevJavaSP11/NW04SneakPrevJavaSP11/NWSneakPreviewSP11/SAP_NetWeaver_04_SR_1_Installation_Master_DVD__ID__51030843\IM01_NT_I386\..\..\SneakPreviewContent\JDMP' '-job' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/IMPORT.XML' '-log' 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log'' aborts with returncode 2. Check 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.log' and 'C:\Program Files\sapinst_instdir\NW04SR1\WEBAS_COPY\ONE_HOST/jload.java.log' for more information.
Exit status of child: 1Yes, you need to download the new installer or you need to change your system setting timezone settings to GMT+1. I faced this problem too but once you are in the middle of installing it, there will be something somewhere missing. The best thing to do is to uninstall the application and unmount the database instance. Uninstall utility 'UNINSTSAP.EXE' is available in the "C:\usr\sap\J2E\JC00" location.
Look at the steps mentioned in the following post by Prakash Gowda.
Error during Load Java Database content at phase 18
Hope this helps and please don't forget to close the thread if answered.
Srinivas -
Hi all,
the step
Load Java database content
during the installation of the SneakPreview SP11 takes now more than 1 hour. Is this the normal duration?
Is there any logfile or something to check the progress?
All comments are appreciated.
JuergenI have run into a similar problem while installing the Java Edition. The install process stops at the 18th step which is "Load Java Database Content" with an error message. The error text is:
"An error occurred while processing service SAP NetWeaver Sneak Preview 04 Support Release 1> Migration - Target System Installation."
I have tried the installation about 6 times on different systems and it stops at the same step. -
How to detect the root cause of XML encoding problem ?
Hi,
I need to identify the exactly root cause of error when parssing a XML ( ISO-8859-1 encoding) problem.
How can I do this using JAVA ?
regards
ICPHi dekassegui,
Thanks for your response
The error is an error from Oracle HTTP adapter servlet. The message error is : "oracle.xml.parser.v2.XMLParseException"
My intention is to verify the data before thats receieved by the adapter and the servlet.
I did my own servlet extending the orgirinal servlet to show and log the entire received content. The content looks "OK".
Now I would like to check a possible special character or symbol unsupported by enconding.
The Input data is aware of my control. But if the error could be detected, message senders will correct this.
My major problem is to ensure what is the root cause of the error.
regards,
ICP
Maybe you are looking for
-
Why is visual voicemail free for iPhone but not for other phones?
I recently activated an iPhone on my line -- temporarily -- and found that visual voicemail was included and didn't cost a dime. Can anyone explain why visual voicemail is free for iPhones but if you want it for any other phone it bears a monthly cha
-
Why isn't the itunes store search box working?
Okay so I type something into the search box and hit enter but then an error message pops up saying: We could not complete your itunes store request. An unkown error occured (0x00090320). What could be causing this and how do i fix it?
-
Workitem ID wise to get the Object value
Hi All, is it possible to get the object value form Workitem id wise. for example workitem id '446085' based on that workitem id i want to retrieve the object value. Please clarify., Thanks & Regards K.Gunasekar.
-
Changing availability Status for event in iCal
How do I change the availability status for an event in iCal Version 7.0 (1835.1)?
-
Flex Component Kit for Adobe Flash Professional CS4
I installed Flex Component Kit for Adobe Flash Professional CS4 and nothing appears at Command menu. I use OSX 10.6 portuguese language. Any suggestion?