I am using FOP 2.2 in order to generate pdf file from xml documents. FOP documentation is here http://xmlgraphics.apache.org/fop/
The pdf document is generated fine. However, I keep on getting this ERROR message.
ERROR: Invalid property value encountered in white-space="pre-wrap": org.apache.fop.fo.expr.PropertyException: null:118:-1: No conversion defined pre-wrap; property:'white-space' (See position 119:-1)
org.apache.fop.fo.expr.PropertyException: null:118:-1: No conversion defined pre-wrap; property:'white-space'
at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:446)
at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:499)
at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:386)
at org.apache.fop.fo.FObj.processNode(FObj.java:124)
at org.apache.fop.fo.flow.table.TableFObj.processNode(TableFObj.java:232)
at org.apache.fop.fo.flow.table.TableRow.processNode(TableRow.java:82)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:291)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:252)
at net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:169)
at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:187)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:195)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.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 net.sf.saxon.event.Sender.sendSAXSource(Sender.java:262)
at net.sf.saxon.event.Sender.send(Sender.java:128)
at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:28)
xsl template has the below code:
<xsl:attribute name="style">
<xsl:text>white-space: pre-wrap;</xsl:text>
</xsl:attribute>
(I guess you are converting HTML to XSL-FO using XSLT, as style is not a valid FO attribute)
The error message is telling you that pre-wrap is not a valid value for the property white-space; the only allowed values are normal, pre and nowrap.
However, in XSL-FO white-space is just a "shorthand property" to quickly control a set of whitespace-related properties, so you should be able to achieve the desired result directly setting those properties instead:
linefeed-treatment="preserve"
white-space-collapse="false"
white-space-treatment="preserve"
Related
I am trying to run the Machine Learning and Anylogic Simulation example workflow provided here. - https://www.anylogic.com/features/artificial-intelligence/h2o-ai/
I can run the second workflow, but the first workflow (Hospital Planning) keeps giving errors. I have tried it running on different systems as well.
Any help will be highly appreciated.
Below is the error code :
Loading Mojo: pipeline.mojo
Loading Mojo: pipeline.mojo
Error during model creation:
Unable to make protected final java.lang.Class
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to
unnamed module #44f69442
java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to
unnamed module #44f69442
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
at javassist.util.proxy.SecurityActions.setAccessible(SourceFile:159)
at javassist.util.proxy.DefineClassHelper$JavaOther.defineClass(SourceFile:213)
at javassist.util.proxy.DefineClassHelper$Java11.defineClass(SourceFile:52)
at javassist.util.proxy.DefineClassHelper.toClass(SourceFile:260)
at javassist.ClassPool.toClass(SourceFile:1232)
at javassist.ClassPool.toClass(SourceFile:1090)
at javassist.ClassPool.toClass(SourceFile:1048)
at javassist.CtClass.toClass(SourceFile:1290)
at ai.h2o.mojos.runtime.c.G.d(SourceFile:118)
at ai.h2o.mojos.runtime.c.G.a(SourceFile:60)
at ai.h2o.mojos.runtime.c.n.a(SourceFile:64)
at ai.h2o.mojos.runtime.readers.b.b.a(SourceFile:135)
at ai.h2o.mojos.runtime.MojoPipelineFactoryImpl.loadFrom(SourceFile:144)
at ai.h2o.mojos.runtime.MojoPipelineFactoryImpl.loadFrom(SourceFile:101)
at ai.h2o.mojos.runtime.MojoPipeline.loadFrom(SourceFile:41)
at hospital_capacity_planning_ml.Main.loadModel(Main.java:690)
at hospital_capacity_planning_ml.Main.setupPlainVariables_Main_xjal(Main.java:1498)
at hospital_capacity_planning_ml.Main.doCreate(Main.java:1421)
at com.anylogic.engine.Agent.createAsEmbedded(Unknown Source)
at com.anylogic.engine.Agent.create(Unknown Source)
at com.anylogic.engine.Engine.start(Unknown Source)
at com.anylogic.engine.ExperimentSimulation.a(Unknown Source)
at com.anylogic.engine.ExperimentSimulation.run(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost.f(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost.executeCommand(Unknown Source)
at com.anylogic.engine.internal.webserver.e.onCommand(Unknown Source)
at com.anylogic.executor.basic.rest.BasicAnimationSessionController.
lambda$null$9(BasicAnimationSessionController.java:112)
at com.anylogic.engine.internal.webserver.i.acceptToAnimationSvgSession(Unknown Source)
at com.anylogic.executor.basic.rest.BasicAnimationSessionController.
lambda$startController$10(BasicAni mationSessionController.java:112)
at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
at spark.http.matching.Routes.execute(Routes.java:61)
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130)
at com.anylogic.engine.internal.webserver.config.ALServerFactory$1.lambda$0(Unknown Source)
at org.eclipse.jetty.servlets.QoSFilter.doFilter(QoSFilter.java:201)
at com.anylogic.engine.internal.webserver.config.ALServerFactory$1.doHandle(Unknown Source)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:530)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
atorg.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java
:382)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
at java.base/java.lang.Thread.run(Thread.java:834)
Error during drawing animation frame:
java.lang.NullPointerException
at com.anylogic.engine.gui.SVGFrameProducer.n(Unknown Source)
at com.anylogic.engine.gui.SVGFrameProducer.n(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost$1.l(Unknown Source)
at com.anylogic.engine.gui.ExperimentHost$1.n(Unknown Source)
at com.anylogic.engine.gui.SVGFrameCollector.l(Unknown Source)
at com.anylogic.engine.gui.SVGFrameCollector.c(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:834)
The problem is that AnyLogic 8.7 switched to newer Java (from 9 to 11).
Add the following line to Java machine arguments in the experiment properties to make the model work in the recent updates 8.7.x:
--add-opens java.base/java.lang=ALL-UNNAMED
We are fetching the data from redshift db using JDBC way in java.
The query used for getting the data from tables is
select * from table_name limit 200;
Below are the errors occurred for different tables.
I am able to see the data in resultset .
But while getting next record of particular row it throwing the below errors. Could you please help us to understand the error and resolution for it.
Error 1:
`https://forums.aws.amazon.com/(500310) Invalid operation: Invalid input syntax for type numeric
Details:
error: Invalid input syntax for type numeric
code: 8001
context: value: ""
query: 88634410
location: cg_util.cpp:604
process: query19_773_88634410 https://forums.aws.amazon.com/
-----------------------------------------------;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.dataengine.PGResultSet.hasMoreRows(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.updateCursorPosition(Unknown Source)`
Error 2: For other table
`https://forums.aws.amazon.com/(500310) Invalid operation: Divide by zero;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.dataengine.PGResultSet.hasMoreRows(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.updateCursorPosition(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.next(Unknown Source)`
Error 3:
`java.sql.SQLException: https://forums.aws.amazon.com/(500310) Invalid operation: operator does not exist: text ||;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.doMoveToNextClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.getParameterDescription(Unknown Source)
at com.amazon.redshift.client.PGClient.prepareStatement(Unknown Source)
at com.amazon.redshift.dataengine.PGQueryExecutor.<init>(Unknown Source)
at com.amazon.redshift.dataengine.PGDataEngine.prepare(Unknown Source)
at com.amazon.jdbc.common.SPreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc41.S41PreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc42.S42PreparedStatement.<init>(Unknown Source)
at com.amazon.redshift.core.jdbc42.PGJDBC42PreparedStatement.<init>(Unknown Source)
at com.amazon.redshift.core.jdbc42.PGJDBC42ObjectFactory.createPreparedStatement(Unknown Source)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)`
error1 example :JDBC mapped column details for divide by zero error :Have 5 columns like=> x-VARCHAR, y-INTEGER , z-VARCHAR , l-VARCHAR, r-DOUBLE
error2 example : JDBC mapped column details for valid input syntax for type numeric error => id-BIGINT,dt-TIMESTAMP,text-VARCHAR,money-NUMERIC
error3 example :we are not able to read the data from table also
Please share your thoughts on this
I am trying to delegate a translator by chaining in the VDB.xml but getting an error after making a call.
The delegate translator suppose intercept calls to the actual delegate translator underneath and performs a calculation.
Calculation is driven by a property set in TEIID_SESSION passed as a payload with the statement object
my vdb.xml:
<source connection-jndi-name="java:/SourceModel" name="SourceModel" translator-name="delegate"/>
<translator name="delegate" type="calcDelegate">
<property name="delegateName" value="sqlserver" />
</translator>
When I set the property in teiid_session, and run the query in SQL client i get the following error:
org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [38000]: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:134)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:488)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:425)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:170)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:417)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:775)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2914)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:111)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:170)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:109)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$17.run(ResultSetViewer.java:3423)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.teiid.jdbc.TeiidSQLException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:723)
at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:65)
at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:561)
at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:284)
at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:322)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
at com.sun.proxy.$Proxy22.read(Unknown Source)
at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:421)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:570)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1076)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:339)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:338)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 12 more
Caused by: org.teiid.core.TeiidException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.teiid.client.ResultsMessage.setException(ResultsMessage.java:196)
at org.teiid.dqp.internal.process.RequestWorkItem.sendError(RequestWorkItem.java:1115)
at org.teiid.dqp.internal.process.RequestWorkItem.close(RequestWorkItem.java:591)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:374)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:275)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at com.lgc.dsl.translators.unitConvert.delegate.UnitConvertResultSetExecution.execute(UnitConvertResultSetExecution.java:126)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:367)
at sun.reflect.GeneratedMethodAccessor740.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:220)
at com.sun.proxy.$Proxy193.execute(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
Based upon
Caused by: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at com.lgc.dsl.translators.unitConvert.delegate.UnitConvertResultSetExecution.execute(UnitConvertResultSetExecution.java:126)
It appears that the problem is with an assumption in the logic of the custom translator. Have you debugged the referenced method and line number in UnitConvertResultSetExecution?
I am trying to create a service ticket, calling the methods (login, createTicket, logout) from Eclipse IDE. I had called the method login(), by passing uid, pwd, and got SID which is a session ID, in return. Now I am trying to create a ticket, and I am passing all the required params.
Error that I got is:
DEBUG [main] (Call.java:2445) - NSPush (32)
DEBUG [main] (Call.java:2445) - org.apache.axis.i18n.resource::handleGetObject(empty00)
DEBUG [main] (Call.java:2445) - NSPop (empty)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
{}ErrorMessage:null
{}ErrorCode:1000
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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 javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at ITSDTickHandler.intializeWebServices(ITSDTickHandler.java:146)
at ITSDTickHandler.main(ITSDTickHandler.java:26)
Help needed regarding this!
Well, I tried the same method by giving only the required parameters, and it had worked. The other optional parameters take some pre-defined set of value, which, when not given, raises the error.
I have this class called PollFrame that extends JFrame in a file called PollFrame.java . PollFrame contains a form. I have an applet, which has a button in it. When the button is clicked, I want the PollFrame to be displayed. I set the ActionPerformed as:
Pollframe poll = new PollFrame(); // This initializes the form
poll.setVisible(true);
However, when I click the button, I get the following error :
Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkExit(Unknown Source)
at javax.swing.JFrame.setDefaultCloseOperation(Unknown Source)
at com.org.pollFrame.initComponents(pollFrame.java:54)
at com.org.pollFrame.<init>(pollFrame.java:11)
at com.org.EmployeeApplet.requestRoomActionPerformed(EmployeeApplet.java:216)
at com.org.EmployeeApplet.access$300(EmployeeApplet.java:7)
at com.org.EmployeeApplet$4.actionPerformed(EmployeeApplet.java:71)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I am guessing fromt he above error that calling another class file from an applet is prohibited. Is there any way I can display the PollFrame from the applet?
It seems like you're calling setDefaultCloseOperation() on your JFrame, which raises the security exception
You can definitively call another class from an applet but some operations are restricted, eg. you can't open local files, open connections to other machines...
I have this class called PollFrame that extends JFrame in a file called PollFrame.java . PollFrame contains a form. I have an applet, which has a button in it. When the button is clicked, I want the PollFrame to be displayed.
This is a one liner:
applet.showDocument("PollFrame.jnlp", "_blank");
The frame launched by PollFrame.jnlp will be able to call any default close operation it likes while still sand-boxed, since it will have a separate VM. To be 'always on top' it will need to be trusted (and then fight it out with all the other apps. that aim to be always on top).