Katalon Studio version 9.6.0 auto implements the Import import com.sun.org.apache.bcel.internal.generic.Select in the classes in Keyword. What are they and are they necessary to be added in newer katalon versions?

Katalon Studio version 9.6.0 auto implements the Import import com.sun.org.apache.bcel.internal.generic.Select in the classes in Keyword. What are they and are they necessary to be added in newer katalon versions?
can this be stopped from being auto imported in every existing class?

1 Like

Hi there, :wave:

Thank you very much for your topic! It may take a little while before Katalon team member or others forum members respond to you.

In the meantime, you can double-check your post to see if you can add any extra information i.e. error logs, HTML codes, screenshots, etc. Check out this posting guide to help us help you better!

Thanks! :sunglasses:
Katalon Community team

@bhavyansh.ameta might be able to help on the above query

Hi @akshay.sharma
When creating a keyword in Katalon Studio, I only see the below packages getting import automatically.

  • Can you try to create a new keyword again to check if the package shared by you gets imported automatically?
  • Please also double-check if you are using any external libraries in your project?
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject

import com.kms.katalon.core.annotation.Keyword

import com.kms.katalon.core.checkpoint.Checkpoint

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

import com.kms.katalon.core.model.FailureHandling

import com.kms.katalon.core.testcase.TestCase

import com.kms.katalon.core.testdata.TestData

import com.kms.katalon.core.testobject.TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows

Thank you

BCEL is a “Byte Code Engineering Library” for Java. See Apache Commons BCEL™ – Home. BCEL is used inside the Oracle JDK: the Xalan XSLT Processer uses it. Xalan provides the javax.xml.trasform package implementation. An evidence is here.

You showed to us a Fully Qualified Class Name which starts with a string com.sun. This implies that your Katalon product ran on some version of Oracle’s JDK. (You know, Oracle aquired Sun in 2010). I guess, you specified an Oracle JDK for Katalon Runtime Engine on Linux; or you specified Oracle JDK for Katakon Studio on Windows.

However, you should check the Katalon’s documentation — you should give Open JDK, not Oracle JDK.

Due to this mistake, anything curious could happen.

Possibly, the jar of BCEL is not bundled in the version of Oracle JDK you specified; therefore an Exception for class import occured.

The fix is NOT to add the BCEL jar; you should not use Oracle JDK for Katalon products. You should use Open JDK as Katalon tells us.

2 Likes