Manuel Leiria

Ranch Hand
+ Follow
since Jul 13, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Manuel Leiria

Hi there,

I'm facing this exception.
My code:


and the object rta will be inserted into another object.

The variable of interest in FileBlob hbm is defined as follows:


where the type blob is oracle.sql.BLOB

If I change the oracle.sql.BLOB to javax.sql.rowset.serial.SerialBlob in the hbm, I can insert but when I try to get the blob back I get a deserialize exception so this change is not an option.


but when I save the main Object (a cascade operation) I get the following exception:



Any light on the subject?

Thanks in advance,
mleiria
Hi there,

first of all I'm posting here because I cannot post on the Test section. When I enter on that section, I'm not logged in!!! Strange behaviour.

I'm trying to make an integration test with JUnit 4.4 and Spring 2.5.6 but when I run it, I get the exception:

java.lang.IllegalStateException: Failed to load ApplicationContext
org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:201)
org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:111)
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:148)
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
Caused by: java.lang.IllegalStateException: @WebServiceRef annotation is not supported on static fields
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$1.doWith(CommonAnnotationBeanPostProcessor.java:323)
org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:523)
org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:500)
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:319)
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:277)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:745)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:448)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42)
org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:197)

Does anyone know what's happening?

thanks in advance,
Manuel Leiria
12 years ago
Hi there,


I have one WebLogic server that needs to access a web service in one iis server and this web server is protected by Kerberos. My code works fine in the development environment where kerberos and ntlm are both activated (but the mechanism choosen is kerberos). In production environment, ntlm is disabled (I was told that this is the main difference beetween the two environments). Now, what happens is that, in production mode instead of getting an Authorization Header: Negociate, I receive an Authorization Header: Kerberos and, of course, I receive from the code one

java.lang.UnsupportedOperationException: Negotiate or Basic Only:Kerberos

from this method:


in the SpnegoProvider class.

Now, the guys here in my company (the iis administrators) know nothing about kerberos (I think the've configured the iis/kerberos/AD following some kind of next, next, next install, if you know what I mean).
The final question is: How can I workaround this exception??





Just adding some more info on the subject

In the code posted above,
Development env:

gives

and

gives



In Production env.,

gives

and
there's no token!!!

thanks for any light!!!

ML
14 years ago
Hello,

I have new info on the subject.
The wsdl file doesn't have any security entry because the web service is not using WS-Security. The security is implemented at the web server level. Given this new info, my question is: is there some java class where I can pass the url of the wsdl file and the credentials?

The generated classes (using wsimport) gave me something like this:



and the Profiles class extends javax.xml.ws.Service

If I invoke Profiles service = new Profiles(), I get a 401 Unauthorized. My guess is that priori to create new Profiles() I must pass (some how) the credentials or ticket or something like that.

Any help is highly appreciated!!

Manuel Leiria
14 years ago
Hi!

I'm trying to create a java client to access a .NET kerberized web service. Right now I have two pieces of code but I I don't know how to integrate them. The scenario is: I have a web application in WebLogic server and this application needs to access a .NET kerberized web service. I'm using SSO.
In one hand I developed all that stubs that make the client code to invoke the service.
On the other hand I have:



I've downloaded the wsdl and generated using Metro the client code. One doubt arises here: in the wsdl there's no security entry. Is it supposed to have?
Onother doubt: who is the client and who is the server? As far as I know, there are 3 entities: the person who's using the application; the weblogic server (the suapps208) and the web service.

I can login and get the TGT. I just don't know how to obtain the ticket for the webservice and how to use ti to access th service.

I know, this is a mess but my brain is completely kerberized. Anyway, you can ask me questions and I'll answer. I've read a lot of stuff but I'm having problems in putting all together.



Thanks in advance,
Manuel Leiria
14 years ago
This is the code I have. Obviously it doesn't work because the given ip is a remote computer.

My question is:is it possible to use some sort of this code (something similar) to get the NetworkInterface of a remote machine?




thanks in advance,
Put the object in a session variable.Something like this:
15 years ago
Does the web server throws any error? What is the content you're expecting to see?
I advise you to start by the database design: design the tables Users, Posts, Threads...make the relationships between them.
15 years ago

Originally posted by kumar Nagesh:
generally this question will be asked in the interviews to test our skills on various technologies.


It's a silly question! Tell that to the interviewr
15 years ago
I've been using this for some time and I think it's great!
Check out DisplayTag
15 years ago
JSP

Originally posted by Venki:
Hi amit,
Thanks!
Check this same site! move cursor over the "post new topic" button. we can see the url on status bar. Is there any way to encrypt/hide that.



As Amit said it's not a button but an image! And why do you want to encrypt that?
15 years ago
JSP
Google for "javascript window.opener"

Originally posted by Joe Ess:
Ah, it's good to be specific about the functionality you are looking for. Maybe even post a picture of the kind of graph you need. "3D" is a pretty generic term.



Ok. Sorry about that. Imagine I want to plot something like
Lorentz Attractor
15 years ago