Hello
We use MAXDB 7.8 (from SAP)!
After i got this one running i step into another problem:
In my servoy 6.03 form i show a record and a picture.
The full path and the filename of the picture is stored in a field:
“F:\xxx\xxx\mypicture.gif”
F is a mapped directory from a fileserver!
To show the picture in the form i do:
var vbildpfad = utils.stringTrim(foundset.produktbild);
var vbildurl = utils.stringIndexReplace(vbildpfad,1,2,'\\\\servername\\pb-allgem');
vbild = plugins.file.readFile(vbildurl); (vbild is a form variable which i show in my form with displaytype Image_media)
Everything works as expected local and on our application server.
To show the picture in a velocity report i use the same code.
var vbildurl = utils.stringIndexReplace(vbildpfad,1,2,'\\\\servername\\pb-allgem');
var vbild = plugins.file.readFile(vbildurl);
context.bild = vbild;
...
And in my HTML-Page:
<head>
<style type="text/css">
body {
color: black; background-color: white;
font-size: 12px;
font-family: Courier,Fixedsys,Helvetica,Arial,sans-serif;
}
img.bild {
margin: 0 0 0.7em; padding: 0em;
height: 150px;
width: 150px;
border: 2px double;
}
</style>
</head>
<body width="100%">
<h1><B> Produkt Informationen </B> </h1>
<img class="bild" $bild
...
...
On my local maschine everything works.
Velocity shows the wanted informations and the picture.
But after putting the solution on our application server, the picture is not shown with Velocity???
All other content is ok.
The velocity.log on the application server is empty.
On the application server i use the same version of Velocity as on my local maschine.
Application server log:
011-11-23 11:37 http-8080-2 WARN org.apache.wicket.request.target.component.listener.BehaviorRequestTarget component not enabled or visible; ignoring call. Component: [MarkupContainer [Component id = 1]] 8621AB05-184C-4FDA-93AB-2FCB785C9370 PAS_Produkte
2011-11-23 11:37 http-8080-2 ERROR com.servoy.j2db.util.Debug Throwable 8621AB05-184C-4FDA-93AB-2FCB785C9370 PAS_Produkte
java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(Unknown Source)
at javax.swing.SwingUtilities.getSharedOwnerFrame(Unknown Source)
at javax.swing.JOptionPane.getRootFrame(Unknown Source)
at javax.swing.JOptionPane.getWindowForComponent(Unknown Source)
at javax.swing.JFileChooser.createDialog(Unknown Source)
at javax.swing.JFileChooser.showDialog(Unknown Source)
at javax.swing.JFileChooser.showOpenDialog(Unknown Source)
at com.servoy.j2db.util.FileChooserUtils.getAReadFile(FileChooserUtils.java:170)
at com.servoy.j2db.util.FileChooserUtils.getAReadFile(FileChooserUtils.java:160)
at com.servoy.extensions.plugins.file.FileProvider.js_readFile(Unknown Source)
at com.servoy.extensions.plugins.file.WebFileProvider.js_readFile(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:367)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3134)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:528)
at com.servoy.j2db.FormController.executeFunction(FormController.java:4058)
at com.servoy.j2db.FormController.executeFormMethod(FormController.java:4375)
at com.servoy.j2db.FormController.executeOnRecordSelect(FormController.java:4313)
at com.servoy.j2db.FormController.refreshAllPartRenderers(FormController.java:2234)
at com.servoy.j2db.FormController.valueChanged(FormController.java:2306)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.fireValueChanged(AlwaysRowSelectedSelectionModel.java:219)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRows(AlwaysRowSelectedSelectionModel.java:199)
at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:164)
at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:131)
at com.servoy.j2db.dataprocessing.SwingFoundSet.setSelectedIndex(SwingFoundSet.java:132)
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.setSelectedIndex(WebEventExecutor.java:576)
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.onEvent(WebEventExecutor.java:390)
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor$4.onEvent(WebEventExecutor.java:305)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:302)
at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at com.servoy.j2db.server.servlets.Zl.doGet(Zl.java:8)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
What do i miss
Regards
Albert