Well, last time I used this title I got some useful comments. Meanwhile I fixed my problems and in fact it was a race condition that I couldn't fix by using locks.
The problem I was facing had to do with the fact that I have a graph of objects that I maintain in a database. Adding a new object to the graph, means that certain objects would point to it as being a new neighbor. Which objects in the graph would get a new neighbor is determined by an algorithm that ensures that this process is 'fair' to the other objects in the graph.
When two or more objects are added more or less simultaneously to the graph, my algorithm would do the same thing and select the same objects that would receive a neighbor. One might argue that the system on this topic is truly stateless.
Anyway, I tried to fix my algorithm to not always pick the same neighbors, that didn't work. I tried to change my datamodel such that the system would be a little more lightweight, that obviously didn't work either. I tried to work with locks which ensured consistency in my model, but still no scalability on this end. I did some tweaking with transaction-scope and that fixed some issues. But finally I realized that I needed the EJB 3.1 Singleton which is not available in 3.0 so I mimicked part of its functionality by introducing a synchronized block on the smallest piece of code that suffered from the concurrency. This together with a smaller transaction scope fixed the problem.
But since that doesn't give me that warm and fuzzy feeling. Especially not since I know there's a solution in EJB 3.1, I'm now considering moving to GF 3 and use EJB 3.1 features. Of course all thru NetBeans' support for GF3 and EJB 3.1.
I'll keep you posted.
Iwan
Showing posts with label JEE. Show all posts
Showing posts with label JEE. Show all posts
Wednesday, August 19, 2009
Monday, November 26, 2007
NB 6.0 RC2, Getting there... but still WS code generation issues.
Hi,
Recently I blogged about the RC1 of NetBeans I installed and the good and bad of the first release candidate. of NetBeans 6.0. One of the major upgrades of NetBeans since about ever.
I installed RC2 last week right after it came out and started testing the major bug I was experiencing, WS client generation for mobile applications. And the bug I'd found was solved, and I was very happy about that. Although it got a bit of a disappointment not long after this 'Yippie' feeling. Issue 122702 is the new code generation problem around the block when it comes to generating code for mobiles to connect to a WS. The problem is that when a class of my own is the type of a field of another class of my own and that second class is produced or consumed by a WS operation, the code for that class is not generated by NB, at least not by either RC1 or RC2. The class that should be generated is fairly simple to create myself, but that is mainly because it is a simple class, well at least the one I created for this issue. Mobility and WS support are definitely an area not yet much treaded.
There's another issue I have with the whole WS connectivity code generation issue, which is that NB generates code that already exists. So it doesn't have to generate the code at all. From a compatibility concern between WS server and WS client, I use exactly the same code on both ends. Therefore I have a mobile-library project setup that is used by my JavaME project as well as my JavaEE project. In this library all classes are defined that are used in the WS communication layer, thus ensuring that the phone sends across data that can be handled by the server and vice versa. This is probably not necessary, but has saved me loads of headaches, since I am now confident that I only send data across that can be handled by both ends. No classes that are too advanced for JavaME so to speak. All classes are there, but NB refuses to use them and generates classes of its own and uses them.
The interesting part here is that when generating a mobile client to web application, the package hierarchy as well as the classnames generated are the same as those found in my web application, i.e. the shared library mentioned above, so I can just delete these generated versions of my classes and use the right classes instead.
When generating a mobile WS client, the package hierarchy and the class names differ. Which makes it harder to replace the generated classes with my own created classes. Really mind boggling is the fact that the standard naming convention 'MyClass' is donned for 'myClass', which looks exactly like the field naming convention utilized by most developers I know.
But mind, I didn't get any exception pop-ups at all since installing RC2, the IDE is rather responsive, more than RC1 I think. And overall it is becoming a solid product, at least from my point of view. Me being a developer working on a mobile massive multi-user online realtime strategy game (MMMORSG).
Iwan
Recently I blogged about the RC1 of NetBeans I installed and the good and bad of the first release candidate. of NetBeans 6.0. One of the major upgrades of NetBeans since about ever.
I installed RC2 last week right after it came out and started testing the major bug I was experiencing, WS client generation for mobile applications. And the bug I'd found was solved, and I was very happy about that. Although it got a bit of a disappointment not long after this 'Yippie' feeling. Issue 122702 is the new code generation problem around the block when it comes to generating code for mobiles to connect to a WS. The problem is that when a class of my own is the type of a field of another class of my own and that second class is produced or consumed by a WS operation, the code for that class is not generated by NB, at least not by either RC1 or RC2. The class that should be generated is fairly simple to create myself, but that is mainly because it is a simple class, well at least the one I created for this issue. Mobility and WS support are definitely an area not yet much treaded.
There's another issue I have with the whole WS connectivity code generation issue, which is that NB generates code that already exists. So it doesn't have to generate the code at all. From a compatibility concern between WS server and WS client, I use exactly the same code on both ends. Therefore I have a mobile-library project setup that is used by my JavaME project as well as my JavaEE project. In this library all classes are defined that are used in the WS communication layer, thus ensuring that the phone sends across data that can be handled by the server and vice versa. This is probably not necessary, but has saved me loads of headaches, since I am now confident that I only send data across that can be handled by both ends. No classes that are too advanced for JavaME so to speak. All classes are there, but NB refuses to use them and generates classes of its own and uses them.
The interesting part here is that when generating a mobile client to web application, the package hierarchy as well as the classnames generated are the same as those found in my web application, i.e. the shared library mentioned above, so I can just delete these generated versions of my classes and use the right classes instead.
When generating a mobile WS client, the package hierarchy and the class names differ. Which makes it harder to replace the generated classes with my own created classes. Really mind boggling is the fact that the standard naming convention 'MyClass' is donned for 'myClass', which looks exactly like the field naming convention utilized by most developers I know.
But mind, I didn't get any exception pop-ups at all since installing RC2, the IDE is rather responsive, more than RC1 I think. And overall it is becoming a solid product, at least from my point of view. Me being a developer working on a mobile massive multi-user online realtime strategy game (MMMORSG).
Iwan
Labels:
Java,
JavaEE,
JavaME,
JEE,
NetBeans NetCAT,
Web Services,
WS
Tuesday, October 02, 2007
Two weeks of beta1 - Let's get started with the dev builds
So I've now been working with the NB 6 releases beta1 and after, after here being the dev build of last week Monday. My strategy here is to install on Monday the latest dev build I can download and use it for a week, not installing any newer builds unless there's a bug that is holding me up. Sofar, I have one bug that is keeping me from progressing on developing my game and sofar it hasn't been resolved. Unfortunately.
Yesterday I installed the latest dev build, so now it is time to start raving and ranting on last week's Monday dev build. And let me put it this way, NB is really good and shaping up.
So just to re-iterate, what is that bug that is preventing me from developing the greatest mobile game ever produced? WS Client support on J2ME. And with the build of last week, that wasn't resolved. Since I filed a bug, I am waiting for that 'RESOLVED' message out of Issuezilla, which I didn't get yet. But in the meantime I started on developing the second incarnation of our Pong based game, called Mong, from scratch and I noticed some back-end functionality missing in our multi-player strategy game that I need to put in.
So what else is going on? SQE is back in the picture, as the SQE AUC was updated. And gosh, do I have a lot of bugs to be found in my code. Thanks to the modules in the SQE they're all visible now. Hmmm, I guess I should be happy about this. The good thing about something like SQE is that you get good quality plugins with one go, and you don't have to worry, in theory, that you are compromising your IDE.
Something that I really don't like, is the fact that when you have some (possibly crippled) JavaDoc on for example a method, than you need to fix it one step at a time. There's no such thing as 'fix JavaDoc' for crippled or incomplete JavaDoc. Guess the NB developers develop their code by starting of with the JavaDoc and then implement what was documented. Probably the way it should be done... Something I just came across is the lack of something called 'Get JavaDoc from overridden method', which would copy the JavaDoc from the method that I am overriding. In fact, the overriding method should always comply with the documentation of the overridden method, since it is just an alternative implementation of the same functionality. Purity over all.
In last week's status update from Jiri, he mentioned that there was suspiciously little email traffic on the J2ME stuff in NB 6... well Jiri, you have to blame the Mobility guys, since they're doing a great job. Really! I still have to use the databinding they came up with and the game-editor features. Time is here the bottleneck, anybody found a way to cram more than 24 hours in a day?
The coming week is going to be slow, I have to finish some stuff at a customer of mine, I need to do my Q3 taxes, but most important of all. I need to prepare for my trip to Oman. A week of scuba diving it is. I just hope that it doesn't mean that I will be kicked of the NetCAT team because of this.
Iwan
PS: Last week I got some really excellent feedback on my blogs. For one, I was told how to get the libraries from one project to another, and secondly the SQE AUC is fixed and now I got those excellent tools back in NB. Thanks to you all.
Yesterday I installed the latest dev build, so now it is time to start raving and ranting on last week's Monday dev build. And let me put it this way, NB is really good and shaping up.
So just to re-iterate, what is that bug that is preventing me from developing the greatest mobile game ever produced? WS Client support on J2ME. And with the build of last week, that wasn't resolved. Since I filed a bug, I am waiting for that 'RESOLVED' message out of Issuezilla, which I didn't get yet. But in the meantime I started on developing the second incarnation of our Pong based game, called Mong, from scratch and I noticed some back-end functionality missing in our multi-player strategy game that I need to put in.
So what else is going on? SQE is back in the picture, as the SQE AUC was updated. And gosh, do I have a lot of bugs to be found in my code. Thanks to the modules in the SQE they're all visible now. Hmmm, I guess I should be happy about this. The good thing about something like SQE is that you get good quality plugins with one go, and you don't have to worry, in theory, that you are compromising your IDE.
Something that I really don't like, is the fact that when you have some (possibly crippled) JavaDoc on for example a method, than you need to fix it one step at a time. There's no such thing as 'fix JavaDoc' for crippled or incomplete JavaDoc. Guess the NB developers develop their code by starting of with the JavaDoc and then implement what was documented. Probably the way it should be done... Something I just came across is the lack of something called 'Get JavaDoc from overridden method', which would copy the JavaDoc from the method that I am overriding. In fact, the overriding method should always comply with the documentation of the overridden method, since it is just an alternative implementation of the same functionality. Purity over all.
In last week's status update from Jiri, he mentioned that there was suspiciously little email traffic on the J2ME stuff in NB 6... well Jiri, you have to blame the Mobility guys, since they're doing a great job. Really! I still have to use the databinding they came up with and the game-editor features. Time is here the bottleneck, anybody found a way to cram more than 24 hours in a day?
The coming week is going to be slow, I have to finish some stuff at a customer of mine, I need to do my Q3 taxes, but most important of all. I need to prepare for my trip to Oman. A week of scuba diving it is. I just hope that it doesn't mean that I will be kicked of the NetCAT team because of this.
Iwan
PS: Last week I got some really excellent feedback on my blogs. For one, I was told how to get the libraries from one project to another, and secondly the SQE AUC is fixed and now I got those excellent tools back in NB. Thanks to you all.
Wednesday, September 26, 2007
One week of beta1 - Party time with Web Services.
So yesterday I blogged about installing NB 6.0 beta1. I just installed the dev build of the 25th, but I used beta1 for about a week on our mobile multi-player game. I was developing the backend last week on Glassfish v2b58g.
As with the installation everything runs quite smoothly, although you shouldn't be looking in the messages.log, since it is not stacktrace free. So far I haven't been able to relate these stacktraces to problems in NB. Well maybe, sometimes NB freezes, it just isn't doing anything, not even consuming CPU, not even writing log entries, but when I switch between applications on my XP box, NB doesn't even come up. I do see some stacktraces in messages.log, but since it doesn't have timestamps, I'm not sure where to put them in the time-space-continuum. Killing java.exe works and I can start NB without problems. I don't even get a message stating that NB is still running.
Sofar I've been using NB to develop my JavaEE backend for the game, which is a EJB 3 solution using TopLink and JavaDB for storage, and WS for interfacing with the client app. I'm using the SWING client that NB can pretty much generate for you to test the WS.
That is actually a cool feature, you just import the WSDL files of the WS you want to connect to and than drag-n-drop the operations in the WSDL into your sources and NB will generate all the code. This is pretty magical stuff, and I use the word 'magical' deliberately, since the documentation on this feature is not very clear. Now I must admit that I didn't read the documentation extensively. The thing that is not clear to me is how I can switch from the generated Java classes that make up the arguments and results of the operations I call to the classes that are actually used by the WS. That is how I will use the code in the mobile client, I have a JAR file that contains the classes for interfacing with the backend by the frontend and those classes I want to use in my tests as well, for obvious reasons. The documentation at first and second glance isn't really clear on how to change this behavior.
There's another gripe I have with this feature of NB to generate the code based on the WSDL: When you change the WSDL or rather the interface of the WS and therefore the WSDL, NB doesn't pick this up automatically, instead you have to refresh the WSDL yourself. There is a checkbox unchecked when you refresh the client that allows you to overwrite the local WSDL with the original WSDL, but there's nowhere to be found what this means. What it means to leave it unchecked or to check it. I have no idea what the impact is to leave it unchecked, as you guess, I check it all the time. Guess I'll file an issue on this right after posting this blog.
One other issue I have with the SWING client and its WS support, is with ANT. All ANT code used is generated by NB, yet I see the following warning: Consider using/ so that wsimport won't do unnecessary compilation and have no idea as how to respond to this... well I do, I ignore it. I have no clue as to how to change my ANT file in order to prevent wsimport to do unnecessary compilation. So far it hasn't hurt me too much that stuff is being compiled over and over again. It only takes seconds on my box, so why worry.
For some reason the mobile library I created (it's a JAR file) and am depending on in my JavaEE project is not being compiled when it changed. Well NB isn't building that project when it builds my main project, although there is a clear dependency. But I noticed that with a JavaEE project I created in beta1 that depends on this library is building this dependency, so I guess it's an artifact of an older NB version. I have to look into this.
Well sofar for my experiences in the WS area with NB 6 beta1. All in all I am very happy, NB is rather stable, although I need to kill java.exe every now and then.
Iwan
As with the installation everything runs quite smoothly, although you shouldn't be looking in the messages.log, since it is not stacktrace free. So far I haven't been able to relate these stacktraces to problems in NB. Well maybe, sometimes NB freezes, it just isn't doing anything, not even consuming CPU, not even writing log entries, but when I switch between applications on my XP box, NB doesn't even come up. I do see some stacktraces in messages.log, but since it doesn't have timestamps, I'm not sure where to put them in the time-space-continuum. Killing java.exe works and I can start NB without problems. I don't even get a message stating that NB is still running.
Sofar I've been using NB to develop my JavaEE backend for the game, which is a EJB 3 solution using TopLink and JavaDB for storage, and WS for interfacing with the client app. I'm using the SWING client that NB can pretty much generate for you to test the WS.
That is actually a cool feature, you just import the WSDL files of the WS you want to connect to and than drag-n-drop the operations in the WSDL into your sources and NB will generate all the code. This is pretty magical stuff, and I use the word 'magical' deliberately, since the documentation on this feature is not very clear. Now I must admit that I didn't read the documentation extensively. The thing that is not clear to me is how I can switch from the generated Java classes that make up the arguments and results of the operations I call to the classes that are actually used by the WS. That is how I will use the code in the mobile client, I have a JAR file that contains the classes for interfacing with the backend by the frontend and those classes I want to use in my tests as well, for obvious reasons. The documentation at first and second glance isn't really clear on how to change this behavior.
There's another gripe I have with this feature of NB to generate the code based on the WSDL: When you change the WSDL or rather the interface of the WS and therefore the WSDL, NB doesn't pick this up automatically, instead you have to refresh the WSDL yourself. There is a checkbox unchecked when you refresh the client that allows you to overwrite the local WSDL with the original WSDL, but there's nowhere to be found what this means. What it means to leave it unchecked or to check it. I have no idea what the impact is to leave it unchecked, as you guess, I check it all the time. Guess I'll file an issue on this right after posting this blog.
One other issue I have with the SWING client and its WS support, is with ANT. All ANT code used is generated by NB, yet I see the following warning: Consider using
For some reason the mobile library I created (it's a JAR file) and am depending on in my JavaEE project is not being compiled when it changed. Well NB isn't building that project when it builds my main project, although there is a clear dependency. But I noticed that with a JavaEE project I created in beta1 that depends on this library is building this dependency, so I guess it's an artifact of an older NB version. I have to look into this.
Well sofar for my experiences in the WS area with NB 6 beta1. All in all I am very happy, NB is rather stable, although I need to kill java.exe every now and then.
Iwan
Tuesday, September 25, 2007
One week of beta1 - Installation time
So it has been one week of beta1 usage for me now. I'm participating in the NetCAT 60 program, yup I'm one of the chosen ones so I have to use beta1. And being the person I am, I am using it on a production project... although it is intended to be a project that is going to be highly successful... a mobile game that has a JavaEE backend.
But on to beta1. Having played with the dev builds recently as M10 was really not very useful and it prevented me from going back to M9 because of some installer issue I never tried to fix. The dev builds got fairly stable, but there were some annoying full-stops every now and then, and some of the builds had more error messages popping up than code completion dialogs.
The first thing that struck me after installing beta1 and using it, was how fast it started. That was a lot better than M10 and even better than the last dev build I had installed.
One of the things I change immediately after installing a NB version are the startup params, more precise the memory settings. All settings are tripled compared to the default settings. Starting of with a huge amount of memory allocated to the JVM seems to speed things up. Maybe its just psychological, but hey, if it looks faster it is faster.
Then on to the next steps, installing the plugins you can't do without. First of all I need to say that I downloaded and installed the full version. Everything is installed, although I don't plan to use the C/C++ support, the Ruby support and the profiler. Well maybe the profiler.
I still can't believe collaboration is not part of the standard installation. It is probably the plugin I use most apart from the obvious plugins that are part of the standard install. Collaboration is really important as I develop the game together with a friend of mine. He lives about 100 km away from me, so we meet in NB, discuss our progress in NB etc.
After having that done, well this time, I refrained from installing every other module I could find. I did install the PluginPortal plugin, but that's gone now, because it is not really usable because too often I selected a module that wasn't supporting NB 6, that is something that needs a fix. Only show plugins that are supporting the NB version I use.
I tried the SQE update center, but that is not supporting NB versions after M10, which is too bad, since these are really, and I mean really useful plugins.
Next is copying the Templates directory from my NB 5.5.1 installation. I don't believe in importing settings from a previous version, as I had some really bad experiences with older versions (upgrading from NB4 to 5 for example). I choose to redo the work I'd done in the previous version, and copy happily whatever needs copying.
I still need to find a way to smartly get my library definitions across from one version of NB to another. Fortunately I only have like 3 libraries defined, so that's easy to do by hand. But still...
And that's about it. Well almost. After opening the projects that make up our game, I define a project group as well. That's a feature I learned about just recently, where I had my own game projects (about 7 projects) and I was working with a customer (I did the UML design for them in NB) which had about 27 projects. Using groups made it really easy to switch over from my own work to the customer's projects.
So that was pretty much my installation of NB 6 beta1, quite uneventful, quite boring. Don't you just hate it when everything goes right, and you intended to blog about it. One feature request to the NB team: Don't make it so smoothly with beta2, so there's something to complain about when blogging about the installation.
Iwan
But on to beta1. Having played with the dev builds recently as M10 was really not very useful and it prevented me from going back to M9 because of some installer issue I never tried to fix. The dev builds got fairly stable, but there were some annoying full-stops every now and then, and some of the builds had more error messages popping up than code completion dialogs.
The first thing that struck me after installing beta1 and using it, was how fast it started. That was a lot better than M10 and even better than the last dev build I had installed.
One of the things I change immediately after installing a NB version are the startup params, more precise the memory settings. All settings are tripled compared to the default settings. Starting of with a huge amount of memory allocated to the JVM seems to speed things up. Maybe its just psychological, but hey, if it looks faster it is faster.
Then on to the next steps, installing the plugins you can't do without. First of all I need to say that I downloaded and installed the full version. Everything is installed, although I don't plan to use the C/C++ support, the Ruby support and the profiler. Well maybe the profiler.
I still can't believe collaboration is not part of the standard installation. It is probably the plugin I use most apart from the obvious plugins that are part of the standard install. Collaboration is really important as I develop the game together with a friend of mine. He lives about 100 km away from me, so we meet in NB, discuss our progress in NB etc.
After having that done, well this time, I refrained from installing every other module I could find. I did install the PluginPortal plugin, but that's gone now, because it is not really usable because too often I selected a module that wasn't supporting NB 6, that is something that needs a fix. Only show plugins that are supporting the NB version I use.
I tried the SQE update center, but that is not supporting NB versions after M10, which is too bad, since these are really, and I mean really useful plugins.
Next is copying the Templates directory from my NB 5.5.1 installation. I don't believe in importing settings from a previous version, as I had some really bad experiences with older versions (upgrading from NB4 to 5 for example). I choose to redo the work I'd done in the previous version, and copy happily whatever needs copying.
I still need to find a way to smartly get my library definitions across from one version of NB to another. Fortunately I only have like 3 libraries defined, so that's easy to do by hand. But still...
And that's about it. Well almost. After opening the projects that make up our game, I define a project group as well. That's a feature I learned about just recently, where I had my own game projects (about 7 projects) and I was working with a customer (I did the UML design for them in NB) which had about 27 projects. Using groups made it really easy to switch over from my own work to the customer's projects.
So that was pretty much my installation of NB 6 beta1, quite uneventful, quite boring. Don't you just hate it when everything goes right, and you intended to blog about it. One feature request to the NB team: Don't make it so smoothly with beta2, so there's something to complain about when blogging about the installation.
Iwan
Monday, August 27, 2007
An anoying difference between NB 5.5.1 and NB 6.0
Hi,
It's been a while since I've blogged, and I won't say that'll change. I've made that promise too often without being able to live up to it. But enough about that.
Last week I reported a bug (113543) about that I couldn't use the visual designer for changing a persistence.xml file. There was a workaround; changing the file in XML view, so the P1 was set to a P2. As it turned out, the JPA provider class in NB5.5.1 had changed from oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider to oracle.toplink.essentials.PersistenceProvider and NB 6.0's visual designer for persistence.xml files couldn't handle this.
It was a really annoying bug, this difference between the NB versions. But changing the provider in the persistence.xml did solve the problem.
Iwan
It's been a while since I've blogged, and I won't say that'll change. I've made that promise too often without being able to live up to it. But enough about that.
Last week I reported a bug (113543) about that I couldn't use the visual designer for changing a persistence.xml file. There was a workaround; changing the file in XML view, so the P1 was set to a P2. As it turned out, the JPA provider class in NB5.5.1 had changed from oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider to oracle.toplink.essentials.PersistenceProvider and NB 6.0's visual designer for persistence.xml files couldn't handle this.
It was a really annoying bug, this difference between the NB versions. But changing the provider in the persistence.xml did solve the problem.
Iwan
Tuesday, July 03, 2007
Developing the JEE application, how tears disappeared from my eyes...
Hi,
It has been a while since I blogged, and that is mainly due to the fact that I didn't work on my project for quite a while. Why? Because I was too busy with all kinds of other stuff, like auditing an architecture for a start-up here in the Netherlands, setting up and implementing a QA process for a customer of mine and spending time in the UK on a JCAPS training and visiting JavaOne 07.
Between my last blog and now, I discovered some interesting things about NetBeans. I was using NB5 for my development until I installed NB6 M9 (got it on NetBeans Day 07 on a memory stick) and since the editor in NB6 is soooo much better than in NB5 that became my preferred IDE. Note that before I used M8 which was fairly stable, but the Java EE 5 support in M8 was not that good. So I used NB5 for JavaEE 5 code generation etc and NB6 for editing.
What was interesting was that my projects would only build in the IDE I started last. NB ammends the build files as it seems to reflect the changes of the new release. This took about an hour to register.
Last week I downloaded Glassfish v2b51 and configured NetBeans to use it. And all issues I had with Sun AS and Glassfish that I blogged about previously about not being able to debug my enterprise app disappeared. I can now succesfully start and restart my app in debug mode. Not that I am able to debug my application, since for some reason the datasources I need to connect to are not defined in Glassfish. But that's probably a problem in the build files or something. I noticed after a file-compare that my build files originating from NB5 are fairly different from the files that NB6 would generate. So I think I'll just create a new project and put my sources there. I'll keep you posted.
So for now: Use the latest version of Glassfish, I'm using v2b51. That should help.
Iwan
It has been a while since I blogged, and that is mainly due to the fact that I didn't work on my project for quite a while. Why? Because I was too busy with all kinds of other stuff, like auditing an architecture for a start-up here in the Netherlands, setting up and implementing a QA process for a customer of mine and spending time in the UK on a JCAPS training and visiting JavaOne 07.
Between my last blog and now, I discovered some interesting things about NetBeans. I was using NB5 for my development until I installed NB6 M9 (got it on NetBeans Day 07 on a memory stick) and since the editor in NB6 is soooo much better than in NB5 that became my preferred IDE. Note that before I used M8 which was fairly stable, but the Java EE 5 support in M8 was not that good. So I used NB5 for JavaEE 5 code generation etc and NB6 for editing.
What was interesting was that my projects would only build in the IDE I started last. NB ammends the build files as it seems to reflect the changes of the new release. This took about an hour to register.
Last week I downloaded Glassfish v2b51 and configured NetBeans to use it. And all issues I had with Sun AS and Glassfish that I blogged about previously about not being able to debug my enterprise app disappeared. I can now succesfully start and restart my app in debug mode. Not that I am able to debug my application, since for some reason the datasources I need to connect to are not defined in Glassfish. But that's probably a problem in the build files or something. I noticed after a file-compare that my build files originating from NB5 are fairly different from the files that NB6 would generate. So I think I'll just create a new project and put my sources there. I'll keep you posted.
So for now: Use the latest version of Glassfish, I'm using v2b51. That should help.
Iwan
Thursday, February 08, 2007
Developing the JEE application, how tears disappeared from my eyes...
Hi,
As promised I was going to update this blog with my proceedings in debugging my JEE application. In my previous posts you could read what was going on with persistency and debugging my JEE application.
From the NB developers I got the hint to start the Sun AS 9 server in debug mode and attach my application to that instance instead of doing a standard debug session, and this works. It works great and I can debug my application just the way I like it. Huray.
There is now only the problem with the re-deployment I'm facing which seems to be known Glassfish issue and is solved in Glassfish 9.1 which I downloaded but probably won't be installing for a while because last night our son Ray was born and he and his brother are getting some more timeslices.
Iwan
As promised I was going to update this blog with my proceedings in debugging my JEE application. In my previous posts you could read what was going on with persistency and debugging my JEE application.
From the NB developers I got the hint to start the Sun AS 9 server in debug mode and attach my application to that instance instead of doing a standard debug session, and this works. It works great and I can debug my application just the way I like it. Huray.
There is now only the problem with the re-deployment I'm facing which seems to be known Glassfish issue and is solved in Glassfish 9.1 which I downloaded but probably won't be installing for a while because last night our son Ray was born and he and his brother are getting some more timeslices.
Iwan
Wednesday, January 31, 2007
Developing the JEE application, how tears appeared in my eyes... [an update]
Hi,
Last night I blogged about my misfortunes with NB's JEE support and promised to keep on updating while I thought I was making progress. And there's something more to tell.
And some progress was made since my previous blog. I found out that I can actually run the application and test the WS from the IDE (right-click on the WS and test it), but I can't debug the application. That results in errors.
When I start debugging the application, I get the following output in NB's output window for ANT:
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
deps-jar:
deps-j2ee-archive:
pre-pre-compile:
pre-compile:
do-compile:
post-compile:
compile:
pre-dist:
do-dist-without-manifest:
do-dist-with-manifest:
post-dist:
dist:
run-debug:
Distributing
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\dist\IFFServer
.ear to [localhost:4848_server]
Start registering the project's server resources
Finished registering server resources
deployment started : 0%
deployment finished : 100%
Deploying application in domain completed successfully
Trying to create reference for application in target server completed
successfully
Trying to start application in target server completed successfully
WARNING:
JDO76614: Deployment encountered SQL Exceptions:
JDO76609: Got SQLException executing statement "CREATE TABLE
SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY
(SEQ_NAME))": org.apache.derby.client.am.SqlException: Table/View 'SEQUENCE'
already exists in Schema 'IWAN'.
JDO76614: Deployment encountered SQL Exceptions:
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFPLAYER_IFFALLIANCE (alliances_ID BIGINT NOT NULL, members_ID BIGINT NOT
NULL, PRIMARY KEY (alliances_ID, members_ID))":
org.apache.derby.client.am.SqlException: Table/View 'IFFPLAYER_IFFALLIANCE'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFALLIANCE (ID BIGINT NOT NULL, ALLIANCE_NAME VARCHAR(255), PRIMARY KEY
(ID))": org.apache.derby.client.am.SqlException: Table/View 'IFFALLIANCE'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFGAMEFIELD (ID BIGINT NOT NULL, INITED SMALLINT DEFAULT 0, FIELDTYPE
INTEGER, ARMY INTEGER, SOUTHEAST_ID BIGINT, NORTH_ID BIGINT, PLAYER_ID
BIGINT, NORTHEAST_ID BIGINT, PRIMARY KEY (ID))":
org.apache.derby.client.am.SqlException: Table/View 'IFFGAMEFIELD' already
exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFPLAYER (ID BIGINT NOT NULL, TAG VARCHAR(255), PLAYER_NAME VARCHAR(255),
LANG VARCHAR(255), PRIMARY KEY (ID))":
org.apache.derby.client.am.SqlException: Table/View 'IFFPLAYER' already
exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFPLAYER_IFFALLIANCE ADD CONSTRAINT FFPLYRFFLLNCllncsD FOREIGN KEY
(alliances_ID) REFERENCES IFFALLIANCE (ID)":
org.apache.derby.client.am.SqlException: Constraint 'FFPLYRFFLLNCLLNCSD'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFPLAYER_IFFALLIANCE ADD CONSTRAINT FFPLYRFFLLNCmmbrsD FOREIGN KEY
(members_ID) REFERENCES IFFPLAYER (ID)":
org.apache.derby.client.am.SqlException: Constraint 'FFPLYRFFLLNCMMBRSD'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGMEFIELDSTHASTID FOREIGN KEY (SOUTHEAST_ID)
REFERENCES IFFGAMEFIELD (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGMEFIELDSTHASTID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGAMEFIELDNORTHID FOREIGN KEY (NORTH_ID)
REFERENCES IFFGAMEFIELD (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGAMEFIELDNORTHID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGAMEFIELDPLYERID FOREIGN KEY (PLAYER_ID)
REFERENCES IFFPLAYER (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGAMEFIELDPLYERID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGMFIELDNRTHASTID FOREIGN KEY (NORTHEAST_ID)
REFERENCES IFFGAMEFIELD (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGMFIELDNRTHASTID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY
(SEQ_NAME))": org.apache.derby.client.am.SqlException: Table/View 'SEQUENCE'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "INSERT INTO
SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)":
org.apache.derby.client.am.SqlException: The statement was aborted because
it would have caused a duplicate key value in a unique or primary key
constraint or unique index identified by 'SQL061208085840450' defined on
'SEQUENCE'.
Enable of IFFServer in target server completed successfully
Enable of application in all targets completed successfully
All operations completed successfully
Duplicated project name in import. Project IFFServer-impl defined first in
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\nbproject\ant-
deploy.xml and again in
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\nbproject\buil
d-impl.xml
connect-debugger:
Non-existing path
"C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\${javac.class
path}" provided.
Attached JPDA debugger to localhost:9009
pre-run-deploy:
Redeploying
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\dist\IFFServer
.ear
Start registering the project's server resources
Finished registering server resources
While redeploying, trying to stop the application in target server
completed successfully
While redeploying, trying to remove reference for application in target
server completed successfully
deployment started : 0%
Deploying application in domain failed; Could not rename
C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFSe
rver to
C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFSe
rver_old
At least one operation failed
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\nbproject\buil
d-impl.xml:174: Deployment error:
The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 34 seconds)
Appearantly, mentioned in a reply on a post from me on the NBUSERS mailing list, I have to add DROP statements in my DDL, which should fix things. Something I'll try tonight, it would be great to be able to debug the application using a debugger instead of System.out.println(...) statements all over the place.
Iwan
Last night I blogged about my misfortunes with NB's JEE support and promised to keep on updating while I thought I was making progress. And there's something more to tell.
And some progress was made since my previous blog. I found out that I can actually run the application and test the WS from the IDE (right-click on the WS and test it), but I can't debug the application. That results in errors.
When I start debugging the application, I get the following output in NB's output window for ANT:
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
deps-jar:
deps-j2ee-archive:
pre-pre-compile:
pre-compile:
do-compile:
post-compile:
compile:
pre-dist:
do-dist-without-manifest:
do-dist-with-manifest:
post-dist:
dist:
run-debug:
Distributing
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\dist\IFFServer
.ear to [localhost:4848_server]
Start registering the project's server resources
Finished registering server resources
deployment started : 0%
deployment finished : 100%
Deploying application in domain completed successfully
Trying to create reference for application in target server completed
successfully
Trying to start application in target server completed successfully
WARNING:
JDO76614: Deployment encountered SQL Exceptions:
JDO76609: Got SQLException executing statement "CREATE TABLE
SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY
(SEQ_NAME))": org.apache.derby.client.am.SqlException: Table/View 'SEQUENCE'
already exists in Schema 'IWAN'.
JDO76614: Deployment encountered SQL Exceptions:
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFPLAYER_IFFALLIANCE (alliances_ID BIGINT NOT NULL, members_ID BIGINT NOT
NULL, PRIMARY KEY (alliances_ID, members_ID))":
org.apache.derby.client.am.SqlException: Table/View 'IFFPLAYER_IFFALLIANCE'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFALLIANCE (ID BIGINT NOT NULL, ALLIANCE_NAME VARCHAR(255), PRIMARY KEY
(ID))": org.apache.derby.client.am.SqlException: Table/View 'IFFALLIANCE'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFGAMEFIELD (ID BIGINT NOT NULL, INITED SMALLINT DEFAULT 0, FIELDTYPE
INTEGER, ARMY INTEGER, SOUTHEAST_ID BIGINT, NORTH_ID BIGINT, PLAYER_ID
BIGINT, NORTHEAST_ID BIGINT, PRIMARY KEY (ID))":
org.apache.derby.client.am.SqlException: Table/View 'IFFGAMEFIELD' already
exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
IFFPLAYER (ID BIGINT NOT NULL, TAG VARCHAR(255), PLAYER_NAME VARCHAR(255),
LANG VARCHAR(255), PRIMARY KEY (ID))":
org.apache.derby.client.am.SqlException: Table/View 'IFFPLAYER' already
exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFPLAYER_IFFALLIANCE ADD CONSTRAINT FFPLYRFFLLNCllncsD FOREIGN KEY
(alliances_ID) REFERENCES IFFALLIANCE (ID)":
org.apache.derby.client.am.SqlException: Constraint 'FFPLYRFFLLNCLLNCSD'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFPLAYER_IFFALLIANCE ADD CONSTRAINT FFPLYRFFLLNCmmbrsD FOREIGN KEY
(members_ID) REFERENCES IFFPLAYER (ID)":
org.apache.derby.client.am.SqlException: Constraint 'FFPLYRFFLLNCMMBRSD'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGMEFIELDSTHASTID FOREIGN KEY (SOUTHEAST_ID)
REFERENCES IFFGAMEFIELD (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGMEFIELDSTHASTID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGAMEFIELDNORTHID FOREIGN KEY (NORTH_ID)
REFERENCES IFFGAMEFIELD (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGAMEFIELDNORTHID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGAMEFIELDPLYERID FOREIGN KEY (PLAYER_ID)
REFERENCES IFFPLAYER (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGAMEFIELDPLYERID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "ALTER TABLE
IFFGAMEFIELD ADD CONSTRAINT FFGMFIELDNRTHASTID FOREIGN KEY (NORTHEAST_ID)
REFERENCES IFFGAMEFIELD (ID)": org.apache.derby.client.am.SqlException:
Constraint 'FFGMFIELDNRTHASTID' already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "CREATE TABLE
SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY
(SEQ_NAME))": org.apache.derby.client.am.SqlException: Table/View 'SEQUENCE'
already exists in Schema 'IWAN'.
JDO76609: Got SQLException executing statement "INSERT INTO
SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)":
org.apache.derby.client.am.SqlException: The statement was aborted because
it would have caused a duplicate key value in a unique or primary key
constraint or unique index identified by 'SQL061208085840450' defined on
'SEQUENCE'.
Enable of IFFServer in target server completed successfully
Enable of application in all targets completed successfully
All operations completed successfully
Duplicated project name in import. Project IFFServer-impl defined first in
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\nbproject\ant-
deploy.xml and again in
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\nbproject\buil
d-impl.xml
connect-debugger:
Non-existing path
"C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\${javac.class
path}" provided.
Attached JPDA debugger to localhost:9009
pre-run-deploy:
Redeploying
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\dist\IFFServer
.ear
Start registering the project's server resources
Finished registering server resources
While redeploying, trying to stop the application in target server
completed successfully
While redeploying, trying to remove reference for application in target
server completed successfully
deployment started : 0%
Deploying application in domain failed; Could not rename
C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFSe
rver to
C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFSe
rver_old
At least one operation failed
C:\Iwan\SticktailGames\projects\FriendOrFoe\backend\IFFServer\nbproject\buil
d-impl.xml:174: Deployment error:
The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 34 seconds)
Appearantly, mentioned in a reply on a post from me on the NBUSERS mailing list, I have to add DROP statements in my DDL, which should fix things. Something I'll try tonight, it would be great to be able to debug the application using a debugger instead of System.out.println(...) statements all over the place.
Iwan
Tuesday, January 30, 2007
Developing the JEE application, how tears appeared in my eyes...
Update: I fixed the first exception mentioned in this blog. I had two methods in the WS with the same name but different params. And yesterday I probably didn't compile the -war project, which I did today. Really annoying NB doesn't take care of this.
As promised in yesterday's blog, I would keep you all posted on my proceedings... Unfortunately there's a lot of misery going on.
So I moved towards a JEE application and that was easy as can be. I created a new Enterprise project and two additional modules were created, one for the ejb's and one for the web part. Excellent. And as intended the newly created project was also the main project.
I then created some entities and had NB create as much as possible, which went like a breeze. Same goes for some stateless session-facades that would actually take care of my transaction problems. NB generated everything nicely and did so for remote and local interfaces as well. How it worked? Like a charm.
Next was a webservice, again NB generated all code and I was on a roll. Added some functionality and hit F11... nothing happened but an error message. As it turned out, the two additional projects weren't compiled as a result of a build of the JEE project.
There's no way to set anywhere in the project's properties to build dependent projects as well, so my guess is that NB should've done this all by itself. Yet it didn't.
So I build both projects myself, and did some experimentation... and as it turned out, when compiling the war project it had the same problem. Since the WS is using the SessionFacade it requires the -ejb project to be build and use its resulting JAR. Since that project is not build as a result of building the -war project, the build of the -war project fails. Hmmm, so I need to build dependencies by hand? First tears started to emerge. This is not what I am use to with NB.
After building everything by hand in the right order I run my project and what do you know... it all worked. Yippie... time to shutdown my laptop and go to sleep.
Tonight I wanted to continue where I left my proceedings last night. And this is where the real misery started and I'm getting the feeling that JEE support in NB is not as good as Roman's demo's show.
So what is happening? Well, nothing to be honest. Nothing has changed. Really nothing, honestly. But now when I run my project, it can't find the WS' WSDL file. Here's the output I get.
Problem encountered during annotation processing;
see stacktrace below for more information.
modeler error: Request wrapper bean names must be unique and must not clash with other generated classes. Class: com.sticktailgames.iff.backend.ws.WSPlayerServiceImpl method register(java.lang.String,java.lang.String,java.lang.String)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:204)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:193)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:189)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:220)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:146)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:470)
at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:408)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:363)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:121)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:169)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:347)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:232)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
at com.sun.tools.apt.main.Main.compile(Main.java:1102)
at com.sun.tools.apt.main.Main.compile(Main.java:964)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:605)
at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:538)
at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56)
at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:44)
at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1820)
at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2089)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:328)
at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:332)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:182)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
error: compilation failed, errors should have been reported
wsgen successful
Error parsing WSDLC:\Programs\Sun\AppServer\9.UR1\domains\domain1\generated\xml\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\wsdl\WSPlayerServiceImplService.wsdl (The system cannot find the file specified)
So I'm a bit mystified when it comes to this since everything worked fine yesterday. Messing around with this kind of stuff like this takes too much time. I should just work, or it should hint better at how to solve my problems.
Worse yet, when I re-run the project, I get an error that it can't deploy the application, because Sun AS is not allowing the deletion of the the ear-file.
ADM1006:Uploading the file to:[C:\Documents and Settings\Iwan\Local Settings\Temp\s1astempdomain1server1400139303\IFFServer.ear]
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed; now marked for delete-on-exit
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Cannot delete existing directory C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer, possibly due to one or more open files or streams; these may interfere with later deployment attempts so you may need to manually delete this directory and/or restart the server to release the open files
at com.sun.enterprise.deployment.backend.AppDeployer.cleanAndCheck(AppDeployer.java:313)
at com.sun.enterprise.deployment.backend.AppDeployer.liquidateAppDirAndStubsDirIfTheyHappenToExist(AppDeployer.java:285)
at com.sun.enterprise.deployment.backend.AppDeployer.predeploy(AppDeployer.java:167)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:128)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
Why is this happening? Why can't the interoperability between Sun AS 9 and NB55 both bundled, not be better, smoother? It only works after stopping Sun AS 9. That is just too time consuming, time I want to spend on developing not on waiting for an app server to start.
And while I'm at it, why can clear the app servers output window, but when I run my project the whole log is displayed, not the log from that point on? What's the use of that?
Well... I'm going ahead and try to figure out what's going on and try to fix things. I'll be posting my proceedings through this.
Iwan
As promised in yesterday's blog, I would keep you all posted on my proceedings... Unfortunately there's a lot of misery going on.
So I moved towards a JEE application and that was easy as can be. I created a new Enterprise project and two additional modules were created, one for the ejb's and one for the web part. Excellent. And as intended the newly created project was also the main project.
I then created some entities and had NB create as much as possible, which went like a breeze. Same goes for some stateless session-facades that would actually take care of my transaction problems. NB generated everything nicely and did so for remote and local interfaces as well. How it worked? Like a charm.
Next was a webservice, again NB generated all code and I was on a roll. Added some functionality and hit F11... nothing happened but an error message. As it turned out, the two additional projects weren't compiled as a result of a build of the JEE project.
There's no way to set anywhere in the project's properties to build dependent projects as well, so my guess is that NB should've done this all by itself. Yet it didn't.
So I build both projects myself, and did some experimentation... and as it turned out, when compiling the war project it had the same problem. Since the WS is using the SessionFacade it requires the -ejb project to be build and use its resulting JAR. Since that project is not build as a result of building the -war project, the build of the -war project fails. Hmmm, so I need to build dependencies by hand? First tears started to emerge. This is not what I am use to with NB.
After building everything by hand in the right order I run my project and what do you know... it all worked. Yippie... time to shutdown my laptop and go to sleep.
Tonight I wanted to continue where I left my proceedings last night. And this is where the real misery started and I'm getting the feeling that JEE support in NB is not as good as Roman's demo's show.
So what is happening? Well, nothing to be honest. Nothing has changed. Really nothing, honestly. But now when I run my project, it can't find the WS' WSDL file. Here's the output I get.
Problem encountered during annotation processing;
see stacktrace below for more information.
modeler error: Request wrapper bean names must be unique and must not clash with other generated classes. Class: com.sticktailgames.iff.backend.ws.WSPlayerServiceImpl method register(java.lang.String,java.lang.String,java.lang.String)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:204)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:193)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:189)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:220)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:146)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:470)
at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:408)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:363)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:121)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:169)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:347)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:232)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
at com.sun.tools.apt.main.Main.compile(Main.java:1102)
at com.sun.tools.apt.main.Main.compile(Main.java:964)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:605)
at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:538)
at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56)
at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:44)
at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1820)
at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2089)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:328)
at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:332)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:182)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
error: compilation failed, errors should have been reported
wsgen successful
Error parsing WSDLC:\Programs\Sun\AppServer\9.UR1\domains\domain1\generated\xml\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\wsdl\WSPlayerServiceImplService.wsdl (The system cannot find the file specified)
So I'm a bit mystified when it comes to this since everything worked fine yesterday. Messing around with this kind of stuff like this takes too much time. I should just work, or it should hint better at how to solve my problems.
Worse yet, when I re-run the project, I get an error that it can't deploy the application, because Sun AS is not allowing the deletion of the the ear-file.
ADM1006:Uploading the file to:[C:\Documents and Settings\Iwan\Local Settings\Temp\s1astempdomain1server1400139303\IFFServer.ear]
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFServer-ejb.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib\IFFSharedLib.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF\lib failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war\WEB-INF failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer\IFFServer-war_war failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed after 4 retries
UTIL6048: Attempt to delete C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer failed; now marked for delete-on-exit
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Cannot delete existing directory C:\Programs\Sun\AppServer\9.UR1\domains\domain1\applications\j2ee-apps\IFFServer, possibly due to one or more open files or streams; these may interfere with later deployment attempts so you may need to manually delete this directory and/or restart the server to release the open files
at com.sun.enterprise.deployment.backend.AppDeployer.cleanAndCheck(AppDeployer.java:313)
at com.sun.enterprise.deployment.backend.AppDeployer.liquidateAppDirAndStubsDirIfTheyHappenToExist(AppDeployer.java:285)
at com.sun.enterprise.deployment.backend.AppDeployer.predeploy(AppDeployer.java:167)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:128)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
Why is this happening? Why can't the interoperability between Sun AS 9 and NB55 both bundled, not be better, smoother? It only works after stopping Sun AS 9. That is just too time consuming, time I want to spend on developing not on waiting for an app server to start.
And while I'm at it, why can clear the app servers output window, but when I run my project the whole log is displayed, not the log from that point on? What's the use of that?
Well... I'm going ahead and try to figure out what's going on and try to fix things. I'll be posting my proceedings through this.
Iwan
Monday, January 29, 2007
And now I'm moving towards full fledged JEE development
Yesterday I moved my project into the realm of JEE with EJB and all. Coming from a web only application I stumbled in too many problems I didn't want to think about too much. Most of them had to do with transaction management, lousy design (on my part), and getting used to developing serverside code in NB55 (I only used MobPack for the last 12 months or so) didn't help either.
I downloaded Spring this weekend and thought it would solve all of my problems, just like a friend of mine promised, but the lack of a tutorial that would fit my needs and the lack of NB supporting it the way I'm used to NB supporting something made it a road I should have traveled.
So let me tell you something about what I am developing that is so different from all that I've seen. And probably it isn't.
I'm working on a server that is accessible by J2ME clients, they are nothing more than thin clients it turns out. It's all for a game we're developing and the world the game takes place in is ever expanding. So I have a server that serves the requests from the clients through NB's generated servlet interface. I blogged about that a while ago, a feature that is really helpful, but there are some improvements thinkable. So I went the servlet way.
The ever expanding universe I thought of doing using a thread started in a servlet. Something I shouldn't do, but still can get away with in Sun AS9 and the thread is running nicely doing its job the way I intended… almost. That is where the problems started. Every time I tried to do something with the database, I got an exception upon the commit of the transaction. I tried everything I could think of this weekend. Instantiating new EntityManagers, UserTransactions, additional PersistenceUnits etc, but I couldn't get rid of the exception. Everything I was doing with the database from the servlet code itself worked like a charm. Ergo I thought about the thread opening an URL and have the servlet behind that URL do the work the thread was supposed to do, but I dismissed that idea straight away. I knew I was sinking in the swamp enterprise development can be, but I didn't want to sink that deep. I knew also that I had a Scheduler in stock that would periodically poll the database to see if there were any jobs scheduled and than execute those jobs. Another thread in the system, that I saw doomed to fail, just like my UniverseExpander. I know I shouldn't use threads in a server application anyway.
So Spring to the rescue, but as it turns out, a quick google on "Spring, tutorial, JPA" got me with either tutorials that assumed extensive knowledge of Spring (which I don't posses), or with tutorials that incorporated Spring MVC. Problem here is that I don't have a problem with the database handling from the web end of the application, it is with the 'JSE' part (the threads) of the application. And the JSE type of database handling didn't work for me.
After a weekend of strugling with the code, the problems etc I decided to spend Sunday night on a proper design. Forget about technologies and just make a proper design, the way I do when working on a client's project. I realized that EJB would help me with the transaction management and EJB3 allows me to work with POJOs all the way, which means that I can keep it fairly lightweight, something I need. Although the in-memory model will be huge… relatively, everything happening in the system will be based on single transactions, something that EJBs can handle nicely. For now that is.
I was a bit intimidated with the JEE stuff NB throws at you. You get 3 projects, not a lot of explanation of what is going on in what project and on top of that, it generates about everything I want to do. So I right- and left-click my way around NB and generate SessionBeans, Entities, WebServices and all without really having to do something. So this is what everybody is raving about when talking about NB and JEE… just as cool as J2ME support.
While designing I found that I need some kind of event system in the server as well, pointing me into the direction of JMS.
While googling I stumbled upon Quartz and decided to use it for my job scheduling instead of developing it by myself. It provides exactly what I want and more.
I will post my proceedings in this blog and hope it will be of help to people. This blog entry is more about what I was facing than about how I was solving… so maybe Spring and JPA and just web tier are coming back… for now it is all about full fledged JEE.
Iwan
I downloaded Spring this weekend and thought it would solve all of my problems, just like a friend of mine promised, but the lack of a tutorial that would fit my needs and the lack of NB supporting it the way I'm used to NB supporting something made it a road I should have traveled.
So let me tell you something about what I am developing that is so different from all that I've seen. And probably it isn't.
I'm working on a server that is accessible by J2ME clients, they are nothing more than thin clients it turns out. It's all for a game we're developing and the world the game takes place in is ever expanding. So I have a server that serves the requests from the clients through NB's generated servlet interface. I blogged about that a while ago, a feature that is really helpful, but there are some improvements thinkable. So I went the servlet way.
The ever expanding universe I thought of doing using a thread started in a servlet. Something I shouldn't do, but still can get away with in Sun AS9 and the thread is running nicely doing its job the way I intended… almost. That is where the problems started. Every time I tried to do something with the database, I got an exception upon the commit of the transaction. I tried everything I could think of this weekend. Instantiating new EntityManagers, UserTransactions, additional PersistenceUnits etc, but I couldn't get rid of the exception. Everything I was doing with the database from the servlet code itself worked like a charm. Ergo I thought about the thread opening an URL and have the servlet behind that URL do the work the thread was supposed to do, but I dismissed that idea straight away. I knew I was sinking in the swamp enterprise development can be, but I didn't want to sink that deep. I knew also that I had a Scheduler in stock that would periodically poll the database to see if there were any jobs scheduled and than execute those jobs. Another thread in the system, that I saw doomed to fail, just like my UniverseExpander. I know I shouldn't use threads in a server application anyway.
So Spring to the rescue, but as it turns out, a quick google on "Spring, tutorial, JPA" got me with either tutorials that assumed extensive knowledge of Spring (which I don't posses), or with tutorials that incorporated Spring MVC. Problem here is that I don't have a problem with the database handling from the web end of the application, it is with the 'JSE' part (the threads) of the application. And the JSE type of database handling didn't work for me.
After a weekend of strugling with the code, the problems etc I decided to spend Sunday night on a proper design. Forget about technologies and just make a proper design, the way I do when working on a client's project. I realized that EJB would help me with the transaction management and EJB3 allows me to work with POJOs all the way, which means that I can keep it fairly lightweight, something I need. Although the in-memory model will be huge… relatively, everything happening in the system will be based on single transactions, something that EJBs can handle nicely. For now that is.
I was a bit intimidated with the JEE stuff NB throws at you. You get 3 projects, not a lot of explanation of what is going on in what project and on top of that, it generates about everything I want to do. So I right- and left-click my way around NB and generate SessionBeans, Entities, WebServices and all without really having to do something. So this is what everybody is raving about when talking about NB and JEE… just as cool as J2ME support.
While designing I found that I need some kind of event system in the server as well, pointing me into the direction of JMS.
While googling I stumbled upon Quartz and decided to use it for my job scheduling instead of developing it by myself. It provides exactly what I want and more.
I will post my proceedings in this blog and hope it will be of help to people. This blog entry is more about what I was facing than about how I was solving… so maybe Spring and JPA and just web tier are coming back… for now it is all about full fledged JEE.
Iwan
Subscribe to:
Posts (Atom)