on 12-07-2007 4:02 PM
Hello community,
my application makes heavy use of bean models which map simple DTOs (Java Beans) to context Nodes.
Now one of the DTOs was changed and I would like to make the model accept those changes. It is only one attribute that switched the datatype from long to String but I seemingly can not get the model to eat those changes.
I tried to change the datatype by navigating to Models -> Mytransaction -> Model Classes -> MyTransaction and Edit, to change the Properties of the node element which maps to my Beans atrtibute - without any effect on the app...
How can I change the model binding - the "Reimport model" option is grayed out in my Developer Studio version NW2004s (SP13)?
Is it possible that the Netweaver Developer Studio stores the original Model class somewhere in the code tree?
Anyone experienced something like that before? Is there some trick which does not require reprogramming the whole thing?
regards,
Christian
Hi Stefan,
I found a work-around which is:
1. Deploy your project (WDJ accessing EJB and exchanging data via DTOs)
2. Restart server
3. Run your app
Everything works fine until you redeploy your WDJ application. The exception above will reoccur, which makes no sense at all, since the project was up and running fine. Maybe there is some caching stuff going on inside Portal or NetWeaver that interferes with my assumption of how deployment in a J2EE environment works or should work.
Not being able to reimport a changed Java bean model within a model-driven software generation tool is more than a bad joke, though.
However, thanks for your answers.
regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I followed the instructions in OSS note 925858, but still could not solve my problem.
The classes still differ, see Exception call stack:
[code]com.sap.tc.webdynpro.progmodel.controller.MessageManager$AbortMessageManagerException:
TransactionManagerProxy: OK Exception:I/O operation failed :
java.io.InvalidClassException: com.my.dto.MyTransaction; local class
incompatible: stream classdesc serialVersionUID = -22222222222222222, local class
serialVersionUID = -8717671986526504904 :
[/code]
The funny thing is, we imported a new model using another SerialVersionUID for our class now (2222....) and the old one still seems to hang around somewhere. The code has been reloaded and rebuild repeatedly, but when deploying we experience the same effect all the time.
regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Have you updated the getter/setter in the DTO for the new field? If your DTO is part of another DC, make sure it has been built and that the .jar file was successfully overwritten (You will get a warning if there was an error with overwriting the .jar. This is a bug in NW 6.40 SP20, which has been confirmed by SAP).
Have you tried doing a reload (reload + rebuild) of your WDP project?
The model info is stored in a .wdmodel file and the model classes are sored in a .wdmodelclass file. They will be found in the src folder... eg src/packages/com/company/dto/MyTransaction.wdmodelclass
src/packages/com/company/wdp/MyTransaction.wdmodel
There is no way of re-importing a model using the wizard, you need to delete and import it again
Take a look at SAP note 925858 for instructions on doing this.
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.