A Moscow court also jailed a student for two months for making positive statements online about a Ukrainian paramilitary group.
The court also opened a treason case against a Siberian man accused of taking orders from a "foreign organisation".
Russia has led a huge crackdown at home as troops fight in Ukraine, regularly arresting its citizens for criticism of the Kremlin's offensive.
In Saint Petersburg, the Petrograd district court opened the trial of teenager Daria Kozyreva.
She was arrested in February for posting on the city's statue of Ukrainian national poet Taras Shevchenko a verse from one of its poems.
"Oh bury me, then rise ye up. And break your heavy chains," the verse read, in Ukrainian.
She posted it on February 24, the second anniversary of Moscow's Ukraine offensive.
Kozyreva was charged with "discrediting the Russian army", the authorities having initiated a criminal case after two administrative offences linked to anti-war protest acts.
"This whole accusation is sewn with white thread," Kozyreva said in court, Russian independent website Mediazona reported -- a Russian expression that means an obvious lie.
In the far eastern Primorye region, authorities jailed a 19-year-old student for almost two months for "publicly justifying" a banned Ukrainian paramilitary group online.
He risks up to seven years in prison.
And the authorities in Siberia's Tyumen region opened a treason case against a local programmer, accused by the FSB security service of taking orders from an unnamed "foreign organisation".
Russia has also opened a criminal case against the exiled chief editor of newspaper Novaya Gazeta, Kirill Martynov for creating an "undesirable" group.
Moscow branded Novaya Gazeta Europe -- which operates from outside Russia -- "undesirable" in June last year. Russia has banned criticism of its Ukraine campaign.