Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Java [игнор отключен] [закрыт для гостей] / dom4j problem - java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader / 1 сообщений из 1, страница 1 из 1
25.06.2012, 18:51:18
    #37853799
just_in_time
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
dom4j problem - java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader
Итак я пытаюсь заюзать dom4j в своем проекте. Добавил dom4j-1.6.1.jar в сборку.

Код: java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
import java.io.File;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;


public static void openQueue(TableLayout queueTable, File queueFile,
			LayoutInflater inflater) {

		StringBuilder text = new StringBuilder();

		queueTable.removeAllViews();

		SAXReader reader = new SAXReader();
		
		try {
			Document document = reader.read(queueFile);
			
			Element root  = document.getRootElement();

			TableRow row = (TableRow) inflater.inflate(
					R.layout.sample_table_row, queueTable, false);
			
			((TextView) row.findViewById(R.id.sampleNameLabel))
			.setText(root.selectSingleNode("/sampleName").getStringValue());

			
			((TextView) row.findViewById(R.id.methodLabel)).setText(root.selectSingleNode("/method").getStringValue());

			((TextView) row.findViewById(R.id.nInjectLabel))
					.setText(root.selectSingleNode("/nInject").getStringValue());

			((TextView) row.findViewById(R.id.injectVolumeLabel))
					.setText(root.selectSingleNode("/injectVolume").getStringValue());

			((TextView) row.findViewById(R.id.typeLabel)).setText(root.selectSingleNode("/type").getStringValue());

			((TextView) row.findViewById(R.id.concLabel)).setText(root.selectSingleNode("/conc").getStringValue());

			row.setOnClickListener(new TableRowOnClickListener(row,
					queueTable));

			row.setOnClickListener(new TableRowOnClickListener(row,
					queueTable));
			
			queueTable.addView(row);
			
		} catch (DocumentException e1) {
			// TODO Auto-generated catch block
			Log.d("sielc", "error parsing doc of queue " + e1);
		}
	
	}




И собственно при попытке распарсить фаил я получаю эксепшн:

java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader


Видимо я что то упустил?
...
Рейтинг: 0 / 0
Форумы / Java [игнор отключен] [закрыт для гостей] / dom4j problem - java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader / 1 сообщений из 1, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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