TORONTO (AP) -- Seven years in the NBA has taught LeBron James the importance of patience. It is being tested after Cleveland started its new season with two straight losses.
Andrea Bargnani scored 28 points, Chris Bosh had 21 points and 16 rebounds, and the Toronto Raptors overcame James' 25th career triple-double to beat the Cleveland Cavaliers 101-91 on Wednesday night.
''Early in my career, I'd get very upset when you lose two or three games, you'd just feel like you can't turn it around,'' James said. ''But I'm at a point in my career now where I know that you can lose two but, at the same time, you don't look too far into it. You learn from the mistakes and you just try to get better.''
James had 23 points, 12 assists and 11 rebounds, but Cleveland opened its season with consecutive losses for the first time since an 0-3 start in 2004-05. James scored 38 points in Tuesday's 95-89 home loss to Boston.
''I'm still positive,'' James said. ''If it was 25 or 35 games into the season and we were going through a three- or four-game losing streak, then I'd be a little bit disappointed, but I'm not at this point.''
Mo Williams scored 16 points and Shaquille O'Neal had 12 for Cleveland, which had won five straight over Toronto and nine of 10.
''Coach is still learning us, we're still learning the system, we're still learning each other,'' O'Neal said. ''It's going to be a work in progress.''
Cavaliers coach Mike Brown said his team has work to do at each end of the court.
''There were stretches where we struggled offensively and there were stretches where we struggled defensively,'' Brown said. ''To struggle the way we did on both ends of the floor is going to result in a loss.''
Hedo Turkoglu scored 12 points in his Raptors debut and Marco Belinelli had 10. Jose Calderon had 11 assists for Toronto, but Bargnani's performance was the talk of the locker room.
''If Andrea gets it going and is scoring the basketball a lot, then we are going to be tough to beat,'' Bosh said.
Trailing 78-71 to start the fourth, Brown left James on the bench and Toronto took advantage, outscoring the Cavaliers 9-3 and building an 87-74 lead by the time James returned with 8:40 remaining.
Brown said he wants James, who played 45 minutes Tuesday, to average 38 minutes in the regular season. James played 40 minutes against Toronto.
''The bottom line is this is the second game of the year and I've got to make sure I don't play him too many minutes,'' Brown said.
Even with James back, Cleveland struggled to cut into the lead. A pair of free throws by Williams and a 3-pointer by Daniel Gibson cut it to 93-83 with 4:06 left, but Antoine Wright answered with a 3-pointer for Toronto.
James wasn't done, making one free throw, then following up a miss from the line with a 3-pointer from the top to cut it to 96-90 with 1:37 left.
Toronto guard Jarrett Jack stopped the run with a free throw and, after James made one more from the line, Turkoglu made a free throw and Calderon converted a three-point play.
Bargnani had 13 points in the first while James was held to just three, making one of three shots, as Toronto led 27-22.
Belinelli had 10 points, Bargnani scored eight more and the Raptors shot 10 for 17 in the second as the Cavaliers stumbled, going just 6 for 22. Toronto closed the second on a 16-7 run and led 57-39 at the break.
James made four of Cleveland's six shots in the second and had 14 points at the half.
It was Toronto's turn to go cold in the third, as the Raptors shot 6 for 15. Cleveland, meanwhile, used five 3-pointers to get back into it, and trailed 78-71 heading into the fourth.
Notes: Cleveland was an NBA-best 16-3 in the second game of back-to-backs last season. ... Calderon was honored at center court before the game for posting an NBA-record 98.1 free throw percentage last season, making 151 of 154. Calderon later missed his first two free throws, the first time he'd done that since Apr. 9, 2007, at Minnesota. ... Cleveland's last loss to Toronto had been a 91-82 defeat on Nov. 30, 2007, a game that James skipped because of a sprained left index finger. ... James scored a career-high 56 points in a 105-98 loss at Toronto on March 20, 2005.