cancel
Showing results for 
Search instead for 
Did you mean: 

Class is a raw type. References to generic type Class<T> should be paramete

Former Member
0 Kudos

Hi,

Im using WD 7.11 and got this warning when I added a BAPI to the model:

Class is a raw type. References to generic type Class<T> should be parameterized

This is just a warnig but when I try to activate this DC I get the following error:

javac] ERROR: ...\model\Bapiret2.java:343: <identifier> expected

javac] ERROR: static void registerMCFactory(java.util.Map<String, Object> mcFactories) {

javac] ERROR: ...\model\Bapiret2.java:344: ')' expected

javac] ERROR: registerMCFactory(mcFactories, "...model.Bapiret2", ....model.TESTModel.class, ....model.Bapiret2.class);

javac] ERROR: ...\model\Bapiret2.java:344: <identifier> expected

javac] ERROR: registerMCFactory(mcFactories, "...model.Bapiret2", ...model.TESTModel.class, ...model.Bapiret2.class);

javac] ERROR: ...\model\Bapiret2.java:344: '{' expected

javac] ERROR: registerMCFactory(mcFactories, "...model.Bapiret2", ...model.EHS_GRModel.class, ...model.Bapiret2.class);

........................

Also this warning:

WARNING: DC "...model ..." depends on deprecated DC sap.com/tc/bl/jrfc/api (sap.com_ENGFACADE_1) by using its public part api.

Im not sure is this is all related, I would like to solve the warning at least:

"Class is a raw type. References to generic type Class<T> should be parameterized"

Thanks in advance

Jean Carlo

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

there was a mix up of versions. I got to fix some configuration on the NWDI server but still there are traces of 1.4 compiling on 1.5 code

former_member214651
Active Contributor
0 Kudos

Hi,

U have to replace the <T> by the name of the structure while u want to send the input to a BAPI. This is is used when u are sending a list to any BAPI as an Input parameter.

The template will be:

List<(structurename)>  listForBAPI = new ArrayList<(structurename)>();

where the (structurename) is an object which will hold single record of the input added to the list and sent to BAPI

Regards,

Poojith MV

Former Member
0 Kudos

Thanks.

Is it normal to modify java files generated when importing the model?

former_member214651
Active Contributor
0 Kudos

Can u send the code where u r using this statement?

Regards,

Poojith MV

Former Member
0 Kudos

there is no code, its a Model DC, only has a couple of BAPIs imported

Former Member
0 Kudos

on the CBS erros I think that it is because its using java 1.4 at a certain point

timer] WebDynpro generator finished in 1.61 seconds

echo] Forking Java compiler as a new process: C:\j2sdk1.4.2_12\bin\javac.exe

former_member214651
Active Contributor
0 Kudos

Try "repair" option by right-clicking on the DC>repair>classpath and structures. If any dependencies are missing, those will be added.

Regards,

Poojith MV

p330068
Active Contributor
0 Kudos

Hi Jean

IF you are using the NWDS 7.11, you must have Java 1.5 or higher. Uninstall all the lower version of Java from your desktop and re-start your PC and then update JAVA_HOPME envirometal variable (update JAVA_HOME system enviromental variable in my computer (My computer > Priperties >> Advance >> Startup and Recovery >> Enviromental Variable >> System Variables >> Add new JAVA_HOME parameter with path for installed Java JDK))

Then try to import the model from NWDS, It will work.

Hope it will helps

Regards

Arun