Felix Sima

Ranch Hand
+ Follow
since Feb 06, 2008
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Felix Sima

Hi.

I've found the answer, thanks.

grant codeBase "file:${jboss.home}/server/default/deploy/<path to my jars>/-" {
permission java.lang.RuntimePermission "accessClassInPackage.mypackage";
permission java.lang.RuntimePermission "accessClassInPackage.mypackage.*";
};
10 years ago
Hi.

I'm new to applets and security and I've received the task to restrict an applet to use any other class except the classes in package "mypackage".
Can you give me some hints of how to do this (i didn't find anything helpful using google) . It is possible to do this by modifying only java.policy file?

Thanks in advance.

Bye,
Felix
10 years ago
Hello

I have found the problem and its solution.
The accented characters were represented by the HTML's special symbols (à, è, etc). But in XML "&" is a reference to an entity. Those entities were not defined in my xml. The solution was to prepend their definition to my xml, like this:

<!DOCTYPE newsletter [
><!ENTITY nbsp " ">
<!ENTITY lt "<">
<!ENTITY igrave "ì">
...

myxml

Best regards,
Felix
13 years ago
JSF
Hello.

I am using richfaces to build my application. Using the <a4j:log/> tag, I can see that the ajax responses containing accented characters (italian characters) give errors during the parsing of xml



The same request/response, using data without accented characters works fine. The document is NOT empty.

The content-type of the response is "Response with content-type: text/xml;charset=UTF-8"
I have checked using XMLSpy that the response is a well formed xml file.

Any idee how to get rid of this error?
Any help will be highly appreciated.
Thank you.

Best regards,
Felix
13 years ago
JSF
Hi Jaikiran.

The contents of the JNDI tree is the same in both cases, in fact, I don't modify
the JBoss configuration from one test to another. I just change the client code, to
access the JNDI tree using jnp or http.





I suppose there is a JBoss configuration error of the http invoker (it is a servlet), but I don't know where to look for the error. I list below the configuration of the
http invoker servlet:

myserver\deploy\http-invoker.sar\invoker.war\WEB-INF\web.xml





myserver\deploy\http-invoker.sar\META-INF\jboss-service.xml



Thank you.

Best regards,
Felix
13 years ago
Hi Rene.

Thanks for the answer.
My client uses the http configuration, so I must use it too
The post you showed me, uses the unified http invoker, which is not ok for me, because, as
I said, I must use the configuration of my client (http://localhost:9000/invoker/JNDIFactory).
Any other suggestion?

Best regards,
Felix

13 years ago
Hi Jaikiran.

Here are the type of objects I receive after the lookup

Using http:


[This is what I see in Eclipse IDE's expression window during debug]
objref -> org.jboss.invocation.http.interfaces.HttpInvokerProxy
objref instanceof ListeAllegateFacadeHome -> false
objref.getClass() -> class $Proxy64
objref.getClass().getInterfaces() -> [interface org.jnp.interfaces.Naming] KO


Using jnp:


[This is what I see in Eclipse IDE's expression window during debug]
objref -> ejb/mif/ListeAllegateFacadeHome
objref instanceof ListeAllegateFacadeHome -> true
objref.getClass() -> class $Proxy64
objref.getClass().getInterfaces() -> [interface ...ListeAllegateFacadeHome, interface javax.ejb.Handle] OK

Any hint? Any idea?
Thanks.

Best regards,
Felix

13 years ago
Hi all.

I have 2 servers running under the same JBoss 4.0.5 on my PC. The second server is configured to use different ports.
From one server I am connecting to the JNDI tree of the other server to lookup an EJB:



As you see I am using http to connect to the JNDI tree.

During the narrowing, on the last line, I get a ClassCastException.

Using the jnp protocol with the same source everthing works fine:



No ClassCastException thrown.

It seems a configuration problem, but I have no idea where to look at.
Can you please give me some advices?

Any help will be highly appreciated.

Best regards,
Felix Sima


13 years ago
Hello all.

I have two instances of JBoss 4.0.5 running on my computer and on each one I have deployed an ear.
From one instance I am connecting to the JNDI tree of the other instance to lookup an EJB:



During the narrowing (line 7) I get a ClassCastException

The type of the object I receive from the lookup is a Proxy$64 which doesn't implement my interface, even if the JNDI view of the second instance shows
that there is an entry that implements my interface (in the global JNDI namespace):

From jmx-console:



Over the last days I have spent a lot of time trying to understand and to fix it, but with no result
Searching the net for a solution I came over a lot of useful articles, made what they said and checked everything.
Here is what I have done, in all combinations, not neccessary all of them in the same time:
- I have checked that there are no duplicated entries of my class (ListeAllegateFacadeHome) in my ear files.
- I have checked that there are no javax.ejb.* classes on my ear files.
- I have included the jars from "client" directory of Jboss on the "lib" directory of my server (on the first instance).
(Is it correct? I mean, in order to transform the first instance in a client of the second instance do I have to put the jars from the "client"
directory of JBoss in the classpath of the first instance, which is the same as placing them in the "lib" directory of my server from the the first instance?)

Any help will be highly appreciated.

Best regards,
Felix
13 years ago
Hello Satish Kore.

My boss told me he wants to use Flex for a new project because he wants browser compatibility, but I have some doubts about passing to Flex to achieve browser compatibility. So my question is:

Is it worth using Flex just for getting browser compatibility? (or it is better to use a Javascript framework (like jQuery) for this?). I mention that the new application will not be very interactive.

Thank you.
Best regards,
Felix Sima
Use www.jaaava.com - A Google CSE for Java
14 years ago
Hello.

I would like to use custom error pages in my rich faces application for some HTTP error codes.

In my web.xml I have:



but I get the browser's 404 error page when the page is not found.

Is there any solution/workaround to this problem?
Thank you in advance.

Best regards,
Felix Sima
Use www.jaaava.com - A Google for Java
15 years ago
JSF
Hi Tim.

I need the value of the "judet" to make an asynchronous call (ajax call) to update another field based on the selection of "judet".
I found the solution:


Thanks,
Felix
Use www.jaaava.com - A Google for Java.
15 years ago
JSF
Hello.

I have the following JSF page:

where actualizeazaOrase is a method of my backing bean:



How can I get the value of the select field having the id="judet" inside of my method?
The code I used is not working, the value of judet_id is null !
I also inspected:

event.getComponent();
event.getSource();

but the value is also null!

Which method is more appropriate to use in here? Should I get that value from FacesContext or from the ActionEvent?
Where can I find some sample code about this? (richfaces_usersguide.pdf doesn't helped me much in here )

Thank you,
Felix
Use www.jaaava.com - A Google for Java !!!
15 years ago
JSF
Hello.

I am developing a web application using JBoss 5.0.0.GA + RichFaces 3.2.2.GA and I want to use romanian characters on my pages, for instance: ţ.
The problem is that on my page this character is displayed like this: ţ. More precisely, if I put this character directly on my page like


it is displayed correctly, but if I use

where

in CustomMessages_ro.properties file, then on the page it comes like Judeţ

I have tried to instruct RichFaces to use UTF-8 encoding, but seems like I am missing something.

My JSP:


I have specified the below filter on my web.xml to be used instead of the default one

web.xml

On the run.bat script that launches JBoss application server I added
-Dfile.encoding=UTF-8

I don't know if it is important, but my page (the welcome page of my application) is display after a redirect, like this:



Am I missing something? Or is there any error on my code above?
Any help would be highly appreciated.
Thanks.

Best regards,
Felix
Use www.jaaava.com - A Google for Java !!!
15 years ago
JSF
Hello.

Now it finally works

From my tests it seems that the <injection-target> could not be found ... error is launched when



annotation is used outside of a managed component.

I also had an error in my persistence.xml. I used "jdbc/someDS" instead of "java:/someDS". I'm using JBoss 5.0.0.GA application server.
Thank you.

Best regards,
Felix
Use www.jaaava.com - A Google CSE for Java