Luis Alfredo Perez

Greenhorn
+ Follow
since Mar 04, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Luis Alfredo Perez

Hello,
I'm deploying a .rar file on Oracle 9iAS release 2 (9.0.3).
The deploy succeds but when I try to restart the OC4J instance,
the startup fails and the instance reports security permission
errors.
I opened the oc4j-connectors.xml file and I added some
security-permission entries to grant the needed permissions.
The changes are applied without errors but when I try to start
the instance again, I get the same errors. Just as if they
weren't introduced.
Here I show you the connectors configuration:
<oc4j-connectors>
<connector name="dance-connector" path="dance-connector.rar">
<security-permission enabled="true">
<description></description>
<security-permission-spec>grant {
permission java.lang.RuntimePermission "getClassLoader", *'
};</security-permission-spec>
</security-permission>
</connector>
</oc4j-connectors>
Something I don't understand and I could'nt find something that
would explain it to me is why should I set the permission with
those characters at the end: "*'", instead of the standard
semicolon one...
I even tried to grant the java.security.AllPermission to the
connector but I get a NullPointerException instead. I guess that
the file parser must be looking for the "target" element of the
permission entry...
Does anyone of you have initialize custom security permissions to
a resource adapter within Oracle 9iAS release 2 (9.0.3)?
Have a nice day!
Error initializing server: Error creating a Connection Factory from '...' could not be created due to reason: javax.resource.spi.EISSystemException: initTransientMembers() failed: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
java.security.AccessControlException: access denied (java.io.FilePermission D:\Oracle\OC4J\j2ee\home\persistence\transaction.state delete)
at java.security.AccessControlContext.checkPermissionAccessControlContext.java:272)
at java.security.AccessController.checkPermissionAccessController.java:399)
at java.lang.SecurityManager.checkPermissionSecurityManager.java:545)
at java.lang.SecurityManager.checkDelete(SecurityManager.java:1005)
at java.io.File.delete(File.java:712)
at com.evermind.server.ApplicationServer.destroyApplicationServer.java:1793)
at com.evermind.server.ApplicationServerLauncher.runApplicationServerLauncher.java:118)
at java.lang.Thread.run(Thread.java:484)
Exception in thread "main" java.security.AccessControlException: access denied (java.util.PropertyPermission vmId read)
at java.security.AccessControlContext.checkPermissionAccessControlContext.java:272)
at java.security.AccessController.checkPermissionAccessController.java:399)
at java.lang.SecurityManager.checkPermissionSecurityManager.java:545)
at java.lang.SecurityManager.checkPropertyAccessSecurityManager.java:1278)
at java.lang.System.getProperty(System.java:560)
at com.evermind.server.OC4JServer.main(OC4JServer.java:235)
21 years ago
Ok, I found the error and I'm going to post the solution for those out there who are working with a similar environment as I...
As we all know, when you have an api that accesses the AWT api you must have a fully configured X11 environment...
If you're developing a webapp and some of the apis loaded by the servlet accesses the AWT api, the servlet engine must resolve the X11 environment, i.e., the DISPLAY environment value, of course!
In the case of Oracle's 9iAS, you waste your time configuring the display through the jserv.properties file... The way to pass the DISPLAY value to the 9iAS servlet engine is through the opmn/conf/opmn.xml configuration file. In that file, you must add an environment tag to your instance properties. The new tag will include the DISPLAY value and the problem gets resolved!!
For more information, you can query the Oracle's Metalink repository but you have to have a valid login...
Have a nice day!
Hello there,
I'm working with JasperReports' api v0.5.0. I've been trying to build a servlet which has to return a report to a client applet. The problem is that the appserver can't resolve a particular class of the jasperreports' api. I tried to deploy the sample webapp that ships with the jasperreports' api but I found the same problem.
My appserver is Oracle's 9iAS v9.0.3 on a Linux SuSE SLES7.2 machine.
I included all the necesary classes in the instance's classpath. When that failed, I included the classes in the WEB-INF/lib directory of the webapp but that doesn't work either.
These are the exceptions I'm receiving... the first one occurs just the first time I invoke the servlet though I thought that the problem was a failed classloading due to the X11 security. I disabled all the xhost's connection restrictions but the problem persisted.
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:54)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:115)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:53)
at dori.jasper.engine.fill.JRBaseFiller.(JRBaseFiller.java:210)
at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:150)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:350)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:290)
at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:281)
at _jsp._pdf._jspService(_pdf.java:62)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
at java.lang.Thread.run(Thread.java:479)

java.lang.NoClassDefFoundError
at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:150)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:350)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:290)
at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:281)
at _jsp._pdf._jspService(_pdf.java:62)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
at java.lang.Thread.run(Thread.java:479)
Any thought about these will be appreciated...
Have a nice day!
Hello,
I'm trying to open a parallel port for reading but the API keeps telling me that my port doesn't support reading mode. This happens when I try to open an input stream for the port and when I explicitly change the port mode.
I'm working in a windows 2000 with the JRE 1.3.1_02 and javacomm 2.0.
I ran the ParallelPort monitor that ships with javacomm 2.0 (as a sample) and I can't switch the ports mode.
I check the BIOS configuration and the parallel port is configured in ECP mode.
The printer is an Olivetti PR 2 that supports IEEE 1284 in ECP mode.
I tried to test the parallel port monitor in another hardware (Compaq PIV) with windows 2000 and I observed the same behaviour.
Does anybody knows what's happening?
I have not found any reported bug addressing the same problem.
Thanks in advance.
Luis Alfredo P�rez
22 years ago
Is there a way of interchanging data between 2 objects running in diferent VM?
I know I can create a pipe and stream the data with it, but I'm just curious about that ...
Thanks in advance!
Luis Alfredo Perez
22 years ago
Hi,
I'm currently working on a WYSiWYG preview screen for an editor. It's integrated with a particular printer that only supports two different monospaced fonts: Courier and SansSerif. Each font has three sizes and a print mode type called "condensed print". I'm trying to match the font sizes of my printer's font so that the number of characters displayed on a line per font size on the screen is the same as the printer's. I tried everything. From the simple and obvious setFont(...), ... SimpleAttributeSets, ... to the scary java 2D API. When you reach the point where 15pt. is too small and 16pt. is to big what is left? even scaling with a particular AffineTransform of high-precision doubles you get the same freakin' interpolation behaviour 15pt or 16pt.
I just need an advice, a tip, a light at the end of the tunnel that could answer:
Am I wasting my time?
Is this hopeless?
Should I start to build the java font api from scratch?
Well, seriously, does anyone have a clue on how to free-scale fonts?
Thanks for your time.
Luis Alfredo.
23 years ago
Hello,
Does anyone of you ever tried to replace the default behaviour of some "special" key bindings like: TAB, BACK_SPACE, SPACE, DELETE, ... from a JTextField?
I�m using jdk1.3 and I�m trying, like I've said, to create a custom JTextField which will have my special actions or responses for those KeyStrokes.
I thought it might be easy because you got the InputMap/ActionMap bindings. So, I create my custom bindings in the InputMap/ActionMap overriding the mentioned KeyStrokes. I checked that the only InputMap with actions in it was WHEN_FOCUSED so I worked with it. Surprisingly, it didn't work. I tried to override the key bindings of the associated Keymap but, since 1.3 wrapped Keymap with InputMap/ActionMap, the result was as meaningless as before.
Then, I tried with a KeyListener. My key listener couldn't be able to catch the TAB. The rest of KeyStrokes were caught but the default action kept showing, even if I explicitly consume the KeyEvent.
Also, I tried overriding the processKeyEvent method. Once again the default action was there.
I kept reading and I found the Swing's Input Method Framework and I got three times the confusion I had in the first place.
Could anyone give me a hint on this?
Thank you
Luis Alfredo
23 years ago