|
Getting the following exception when building my TempProject Project through Maven.
[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.540s [INFO] Finished at: Fri Feb 15 16:00:09 CST 2013 [INFO] Final Memory: 28M/205M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project temp-project: Compilation failure: Compilation failure: [ERROR] \temp-project\src\main\java\com\temp.webapp\TestHandler.java:[18,29] cannot find symbol [ERROR] symbol : class TestService [ERROR] location: package com.test.services Although I have correctly added the artifact to dependencies section in the pom file as follows. <dependency> <groupId>com.test.service</groupId> <artifactId>testservice</artifactId> <version>1.27-SNAPSHOT</version> </dependency> Analysis: This error usually comes when the jar with specified version is not available in the central or local maven repository. I rebuilt the parent testservice with snapshot version 1.27-SNAPSHOT. And then tried to build my dependent temp-project again, I was able to build it successfully. Be careful while building snapshot versions, because Maven might try to refer it in central repository and fail. in such cases you can try running the build in offline mode to see if it works. |
Friday, February 15, 2013
Maven Build Failed : Cannot Find Symbol
Wednesday, January 2, 2013
WSSERVLET11: failed to parse runtime descriptor: java.lang.Error: Unresolved compilation problems
I am building a Maven Project in Eclipse and getting an exception while deploying the application on Weblogic 11G.
Stacktrace:
WSSERVLET13: JAX-WS context listener destroyed
2013-01-02 01:23:08.229 PM <id 14> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> [INFO] com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized : WSSERVLET12: JAX-WS context listener initializing
2013-01-02 01:23:08.233 PM <id 14> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> [SEVERE] com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized : WSSERVLET11: failed to parse runtime descriptor: java.lang.Error: Unresolved compilation problems:
The import test.company.TestClass cannot be resolved
Solution :
The issue is related to Eclipse workspace. If you are building the Maven Project from the within Eclipse. The classpath settings into local workspace might cause this issue. Clean up your workspace by resetting class paths, Java home, Maven path etc.
To check if its a workspace issue try building your Maven project from command prompt and deploy. I was able to successfully deploy my application after building it from command prompt.
Stacktrace:
WSSERVLET13: JAX-WS context listener destroyed
2013-01-02 01:23:08.229 PM <id 14> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> [INFO] com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized : WSSERVLET12: JAX-WS context listener initializing
2013-01-02 01:23:08.233 PM <id 14> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> [SEVERE] com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized : WSSERVLET11: failed to parse runtime descriptor: java.lang.Error: Unresolved compilation problems:
The import test.company.TestClass cannot be resolved
Solution :
The issue is related to Eclipse workspace. If you are building the Maven Project from the within Eclipse. The classpath settings into local workspace might cause this issue. Clean up your workspace by resetting class paths, Java home, Maven path etc.
To check if its a workspace issue try building your Maven project from command prompt and deploy. I was able to successfully deploy my application after building it from command prompt.
Friday, December 7, 2012
Whats Apache Wicket?
Whats Apache Wicket?
Answer : Apache wicket is a lightweight, component based web application framework.It separates the html or UI completely from Java code, which makes it convenient for designer and programmers to work independently, besides there is no confusing HTML messed up with Java code in it. Its far more convenient than using JSP's where we have to put scriptlets and expressions to use java objects in UI.
Wicket provides many advantages over frameworks like struts and it can be easily integrated with core frameworks like hibernate, spring etc.
Answer : Apache wicket is a lightweight, component based web application framework.It separates the html or UI completely from Java code, which makes it convenient for designer and programmers to work independently, besides there is no confusing HTML messed up with Java code in it. Its far more convenient than using JSP's where we have to put scriptlets and expressions to use java objects in UI.
Wicket provides many advantages over frameworks like struts and it can be easily integrated with core frameworks like hibernate, spring etc.
java.security.AccessControlException: access denied (java.io.FilePermission
I have a third party service which is being invoked from my J2ee Web application. I have created a remote client class to invoke this service but I am getting the folllowing exception while trying to access the Remote Client from Weblogic 11 G Server.
<at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)>
<at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)>
<at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)>
<at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)>
<at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)>
<at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)>
<at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)>
<at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)>
<Warning> <mngd-srvr> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1349369405197> <BEA-2000161> <[Enhance] An exception was thrown while attempting to perform class file transformation on "com.test.services.objects.TestObject":
java.security.AccessControlException: access denied (java.io.FilePermission /srvrs/installed/servers/mngd-srvr/tmp/_WL_user/test-ear/ykrfd6/APP-INF/lib/testdataobjects.jar read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.isDirectory(File.java:752)
at java.io.File.toURL(File.java:623)
Fix: It can be fixed by providing security policy in the Java Options in your setDomainEnv file under bin directory of web logic installation:
I placed a policy file with grant all security level and set its location in the java options.
1. Place grant_all.policy in your config folder:
grant {
permission java.security.AllPermission;
};
2. Add the following in JAVA_OPTIONS in setDomainEnv.
-Djava.security.policy=C:\weblogic\testdomain\config\grant_all.policy
<at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)>
<at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)>
<at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)>
<at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)>
<at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)>
<at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)>
<at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)>
<at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)>
<Warning> <mngd-srvr> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1349369405197> <BEA-2000161> <[Enhance] An exception was thrown while attempting to perform class file transformation on "com.test.services.objects.TestObject":
java.security.AccessControlException: access denied (java.io.FilePermission /srvrs/installed/servers/mngd-srvr/tmp/_WL_user/test-ear/ykrfd6/APP-INF/lib/testdataobjects.jar read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.isDirectory(File.java:752)
at java.io.File.toURL(File.java:623)
Fix: It can be fixed by providing security policy in the Java Options in your setDomainEnv file under bin directory of web logic installation:
I placed a policy file with grant all security level and set its location in the java options.
1. Place grant_all.policy in your config folder:
grant {
permission java.security.AllPermission;
};
2. Add the following in JAVA_OPTIONS in setDomainEnv.
-Djava.security.policy=C:\weblogic\testdomain\config\grant_all.policy
Tuesday, December 4, 2012
The setup requires the .NET Framework version 4.0.
I created a a setup Project for an application I created in .Net framework. But when installing it on a different machine it gave me following Error:
The setup requires the .NET Framework version 4.0. Please install the .NET Framework and run the setup again. The .NET Framework can be obtained from the web. Would you like to do this now?

I found out that it looks for a specific version of .Net framework if you kept the the default value for Version (in this case 4.0). To resolve this we need to set the version to 'Any' so it run just fine independent of any specific version.
Here is how we configure it.
Under the Setup Project click on the Detected Dependencies.
Click on the Microsoft .Net Framework. Go to Properties window
Change the Version property to 'Any' (Or as per your preference)
Build teh Setup Project again and retry.
The setup requires the .NET Framework version 4.0. Please install the .NET Framework and run the setup again. The .NET Framework can be obtained from the web. Would you like to do this now?
I found out that it looks for a specific version of .Net framework if you kept the the default value for Version (in this case 4.0). To resolve this we need to set the version to 'Any' so it run just fine independent of any specific version.
Here is how we configure it.
Under the Setup Project click on the Detected Dependencies.
Click on the Microsoft .Net Framework. Go to Properties window
Change the Version property to 'Any' (Or as per your preference)
Build teh Setup Project again and retry.
Monday, November 12, 2012
vb .Net null check for objects
How to check Null objects in VB.Net?
Solution:
If IsNothing(myObject) Then
' Some Code
End If
Solution:
If IsNothing(myObject) Then
' Some Code
End If
Thursday, November 8, 2012
Creating Public Synonym in Oracle
In Oracle we can create the public synonyms for the tables which users of other schema can refer to without specifying any schema name. Its an alternative name for data objects.
This is specifically useful when we are creating a generic script and do not want it to be schema specific.
For example the table called "employee" in the following query can be accessed without having to prefix the table name with the schema named testschema:
create or replace public synonym employee for testschema.employee ;
To drop the synonym use the following :
drop public synonym employee;
Synonyms can also be used for views, sequences, stored procedures, and other database objects.
This is specifically useful when we are creating a generic script and do not want it to be schema specific.
For example the table called "employee" in the following query can be accessed without having to prefix the table name with the schema named testschema:
create or replace public synonym employee for testschema.employee ;
To drop the synonym use the following :
drop public synonym employee;
Synonyms can also be used for views, sequences, stored procedures, and other database objects.
Subscribe to:
Posts (Atom)