find /c /v "~`!@#$%^&*()_+" file.txtIt'll give an output like this :-
---------- file.txt: 943526
Dubito, ergo cogito, ergo sum.
find /c /v "~`!@#$%^&*()_+" file.txtIt'll give an output like this :-
CLASSPATH=.:../lib/junit.jar:../lib/weblogic.jar:../lib/ojdbc6.jar
# Convert paths to help cygwin see Classpaths
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
java -classpath "$CLASSPATH" com.test.PreLoadTester
$DOMAIN_HOME/tmp/_WL_user/I recently ran into this issue and it gave me a couple of sleepless nights.myApplication/
.class.getProtectionDomain().getCodeSource().getLocation();
$DOMAIN_HOME/servers/tmp/_WL_user/ myApplication /ub48zr/war/WEB-INF/lib/ myOldJARFile .jar
/app/home/myUser/
print '*** WEBLOGIC : START ***'
print 'connecting to admin server....'
connect( 'weblogic', 'weblogic', 't3://localhost:8001', adminServerName='AdminServer' )
print 'stopping and undeploying ....'
stopApplication('myApplication')
undeploy('myApplication')
print 'deploying....'
deploy('myApplication', '/app/home/myUser/myApplication.ear', targets='AdminServer')
startApplication('FoundationSearch')
print 'disconnecting from admin server....'
disconnect()
exit()
print '*** WEBLOGIC : STOP ***'
execfile('myApp.py')
Error is: 'weblogic.management.DeploymentException:The error occurs when the WebLogic Server is unable to locate the EAR file. The common causes for the EAR file could be :-
[Deployer:149003]Unable to access application source information in
'/home/bea/bea/user_projects/domains/myDomain/servers/myServer/stage
app/app.war' for application 'roller'. The specific error is:
[Deployer:149158]No application files exist at
'/home/bea/bea/user_projects/domains/my/servers/myServer/stage
appapp.war'
Set whether environment properties should be cached between requsts for anonymous environment. Default is true; setting this property to false causes the environment Hashmap to be rebuilt from the current property settings of this instance between each request for an anonymous environment.
- spring-ldap-core-tiger-x.x.jar
- Commons Logging
- Commons Lang
- Commons Pool
- spring-beans
- spring-core
- spring-context
- spring-jdbc
- spring-tx
- ldapbp
< ?xml version="1.0" encoding="UTF-8"? >3. Write any utility classes you may need.
< !DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd" >
<>
< !-- The Spring LDAP Context Source Configuration. The information provided here is used to create an instance of InitialLdapContext -- >
< id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
< name="url" value="ldap://ecmser.idc.oracle.com:389">
< name="base" value="cn=Users,dc=idc,dc=oracle,dc=com">
< name="userDn" value="cn=orcladmin">
< name="password" value="allstate1">
< /bean >
< !-- The Spring LDAP Template executes tcore LDAP functionalities. It requires the Context Source for its operations. -- >
< id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
< ref="contextSource">
< /bean >
< !-- Our User Bean that makes uses of the pre-configured Spring LDAP Template-- >
< id="user" class="com.org.sandeep.dao.impl.UserDAOImpl">
< name="ldapTemplate" ref="ldapTemplate">
< /bean >
< /beans >
package com.org.sandeep.util;
public interface UserConstants
{
String FIRST_NAME = "cn";
String LAST_NAME = "sn";
String BLANK = "";
String OBJECT_CLASS = "objectclass";
String PERSON = "person";
}
public class UserBean
{
private String firstName;
private String lastName;
public UserBean()
{
}
public UserBean(String firstName,String lastName)
{
this.firstName = firstName;
this.lastName = lastName;
}
public void setFirstName(String firstName)
{
this.firstName = firstName;
}
public String getFirstName()
{
return firstName;
}
public void setLastName(String lastName)
{
this.lastName = lastName;
}
public String getLastName()
{
return lastName;
}
public String toString()
{
return firstName + " : "+lastName;
}
}
package com.org.sandeep.mapper;
import com.org.sandeep.bean.UserBean;
import com.org.sandeep.util.UserConstants;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import org.springframework.ldap.core.AttributesMapper;
public class UserMapper implements AttributesMapper
{
public Object mapFromAttributes(Attributes attributes)
{
UserBean userBean = null;
String firstName = null;
String lastName = null;
try
{
firstName = (String)attributes.get(UserConstants.FIRST_NAME).get();
lastName = (String)attributes.get(UserConstants.LAST_NAME ).get();
}
catch (NamingException objNamingException)
{
objNamingException.printStackTrace();
}
if ( firstName != null || lastName != null )
{
userBean = new UserBean(firstName,lastName);
}
return userBean;
}
}
package com.org.sandeep.dao;Next, we need an implementation class that uses the interface :-
import com.org.sandeep.bean.UserBean;
import java.util.List;
public interface UserDAO
{
public List get(UserBean user);
public void add(UserBean user);
public void modify(UserBean user);
public void remove(UserBean user);
}
package com.org.sandeep.dao.impl;
import com.org.sandeep.bean.UserBean;
import com.org.sandeep.dao.UserDAO;
import com.org.sandeep.mapper.UserMapper;
import com.org.sandeep.util.UserConstants;
import java.util.List;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
import org.springframework.ldap.core.DistinguishedName;
import org.springframework.ldap.core.LdapTemplate;
import org.springframework.ldap.filter.AndFilter;
import org.springframework.ldap.filter.EqualsFilter;
public class UserDAOImpl implements UserDAO
{
private LdapTemplate ldapTemplate;
public UserDAOImpl()
{
}
public void setLdapTemplate(LdapTemplate ldapTemplate)
{
this.ldapTemplate = ldapTemplate;
}
public List get(UserBean user)
{
String firstName = null;
String lastName = null;
AndFilter andFilter = null;
firstName = user.getFirstName();
lastName = user.getLastName();
andFilter = new AndFilter();
andFilter.and(new EqualsFilter(UserConstants.OBJECT_CLASS,UserConstants.PERSON));
andFilter.and(new EqualsFilter(UserConstants.FIRST_NAME,firstName));
andFilter.and(new EqualsFilter(UserConstants.LAST_NAME,lastName));
return ldapTemplate.search(UserConstants.BLANK, andFilter.encode(),new UserMapper());
}
public void add(UserBean user)
{
Attributes userAttributes = null;
BasicAttribute userBasicAttribute = null;
DistinguishedName userDN = null;
userAttributes = new BasicAttributes();
userBasicAttribute = new BasicAttribute(UserConstants.OBJECT_CLASS);
userBasicAttribute.add(UserConstants.PERSON);
userAttributes.put(userBasicAttribute);
userAttributes.put(UserConstants.FIRST_NAME, user.getFirstName());
userAttributes.put(UserConstants.LAST_NAME, user.getLastName());
userDN = new DistinguishedName(UserConstants.BLANK);
userDN.add(UserConstants.FIRST_NAME, user.getFirstName());
ldapTemplate.bind(userDN, null, userAttributes);
}
public void modify(UserBean user)
{
Attributes userAttributes = null;
BasicAttribute userBasicAttribute = null;
DistinguishedName userDN = null;
userAttributes = new BasicAttributes();
userBasicAttribute = new BasicAttribute(UserConstants.OBJECT_CLASS);
userBasicAttribute.add(UserConstants.PERSON);
userAttributes.put(userBasicAttribute);
userAttributes.put(UserConstants.FIRST_NAME, user.getFirstName());
userAttributes.put(UserConstants.LAST_NAME, user.getLastName());
userDN = new DistinguishedName(UserConstants.BLANK);
userDN.add(UserConstants.FIRST_NAME, user.getLastName());
ldapTemplate.rebind(userDN, null, userAttributes);
}
public void remove(UserBean user)
{
DistinguishedName userDN = new DistinguishedName(UserConstants.BLANK);
userDN.add(UserConstants.FIRST_NAME, user.getFirstName());
ldapTemplate.unbind(userDN);
}
}
package com.org.sandeep.client;
import com.org.sandeep.bean.UserBean;
import com.org.sandeep.dao.UserDAO;
import java.util.List;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.dao.DataAccessException;
public class UserClient
{
public static void main(String[] args)
{
try
{
Resource resource = new ClassPathResource("applicationContext.xml");
BeanFactory factory = new XmlBeanFactory(resource);
UserDAO userDAO = (UserDAO)factory.getBean("user");
UserBean userBean = new UserBean("Sandeep","Seshan");
userDAO.add(userBean);
System.out.println("Done");
List userList = userDAO.get(userBean);
System.out.println("User "+userList);
userDAO.remove(userBean);
System.out.println("Done & Deleted");
}
catch (DataAccessException objDataAccessException )
{
objDataAccessException .printStackTrace();
}
}
}
Rajesh Setty ( of the LifeBeyondCode Blog fame ) has decided to give away the PDF version one of his famous books - Beyond Code - FREE as a ThanksGiving gift to all his readers !The news will definitely be stale by now, but I want to post this note on my blog for those who haven't caught the wave yet.
1. Right click on the Project & select the “Project Properties” option.
2. You can see the “Project Properties window.
3. Select the “Libraries” option. You can see the various configuration options for Project Libraries.
4. Click on the “Add Library” button. You can see the “Add Library” window.
5. Select “JSP Runtime” from the list of libraries & click on the “Ok” button.
6. “Make” / “Rebuild” your project.
7. You can see that you no longer see this error.
1. Click on the “Tools” option in the Jdeveloper Menu.
2. Select the “Project Properties” option from the drop down.
You can see the “Project Properties” Window.
3. Click on the “+” in the “Web Application” section to expand the options.
4. You can see the “HTML Root Directory” option.
5. Specify the Root Directory of your JSP Pages here & click on the Ok button.
6. “Make” or “ReBuild” your project now.
7. You can notice that you no longer see this error.