javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: WINDOWS_ERROR_INVALID_PARAMETER - java

We are using Mifare 4k card and Gemalto Prox SU Contact less reader.
When we are trying to authenticate the sector, we are getting following exception and this is not occuring every time
but only on one client machine
May 20, 2014 4:02:43 PM com.tcs.smartcard.Mifare4KUtils authSector
SEVERE: authSector
javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: WINDOWS_ERROR_INVALID_PARAMETER
at sun.security.smartcardio.ChannelImpl.doTransmit(Unknown Source)
at sun.security.smartcardio.ChannelImpl.transmit(Unknown Source)
at com.tcs.smartcard.Mifare4KUtils.authSector(Mifare4KUtils.java:114)
at com.tcs.smartcard.Mifare4KUtils.authenticateKeyBlockToFormat(Mifare4KUtils.java:426)
at com.tcs.smartcard.Mifare4KUtils.writeKeyBlockForFormat(Mifare4KUtils.java:677)
at com.tcs.smartcard.IssueCardApplet$TaskInit.doInBackground(IssueCardApplet.java:691)
at com.tcs.smartcard.IssueCardApplet$TaskInit.doInBackground(IssueCardApplet.java:584)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: sun.security.smartcardio.PCSCException: WINDOWS_ERROR_INVALID_PARAMETER
at sun.security.smartcardio.PCSC.SCardTransmit(Native Method)
... 13 more
Please help on this.

Related

Tomcat startup Failing in "opencms" version 10.5.4 web application

Starting OpenCms, version 10.5.4 in web application "opencms"
Copyright (c) 2016 Alkacon Software GmbH & Co. KG
OpenCms comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to
redistribute it under certain conditions.
Please see the GNU Lesser General Public Licence for
further details.
ERROR org.apache.commons.digester.Digester Begin event threw exception
java.lang.ClassNotFoundException: com.abc.opencms.repository.WebdavCmsRepository
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:210)
at org.apache.commons.digester.Rule.begin(Rule.java:177)
at org.apache.commons.digester.Digester.startElement(Digester.java:1583)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(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.commons.digester.Digester.parse(Digester.java:1892)
at org.opencms.configuration.CmsConfigurationManager.loadXmlConfiguration(CmsConfigurationManager.java:657)
at org.opencms.configuration.CmsConfigurationManager.loadXmlConfiguration(CmsConfigurationManager.java:379)
at org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:1189)
at org.opencms.main.OpenCmsCore.initContext(OpenCmsCore.java:1541)
at org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:2097)
at org.opencms.main.OpenCmsListener.contextInitialized(OpenCmsListener.java:85)
--------------------
The following critical error occurred:
Critical error during OpenCms initialization: Unable to read the OpenCms XML configuration.
Giving up, unable to start OpenCms.
--------------------
ERROR org.opencms.main.OpenCmsCore Critical error during OpenCms initialization: Unable to read the OpenCms XML configuration.
org.opencms.main.CmsException: Critical error during OpenCms initialization: Unable to read the OpenCms XML configuration.
at org.opencms.main.OpenCmsCore.setErrorCondition(OpenCmsCore.java:370)
at org.opencms.main.CmsInitException.setErrorCondition(CmsInitException.java:113)
at org.opencms.main.CmsInitException.<init>(CmsInitException.java:84)
at org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:1191)
at org.opencms.main.OpenCmsCore.initContext(OpenCmsCore.java:1541)
at org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:2097)
at org.opencms.main.OpenCmsListener.contextInitialized(OpenCmsListener.java:85)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5110)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1694)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1684)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
ERROR org.opencms.main.OpenCmsListener Critical error during OpenCms initialization: Unable to read the OpenCms XML configuration.
org.opencms.main.CmsInitException: Critical error during OpenCms initialization: Unable to read the OpenCms XML configuration.
at org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:1191)
at org.opencms.main.OpenCmsCore.initContext(OpenCmsCore.java:1541)
at org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:2097)
at org.opencms.main.OpenCmsListener.contextInitialized(OpenCmsListener.java:85)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5110)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1694)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1684)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 148; columnNumber: 90; Error at line 148 char 90: com.abc.opencms.repository.WebdavCmsRepository
Please help with this?

How to solve the exception throwed by web service?

I encoutered a problem when invoking the web service from a simple Java client; and I want all your answers!
Here is the exception throwed by the client:
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:1010/helloworld
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at org.warnier.zhang.demo.Tests.main(Tests.java:40)
Here is the exception throwed by the Server:
javax.xml.ws.WebServiceException: javax.xml.stream.XMLStreamException: java.io.IOException: 远程主机强迫关闭了一个现有的连接。(Translation: connection was forcibly closed by the remote host)
at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.encode(Unknown Source)
at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.encode(Unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter.encodePacket(Unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter.access$100(Unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit.handle(Unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.stream.XMLStreamException: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.flush(Unknown Source)
... 17 more
Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接。 (Translation: connection was forcibly closed by the remote host)
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at sun.net.httpserver.Request$WriteStream.write(Unknown Source)
at sun.net.httpserver.ChunkedOutputStream.writeChunk(Unknown Source)
at sun.net.httpserver.ChunkedOutputStream.flush(Unknown Source)
at sun.net.httpserver.PlaceholderOutputStream.flush(Unknown Source)
at java.io.FilterOutputStream.flush(Unknown Source)
at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.flush(Unknown Source)
... 18 more

Struts2 - tiles error

I am working on a website using struts2 framework. I tried to run the code but then I encountered an error as below
SEVERE: Exception sending context initialized event to listener instance of class org.apache.struts2.tiles.StrutsTilesListener
java.lang.NoClassDefFoundError: org/apache/tiles/context/TilesRequestContextFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2944)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1208)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
at org.apache.tiles.jsp.context.JspTilesContextFactory.<init>(JspTilesContextFactory.java:51)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.tiles.context.ChainedTilesContextFactory.init(ChainedTilesContextFactory.java:84)
at org.apache.struts2.tiles.StrutsTilesContainerFactory$StrutsTilesContextFactory.init(StrutsTilesContainerFactory.java:79)
at org.apache.struts2.tiles.StrutsTilesContainerFactory.storeContainerDependencies(StrutsTilesContainerFactory.java:55)
at org.apache.tiles.factory.TilesContainerFactory.initializeContainer(TilesContainerFactory.java:231)
at org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(TilesContainerFactory.java:198)
at org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesContainerFactory.java:163)
at org.apache.tiles.web.startup.TilesListener.createContainer(TilesListener.java:90)
at org.apache.struts2.tiles.StrutsTilesListener.createContainer(StrutsTilesListener.java:70)
at org.apache.tiles.web.startup.TilesListener.contextInitialized(TilesListener.java:57)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.tiles.context.TilesRequestContextFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
... 31 more
It's a 404 error but I don't know why because I included all the tile libraries. Specifically, I am using struts2-core-2.1.6.jar and tiles-core-2.0.6.jar, build path is included and tiles listener is configured
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
More details: I am using struts-2.3.16.1 library and included
tiles-api-2.1.2.jar
tiles-compat-3.0.1.jar
tiles-core-2.0.6.jar
tiles-jsp-2.1.2.jar
tiles-servlet-3.0.1.jar
commons-beanutils-1.8.0.jar
commons-digester-2.0.jar
struts2-tiles-plugin-2.3.16.1.jar
in WEB-INF/lib

Unable to run javafx app on windows 8.1

I made a javafx desktop application using intellij idea and packaged it as given in this link. It works fine on my pc which has windows 7. But when run on windows 8.1, it gives this exception:
java.lang.NullPointerException
at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(Unknown Sourc
e)
at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(Unknown Sourc
e)
at com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(Un
known Source)
at com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(Unk
nown Source)
at com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.paintTiles(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.BaseNode.render(Unknown Source)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(Unknown Source)
at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(Unknown Source)
at com.sun.javafx.tk.quantum.PresentingPainter.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at com.sun.prism.render.RenderJob.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknow
n Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at com.sun.prism.impl.BaseResourceFactory.clearTextureCache(Unknown Sour
ce)
at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(Unknown Sourc
e)
at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(Unknown Sourc
e)
at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(Unknown Sourc
e)
at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(Unknown Sourc
e)
at com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(Un
known Source)
at com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(Unk
nown Source)
at com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.paintTiles(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.BaseNode.render(Unknown Source)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(Unknown Source)
at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(Unknown Source)
at com.sun.javafx.tk.quantum.PresentingPainter.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at com.sun.prism.render.RenderJob.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknow
n Source)
at java.lang.Thread.run(Unknown Source)
So is it that javafx does not work on windows 8? I dont think its given anywhere like that. After all its a typical java application, so it should work if we have jre installed.
What could be the solution to this?
EDIT:
Here is something strange observed:
Artifacts built using intellij idea 12.0.4 are working fine on windows 8 as well. But when built throught intellij idea 13.0.1 are giving the error.

Java Web Start Error FileNotFoundException

So Im trying to use webstart on this application of mine and I keep getting this error:
java.io.FileNotFoundException:
http://www.fenixflame.net/DropLogger/Drop Logger.jar at
sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method) at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown
Source) at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source) at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown
Source) at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown
Source) at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown
Source) at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown
Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown
Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown
Source) at
com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source) at
com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source) at com.sun.deploy.net.DownloadEngine.getResource(Unknown
Source) at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown
Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) Caused by:
java.io.FileNotFoundException:
http://www.fenixflame.net/DropLogger/Drop Logger.jar at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 15 more
This is my First time using webstart. I tested it out with simple applications and it worked just fine. I think it might have something to do with the fact that the application tries to read a local file when its launched.
Cannot post more than 2 links but you can check it out here:
fenixflame.net/DropLogger/launch.html
Yes problem was the space on the .jar file. I changed it and it worked just fine.
Its not possible to change the .jar file name inside netBeans, you can only change the project name but that doesnt change the file name. The only way to do change the .jar name is going to the project .xml file or creating a new project with the name you want for your jar file and copying all ur packages there.

Categories

Resources