shai koren

Ranch Hand
+ Follow
since Nov 04, 2001
Merit badge: grant badges
For More
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 shai koren

Also have a look at www.contractoruk.com.

Not sure about rates off the top of my head though.


Good Luck
19 years ago
Kundan

yes, this code will create new String objects and thus is bad news.

you better stick to this format:
StringBUffer sb = new StringBuffer("[");
sb.append("',").append(variable1).append(",'");
sb.append("',").append(variable2).append(",'");


snd so on
19 years ago
I was using Netbeans for a long time (from http://www.netbeans.org/) and now later eclipse. At the moment i work with WSAD (websphere studio)and although built on top of eclipse (it is actually eclipse) i find it a bit heaveier. wasnt sure personally which of the features are part of eclipse and which are added on top.
thank YOU brian.
your answers were very informative and helpful.
Looking forward to read the book.
All the best.
21 years ago
I have realized now that the exception is from the URL object that the security manager probably uses. after adding "file:" at the beginning of the string its fine but cannot find the config file.
there gain back to the question - what is the root context of the Configuration file to look for the file in an ejb-jar?
shai
21 years ago
thank you brian.
at the moment i am running some tests without the security manager installed and getting the following exception:
java.lang.SecurityException: no protocol: auth_config.config
is this because of permissions or because the file couldnt be found. the file is located in the root of the ejb-jar where some other properties files are located and found. where does the Configuration looks for the file? is there any governing rule as to what is the context for the Configuration, or does it depend on whichever is the root context?
thanks again
shai
21 years ago
hi
when testing a little jaas login module implementation as a stand alone program i normally pass the config file name just like any initial parameter using
-Djava.security.auth.login.config.
with web applications, when i dont have access to the starting parameters of the server,
will it be preferd to hard code the name of the file and set it like you set any property in the system, or store the name of the file in a properties or descriptor file? I guess its a matter of trading security(exposing file name) with flexibilty(use different file), where is the line?
when running with the security manager set, is there a restriction on a code executing System.getProperty(key) to check if the config file is set? could that throw a security exception? locally i tested and its file but am not sure if the on client's environment i could query this property or set it?
cheers
shai
21 years ago
thanks brian
yep that helped.
21 years ago
hello
just a quick question i am not sure about.
Do CallbackHandller implementations have to have a no argument constructor?
It makes sense to me that they dont, because you need a way to pass parameters to populate username/password etc.is that right?
thanks in advance
shai
21 years ago
hello
I did see few messages with such problem but none was replied...
We are trying to deploy our application on the client's environment
(Borland 4.5.1 on Solaris).
We have a problem with the ejb's deployment and to isolate the problem
we wrote different test jsps. We found that the lookups are fine and the container
actually gets the stubs alright, but when a method of this stub is executed a
java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 0[]
is thrown.
code:
...
<%
UserManagerHome userManagerHome;
UserManager userManager ;
String str = null;
try {
javax.naming.Context context = new javax.naming.InitialContext();
Object ref = context.lookup(JNDI_USERMANAGER);
//log.debug(thisClass + " got the ref " + ref);
userManagerHome = (UserManagerHome) javax.rmi.PortableRemoteObject.narrow(ref, UserManagerHome.class);
//log.debug(thisClass + " before calling create " + userManagerHome);

userManager = userManagerHome.create();

//log.debug(thisClass + " got the userManager " + userManager );
str = userManager.sayHello(); // this method should return "hello world" string

%>
OK got the String <%=str%><br>
<%
}
catch (javax.naming.NamingException e) {

%>
FAIL (NamingException) <br>
<%=e.getMessage()%><br>
<%
e.printStackTrace();
log.writeStackTrace(e);
}
catch (Exception e) {
%>
FAIL (Exception) <br>
<%=e.getMessage()%><br>
<%
e.printStackTrace();
log.writeStackTrace(e);
}

%>

log:

2002-07-26 06:01:34.672 Trace [Thread-10] SessionTest.jsp ==========started========= 2002/07/26 06:01:34
2002-07-26 06:01:34.689 DEBUG [Thread-10] SessionTest.jsp got the ref Stub[repository_id=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,key=PersistentId[repId=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,objectName=com/perceptionbe/crc/ejb/UserManager,poaName=/persistent],codebase=null]
2002-07-26 06:01:34.690 DEBUG [Thread-10] SessionTest.jsp before calling create Stub[repository_id=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,key=PersistentId[repId=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,objectName=com/perceptionbe/crc/ejb/UserManager,poaName=/persistent],codebase=null]
2002-07-26 06:01:34.695 DEBUG [Thread-10] SessionTest.jsp got the userManager Stub[repository_id=RMI:com.perceptionbe.crc.ejb.UserManager:0000000000000000,key=ServiceId[service=/EJB[crc]com\/perceptionbe\/crc\/ejb\/UserManager,id={4 bytes: (0)(0)(0)(2)}],codebase=null]
java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 0[]
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.inprise.vbroker.rmi.CORBA.UtilImpl.newInstance(UtilImpl.java:99)
at com.inprise.vbroker.rmi.CORBA.UtilImpl._mapSystemException(UtilImpl.java:368)
at com.inprise.vbroker.rmi.CORBA.UtilImpl.mapSystemException(UtilImpl.java:572)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
at com.perceptionbe.crc.ejb._UserManager_Stub.sayHello(_UserManager_Stub.java:272)
at _0002fSessionTest_0002ejspSessionTest_jsp_0._jspService(_0002fSessionTest_0002ejspSessionTest_jsp_0.java:119)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
at ...
few more points about it:
- The same code runs nicely on number of different environments ( NT/Linux , Borland/Orion etc..), which suggest it is an environment specific problem
- The same thing happens with Entity but then it happens on the Home's stub.
- From looking in the spec i realized that this exception is thrown by the container as a wrapper to "lower level" or
CORBA exception that occured or when the refered object does not exists.
- In the event_log i see that there is one session bean in READY state.
- looking in the stub's code where the exception thrown in line 272 shows that :

catch (org.omg.CORBA.SystemException ex) {
throw javax.rmi.CORBA.Util.mapSystemException(ex);
}
I doubt if it's anything to do with the deployment descriptors, could it?
What could have gone wrong that triggered the org.omg.CORBA.SystemException to begin with?
Could it be related to environment settings or configuration?
Has anyone faced this problem before?
Any ideas, sugestions or thoughts will be very appreciated.
Thanks
shai
[ August 05, 2002: Message edited by: shai koren ]
i think you can just paste it in the edit box.
the html is disabled which is fine but still we could see what you tries to do.
more importantly what is the error you are getting?
21 years ago
Ali
what do you mean doesnt work???
what error do you get
the basic syntax is
<a href="MyServlet?param1=value1&month=5&year=2002"> bla bla bla >/a>
have a look at your web.xml check that all information about the servlet is there.
<servlet>
<servlet-name>MyServlet</servlet-name>
<display-name>MyServlet</display-name>
<description>description </description>
<servlet-class>com.mycomp.project.servlets.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/MyServlet</url-pattern>
</servlet-mapping>
that's just a guess of course because we dont even know what error you get.
cheers
shai
21 years ago
yep misunderstood this one.
I thought it was in the results part...
the number of correct results actually helped me in my exam, bless that.
hi Sankar
1) yes, all multiple choices
2) no , only precentage
3) i didnt have such but it is in the objectives
cheers
shai