Buggy code:
@ ManagedBean ( name = "userView" ) @ SessionScoped public class userView { private int id ; private String name ; private String last_name ; private double mittel ; private double mittelstar ; private Date birthdate ; private int car ; private String abouttext ; private int sex ; private String street ; private int plz ; private String phone ; private boolean [ ] [ ] daytimeavailable ; private int anzahl ; private ArrayList < RatingResults > RatingList ; public ArrayList < RatingResults > getRatingList ( ) { } public int getAnzahl ( ) { } public void setAnzahl ( int anzahl ) { } public double getMittelstar ( ) { } public void setMittelstar ( double mittelstar ) { } public double getMittel ( ) { } public void setMittel ( double mittel ) { } public void setRatingList ( ArrayList < RatingResults > ratingList ) { } public String getName ( ) { } public void setName ( String name ) { } public String getLast_name ( ) { } public void setLast_name ( String last_name ) { } public Date getBirthdate ( ) { } public void setBirthdate ( Date birthdate ) { } public int getCar ( ) { } public void setCar ( int car ) { } public String getAbouttext ( ) { } public void setAbouttext ( String abouttext ) { } public int getSex ( ) { } public void setSex ( int sex ) { } public String getStreet ( ) { } public void setStreet ( String street ) { } public int getPlz ( ) { } public void setPlz ( int plz ) { } public String getPhone ( ) { } public void setPhone ( String phone ) { } public boolean [ ] [ ] getDaytimeavailable ( ) { } public void setDaytimeavailable ( boolean [ ] [ ] daytimeavailable ) { } DataSource ds ; public String showProfil ( int id ) { } private void mittel ( ) { } public void getRatings ( int id ) throws SQLException { PreparedStatement ps = null ; Connection con = null ; ResultSet rs = null ; if ( ( ds ) != null ) { try { con = ds . getConnection ( ) ; if ( con != null ) { <START_BUG> String sql = ( ( ( "select<seq2seq4repair_space>id,<seq2seq4repair_space>buyer_id,<seq2seq4repair_space>advertiser_id,<seq2seq4repair_space>rating,<seq2seq4repair_space>text,<seq2seq4repair_space>ad_id<seq2seq4repair_space>from<seq2seq4repair_space>rating<seq2seq4repair_space>where<seq2seq4repair_space>buyer_id<seq2seq4repair_space>=<seq2seq4repair_space>" + id ) + "<seq2seq4repair_space>or<seq2seq4repair_space>advertiser_id<seq2seq4repair_space>=<seq2seq4repair_space>" ) + id ) + ";" ; <END_BUG> System . out . println ( sql ) ; ps = con . prepareStatement ( sql ) ; rs = ps . executeQuery ( ) ; System . out . println ( "QUery<seq2seq4repair_space>geht" ) ; ArrayList < RatingResults > TempList = new ArrayList < RatingResults > ( ) ; while ( rs . next ( ) ) { System . out . println ( "was<seq2seq4repair_space>gefunden" ) ; RatingResults TempObj = new RatingResults ( ) ; TempObj . setId ( rs . getInt ( "id" ) ) ; TempObj . setBuyerid ( rs . getInt ( "buyer_id" ) ) ; TempObj . setAdvertiserid ( rs . getInt ( "advertiser_id" ) ) ; TempObj . setRating ( rs . getInt ( "rating" ) ) ; TempObj . setAdid ( rs . getInt ( "ad_id" ) ) ; TempObj . setText ( rs . getString ( "text" ) ) ; System . out . println ( "wird<seq2seq4repair_space>liste<seq2seq4repair_space>hinzugefuegt" ) ; System . out . println ( rs . getInt ( "id" ) ) ; System . out . println ( rs . getInt ( "buyer_id" ) ) ; System . out . println ( rs . getInt ( "advertiser_id" ) ) ; System . out . println ( rs . getInt ( "rating" ) ) ; System . out . println ( rs . getInt ( "ad_id" ) ) ; System . out . println ( rs . getString ( "text" ) ) ; System . out . println ( TempObj ) ; TempList . add ( TempObj ) ; System . out . println ( "wurde<seq2seq4repair_space>liste<seq2seq4repair_space>hinzugefuegt" ) ; } RatingList = TempList ; } } finally { try { con . close ( ) ; ps . close ( ) ; } catch ( SQLException sqle ) { sqle . printStackTrace ( ) ; } } } System . out . println ( "jetzt<seq2seq4repair_space>return" ) ; } private void showTimes ( int id ) { } public userView ( ) { } public int getId ( ) { } public void setId ( int id ) { } }

Fix:
String sql = ( "select<seq2seq4repair_space>id,<seq2seq4repair_space>buyer_id,<seq2seq4repair_space>advertiser_id,<seq2seq4repair_space>rating,<seq2seq4repair_space>text,<seq2seq4repair_space>ad_id<seq2seq4repair_space>from<seq2seq4repair_space>rating<seq2seq4repair_space>where<seq2seq4repair_space>buyer_id<seq2seq4repair_space>=<seq2seq4repair_space>" + id ) + ";" ;