My beanshell script gives "internal server error":
import de.hybris.platform.jalo.product.Product;
import de.hybris.platform.jalo.product.ProductManager;
import de.hybris.platform.variants.jalo.VariantProduct;
import java.util.Collection;
final Collection<Product> products = ProductManager.getInstance().getAllProducts();
print(products.size());
for (final Product product : products)
{
if (product instanceof VariantProduct)
{
print(product.getCode());
}
}
In fact running only the first line also gives the "internal server error".