Showing posts with label web dev. Show all posts
Showing posts with label web dev. Show all posts

10 February 2014

MalformedUrlException o_O

...
Caused by:
java.net.MalformedURLException
        at java.net.URL.(URL.java:601)
        at java.net.URL.(URL.java:464)
        at java.net.URL.(URL.java:413)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.xalan.templates.StylesheetRootProxy.(Unknown Source)
OR
...
java.net.MalformedURLException
 at java.net.URL.(URL.java:601)
 at java.net.URL.(URL.java:464)
 at java.net.URL.(URL.java:413)
 at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:649)
 at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)


...may just mean that you pushed a null InputSteam into parser.

For example this piece of code would produce such exception trace:

SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
parser.parse(new InputSource((InputStream) null), new DefaultHandler());

It also may be done in less explicit way, for example with an XSLT parser being given XSLT source with null InputSteam inside (which actually was the issue I originally faced).

07 June 2012

DSRA0080E Data Store Adapter exception on IBM WebSphere EJB client

More like a hint for myself :)


Exception like this:

...
Caused by: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: com/ibm/websphere/rsadapter/DataStoreHelper.doConnectionSetupPerGetConnection(Ljava/sql/Connection;ZLjava/lang/Object;)Z.
  at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.getConnection(WSRdbManagedConnectionImpl.java:3503)
  at com.ibm.ws.rsadapter.spi.WSDefaultConnectionManagerImpl.allocateConnection(WSDefaultConnectionManagerImpl.java:91)
  at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:646)
  ... 22 more
Caused by: java.lang.AbstractMethodError: com/ibm/websphere/rsadapter/DataStoreHelper.doConnectionSetupPerGetConnection(Ljava/sql/Connection;ZLjava/lang/Object;)Z
  at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.getConnection(WSRdbManagedConnectionImpl.java:3482)
  ... 24 more

may be caused by running EJB client application with different (e.g. non-IBM) Java VM.

02 April 2012

Meaningful error message from IBM WebSphere

Seeing this on your WebSphere application server startup?
00000000 ContainerHelp E   WSVR0501E: Error creating component com.ibm.ws.cluster.runtime.ProcessRuntimeImpl
java.lang.NoClassDefFoundError: com.ibm.websphere.cluster.topography.DescriptionManagerFactory (initialization failure)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
        at com.ibm.ws.cluster.runtime.ProcessRuntimeImpl.initialize(ProcessRuntimeImpl.java:366)
        at com.ibm.ws.runtime.component.ContainerHelper.initWsComponent(ContainerHelper.java:1166)
        at com.ibm.ws.runtime.component.ContainerHelper.initializeComponent(ContainerHelper.java:1073)
        at com.ibm.ws.runtime.component.ContainerHelper.initializeComponents(ContainerHelper.java:874)
        at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:780)
        at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:754)
        at com.ibm.ws.runtime.component.ServerImpl.initialize(ServerImpl.java:350)
        at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:280)
        at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:214)
        at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:666)
        at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:213)
        at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:93)
        at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:74)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
        at org.eclipse.core.launcher.Main.run(Main.java:981)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:330)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:108)
Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
        at com.ibm.ws.util.ImplFactory.loadImplFromClass(ImplFactory.java:354)
        at com.ibm.ws.util.ImplFactory.loadImplFromKey(ImplFactory.java:328)
        at com.ibm.ws.util.ImplFactory.loadImplFromKey(ImplFactory.java:332)
        at com.ibm.ws.wlm.Factory$4.run(Factory.java:141)
        at java.security.AccessController.doPrivileged(AccessController.java:251)
        at com.ibm.ws.wlm.Factory.loadImpl(Factory.java:139)
        at com.ibm.websphere.cluster.topography.DescriptionManagerFactory.(DescriptionManagerFactory.java:50)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at com.ibm.ws.cluster.service.ClusterManagementImpl.(ClusterManagementImpl.java:119)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:45)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
        at com.ibm.wsspi.cluster.ClusterManagementFactory.(ClusterManagementFactory.java:62)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at com.ibm.ws.cluster.runtime.WLMDiagnosticModule.ffdcDumpDefaultClusterManagement(WLMDiagnosticModule.java:422)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at com.ibm.ws.ffdc.DiagnosticModule.getDataForDirective(DiagnosticModule.java:305)
        at com.ibm.ws.ffdc.DiagnosticModule.getDataForDirectives(DiagnosticModule.java:279)
        at com.ibm.ws.ffdc.DiagnosticModule.dumpComponentData(DiagnosticModule.java:144)
        at com.ibm.ws.ffdc.impl.DMAdapter.processDM(DMAdapter.java:123)
        at com.ibm.ws.ffdc.impl.DMAdapter.formatTo(DMAdapter.java:114)
        at com.ibm.ffdc.util.provider.IncidentLogger.writeIncidentTo(IncidentLogger.java:63)
        at com.ibm.ws.ffdc.impl.FfdcProvider.logIncident(FfdcProvider.java:135)
        at com.ibm.ws.ffdc.impl.FfdcProvider.logIncident(FfdcProvider.java:92)
        at com.ibm.ffdc.util.provider.FfdcProvider.log(FfdcProvider.java:232)
        at com.ibm.ws.ffdc.impl.FfdcProvider.log(FfdcProvider.java:100)
        at com.ibm.ffdc.util.provider.IncidentEntry.log(IncidentEntry.java:96)
        at com.ibm.ffdc.util.provider.Ffdc.log(Ffdc.java:90)
        at com.ibm.ws.ffdc.FFDCFilter.processException(FFDCFilter.java:114)
        at com.ibm.ws.cluster.ProcessProperties.(ProcessProperties.java:281)
        at com.ibm.ws.cluster.ProcessProperties.(ProcessProperties.java:234)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at com.ibm.ws.cluster.runtime.ProcessRuntimeImpl.initialize(ProcessRuntimeImpl.java:307)
        ... 31 more
Caused by: java.lang.NullPointerException
        at com.ibm.ws.cluster.WLMCustomPropertyUtility.getBBCallbacksEnableWLMThreads(WLMCustomPropertyUtility.java:384)
        at com.ibm.ws.cluster.propagation.bulletinboard.BBDescriptionManager.(BBDescriptionManager.java:165)
        at java.lang.J9VMInternals.newInstanceImpl(Native Method)
        at java.lang.Class.newInstance(Class.java:1325)
        at com.ibm.ws.util.ImplFactory.loadImplFromClass(ImplFactory.java:349)
        ... 70 more

This should probably mean that your PC's hostname couldn't be resolved.

15 March 2010

IE Developer Toolbar for IEs4Linux

IEs4Linux is know the best approach of running Internet Explorer under Linux. Working on a web project I faced a need to fix some style bugs in IE. So I tried to install IE Developer Toolbar (for those who don't know - just like FireBug, but far less cool) and saw error message from msiexec saying "Internet Explorer Development Toolbar requires Windows 2000 or newer".

So this post is about how to install the toolbar anyway! :)

The point is that IEs4Linux runs IE in wine environment with Win 98 version (at least for IE6 this is true), that why developer toolbar doesn't installs. To fix this, execute:

$ cat `which ie6` | grep WINEPREFIX
export WINEPREFIX="/opt/.ies4linux/ie6" 

You will most probably see other path instead of  /opt/.ies4linux/ie6. So now we know where the wine environment for wine is located. The next thing to do is to run winecfg for this environment and change target Win version:

$ WINEPREFIX="/opt/.ies4linux/ie6" winecfg

A dialog window will appear and in drop-down in the bottom of the window select Windows XP and press OK.

With this changes your IE won't run. So, download MSI of developer toolbar to your home directory with your favourite browser and install it to your wine environment with the following:

$ cd ~ 
$ WINEPREFIX="/opt/.ies4linux/ie6" msiexec /i IEDevToolBarSetup.msi
 
After installing the toolbar, run winecfg just like we previously did and switch Win version back to Windows 98.

Voila, we have IE with developer toolbar :)