I repeatedly get a strange error with my application.
After a restart it tells me IOException:Profile could not be activated
when I start the application the next time. (I´m using Florentines apn
detection algorithm). And it doesn´t matter how many restarts I make,
I always get this.
Then I removed the SIM card, inserted it into a new phone and dialed
to a friend, just to check that the sim was working, and it was :-)
So I put the SIM back into the TC65, runs the same application as
before, and now it works just fine :-(
Any idea of what might be causing this? Are there any regulations that
I need to make a call once in a while or so? Or do I need to
disconnect a longer period of time when it restarts?
br
Thomas Hermansson
--
You received this message because you are subscribed to the Google Groups "Cinterion Java enabled chips support" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javacint+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javacint?hl=en.
Hi,I hope both of you are still here in the group, or somebody else is here who is familiar with this strange error.I experience the same error "Profile could not be activated", with two differences: I use TC65i-X, and I got "+CEER: 0,0,0" response to the execution of "AT+CEER" command after I caught the IOException. So I don't have any error code, what I can use to determine what the real problem is. I've read about a few problems what may cause this error, for example:- GPRS hasn't been initialized at the time of sending the request- HttpConnection wasn't closed after the previous request- Timeout- Connection errorHere is the shortened code:public void sendRequest( Request request )
{
OutputStream os = null;
HttpConnection conn = null;
Long transactionId = null;
try
{
byte[] requestXml = buildRequestXML( request );
conn = buildHttpConnection( requestUrl );
os = conn.openOutputStream();
os.write( requestXml );
transactionId = processResponse( conn );
}
catch ( IOException e )
{
new QueryLastErrorDetailsCommand().execute();
setupNetwork();
}
catch ( Exception e )
{
ExceptionHandler.handleException( "An exception occured while sending the request: ", e, logger );
}
finally
{
try
{
os.close();
conn.close();
}
catch ( Exception e )
{
ExceptionHandler.handleException( "An exception occured while closing resources: ", e, logger );
}
}
}private HttpConnection buildHttpConnection( String requestUrl ) throws IOException{HttpConnection conn = ( HttpConnection ) Connector.open( requestUrl );conn.setRequestMethod( HttpConnection.POST );conn.setRequestProperty( "Content-Language", "en-US" );conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded" );return conn;}Everything seems to be clear and it works fine for a while. But once it fails, it constantly stays in the faulty state and I always get the cited IOException. Additionally, what I also experience is running out of the free memory at each attempt, and I can't close neither the OutputStream nor the HttpConnection.I tried to re-initialize the GPRS connection, waiting for 60 seconds after an exception, but nothing has helped, I still get the exception, and the attempts eat my memory.Does anybody have the same problem, or has the solution?Thanks,Zoltán Baranyi
try {
if ( os != null )
os.close();
}
catch ( Exception e ) {
ExceptionHandler.handleException( "An exception occured while closing the output stream: ", e, logger );
}
try {
if ( conn != null )
conn.close();
}
catch ( Exception e ) {
ExceptionHandler.handleException( "An exception occured while closing the http connection: ", e, logger );
}
--