This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!

Aditya Prasad

Greenhorn
+ Follow
since Sep 02, 2004
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 Aditya Prasad

Hi All

My application is deployed in AIX.The java code for printing is not working.
I am reading a file which contains the printer configuration and based on the availability either the local printer or a remote printer will be accessed.The code works fine in windows. But in UNIX environment i don't know wat's wrong with the code. Can anyone help me out in this regard ?

what can be the printer path when we try to access from a unix environment.
If you try from windows it will be \\172.20.162.216\Printer Name

Can anyone of you help me ??

Thanx in Advance..


Here is my code

------------------------
The printer configuration files is
//Select 1 to print without ip address. And use 2 to print using ip address
1:lpt1
2:172.20.170.94 omestic Projects-3FS
------------------------------
My java code :-


public PrintManager(String st[])
{
this();
System.out.println("PrintManager: Inside 3rd const: after calling this():as: ");
name = st;

String stline ="";
StringTokenizer stok = null;
try {
File file = new File("/ibs/PrintConfig.cfg");//Unix environment
BufferedReader br = new BufferedReader(new FileReader(file));

while((stline=br.readLine())!=null)
{
if(!stline.startsWith("//"))
{
stok=new StringTokenizer(stline,":");
stFlag = stok.nextToken();
if(stFlag.equals("1"))
{
stPrintString = stok.nextToken();
}
else if(stFlag.equals("2"))
{
stPrinterIP = (stok.nextToken());
stPrinterName = (stok.nextToken());
stPrinterPath = "\\\\"+stPrinterIP +"\\"+stPrinterName ;
System.out.println(" Printer Path is :" + stPrinterPath );

}


}
}
}catch (Exception e)
{
System.out.println ("Exception while printing :"+e);
}

}
17 years ago

Originally posted by jaikar ss:
How to create new context or Modify in WebLogic8.1 has that we do in Tomcat 5.0



I too encountered the same problem once and i was through

open your .ear file in weblogic builder.select the .war component and in the right plane click context path. there you can modify or add a new context or modify an existing one if any.


let me know if it works for you.
17 years ago
Hi All

we have weblogic8.1 installed in two different machines.
Now i want to use one machine as web server and the other as Appserver.
And any request that hits the webserver should be redirected to the Appserver.i.e. i want to separate the webserver and appserver of weblogic and put them into two different machines.
Can anyone let me know how do i do this.


This is a little bit urgent.

Pls mark a copy of your answer to aditya.prasad@tcs.com as i may not visit this forum again.


Thanks in Advance
Aditya
17 years ago
Hi All
I am new to weblogic workshop and i am trying to build a sample web application.
My application contains jsp,servlet,ejb and other class files.

The flow in the application should be like this :
jsp---->servlet---->EJB--->DBClas.
I created a jsp in workshop but couldn't create a servlet. How do i create a servlet and pass the control from the jsp to the servlet and then to EJB ?
can anyone help me regarding this ? Any links or examples will be of great help to me.


Regards
Aditya
+91-98402--63222
17 years ago
Hi All
I am new to weblogic workshop and i want to build a sample web application.
I want jsp,servlet,EJB and other classes to be there in my application.

Can anyone tell me how do i add servlet and EJB ? Also any link tat provides detailed steps to use weblogic workshop will be of great help.

Regards
Aditya
17 years ago
Thank u very much scott.
Yeah i am doing the same way in my project.
But what i posted is just a sample program to connect to oracle.
I had a problem in my project and so i am trying with this sample program.

thanx a lot
Regards

aditya
17 years ago
Thank u very much for your reply.
when i installed weblogic8.1 there are two versions of jdk's installed.
One is jdk141_05 and the other jrockit81sp2_141_05. But i started my server in development mode and so i used jdk141_05.
Also when i set the path and the classpath i did it this way

c:\>path=;%path%;c:\bea\jdk141_05\bin;
c:\>classpath=;%classpath%;c:\bea\jdk141_05\jre\lib\rt.jar.

I believe that what i did is correct. Pls correct me if i am wrong.

Regards
Aditya
17 years ago
I am working in weblogic 8.1 and my backend is Oracle. I am using jdk141_05.
My problem is i have a program connecting to the Oracle Database.
when i compiled it gave no errror. But when i execute it it says.
"Exception in thread "main" java.lang.NoClassDefFoundError: javax/security/auth/c
allback/CallbackHandler". I inclued rt.jar in the classpath.
But now it says.
"Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/securit
y/auth/callback/CallbackHandler (Unsupported major.minor version 48.0)".

Can anyone help me out solving this problem ??
I am also appending my program.
In this program if i include the commented code (/*DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc racle:thin:IndianBank/indianbank@172.20.169.130:1521:ibank","IndianBank","indianbank");
*/)
and remove the "conn = ds.getConnection("IndianBank","indianbank")" it works fine.

But if i do the other way it's giving me error while executing.
Any of your help will be highly appreciated.

Regards
Aditya Naga Prasad


-------------------------------------------------------------------------




import java.util.*;
import javax.naming.*;
import java.sql.*;
import javax.sql.*;
//import java.security.*;
/**
* Insert the type's description here.
* Creation date: (9/7/2004 6:34:03 PM)
* @author: Administrator
*/
public class TestClass {
/**
* TestClass constructor comment.
*/
public TestClass()
{
}

/**
* Insert the method's description here.
* Creation date: (9/7/2004 6:46:22 PM)
* @param args java.lang.String[]
*/
public static void main(String[] args) {

System.out.println("Entered the main");
String dsLookUp = "jdbc/ibs";
DataSource ds = null;
String initCtxt = "weblogic.jndi.WLInitialContextFactory";
Connection conn = null;
Context ctx = null;

try
{
Properties prop=new Properties();
prop.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, initCtxt);
ctx = new InitialContext(prop);
ds = (DataSource)ctx.lookup(dsLookUp);
}
catch (Exception ex)
{
ex.printStackTrace();
}

try
{
conn = ds.getConnection("IndianBank","indianbank");
/*DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc racle:thin:IndianBank/indianbank@172.20.169.130:1521:ibank","IndianBank","indianbank");
*/

}
catch (SQLException ex)
{
System.out.println("IBSDbUtil : getDbConnection: SQLException: "+ex);
}
catch (Exception ex)
{
System.out.println("IBSDbUtil : getDbConnection: Exception: "+ex);
}

}
}
17 years ago
Hi
Donno whether it'll help u or not.
The best option i feel is to use frames.
In that case i don't think the URL will change when u move from one screen to the other.




Originally posted by Kalluru Uma:
Hi,
Please have a look at this link for a detailed description of my problem.

http://theserverside.com/news/thread.tss?thread_id=28381

Thanks
Uma

17 years ago
Thank u very much Meka Toka
i changed to the directory that u told.i.e. C:\bea\weblogic81\server\lib> and then i executed the java command.
But i still get an error.
pls look at what i did and correct me if i am wrong. I am very much new to J2EE and also to weblogic.

C:\bea\weblogic81\server\lib>java -classpath weblogic.jar weblogic.appc myApplic
ation.ear
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/logging/Lev
el
at weblogic.j2ee.J2EELogger.logAppcSourceArgDoesNotExistLoggable(J2EELog
ger.java:2142)
at weblogic.appc.prepareInput(appc.java:233)
at weblogic.appc.runBody(appc.java:181)
at weblogic.utils.compiler.Tool.run(Tool.java:146)
at weblogic.utils.compiler.Tool.run(Tool.java:103)
at weblogic.appc.main(appc.java:1028)



Originally posted by meka toka:
when i click the 'ejb-jar.xml' and 'weblogic-ejb-jar.xml' link it says "could not read descriptor file".

The reason for this is that you are deploying an ear that is generated by WSAD and to my knowledge WSAD doesnt generate descriptor files specific for Weblogic. So when you package your application you might have the generic J2EE descriptors which are application.xml, ejb-jar.xml and web.xml

i tried the command java -classpath weblogic.jar weblogic.appc UBITEST31082004.ear (UBITEST31082004.ear is my application ear file) it says weblogic/appc not found.

Where are you running the java command from ? You need to run this from the directory where the weblogic.jar is present or give the exact path where the jar file is present

You can find weblogic.jar in the location $BEA_HOME$/$WL_SERVER$/server/lib

I am assuming that in your case the location will be c:\bea\weblogic81\server\lib\weblogc.jar

17 years ago
Thanx a lot Mr. makiey
But can u pls help me how do i test my ear file with the help of weblogic.appc tool:
i tried the command java -classpath weblogic.jar weblogic.appc UBITEST31082004.ear (ibs is my application ear file) it says weblogic/appc not found.
Can u pls tell me what should i do ?
Here is my config.xml.(this file is in c\bea\user_projects\domains\Mydomainname)


<?xml version="1.0" encoding="UTF-8" ?>
- <Domain ConfigurationVersion="8.1.2.0" Name="ibs">
- <Server ListenAddress="" ListenPort="7001" Name="myserver" NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy" ServerVersion="8.1.2.0" XMLEntityCache="XMLCacheMBean_myserver">
<SSL Enabled="false" HostnameVerificationIgnored="false" IdentityAndTrustLocations="KeyStores" Name="myserver" />
</Server>
<JMSFileStore Directory="rmfilestore" Name="FileStore" />
<WSReliableDeliveryPolicy DefaultRetryCount="10" DefaultTimeToLive="60000" Name="RMDefaultPolicy" Store="FileStore" />
<Security Name="ibs" PasswordPolicy="wl_default_password_policy" Realm="wl_default_realm" RealmSetup="true" />
<EmbeddedLDAP Credential="{3DES}UnY7i2T3d1o6GxvTKQsc6g97nKkMbnTBX7s96Kr0PnU=" Name="ibs" />
<SecurityConfiguration Credential="{3DES}d8Sb8z21tNYC9kjFJLh0qzWqk4pG74srx9EgUgvDOztWLBMC0nPe+xS9cZvE1PWStdnONijNQ3UTn5p5cPCoQjpLQZEVIspO" Name="ibs" RealmBootStrapVersion="1" />
<Realm FileRealm="wl_default_file_realm" Name="wl_default_realm" />
<FileRealm Name="wl_default_file_realm" />
<PasswordPolicy Name="wl_default_password_policy" />
- <JMSServer Name="WSStoreForwardInternalJMSServermyserver" Store="FileStore" Targets="myserver">
<JMSQueue CreationTime="1094167869968" JNDIName="jms.internal.queue.WSStoreForwardQueue" JNDINameReplicated="false" Name="WSInternaljms.internal.queue.WSStoreForwardQueuemyserver" />
<JMSQueue CreationTime="1094167870203" JNDIName="jms.internal.queue.WSDupsEliminationHistoryQueue" JNDINameReplicated="false" Name="WSInternaljms.internal.queue.WSDupsEliminationHistoryQueuemyserver" />
</JMSServer>
<XMLEntityCache Name="XMLCacheMBean_myserver" />
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver" Name="ibs" Password="{3DES}3dpNMvs48jE=" Properties="user=ebank" Targets="myserver" TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc racle:thin:@172.20.169.130:1521:ibank" />
<JDBCTxDataSource JNDIName="jdbc/ibs" Name="jdbc/ibs" PoolName="ibs" Targets="myserver" />
- <Application Name="UBITest31082004" Path="C:\Executables\EAR\UBITest31082004.ear" StagingMode="nostage" TwoPhase="true">
<EJBComponent Name="UBIEJB.jar" Targets="myserver" URI="UBIEJB.jar" />
<WebAppComponent Name="/" Targets="myserver" URI="UBIWeb.war" />
</Application>
</Domain>


I am breaking my head over this for more than a week.Any sort of help would be highly appreciated.

Regards
Aditya








Originally posted by makiey bartsch:
hi,

please try to test your ear file with a help of weblogic.appc tool:
java -classpath weblogic.jar weblogic.appc myApplication.ear

it will show you any errors/problems/missing descriptors etc.

greetings,
makiey

17 years ago
Hi All
I have a web application and it's time i go for deployment.
we use Oracle as our back end.
i am using .ear file for deploying and this is generated in WSAD.
Now i want to deploy this in weblogic8.1
while configuring the connection pool, my Database type is oracle and i selected oracle driver(thin).i.e. my driver class name is Oracle.jdbc.xa.client.oracleXA.

The JNDI name that i use in my application is JDBC/IBS (IBS stands for internet banking service and this is my application) and the JNDI name that i specified for the Datasource is also JDBC/IBS.

Now after deploying the application and when i login to the page, i get
javax.naming.NameNotFoundException : while trying to lookup "ejbobject" didn't find subcontext resolved.......
the same error is showed for all the ejb objects that i use in my application.
Down these error's it says login user 'someusername' failed to be authenticated.

when i click the 'ejb-jar.xml' and 'weblogic-ejb-jar.xml' link it says "could not read descriptor file".


Can any one help me regarding this deployment in weblogic 8.1 ?
It's a bit urgent.I am very much new to this.

thanx in advance
Aditya
17 years ago
Hi All
I have a web application and it's time i go for deployment.
we use Oracle as our back end.
i am using .ear file for deploying and this is generated in WSAD.
Now i want to deploy this in weblogic8.1
while configuring the connection pool, my Database type is oracle and i selected oracle driver(thin).i.e. my driver class name is Oracle.jdbc.xa.client.oracleXA.

The JNDI name that i use in my application is JDBC/IBS (IBS stands for internet banking service and this is my application) and the JNDI name that i specified for the Datasource is also JDBC/IBS.

Now after deploying the application and when i login to the page, i get
javax.naming.NameNotFoundException : while trying to lookup "ejbobject" didn't find subcontext resolved.......
the same error is showed for all the ejb objects that i use in my application.
Down these error's it says login user 'someusername' failed to be authenticated.

when i click the 'ejb-jar.xml' and 'weblogic-ejb-jar.xml' link it says "could not read descriptor file".


Can any one help me regarding this deployment in weblogic 8.1 ?
It's a bit urgent.I am very much new to this.

thanx in advance
Aditya
17 years ago