Aruna Jayabalu

Greenhorn
+ Follow
since Aug 09, 2011
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aruna Jayabalu

Hi,

In an excel when the cell format type is Accounting(with decimal values) and when the cell data is blank, then POI returns the cell object as null.

The cell object is returned as null only for Accounting type. For all other format type when cell does not have any value poi returns blank cell type.

Can you please suggest me a solution for this. The cell object should not be null even if it has blank value.

Or is there any way to identify the accounting format type in POI
8 years ago
Hi,

I am using CXF webservice. I am trying to access the published endpoint in the Interceptor class.

Endpoint ep= null;
Bus bus = CXFBusFactory.getDefaultBus();
ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
List<Server> servers = serverRegistry.getServers();
Server targetServer = null;
for (Server server : servers) {
targetServer = server;
String address = server.getEndpoint().getEndpointInfo().getAddress();
ep = server.getEndpoint();
logger.debug("Endpoint ******* "+ep);
logger.debug("Endpoint Info******* "+ep.getEndpointInfo());
}


The above code works fine and I am able get the endpoint object.
With the endpoint object when I try to access the method ep.getBinding()
I need to setMTOMEnabled property on the binding object.

SOAPBinding binding = (SOAPBinding)ep.getBinding();
binding.setMTOMEnabled(true);

I am getting class cast exception. Cannot cast org.apache.cxf.binding.soap.SoapBinding cannot be cast to javax.xml.ws.soap.SOAPBinding
It is expecting cxf.binding.soap.SoapBinding object. But there is no setMTOMEnabled in cxf SoapBinding.

Can you please suggest any solution for the above problem.

We have confirgured the below service factory in cxf-servlet.xml
<jaxws:serviceFactory>
<bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"/>
</jaxws:serviceFactory>

Will this create any problem?


Thanks,
Aruna.J



10 years ago
When I remove the mtom property in the configuration file and when I add @MTOM(enabled=true, threshold=1024)
in the endpoint class, then I am getting the content type as 'application/xop'.
But I want the content type as 'text/plain' for some of the services.
So can I disable this mtom on the method level?
10 years ago
Hi,

I have the MTOM property enabled in the configuration file.
But now I wanted the mtom property to change dynamically.
Please suggest on how to enable this mtom at class level?

Thanks,
Aruna.J

10 years ago
Below are the commands that I give in windows prompt

D:
cd proj\src\com\cts
set path=%path%;D:\jdk1.5.0_07\bin;
set classpath=%classpath;D:\proj\lib\*.jar

javac sendEmail.java

The compilation fails for sendEmail.java

sample error:
SendEmail.java:7: package javax.mail.internet does not exist
import javax.mail.internet.*;

Its not refferring mail.jar which is inside my proj lib folder.


10 years ago
I am trying to execute java files in windows command prompt.

Compilation fails because its not able to find mail.jar.
While executing the java files using eclipse mail.jar is automattically getting reffered from jboss lib folder.

Tried setting mail.jar in the classpath
and also tried including the mail.jar in jre lib folder. But still getting the same compilation error for the mail class.

Please share your suggestions.

Thanks,
Aruna.J
10 years ago
Your prepared statement usage is wrong..
You are trying to set 3 values for 2 parameters which is again wrong.

Just try like this

File file = new File("myimage.gif");
FileInputStream fis = new FileInputStream(file);
PreparedStatement ps =
conn.prepareStatement("insert into images values (?,?)");
ps.setString(1,file.getName());
ps.setBinaryStream(2,fis,(int)file.length());
ps.executeUpdate();
ps.close();
fis.close();

Change accordingly.

Thanks,
Aruna.J
stmt.setInt(1, sid);
stmt.setString(1,fin);

You are trying to set both sid and fin to the 1st parameter person_id.
This is the reason for the error. Change it to 2 and try once.


Thanks,
Aruna.J
\\10.234.34..\\"test folder"
dint not work..

But quotes for the entire path worked!!!

"\\10.234.34..\\test folder"


Thanks a lot!!!
10 years ago
What is the datatype of the image column in your database?
Check for the column size also..

Thanks,
Aruna.J
Hi,

Command is a String.. So its already enclosed within double quotes...
Even though meaning less, I even tried like this

String command= "net use K: \\\\10.234.34..\\"+"test folder"+ /USER:username password";
But no luck...
Have I understood your suggestion correctly?

Thanks,
Aruna.J

10 years ago
Hi all,

I was trying to map a remote ip to my machine in a java program..

String command= "net use K: \\\\10.234.34..\\test\\ /USER:username password";
Process output = Runtime.getRuntime().exec(command);

The above code works perfectly.
But the below command does'nt work. That's because of the space in the folder name.
String command= "net use K: \\\\10.234.34..\\test folder\\ /USER:username password";

Can you please suggest any solution for the above problem?

Thanks,
Aruna.J
10 years ago
Hello,

Can you please help me in getting a tooltip for a column in the below display table.
The data for the ticket description column will be too big, so I need to display the description as a tooltip... But im not sure how to achive this with display tables.
<td>
<display:table name="sessionScope.TicketUpdateForm.ticketUpdateList" id="tableUpdateList" >
<display:column property="ticketNumber" title="TicketNumber" />
<display:column property="ticketDesc" title="Ticket Description"/>
<display:column property="ticketStatus" title="TicketStatus"/>
</display:column>
</display:table>
</td>

Thanks in Advance.