Showing posts with label Jdeveloper. Show all posts
Showing posts with label Jdeveloper. Show all posts

Thursday, January 14, 2010

Error using upgrade assistant in JDeveloper 11.1.1.2.0

Today I was running the upgrade assistant in  JDeveloper 11.1.1.2.0 to migrate an ear file to see if we can get a quick deployment on the WLServer.
But then I suddenly received  the following error:


31:57 WARNING - ***
[ERROR] Action in Web Service Artifact Generation 10.1.3javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.lang.NullPointerException (<Unknown Source>#10)    at com.sun.script.javascript.RhinoCompiledScript.eval(RhinoCompiledScript.java:41)    at oracle.migration.action.ScriptBody.execute(ScriptBody.java:122)    at oracle.migration.action.Action.eval(Action.java:210)    at oracle.migration.action.Action.execute(Action.java:176)    at oracle.migration.action.Action.doAction(Action.java:227)    at oracle.migration.action.Action.doFinally(Action.java:231)    at oracle.migration.action.Action.execute(Action.java:188)    at oracle.migration.rule.MigrationRule.performAction(MigrationRule.java:808)    at oracle.migration.update.Updator$ActionContent.doUpdate(Updator.java:100)    at oracle.migration.update.Updator.doUpdate(Updator.java:110)    at oracle.migration.rule.MigrationRule.doUpdate(MigrationRule.java:788)    at oracle.migration.rule.MigrationRule.doUpdate(MigrationRule.java:781)    at oracle.migration.Migrator.generateArtifacts(Migrator.java:762)    at oracle.migration.MigrationPlan.doMigration(MigrationPlan.java:511)    at oracle.migration.MigrationPlan.execute(MigrationPlan.java:438)    at oracle.weblogic.jdeveloper.migration.io.WLMigrationManager.executeArchiveFindings(WLMigrationManager.java:288)    at oracle.weblogic.jdeveloper.migration.addin.application.ArchiveMigrationContext.regenerateFindings(ArchiveMigrationContext.java:85)    at oracle.weblogic.jdeveloper.migration.addin.application.ArchiveMigrationContext.continueUpgrade(ArchiveMigrationContext.java:131)    at oracle.weblogic.jdeveloper.migration.addin.command.ContinueUpgradeCommand.run(ContinueUpgradeCommand.java:89)    at oracle.toplink.workbench.utility.command.CommandWorker.run(CommandWorker.java:61)Caused by: sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.lang.NullPointerException (<Unknown Source>#10)    at sun.org.mozilla.javascript.internal.Context.throwAsScriptRuntimeEx(Context.java:1699)    at sun.org.mozilla.javascript.internal.MemberBox.invoke(MemberBox.java:147)    at sun.org.mozilla.javascript.internal.NativeJavaMethod.call(NativeJavaMethod.java:190)    at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Interpreter.java:3073)    at sun.org.mozilla.javascript.internal.Interpreter.interpret(Interpreter.java:2239)    at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:138)    at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(ContextFactory.java:323)    at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(ScriptRuntime.java:2747)    at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(InterpretedFunction.java:149)    at com.sun.script.javascript.RhinoCompiledScript.eval(RhinoCompiledScript.java:37)    ... 19 moreCaused by: java.lang.NullPointerException    at java.io.File.<init>(File.java:222)    at oracle.migration.ws.config.cli.SmartUpgradeEntry.createContinuationStateFile(SmartUpgradeEntry.java:285)    at oracle.migration.ws.config.cli.SmartUpgradeEntry.upgrade(SmartUpgradeEntry.java:174)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java:597)    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37)    at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java:597)    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:244)    at sun.org.mozilla.javascript.internal.MemberBox.invoke(MemberBox.java:132)    ... 27 more[INFO]: script file:
null
script line:

   extraArgs=migrator.getLocator("_cliArgs")
   if (extraArgs==null) {
          map = null;
   } else {
          leaves=extraArgs.getLeafMigrationElements(rule)
          migEl=leaves.get(0)  
          map=migEl.getArtifact()    
   }
          Packages.oracle.migration.ws.config.cli.SmartUpgradeEntry.upgrade(rule, migrationElement, map, targetVersion)
      ot=Packages.oracle.migration.ws.config.cli.SmartUpgradeEntry.getOutString();
          migrationElement.setAttribute("ws.upgrade.out", ot)

 
script code:
null


I did not see this in previous migrations.........

After a while of debugging and looking for certain errors finally it came to mind that spaces in paths of imported files could be disastrous.

The error changed a bit, now it could find de ear but still ended in a nullpointer exception :-(
The fix for this that the whole workspace and project also had a space in the path.
After changing this the upgrade went through and we could continue looking into the migration of all parts for the ear......



Monday, July 6, 2009

Changing the font of JDeveloper 11R1 on Linux

Just installing the new release of JDeveloper 11.

But when running on Linux the font size seems a little bit off.
In order to make this better to look at a chane is needed in the ide.properties.

This file is located at:   ~/.jdeveloper/system11.1.1.1.33.54.07/o.jdeveloper
There is a commented field "#      Ide.FontSize=11"
Changed it to 'Ide.FontSize=10' and then started JDeveloper that looked a lot better........







Tuesday, March 24, 2009

Howto run ADF with a Node Manager


I am working now more and more with weblogic.
So I normally ran simple ADF web applications from JDeveloper.

Now I tried to deploy an ADF webapplication on a server running an AdminServer and a Managed Server set-up to be recovered by the node manager.
But during deploy the only error received is a "java.lang.ClassNotFoundException: "

Either on "oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener" or on "javax.faces.webapp.FacesServlet".

But when running the Managed Server from the commandline all seem to work fine..........

The catch is in the classpath.
The nodemanager is NOT using the same startup script as available in your domain directory (see further below).

So a change needs to be made to the nodemanager:
Add the following code in the <WLS_HOME>/server/bin/startNodeManger.sh (or .cmd).

ORACLE_HOME="/opt/products/oracle/WLS103/jdeveloper"
export ORACLE_HOME

ADF_CLASSPATH="${ORACLE_HOME}/modules/features/adf.share_11.1.1.jar"
export ADF_CLASSPATH

set -x
CLASSPATH="${WEBLOGIC_CLASSPATH}${CLASSPATHSEP}${CLASSPATH}${CLASSPATHSEP}${BEA_HOME}${CLASSPATHSEP}${ADF_CLASSPATH}"
export CLASSPATH

By doing so the start of a managed server is made ADF aware and therefor deployments will result in a deployment on a server that uses the nodemanager...

There is a second solution to this problem.
The nodemanager.properties can be adjusted.
The properties for start and stop scripts needs to be enabled.

StopScriptEnabled=true
StartScriptEnabled=true


By this the classpath is set through the scripts created when the domain is also created...


Thursday, February 19, 2009

Open a file in a JDeveloper Extension.

Since a few months I now run Linux.
And I am using the PMD plugin for JDeveloper.
After the upgrade of JDeveloper to the latest version 11.1.1.0.1 the preferences are always gone.
So I wanted to import my settings again, but the file selector did not come up!

So looking into the log I saw the following stacktrace:
Exception occurred during event dispatching:
java.lang.ClassCastException: sun.awt.NullComponentPeer cannot be cast to sun.awt.X11.XChoicePeer
at sun.awt.X11.XFileDialogPeer.init(XFileDialogPeer.java:264)
at sun.awt.X11.XFileDialogPeer.show(XFileDialogPeer.java:726)
with the following code to open the dialog
final FileDialog fdlg = new FileDialog(new Frame(), "Import", FileDialog.LOAD);
fdlg.setVisible(true);
Looking throug a lot of (blog) post I could not get a fix for this.
So the thing that intrigued by the fact that the JDeveloper File chooser was working.
But that was not the Java default file chooser.

Then the question arises how can I use the JDeveloper file chooser?

A quest was up to get through the knowledge where a description is on the JDeveloper File Chooser.

I finally found it in an extension I also did some work on, the search extension.

It is needed to use the following code:
    public String getPath(String windowText, String currPath)
{
String returnPath = "";

URL url = URLFactory.newDirURL( Ide.getSystemDirectory() );
URLChooser chooser = DialogUtil.newURLChooser( url );
chooser.setSelectionMode( URLChooser.SINGLE_SELECTION );
chooser.setSelectionMode( URLChooser.FILES_ONLY);
int ret = chooser.showOpenDialog( Ide.getMainWindow(), windowText);
if ( ret == URLChooser.APPROVE_OPTION )
{
URL selectedURL = chooser.getSelectedURL();
returnPath = URLFileSystem.getPlatformPathName( selectedURL ) ;
}
return returnPath;
}
With this also on Linux it will work to import or export files into the PMD plugin.