Monday Mar 25, 2013

Now is a perfect time to panic^h^h^h^h^hbackup

Peter Benedikovic has been hard at work prepping a new version of the GlassFish server adapter for Eclipse. This new server adapter supports GlassFish 4.0, but has required some changes that prevent the upgrade process from being straight-forward.

You will be able to tell that you are upgrading to the new version of the adapter if you see messages like these:

Your original request has been modified.
  "GlassFish Tools" is already installed, so an update will be performed instead.
  "Java EE 5 Documentation" is already installed, so an update will be performed instead.
  "Java EE 6 Documentation" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
  Software being installed: GlassFish Tools 2.2.1.201303... (oracle.eclipse.tools.juno.glassfish.feature.group 2.2.1.201303...)
  Software currently installed: GlassFish 3.1.2.2 Application Server runtime 3.1.2.201208291146 (oracle.eclipse.runtime.juno.runtime.glassfish3122.feature.group 3.1.2.201208291146)
  Only one of the following can be installed at once: 
    Oracle GlassFish Server Tools 5.0.1.201208291146 (oracle.eclipse.tools.glassfish 5.0.1....)
    GlassFish Tools 5.2.1.201303201334 (oracle.eclipse.tools.glassfish 5.2.1....)
  Cannot satisfy dependency:
    From: GlassFish 3.1.2.2 Application Server Runtime 3.1.2.2012... (oracle.eclipse.runtime.glassfish3122 3.1.2.2012...)
    To: package com.sun.enterprise.jst.server.sunappsrv 0.0.0
  Cannot satisfy dependency:
    From: GlassFish 3.1.2.2 Application Server runtime 3.1.2.2012... (oracle.eclipse.runtime.juno.runtime.glassfish3122.feature.group 3.1.2.2012...)
    To: oracle.eclipse.runtime.glassfish3122 [3.1.2.2012...]
  Cannot satisfy dependency:
    From: GlassFish Tools 2.2.1.2013... (oracle.eclipse.tools.juno.glassfish.feature.group 2.2.1.2013...)
    To: oracle.eclipse.tools.glassfish [5.2.1.2013...]

Peter has a write-up on the process to follow to install the new GlassFish server adapter.

Monday Mar 05, 2012

Internal 3.1.2 runtime plugin for Eclipse available

While I have been busy learning the code of some different Oracle products, I have been helping keep the Eclipse tooling story on track. I am really happy with the work that Peter Benedikovic has been doing.

And here is the result of one of his first assignments:

He created a new runtime plugin for Eclipse, so folks that love to be lazy (like me) can download the plugin and never have to think about downloading 3.1.2 from download.java.net, unzipping it, opening the New Server dialog to create a new server runtime and then registering a new 3.1.2 instance.

I can feel my braincells doing a happy dance already!

For folks that like to live on the edge, there is also an update center of GlassFish related code for Eclipse Juno.

Thursday Dec 15, 2011

Eclipse integration changes

I recently started being responsible for addressing issues with the GlassFish integration plugin for Eclipse. Lucky for me, Indigo had shipped before the previous developer had left Oracle, so there were not immediate changes that were necessary.

Recent changes in the GF 3.1.2 code did make it necessary to release a new version of the plugin, since users could not register recent builds by claiming that it was a 3.1.1 build any longer.

I just finished pushing an update that makes 3.1.2 an explicitly 'supported' run-time to address that issue.

I have also finished the work that Ludo started to convert the plugin to a Maven/Tycho based build.

This is the first release of the plugin that was built and pushed onto java.net via hudson jobs, thanks to the wonderful support of Jane Young.

You can get the new plugin from http://dlc.sun.com.edgesuite.net/glassfish/eclipse/indigo/.

Folks should know that I will be building a new GlassFish runtime plugin that includes 3.1.2 once it is finalized.

Monday Feb 28, 2011

GlassFish 3.1 and NetBeans 7.0

Folks have been working feverishly to put the finishing touches on GlassFish Server 3.1... and it is strutting it's stuff on the virtual red carpet this morning... a finished product.

NetBeans 7.0 is still under development and will ship with GlassFish Server 3.1 when it is released . The dev build downloads have been bundling the latest promoted builds of GlassFish Server 3.1

The integration plugin has also allowed users to download the 'latest promoted build' for some time. I am making the code changes that will make the 3.1 FCS bits 'the bits' that get downloaded when the user decides to Download Now... the 3.1 server.

I have posted a number of blog entries that outline some of the features that are supported by GlassFish Server 3.1 and the integration with NetBeans:

Register an existing 3.1 install in NetBeans 7.0
The registration wizard automatically detects which kind of GlassFish Server (3.0 or 3.1) you are trying to register. In earlier implementations of the registration wizard the user had to select the version correctly.
Download and 'install' GlassFish Server OSE 3.1
The plugin had been allowing users to download and install promoted builds while the 3.1 release has been under development. Now that the server has shipped, the plugin allows users to download the release bits.
Restart a remote domain
This feature is actually supported by 3.0 and 3.1.
Enable/disable deployed applications
Users have been able enable and disable deployed applications and modules with asadmin. It wasn't considered to be a must have feature of plugin. That changed when the application versioning feature went live in 3.1 builds. When it became really easy for a project to become disabled (by deploying a new version of the project), it became important to be able to enable the older version after the user undeployed the latest version of project.
Restart a remote domain in debug mode
This is a feature of the plugin that only works with 3.1. This allows users to Debug->Debug Project when they are working with a project that targets a remote domain.
View the server log of a remote domain
This is a feature of the plugin that only works with 3.1, since it depends on the extended features of the REST interface of 3.1.
Create glassfish-\*.xml files for descriptors and resources.
These are new descriptor files associated with 3.1.
Web service management nodes in the Servers explorer
This is a feature of the plugin that only works with 3.1, since it depends on the extended features of the REST interface of 3.1.
Application scoped resources
Users can take advantage of this 3.1 feature by altering the location of the glassfish-resources.xml file in their projects that target 3.1. The integration plugin tracks the file's location so changes that are triggered by wizards and the like get written into the file correctly.
Wizards to create Oracle WebLogic Server deployment descriptors
This was added to the 3.1 plugin, so users would be able to create 'empty' descriptors for projects that do not actually target WLS.

Sunday Sep 19, 2010

IDE Feature, now available from the command-line

Folks that use NetBeans and GlassFish together have enjoyed the benefits of having the IDE automatically register and update resources for many years. This is one of the features that folks doing command-line based deployment have requested for many years, too. For those folks that have been waiting, I have good news. The feature is in GlassFish Server 3.1, though it is going by the name Application Scoped Resources. Jagadish provides a lot of details about application scoped resources and Alexis produced a screen cast that demonstrates application scoped resources.

After seeing all their hard work, I decided to see how I could support the feature in NetBeans.

We have been creating a file called sun-resources.xml to persist resource definitions in NetBeans for awhile. I recently made the changes necessary to start naming that file glassfish-resources.xml when a project targets GlassFish Server 3.1.

The file is currently used by the IDE to drive its automatic resource registration, if it is present in the 'Server Resources' logical folder for a project when the project is deployed. Move this file to someplace else to prevent the IDE from creating and updating resources. If you Cut the file out of the Server Resources logical folder and Paste it into

  1. the WEB-INF folder under the 'Web Pages' logical folder, you will have a Web Application project that leverages application scoped resources, OR
  2. the 'Configuration Files' logical folder, you will have an EJB Module or Enterprise Application project that leveraged application scoped resources,


Two projects, transformed to leverage application scoped resources.

The IDE doesn't do the resource registration and updates after this change. The server will when the app is deployed.

IDE features that would update the glassfish-resources.xml file will update the file in its new location after you have moved it out of the 'Server Resources' logical folder, automatically.

If you use JPA, you need to make one change to the persistence.xml file that is generated by NetBeans when you create your entity beans. You will need to change the value of the jta-data-source element. For example, if your persistence.xml says

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" 
        xmlns="http://java.sun.com/xml/ns/persistence" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="EJBModule23PU" transaction-type="JTA">
    <jta-data-source>jdbc/myJDBCresource
    <properties/>
  </persistence-unit>
</persistence>
you will need to change it to say
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" 
       xmlns="http://java.sun.com/xml/ns/persistence" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="EJBModule23PU" transaction-type="JTA">
    <jta-data-source>java:app/jdbc/myJDBCresource
    <properties/>
  </persistence-unit>
</persistence>

If you use JDBC directly in your code, you will need to make sure that you create a glassfish specific deployment descriptor to map the logical JDBC resource to the actual resource's JNDI name.

I have to admit, none of this would work without the hard work that Jagadish and Mitesh had to do to in the server code to get this feature working. Thanks guys. You rock.

You can start to leverage application scoped resources in modules and apps that use JPA on GlassFish Server 3.1 promoted builds 20 (and higher).

Monday Jul 06, 2009

Lifting the basket

There has been support for registering instances of Sun GlassFish Communications Server, which is produced from the code written as part of Project SailFin for a long time in the our Eclipse Server Adapter.

But, it has been hidden from users.

Well, no more!

Tuesday Nov 04, 2008

No PasswordCredential found

I have seen a number of people run into problems with using databases that use an empty string as the value for a password. I have seen many of these reports coming from folks using MySQL. But I had never investigated the problem... until today.

I have been asked to prepare some training materials about the integration between NetBeans and GlassFish for folks that aren't in the thick of developing NetBeans or GlassFish. So, I decided to try out the NetBeans, MySQL, GlassFish bundle... and ran straight into the grief that others have been talking about.

I installed the bundle on my laptop and tried to retarget the JsfJpa sample to MySQL. When I tried to create the JDBC Connection Pool in the IDE, I hit the first problem. The wizard for creating the connection pool insisted that I must enter a value in the field.

I filed an issue against NetBeans so this can get fixed.

After I got the pool defined... incorrectly. I decided to try to correct it. So, I tried setting the value to an empty string via the CLI and the Admin GUI and was thwarted on all fronts.

I was lucky though. I have Kedar just down the hall... and he gave me the info that I needed.

And now, I am going to give that to you.

There is a special meta-string that can be used in property values to represent a zero length string.

()

This special string can be used in asadmin's set subcommand, in the Admin GUI's property table and in the IDE wizards.

About


Vince Kraemer writes the entries in this blog.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News
Blogroll

No bookmarks in folder

automarks