For six months, Heinrich Traublinger did not manage to fill a vacancy at his bakery near Munich. For about the same length of time, Daniel Henares was looking for work after being laid off from the tire factory where he worked near Barcelona.

Now Henares has begun a new life as a German baker in what amounts to a small step toward solving one of the continent’s most glaring imbalances. While Spain’s unemployment rate is one of the highest in the Western world, in Germany the problem is the opposite: a dearth of labor in one of the wealthiest and most economically successful parts of Europe.

“It is getting very difficult to find qualified people,” says Traublinger, whose family company employs 150 people besides Henares. “Unemployment is so low. There just aren’t the qualified people on the market. Everyone wants to hold on to the people they have.”

Even amid the euro-zone debt crisis, German employers say their “Fachkraeftemangel” — the shortage of skilled labor — is one of their biggest problems as they grapple with the changes that an aging and shrinking population is bringing to the workforce.

A recent study from the Robert Bosch foundation suggested the workforce could shrink by about 6 million, or some 12 percent, by 2030 without remedial action. In Munich, advertisements proliferate for training schemes in fields such as engineering, with employers seeking the next generation of workers to keep the German economy humming.

Bringing workers from outside Germany is only a small part of what politicians say must be a range of solutions to the labor shortage, including getting more women into the workforce and keeping older employees in work for longer. But migration is also a solution that chimes with the grim employment situation in other parts of Europe.

Latest figures from Germany’s labor office show that almost 500,000 workers from Spain, Portugal, Italy and Greece are working in Germany — an increase of 8 percent over the previous 12 months.

With labor shortages so acute, Germany must do even more to attract skilled workers, says Dirk Palige, managing director of the ZDH, a national organization representing skilled trades.

“Sitting and hoping people come is not enough. We have to go actively to people as we have done in Germany,” he says.

The companies that are represented by his organization find it difficult to compete with big multinationals such as BMW and Siemens to recruit workers, Palige says. Two-thirds say they have recruitment difficulties, with 30,000 unfilled jobs in the past few years.

The care home sector is another facing an acute labor shortage. Daniel Bahr, the federal health minister, last month proposed relaxing rules for bringing in foreign care workers.

Fostering labor mobility in a continent of myriad tax and pension rules, not to mention languages and culture, remains one of the biggest obstacles to the creation of a true single European market. Henares’s move from Spain to Germany took place as part of a scheme supported by the Munich Chamber of Trade and Crafts, which is supporting those willing to migrate with paperwork, finding accommodation and even German lessons. It has offered 21 places with funds from Europe and the Bavarian Labor Ministry.

Katrin Budick, an official at the Munich Handwerk chamber, says: “We don’t want to promote a ‘guest worker’ mentality. We want people to live in Germany long-term, not send them back after six months when they are no longer needed.”

Representatives from other towns around Germany turned up to hear about the Munich plan at a recent trade fair in the city. And Germany’s federal Labor Ministry and employment agency are rolling out a nationwide scheme to offer similar incentives, with 139 million euros available for the next three years to help young European workers interested in training and working in Germany.

“We know that the cross-border labor market in Europe is a big challenge,” Dagmar Beer-Kern, a Labor Ministry official, told the Munich meeting. “This is an experimental program, and we will see how it looks in six months.”

Oliver Abrecht, of the German employment agency, said Germany wanted to avoid a “distortion” of Europe’s labor market. “We don’t want to lure away people who have jobs simply on the basis that we have a labor shortage,” he said.

Traublinger praises Henares’s work, while the Spaniard says that the bakery offers a better salary than in Spain and that his new colleagues are being “patient” with his faltering German. After a few weeks in Germany, and even as his wife in Spain was about to give birth to twins, he is optimistic that he has made the right choice.

“I see Spain having very difficult times. Germany seems like a strong country in the medium and long term that will keep the jobs it has,” he says. “I hope I will stay for a long time. My children will have more opportunities growing up in Germany. Spain is going to have a very difficult decade.”

— Financial Times