Posted by: peteinman | October 15, 2010

Updating Root Certificate Authorities–J2EE JDK

I had a problem I hadn’t encountered before in a J2EE environment. I had in the windows world and it was to to with trusted root authorities and certificates.

From one of our OSB proxy services, we were receiving the following message. This occurred after the server system we were communicating with updated their certificates.

General runtime error: [Security:090477]Certificate chain received from xxxxxx.xxxx.xxx.xx – 99.9.999.999 was not trusted causing SSL handshake failure.

 

I have had this with IE clients connecting to our system after we did the same thing, and a patch from Microsoft or the certificate suppliers sorted it.

I’d not encountered it in the J2EE world as we only communicate with one system via https, so was a little puzzled at first on what to do.

These are the steps I went through to solve it:

1) Download the certificate as a PEM file, then change to jre\lib\security and update the database “cacerts” which is the database of trusted authorities with this command.

keytool -keystore cacerts -storepass changeit -importcert -file mycert.pem –v

Probably easy if you’re used to working with certificates, but if you’re not…..

Posted by: peteinman | May 11, 2010

XPath Tester

I came across this the other day which I found extremely useful for playing with xpath expressions.

http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm

Posted by: peteinman | May 10, 2010

Oracle Service Bus IDE

I really do think the Oracle Service Bus IDE using Workshop is awful and it drives me round the bend!

Yes, it is a billion times more enjoyable than just developing in a web browser which was the original method, but the whole IDE just feels a little unstable at times.

Today, I have nullpointer exceptions whilst publishing a project which published quite happily last week.

Many times I end up having to remove the .metadata folder from the workspace and starting again.

And the odd synchronisation issues between the file system and the workspace annoy me too.

I’m guessing this is normal eclipse IDE stuff, but if you’re not using eclipse actively for development, it’s a bit of a mystery at times.

The sooner it moves into a proprietary IDE the better!

 

Here’s an example of what annoys me.

1) New OSB Configuration, removed every trace of the previous one from the IDE.

2) New OSB Project, removed every trace of the previous one from the IDE.

3) Publish

The eclipse PDE runtime log message says “Unhandled Event Loop Exception” and you get the stack trace below and the publish, just doesn’t publish.

Now, I’m faced with trying to figure out what’s wrong with the eclipse IDE and will probably end up with wiping out my .metadata folder again as it must be hanging on to something even though I deleted the previous projects.

It just creates unnecessary pain and such a useless flippin’ error message. I really didn’t need this on a Monday morning!!

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:3563)
at org.eclipse.swt.SWT.error(SWT.java:3481)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3664)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3301)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.eclipse_main(Main.java:1148)
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 com.m7.installer.util.NitroxMain$1.run(NitroxMain.java:33)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.NullPointerException
at com.bea.alsb.ui.explorer.projectnester.AlsbContainerContentProvider.hasChildren(AlsbContainerContentProvider.java:75)
at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.hasChildren(SafeDelegateTreeContentProvider.java:107)
at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.hasChildren(SafeDelegateTreeContentProvider.java:292)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(NavigatorContentServiceContentProvider.java:662)
at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2017)
at org.eclipse.jface.viewers.TreeViewer.isExpandable(TreeViewer.java:575)
at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2047)
at org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.java:2671)
at org.eclipse.jface.viewers.TreeViewer.updatePlus(TreeViewer.java:835)
at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2606)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1829)
at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:704)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1804)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1753)
at org.eclipse.ui.navigator.CommonViewer.internalRefresh(CommonViewer.java:454)
at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1460)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1368)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:390)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1331)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1463)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:548)
at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:300)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider$7.run(PackageExplorerContentProvider.java:913)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.runUpdates(PackageExplorerContentProvider.java:171)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.runPendingUpdates(PackageExplorerContentProvider.java:163)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider$1.run(PackageExplorerContentProvider.java:145)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3664)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3301)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:112)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:448)

Posted by: peteinman | May 4, 2010

User Interface Design Issues

So, where is the logic in placing options like “Close” right next to the option marked “Edit”

Take this example from a Windows command window running WebLogic

image

And from the Oracle Workshop IDE, why is the most common option “Publish” next to the “Stop” option.

image

And, yes, I have hit those options several times today!

Posted by: peteinman | April 29, 2010

Publishing Error Oracle Service Bus – Workshop IDE

I’ve been working on a SOA project for a few days, and gradually adding functionality. Suddenly Workshop failed to publish with the exception below.

org.eclipse.core.runtime.CoreException: Error publishing new container for: Dev
    at com.bea.alsb.server.publish.ALSBPublishOperation.publishNewContainer(ALSBPublishOperation.java:302)
    at com.bea.alsb.server.publish.ALSBPublishOperation.execute(ALSBPublishOperation.java:150)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.performTasks(WeblogicServerBehaviour.java:1189)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:744)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:607)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:503)
    at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
    at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
    at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:72)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
org.eclipse.core.runtime.CoreException[4000]: com.bea.alsb.core.repositories.RepositoryException: Socket closed
    at com.bea.alsb.core.internal.repositories.jar.AbstractConfigRepository.init(AbstractConfigRepository.java:122)
    at com.bea.alsb.core.internal.repositories.jar.ServerConfigRepository.<init>(ServerConfigRepository.java:102)
    at com.bea.alsb.core.internal.repositories.RepositoryService.create(RepositoryService.java:155)
    at com.bea.alsb.server.publish.ALSBPublishOperation.publishNewContainer(ALSBPublishOperation.java:295)

The key part of this exception is highlighted in red.

I did raise a support case, but in the meantime, decompiled some of the classes in the stack trace to get a clue as to what was going on.

All it was doing was creating a publish session, uploading the file and publishing, so why the Socket Closed exception.

Something made me think of the maximum message size for WebLogic which by default is 10,000,000 bytes or 10MB. My project had grown to 12MB due to the addition of a couple of jar files.

I increased the maximum message size and my project now publishes.

Hope this is of help to someone.

Posted by: peteinman | April 29, 2010

A very useful blog

There is lots and lots of useful information on this blog

http://jaysensharma.wordpress.com/

I wish I could generate as much useful stuff as Jay does.

Posted by: peteinman | April 29, 2010

OSB – Failed To get Operation From Inbound Request

I’ve been developing an OSB application which uses an existing EJB hosted on WLS 8.1.

For 1.5 days, I’ve been stumped by the error “failed to get operation from inbound request”

My XML that I was sending to the EJB looked perfect, method names and parameters matched perfectly.

What it turned out to be, and something I found by reading a “Caution” column in “The Definitive Guide To Oracle Service Bus” was that the namespace was missing a trailing slash and instead of

http://www.openuri.org”, should have been

“http://www.openuri.org/

Now my EJB gets called correctly.

I’ve been working with the weblogic-maven-plugin over the past few weeks trying to get a deployment working against Oracle WebLogic Server 10.3.2.

I’m using the 2.3-SNAPSHOT version and everything’s been going fine with local builds and deployments – it works really well.

Running my build from a TeamCity environment started giving me the following error

java.net.MalformedURLException: no protocol: and

At first I thought maybe there was something wrong with the remote WebLogic server I was deploying to, but when I tried to deploy to that instance from MY own PC, it worked perfectly.

After several hours of investigation and comparing debug output between the two systems running the plug-in I was no further forward.

The stack trace which is here was pointing me to the java.net.URL class.

java.net.MalformedURLException: no protocol: and
        at java.net.URL.<init>(URL.java:567)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:751)
        at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
        at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
        at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)

 

I thought this was strange, but then decompiled the “java.net.URL” class which is where I realised that the “no protocol: and” was actually giving me a hint.

On Windows systems, the default maven repository user directory is c:\documents and settings\<username>\.m2

This is where the “and” is coming from.

Changing the default repository to a repository name without spaces solved the problem and I can now deploy nicely from TeamCity.

I’m also using the default repository location on Windows 7, but with Windows 7, the location is now c:\users\<username>\.m2 which doesn’t cause problems as there are no spaces in the path name.

The result is – on Windows systems that use the “C:\documents and settings” convention, don’t use the default repository location when using maven – create your own with a sensible path name!

Posted by: peteinman | February 25, 2010

Vista is no more

Finally, Windows Vista failed to shut down for the last time yesterday and had to be helped by the power switch.

Now running Windows 7 64 bit and a Solid State Hard Disk from Crucial, details of which are here.

Lovely, Windows 7 ready to log on in less than 30 seconds. Maven, WebLogic server and other development tools I use just fly.

Posted by: peteinman | January 15, 2010

Things you never know about Windows Vista

1) Will it shut down before you are forced to press the power button?

2) Will it start?

3) Will the screen which says “Press CTRL+ALT+DEL to logon” actually respond?

4) Will right clicking on a file in explorer hang explorer.exe resulting in that process restarting

5) Will my wireless networking re-connect to my home router or will it need another restart?

Roll on the Windows 7 and SSD upgrade!

Older Posts »

Categories