powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / JDBC postgresql, Eclipse & AJAX
2 сообщений из 2, страница 1 из 1
JDBC postgresql, Eclipse & AJAX
    #33879519
Я сделал прогу
package ru.cerif.client;
import java.sql.SQLException;
import org.postgresql.core.ConnectionFactory;
import org.postgresql.core.ProtocolConnection;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.SourcesTableEvents;
import com.google.gwt.user.client.ui.TableListener;
import com.google.gwt.user.client.ui.TextBox;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class cerif implements EntryPoint {

/**
* This is the entry point method.
*/
private int old_row=-1,old_column=-1;
private String data[][];
private void FillDataFromDatabase() throws SQLException
{
ProtocolConnection conn = ConnectionFactory.openConnection("localhost", 5432, "postgres", "12345", null);


}
public void onModuleLoad() {
try
{
FillDataFromDatabase();
}
catch(Exception ex)
{
Window.alert(ex.toString());
return;
}
final Grid myGrid = new Grid();
final TextBox box = new TextBox();
box.setWidth("137");
box.setHeight("20");
myGrid.setVisible(true);
myGrid.setStyleName("table");
myGrid.resize(20, 5);
myGrid.setBorderWidth(1);
data = new String[19][5];
for (int i = 0; i < 5; i++)
{
myGrid.setText(0, i, "Header "+String.valueOf(i));
}
for (int row = 0; row < 20; row++)
for (int cell = 0; cell < 5; cell++)
{
myGrid.getCellFormatter().setHeight(row, cell, "24");
myGrid.getCellFormatter().setWidth(row, cell, "138");
if (row>0)
{
data[row-1][cell] = "";
}
}
myGrid.setHeight("500");
myGrid.setWidth("700");
myGrid.getAbsoluteLeft();
myGrid.setCellPadding(0);
myGrid.setCellSpacing(0);
myGrid.addTableListener( new TableListener(){
public void onCellClicked(SourcesTableEvents sender, int row, int cell)
{
if (row==0)
{
if (old_row > 0)
{
data[old_row-1][old_column] = box.getText();
if ( data[old_row-1][old_column] == "")
myGrid.setText(old_row, old_column, " ");
else myGrid.setText(old_row, old_column, data[old_row-1][old_column]);
}
return;
}
if (old_row > 0)
{
data[old_row-1][old_column] = box.getText();
if ( data[old_row-1][old_column] == "")
myGrid.setText(old_row, old_column, " ");
else myGrid.setText(old_row, old_column, data[old_row-1][old_column]);
}
myGrid.setWidget(row, cell, box);
old_row = row;
old_column = cell;
box.setText(data[row-1][cell]);
box.setFocus(true);
}
});
RootPanel.get("slot1").add(myGrid);
RootPanel.get("slot1").setWidgetPosition(myGrid, 0, 0);
}
}
я в eclipse подключил postgresql-8.1-407.jdbc3.jar, он видит эту библиотеку
но когда я запускаю прогу мне пишет что
Analyzing source in module 'ru.cerif.cerif'
[ERROR] Errors in 'W:\home\test1.ru\src\ru\cerif\client\cerif.java'
[ERROR] Line 4: The import java.sql cannot be resolved
[ERROR] Line 6: The import org cannot be resolved
[ERROR] Line 7: The import org cannot be resolved
[ERROR] Line 26: SQLException cannot be resolved to a type
[ERROR] Line 28: ProtocolConnection cannot be resolved to a type
[ERROR] Line 28: ConnectionFactory cannot be resolved
Finding entry point classes
[ERROR] Unable to find type 'ru.cerif.client.cerif'
[ERROR] Hint: Previous compiler errors may have made this type unavailable

[ERROR] Hint: Check the inheritance chain from your module; it may not be
inheriting a required module or a module may not be adding its source path entri
es properly
[ERROR] Build failed
кто может, подскажите в чем дело!!!
...
Рейтинг: 0 / 0
JDBC postgresql, Eclipse & AJAX
    #33880686
niinu
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
автор[ERROR] Build failed
если это ANT, то он не видит PATH в Eclipse
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / JDBC postgresql, Eclipse & AJAX
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]