-
1. Re: CMR collection problem in jboss-3.0.3
aloubyansky Oct 21, 2002 3:03 AM (in response to iris)Are you sure this line
Collection profiles = user.getProfiles();
throws the excpetion? Post the other code that follows this line. Note, further, profiles collection must be used in the same transaction in which the line with getProfiles() was executed. -
2. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 6:57 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
3. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 6:57 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
4. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 6:58 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
5. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 6:59 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
6. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 7:01 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
7. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 7:01 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
8. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 8:46 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
9. Re: CMR collection problem in jboss-3.0.3
iris Oct 21, 2002 8:46 AM (in response to iris)I'm sure it is the line user.getProfiles() that throws the exception because the exception still when I comment
the code that follows, and the exception is not thrown if
I comment the line user.getProfiles().
And I use the collection in the same method that user.getProfiles() ; :
public Enumeration members() {
System.out.println("Call to members of ProfilesGroup") ;
try {
Collection tmp = userHome.findByName(userName) ;
if ( tmp == null || tmp.isEmpty() )
return null ;
User user = (User)tmp.iterator().next() ;
System.out.println("User: "+user.getName()) ;
Collection profiles = user.getProfiles() ;
ArrayList principals = new ArrayList() ;
Iterator it = profiles.iterator();
for (; it.hasNext();) {
Profile profile = (Profile)it.next() ;
System.out.println("profil: "+profile.getTitle()) ;
principals.add(new MyPrincipal(profile.getTitle())) ;
}
return Collections.enumeration(principals) ;
} catch (FinderException find) {
System.err.println("FinderException") ;
return null ;
} catch (Exception e) {
e.printStackTrace() ; // to see the exception about the CMR
return null ;
}
}
(this exception is when I use jboss3.0.3 but not when I use jboss3.0.0)
thanks for ideas.
Iris -
10. Re: CMR collection problem in jboss-3.0.3
iris Oct 23, 2002 8:52 AM (in response to iris)Excuse me,
It seems I had a problem with the submit "Post Message".
Iris