Skip to Content
0
Former Member
Jul 26, 2016 at 10:33 AM

Internal server error on beanshell console

168 Views

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".