Мария Григорьева Escribio :-)
> Hello!
>
> I'm using OJB!!!
>
> The problem is:
>
> I want to make a test on insert.
>
>
>
> Here is my sample-function:
>
>
>
> public void doInsertTest() {
>
> Dept[] depts = null;
>
> for (int i = 0; i < 5; i++) {
>
> depts[i].setDeptno(i);
>
> depts[i].setDname("Hello");
>
> }
>
> Object deptObj = depts;
>
> for (int i = 0; i < depts.length; i++) {
>
> Dept dept = (Dept) deptObj;
>
> broker.store(dept);
>
> }
Hi There.
try: Dept[] depts = new Dept[5];
or
for (int i=1; i<=5; i++) {
Dept dept = new Dept();
dept.setDeptno(i);
dept.setDname("Hello - " + i);
broker.store(dept);
}
something like that.
Cheers.
Carlos Chávez.
>
> long time = System.currentTimeMillis();
>
> sendPage("screens/test-template", new VarMap().add("test",
> time));
>
> }
>
>
>
> But I've got java.lang.NullPointerException:
>
>
>
> Depts are staying null!
>
>
>
>
>
> What should I do?
>
> How to pass an array to this function?
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]