cancel
Showing results for 
Search instead for 
Did you mean: 

Code Generation Error - SUP 2.2 / SUW 2.2

Former Member
0 Kudos

Hi,

I have formatted my laptop PC and re-installed Sybase Unwired Workspace 2.2. After the installation I get Code Generation Error message:

Before Code Generarion attemp the Java Build Path / Source tab is empty and after the Code Generation the error specified above is generated and the following path is added to the Java Build Path / Source tab:

XXX/Generated Code/src (missing)

I cannot resolve the problem. Does anybody has idea about the problem?

thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks to all,

The OSS has provided us with a patch: PATCH-10361-2.2SP02. the problem is resolved.

The afx-compiler.jar, AfxGenModel.templatej.jar and AfxGenModelMDP.templatej.jar files providen with SP02 are replaced with the patch PATCH-10361-2.2SP02.

Now the generated code is fine.

Answers (2)

Answers (2)

0 Kudos

It seems that your problem is not related to the error that you see on eclipse as the error should normally disappear after the workspace refreshes. The problem is more to do with the code that is generated.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

For which platform you trying to generated the code?

Is this first time you generated the code? What about project? Existing one or you created a new one?

Can you manually create a folder named "Generated Code" inside the project and then try to generate the code. (Make sure this folder should be empty)

Former Member
0 Kudos

I tried generationg code for Java for Android.

Before the format operation the code generation process was fine.The project is existing one.

"Generated Code" forlder exists under the project forlder and is empty. I run the application with administrative privilages. I also use "Run As Administrator" option.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos
Generated Code" forlder exists under the project forlder and is empty.

Howcome "Generated Code" folder is empty. Did you delete its content (subfolders/files inside this folder) and trying to regenerating code?

In general, this "Generated Code" folder is created only when we try to generate the code for a particular platform and it should have some cotents, e.g. for iOS, it should have .h, .m files folder.

Is it possible, can you try with one small new project (maybe with one mbo) and try to generate the code for Android and see if you come across the similar issue?

midhun_vp
Active Contributor
0 Kudos

Can you check any of the below works,

  1. Try generating the code from a new workspace.
  2. Delete "Generated Code" folder and create a new folder.
  3. Generate code to an external folder instead of using Generated Code folder.

Midhun VP

Former Member
0 Kudos

Hi,

1. I created a new model having only one MBO and generated code successfuly.

2. The result is the same after deletion of "Generated Code" and creating new folder

3. The result is the same after generation code to another folder.

nothing has changed but I discovered additional information in the "workspace\.metadata\.log" file:

com.sybase.uep.tooling.codegeneration.coordinator.CoordinatorException: Member not found: inverseClass on object com.sybase.afx.compiler.AttributeDef@2a3881

  at com.sybase.uep.tooling.codegeneration.coordinator.impl.ClientObjectAPICoordinator.sendRequest(ClientObjectAPICoordinator.java:115)

  at com.sybase.uep.tooling.codegeneration.ui.CodeGenerationJob.sendRequest(CodeGenerationJob.java:200)

  at com.sybase.uep.tooling.codegeneration.ui.CodeGenerationJob.processTasks(CodeGenerationJob.java:172)

  at com.sybase.uep.tooling.codegeneration.ui.CodeGenerationJob.runInWorkspace(CodeGenerationJob.java:123)

  at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)

  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Caused by: com.sybase.uep.tooling.codegeneration.clientobjectapi.ClientObjectAPIException: Member not found: inverseClass on object com.sybase.afx.compiler.AttributeDef@2a3881

  at com.sybase.uep.tooling.codegeneration.coordinator.CoordinatorException.<init>(CoordinatorException.java:27)

  ... 6 more

Caused by: com.sybase.modeling.templatej.runtime.adapter.impl.NoSuchMemberException: Member not found: inverseClass on object com.sybase.afx.compiler.AttributeDef@2a3881

  at com.sybase.uep.tooling.codegeneration.CodeGenerationException.<init>(CodeGenerationException.java:26)

  at com.sybase.uep.tooling.codegeneration.clientobjectapi.ClientObjectAPIException.<init>(ClientObjectAPIException.java:27)

  at com.sybase.uep.tooling.codegeneration.clientobjectapi.impl.ClientObjectAPIDelegator.generate(ClientObjectAPIDelegator.java:155)

  at com.sybase.uep.tooling.codegeneration.coordinator.impl.ClientObjectAPICoordinator.sendRequest(ClientObjectAPICoordinator.java:86)

  ... 5 more

midhun_vp
Active Contributor
0 Kudos

Create a new workspace》 move existing project to it and generate code. May be the workspace was corrupted.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos
The result is the same after deletion of "Generated Code" and creating new folder

Yes, you are right. I have faced this issue many times while generating the code for ANDROID and i had to create whole project (mbo modeling) from scratch in a new project.

Rgrds,

Jitendra

Former Member
0 Kudos

Hi,

There are 59 MBOs in my model. Creating the project from scratch will be painful

I have discovered an interesting point:

- I have changed my language setting from Turkish to English (US). Then I tried generating code again and the code was generated but there are errros in the generated code. The generated files are in the Genereted Code\src\Project Name folder as expected but for MBOs having "create" method there are erros in the generated code.

For MBO named "Tahsilatlar" the following error message is listed:

I_TAHSILAT_SEKLI is an input parameter of the Remote Function related to the "create" method.

midhun_vp
Active Contributor
0 Kudos

Whats happening when you uncheck the option Javadoc (last option) in the code generation wizard.

Midhun VP

Former Member
0 Kudos

I have already unchecked Javadoc option and the result is the same.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

CC: